Last active
January 17, 2017 10:27
-
-
Save sebsel/f002d61e4480156d3987314bb7727e20 to your computer and use it in GitHub Desktop.
Kirby minimal blueprint dev template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
| <title><?php echo $site->title()->html() ?> | <?php echo $page->title()->html() ?></title> | |
| <style> | |
| .field { | |
| border: 1px solid #ccc; | |
| margin: 5px; | |
| padding: 5px; | |
| } | |
| body { font-family: 'Source Code Pro', monospace; } | |
| .label { color: #888; } | |
| .invisible { color: #88b; } | |
| a { color: #00b; } | |
| </style> | |
| </head> | |
| <body> | |
| <main> | |
| <nav> | |
| <ul > | |
| <?php foreach(site()->children() as $p): ?> | |
| <li> | |
| <a <?php e(!$p->isVisible(), ' class="invisible"') ?> href="<?php echo $p->url() ?>"><?php echo $p->title()->html() ?></a> | |
| </li> | |
| <?php endforeach ?> | |
| </ul> | |
| </nav> | |
| <div class="label">Template: <?php echo $page->intendedTemplate() ?></div> | |
| <?php foreach ($page->toArray()['content'] as $name => $field): ?> | |
| <div class="field"><div class="label"><?php echo $name ?>:</div> <?php echo kirbytext($field) ?></div> | |
| <?php endforeach; ?> | |
| <div class="label">Children:</div> | |
| <ol> | |
| <?php foreach ($page->children() as $child): ?> | |
| <li><a <?php e(!$p->isVisible(), ' class="invisible"') ?> href="<?php echo $child->url() ?>"><?php echo $child->title() ?></a></li> | |
| <?php endforeach; ?> | |
| </ol> | |
| </main> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment