Commit graph

761 commits

Author SHA1 Message Date
Daniel Rudolf 00603f61fc
Add integrated 404 Not Found page
Resolves #299
2016-10-01 18:58:04 +02:00
Daniel Rudolf a74db1ddbb
Add Pico::filterVariable() method
This method can be used to validate and filter input data and can be called via `Pico::getUrlParameter()` (URL GET parameters) and `Pico::getFormParameter()` (HTTP POST parameters). `Pico::filterVariable()` is basically a wrapper for PHP's `filter_var()` function with various compatibility extensions to allow theme developers to use its functionality in Twig templates. Therefore Pico 1.1 adds the `url_param` (`Pico::getUrlParameter()`) and `form_param` (`Pico::getFormParameter()`) Twig functions.

Resolves #305
2016-09-17 20:10:24 +02:00
Daniel Rudolf 0b4099fdb0
Improve class docs 2016-09-17 20:02:49 +02:00
Daniel Rudolf f73c9622b8
Fix Pico::evaluateRequestUrl(): PHP's built-in webserver doesn't always set QUERY_STRING 2016-09-17 20:02:29 +02:00
Daniel Rudolf f8e6d4fbd1
Update CHANGELOG.md 2016-09-17 16:51:00 +02:00
Daniel Rudolf cdba66b951
Inline docs: Use Twig's array literal rather than the split filter for sort_by 2016-09-17 16:50:36 +02:00
Daniel Rudolf dedb09d3e9
iloveopensource.io is out of service
Don't know what happened and don't know whether Pico's new owner is using it anyway...
2016-09-02 22:54:24 +02:00
Daniel Rudolf 998ce379e1
Update _build/create-release-archive.sh 2016-08-24 21:50:03 +02:00
Daniel Rudolf 08fd7465bc
Update CHANGELOG.md 2016-08-24 21:41:54 +02:00
Daniel Rudolf f7dc9cb47c
Default theme: Add flexbox CSS rules
I was sure that I've added that some time ago... Strange... Thanks to IRC user tony1
2016-08-24 21:37:29 +02:00
Daniel Rudolf f9f998af65
Default theme: Fix default container width 2016-08-03 18:35:41 +02:00
Daniel Rudolf 73a0b40f72
Default theme: Fix hr element theming in IE8+ 2016-08-03 17:56:11 +02:00
Daniel Rudolf 65a37f1464
Default theme: Add basic support for IE8
Forms still look broken and I definitly will *NOT* fix that. We don't support IE8 officially!

+ some minor improvements
2016-08-03 17:16:34 +02:00
Daniel Rudolf 51e8f31692
Default theme: Improve form theming 2016-08-03 02:01:44 +02:00
Daniel Rudolf eef41698f1
Default theme: Add basic form themeing 2016-08-03 01:01:20 +02:00
Daniel Rudolf d143105279
Default theme (JavaScript): Fix coding standard 2016-08-02 23:42:48 +02:00
Daniel Rudolf 518d9b5aef
Default theme: Fix rem unit 2016-08-02 22:49:53 +02:00
Daniel Rudolf 432710c400
Default theme: Improve compatibility with older browsers
Namely (it could hardly be different...) Internet Explorer - even IE11 still causes trouble. The default theme now supports IE9+, even older browsers will present broken markup. The sliding animation works with IE10+ (however, it is still usable, there's just no nice animation).

Furthermore this commit heavily improves the sliding process by allowing to abort the animation. I've updated Pico's screenshot in the , too.
2016-08-02 21:50:48 +02:00
Daniel Rudolf 6a13915f15
Refactor default theme 2016-08-02 02:31:20 +02:00
Daniel Rudolf 39d4a7c2ae
Hotfix for responsiveness of default theme
I'll completely refactor the default theme for Pico 1.1... The CSS is just broken.
2016-08-01 16:51:22 +02:00
Daniel Rudolf 2dada502b5
Update README.md
As suggested by @smcdougall (https://github.com/picocms/Pico/pull/352#issuecomment-235573290)
2016-07-27 15:10:10 +02:00
Daniel Rudolf 827be2cb9c
Build System: Refactor source code and release archive creation
Resolves #313
2016-07-24 23:35:10 +02:00
Daniel Rudolf 1bf157049a
README.md: Link to about page instead of landing page 2016-07-24 20:15:35 +02:00
Daniel Rudolf 21bd18bcf0
Replace Pico::discoverRequestFile() with public Pico::resolveFilePath()
This allows plugins (e.g. PicoAdmin) to safely resolve file paths without the need of re-implementing the method.
2016-07-20 19:23:19 +02:00
Daniel Rudolf e27be7a80f
Merge branch 'master' into pico-1.1 2016-07-15 03:23:09 +02:00
Daniel Rudolf fb4bdfe1fc
Fix Pico::parseFileMeta() for non-YAML 1-liners
\Symfony\Component\Yaml\Parser::parse() returns the unchanged value when a 1-liner string which is no valid YAML is passed. Assume this string to be the page title. Thus the following page will work now:

```
---
This is the title
---

# Example page

{{ meta.title }} is going to be "This is the title" - or "%meta.title%" == "This is the title".
```
2016-07-15 03:13:58 +02:00
Daniel Rudolf aa1bc077a7
Add $dropIndex parameter to Pico::getPageUrl() method
This allows one to prevent Pico from removing the last "index" path component. Example use case: Pico's official admin plugin. We must distinguish between "content/sub.md" and "content/sub/index.md", otherwise it wouldn't be possible to edit both pages.
2016-07-14 00:24:06 +02:00
Daniel Rudolf 848e28b7e6
Declare Pico::getFiles() public
This might be a useful helper method for plugins (e.g. PicoAdmin)
2016-07-14 00:20:22 +02:00
Daniel Rudolf bf1663cc1c
Add Pico's social icons to default theme 2016-07-06 01:26:29 +02:00
Daniel Rudolf 81dddc94cf
Revert "Update composer.json: Use Symfony YAML 3.1 and later"
Symfony YAML >= 3.0 requires PHP >= 5.5.9 and we're currently not planning to raise Pico's PHP requirement.

This reverts commit f251bc83ec.
2016-06-20 22:46:57 +02:00
Daniel Rudolf f251bc83ec
Update composer.json: Use Symfony YAML 3.1 and later 2016-06-20 22:38:24 +02:00
Daniel Rudolf ddf3da0391
Merge branch 'master' into pico-1.1
Conflicts:
	.htaccess
	config/config.php.template
	content-sample/index.md
	lib/Pico.php
2016-06-18 20:23:23 +02:00
Daniel Rudolf eeb43e131f
Pico::prepareFileContent(): Declare $variables variable 2016-06-18 20:19:16 +02:00
Daniel Rudolf 94279c57f8
Improve phpDocs class docs 2016-05-23 15:13:56 +02:00
Daniel Rudolf 79bb543c46
Version 1.0.3
```
* [Changed] Improve documentation
* [Changed] Heavily extend nginx configuration docs
* [Changed] Add CSS rules for definition lists to default theme
* [Changed] Always use `on404Content...` execution path when serving a `404.md`
* [Changed] Deny access to `.git` directory, `CHANGELOG.md`, `composer.json`
            and `composer.lock` (`.htaccess` file)
* [Changed] Use Pico's `404.md` to deny access to `.git`, `config`, `content`,
*           `content-sample`, `lib` and `vendor` dirs (`.htaccess` file)
* [Fixed] #342: Fix responsiveness in default theme
* [Fixed] #344: Improve HTTPS detection with proxies
* [Fixed] #346: Force HTTPS to load Google Fonts in default theme
```
2016-05-11 23:33:04 +02:00
Daniel Rudolf d17f0a8a8f
Update CHANGELOG.md 2016-05-11 23:32:26 +02:00
Daniel Rudolf b2a7c7623d
Sync docs 2016-05-11 23:28:26 +02:00
Daniel Rudolf e32a46d6cf
Sync docs 2016-05-06 23:17:17 +02:00
Daniel Rudolf 86b2839660
Update .htaccess
Thanks @smcdougall, see ee5b4f0d56 (commitcomment-17304977)
2016-04-29 18:02:19 +02:00
Daniel Rudolf 0f8deda6a3
Update .htaccess
Sync with Pico 1.0.3; see ee5b4f0
2016-04-27 21:07:59 +02:00
Daniel Rudolf ee5b4f0d56
.htaccess: Deny access to CHANGELOG.md, composer.json, composer.lock
See discussion in #343
2016-04-27 21:02:20 +02:00
Daniel Rudolf 749114df61
Build system: Update phpDoc list formatting 2016-04-27 19:00:44 +02:00
Daniel Rudolf 79a14799bb
Build system: Add phpDoc list 2016-04-27 16:49:38 +02:00
Daniel Rudolf 4c0366fa49
Build system: Move generate-version.sh 2016-04-27 16:49:10 +02:00
Daniel Rudolf 4d3eace1af
README.md: Update upgrade URL 2016-04-27 16:47:13 +02:00
Daniel Rudolf e01044319a
Build system: Use dynamic phpDoc title 2016-04-24 21:13:47 +02:00
Daniel Rudolf 6c4f69c107
Update inline user docs to reflect 6465c2b0a9 2016-04-24 20:49:06 +02:00
Daniel Rudolf 0e8cd0873d
Merge branch 'master' into pico-1.1
Conflicts:
	.htaccess
2016-04-24 20:23:00 +02:00
Daniel Rudolf 6465c2b0a9
Support REQUEST_URI routing method
With Pico 1.0 you had to setup URL rewriting (e.g. using `mod_rewrite` on Apache) in a way that rewritten URLs follow the `QUERY_STRING` principles. Starting with version 1.1, Pico additionally supports the `REQUEST_URI` routing method, what allows you to simply rewrite all requests to just `index.php`. Pico then reads the requested page from the `REQUEST_URI` environment variable provided by the webserver. Please note that `QUERY_STRING` takes precedence over `REQUEST_URI`.
2016-04-24 20:11:05 +02:00
Daniel Rudolf 31e55ca24a
.htaccess: Pass full URL to Pico when requesting content, lib... dirs
This allows Pico to e.g. serve content/config.md when http://example.com/pico/config/ is requested
2016-04-24 04:14:58 +02:00