Commit graph

784 commits

Author SHA1 Message Date
Daniel Rudolf
82c6dd9795
Don't sort pages when a unknown sort method is specified
Specifying a custom sort method usually means that all pages are sort by a plugin, so Pico's default alphabetical order is overwritten anyway. Letting Pico sort the pages first and discarding the result is burned CPU time...
2016-12-06 19:47:37 +01:00
Daniel Rudolf
b493ebdb84
Default theme: Navigation: Hide pages starting with a underscore (_) 2016-12-06 19:37:23 +01:00
Daniel Rudolf
b712650678
Default theme: Navigation: Show top-level pages only 2016-12-06 19:36:52 +01:00
Daniel Rudolf
ea2146b2db
Remove default plugins PicoParsePagesContent and PicoExcerpt
As previously announced (see [Upgrade to Pico 1.0 page](http://picocms.org/in-depth/upgrade/)) we'll remove the default plugins `PicoParsePagesContent` and `PicoExcerpt` with the next Pico milestone. Needless to say, that you can still install both plugins without any problem - we'll add them to Pico's official [Plugins collection](http://picocms.org/plugins/) by then. Please note that the disadvantages of these plugins are still critical and we strongly advise to not use them. Please refer to the [Upgrade to Pico 1.0 page](http://picocms.org/in-depth/upgrade/) for details.
2016-12-06 19:31:29 +01:00
Daniel Rudolf
5cf47e65de
Various small improvements 2016-12-06 19:03:58 +01:00
Daniel Rudolf
7a6e4f8271
Sort all loaded plugins using a plugin dependency topology
Execution order matters: if plugin A depends on plugin B, it usually means that plugin B does stuff which plugin A requires. However, Pico loads plugins in alphabetical order, so events might get fired on plugin A before plugin B.

Hence plugins need to be sorted. Pico sorts plugins using a dependency topology, this means that it moves all plugins, on which a plugin depends, in front of that plugin. The order isn't touched apart from that, so they are still sorted alphabetically, as long as this doesn't interfere with the dependency topology. Circular dependencies are being ignored; their behavior is undefiend. Missing dependencies are being ignored until you try to enable the dependant plugin.

This method bases on [Marc J. Schmidt's Topological Sort library](https://github.com/marcj/topsort.php) in version 1.1.0, licensed under the MIT license. It uses the `ArraySort` implementation ([class `\MJS\TopSort\Implementations\ArraySort`](https://github.com/marcj/topsort.php/blob/1.1.0/src/Implementations/ArraySort.php)).
2016-12-06 17:18:59 +01:00
Daniel Rudolf
0a269746eb
Add Pico::is404Content() method 2016-11-26 16:48:10 +01:00
Daniel Rudolf
d9393df4fa
Pico::getBaseUrl(): Improve hostname detection with proxies 2016-11-23 23:26:55 +01:00
Daniel Rudolf
d6a094216b
Merge branch 'master' into pico-1.1
Conflicts:
	_build/deploy-phpdoc-branch.sh
	themes/default/index.twig
	themes/default/style.css
2016-11-02 23:02:20 +01:00
Daniel Rudolf
381b339b9f
Build system: Fix _build/github-clone.sh 2016-11-02 22:40:05 +01:00
Daniel Rudolf
fad5d869ee
Improve build system; add _build/github-clone.sh 2016-11-02 22:23:41 +01:00
Daniel Rudolf
a9eee00950
Fix references to the picocms.github.io repo 2016-11-02 22:00:38 +01:00
Daniel Rudolf
6a68df2866
Update CHANGELOG.md 2016-11-02 03:12:09 +01:00
Daniel Rudolf
0f4257233a
Sync docs 2016-11-02 03:12:02 +01:00
Daniel Rudolf
19bc3412ad
.travis.yml: Enable HHVM nightly builds 2016-10-11 18:21:14 +02:00
Daniel Rudolf
da3d5a7e6f
.travis.yml: Enable Travis IRC notifications 2016-10-09 13:14:56 +02:00
Daniel Rudolf
6e891585ab
.travis.yml: Add PHP 7.1 to Travis CI 2016-10-09 02:52:36 +02:00
Daniel Rudolf
38615e444d
Use Pico::loadFileContent() in Pico::readPages() 2016-10-09 02:49:30 +02:00
Daniel Rudolf
bea610dbf4
Pico::evaluateRequestUrl(): Replace strpos()+substr() with strstr() 2016-10-05 14:17:10 +02:00
Daniel Rudolf
ac3f9b6742
Version 1.0.4
```
* [New] Add Pico's social icons to default theme
* [Changed] Improve documentation
* [Changed] Add CSS flexbox rules to default theme
* [Fixed] Fix handling of non-YAML 1-line front matters
* [Fixed] Fix responsiveness in default theme
```
2016-10-04 13:16:02 +02:00
Daniel Rudolf
53ebf0e39d
Update CHANGELOG.md 2016-10-04 13:15:50 +02:00
Daniel Rudolf
c44657ec4e
Update README.md: State that PHP 5.3.6+ is required
Resolves #372, thanks @Prolegomenes for reporting this
2016-10-04 13:11:21 +02:00
Daniel Rudolf
3ebb51a55e
Improve class docs
Follow-up to 00603f6
2016-10-01 19:01:21 +02:00
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