mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit f339d03606be33f953f806dcbbc1bc00d0327fcd
parent 096c7c6a3e16a6a959736ceaf12599cb2baa9880
Author: markseu <mark2011@mayberg.se>
Date:   Fri, 22 May 2015 19:37:37 +0200

Core update (navigation remix)

Diffstat:
MREADME.md | 2+-
Msystem/config/config.ini | 1+
Msystem/core/core.php | 4+++-
Msystem/themes/flatsite.css | 37++++++++++++++++++++++++-------------
Msystem/themes/snippets/content-sidebar.php | 11+----------
Msystem/themes/snippets/header.php | 2+-
Asystem/themes/snippets/navigation-sidebar.php | 10++++++++++
Asystem/themes/snippets/navigation-tree.php | 16++++++++++++++++
Dsystem/themes/snippets/navigationtree.php | 16----------------
9 files changed, 57 insertions(+), 42 deletions(-)

diff --git a/README.md b/README.md @@ -1,4 +1,4 @@ -Yellow 0.5.13 +Yellow 0.5.14 ============= [![Yellow](https://raw.githubusercontent.com/wiki/datenstrom/yellow/images/yellow.jpg)](http://datenstrom.se/yellow) diff --git a/system/config/config.ini b/system/config/config.ini @@ -36,6 +36,7 @@ textFile = language-(.*).ini errorFile = page-error-(.*).txt robotsTextFile = robots.txt template = default +navigation = navigation parser = markdown parserSafeMode = 0 multiLanguageMode = 0 diff --git a/system/core/core.php b/system/core/core.php @@ -5,7 +5,7 @@ // Yellow main class class Yellow { - const Version = "0.5.13"; + const Version = "0.5.14"; var $page; //current page var $pages; //pages from file system var $files; //files from file system @@ -60,6 +60,7 @@ class Yellow $this->config->setDefault("errorFile", "page-error-(.*).txt"); $this->config->setDefault("robotsTextFile", "robots.txt"); $this->config->setDefault("template", "default"); + $this->config->setDefault("navigation", "navigation"); $this->config->setDefault("parser", "markdown"); $this->config->setDefault("parserSafeMode", "0"); $this->config->setDefault("multiLanguageMode", "0"); @@ -437,6 +438,7 @@ class YellowPage $this->set("template", $this->yellow->lookup->findNameFromFile($this->fileName, $this->yellow->config->get("templateDir"), $this->yellow->config->get("template"), ".html")); $this->set("modified", date("Y-m-d H:i:s", $this->yellow->toolbox->getFileModified($this->fileName))); + $this->set("navigation", $this->yellow->config->get("navigation")); $this->set("parser", $this->yellow->config->get("parser")); if(preg_match("/^(\xEF\xBB\xBF)?\-\-\-[\r\n]+(.+?)[\r\n]+\-\-\-[\r\n]+/s", $this->rawData, $parts)) diff --git a/system/themes/flatsite.css b/system/themes/flatsite.css @@ -1,4 +1,4 @@ -/* Flatsite theme 0.5.3 */ +/* Flatsite theme 0.5.4 */ /* Designer: Mark Mayberg */ @import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,700); @@ -24,7 +24,6 @@ a, img { border:none; text-decoration:none; } .sitename h1 a { color:#111; text-decoration:none; } .with-sidebar .main { margin-right:13em; } .with-sidebar .sidebar { float:right; width:12em; margin-top:4.3em; overflow:hidden; } -.with-sidebar .sidebar .navigationside ul { margin:0; padding:0; list-style:none; } .content h1:first-child, .content>*:first-child { margin-top:0; } .content h1 a:hover { text-decoration:none; } .content img { max-width:100%; height:auto; } @@ -56,17 +55,28 @@ a, img { border:none; text-decoration:none; } .navigation ul { margin:0 -0.3em; padding:0; list-style:none; } .navigation li { display:inline; } -.navigationtree { display:block; float:right; } -.navigationtree { margin-top:0.9em; margin-bottom:0.9em; line-height:2em; } -.navigationtree a { padding:0 0.3em; display:inline-block; } -.navigationtree ul { margin:0 -0.3em; padding:0; list-style:none; } -.navigationtree li { display:inline; } -.navigationtree ul li { display:inline-block; position:relative; cursor:pointer; margin:0; } -.navigationtree ul li:hover {} -.navigationtree ul li ul { padding:0.3em; position:absolute; width:13em; background:#fff; z-index:100; display:none; } -.navigationtree ul li ul { border:1px solid #bbb; border-radius:4px; box-shadow:2px 4px 10px rgba(0, 0, 0, 0.2); } -.navigationtree ul li ul li { display:block; } -.navigationtree ul li:hover ul { display:block; } +.navigation-search { padding-bottom:1em; } +.navigation-search .search-form { position:relative; } +.navigation-search .search-text { font-family:inherit; font-size:inherit; font-weight:inherit; } +.navigation-search .search-text { padding:0.5em; border:1px solid #bbb; border-radius:4px; width:100%; box-sizing:border-box; } +.navigation-search .search-text { background-color:#fff; background-image:linear-gradient(to bottom, #fff, #fff); } +.navigation-search .search-button { position:absolute; top:0; right:0; } +.navigation-search .search-button { font-family:inherit; font-size:inherit; font-weight:inherit; } +.navigation-search .search-button { margin:5px; padding:0.3em; border:none; background-color:transparent; } + +.navigation-sidebar ul { margin:0; } + +.navigation-tree { display:block; float:right; } +.navigation-tree { margin-top:0.9em; margin-bottom:0.9em; line-height:2em; } +.navigation-tree a { padding:0 0.3em; display:inline-block; } +.navigation-tree ul { margin:0 -0.3em; padding:0; list-style:none; } +.navigation-tree li { display:inline; } +.navigation-tree ul li { display:inline-block; position:relative; cursor:pointer; margin:0; } +.navigation-tree ul li:hover {} +.navigation-tree ul li ul { padding:0.3em; position:absolute; width:13em; background:#fff; z-index:100; display:none; } +.navigation-tree ul li ul { border:1px solid #bbb; border-radius:4px; box-shadow:2px 4px 10px rgba(0, 0, 0, 0.2); } +.navigation-tree ul li ul li { display:block; } +.navigation-tree ul li:hover ul { display:block; } /* Forms and buttons */ @@ -111,6 +121,7 @@ a, img { border:none; text-decoration:none; } .sitename h1, h1, h2 { font-size:1.2em; } .sitename h1, .header, .navigation, .footer, .page { margin:0; padding:0; } .sitename, .navigation { float:none; } + .navigation-search { padding-top: 0.5em; } .with-sidebar .main { margin-right:0em; } .with-sidebar .sidebar { display:none; } } diff --git a/system/themes/snippets/content-sidebar.php b/system/themes/snippets/content-sidebar.php @@ -5,16 +5,7 @@ <?php $yellow->page->setLastModified($page->getModified()) ?> <?php echo $page->getContent() ?> <?php else: ?> -<?php $page = $yellow->page->getParentTop(false) ?> -<?php $pages = $page ? $page->getChildren(): $yellow->pages->clean() ?> -<?php $yellow->page->setLastModified($pages->getModified()) ?> -<div class="navigationside"> -<ul> -<?php foreach($pages as $page): ?> -<li><a<?php echo $page->isActive() ? " class=\"active\"" : "" ?> href="<?php echo $page->getLocation() ?>"><?php echo $page->getHtml("titleNavigation") ?></a></li> -<?php endforeach ?> -</ul> -</div> +<?php $yellow->snippet("navigation-sidebar") ?> <?php endif ?> </div> <?php endif ?> diff --git a/system/themes/snippets/header.php b/system/themes/snippets/header.php @@ -21,5 +21,5 @@ <div class="header"> <div class="sitename"><h1><a href="<?php echo $yellow->page->base."/" ?>"><i class="sitename-logo"></i><?php echo $yellow->page->getHtml("sitename") ?></a></h1></div> <div class="sitename-banner"></div> -<?php $yellow->snippet($yellow->page->isExisting("navigation") ? $yellow->page->get("navigation") : "navigation") ?> +<?php $yellow->snippet($yellow->page->get("navigation")) ?> </div> diff --git a/system/themes/snippets/navigation-sidebar.php b/system/themes/snippets/navigation-sidebar.php @@ -0,0 +1,10 @@ +<?php $page = $yellow->page->getParentTop(false) ?> +<?php $pages = $page ? $page->getChildren(): $yellow->pages->clean() ?> +<?php $yellow->page->setLastModified($pages->getModified()) ?> +<div class="navigation-sidebar"> +<ul> +<?php foreach($pages as $page): ?> +<li><a<?php echo $page->isActive() ? " class=\"active\"" : "" ?> href="<?php echo $page->getLocation() ?>"><?php echo $page->getHtml("titleNavigation") ?></a></li> +<?php endforeach ?> +</ul> +</div> diff --git a/system/themes/snippets/navigation-tree.php b/system/themes/snippets/navigation-tree.php @@ -0,0 +1,16 @@ +<?php list($name, $pages, $level) = $yellow->getSnippetArgs() ?> +<?php if(!$pages) $pages = $yellow->pages->top() ?> +<?php $yellow->page->setLastModified($pages->getModified()) ?> +<?php if(!$level): ?> +<div class="navigation-tree"> +<?php endif ?> +<ul> +<?php foreach($pages as $page): ?> +<?php $children = $page->getChildren() ?> +<li><a<?php echo $page->isActive() ? " class=\"active\"" : "" ?> href="<?php echo $page->getLocation() ?>"><?php echo $page->getHtml("titleNavigation") ?></a><?php if($children->count()) { echo "\n"; $yellow->snippet($name, $children, $level+1); } ?></li> +<?php endforeach ?> +</ul> +<?php if(!$level): ?> +</div> +<div class="navigation-banner"></div> +<?php endif ?> diff --git a/system/themes/snippets/navigationtree.php b/system/themes/snippets/navigationtree.php @@ -1,16 +0,0 @@ -<?php list($name, $pages, $level) = $yellow->getSnippetArgs() ?> -<?php if(!$pages) $pages = $yellow->pages->top() ?> -<?php $yellow->page->setLastModified($pages->getModified()) ?> -<?php if(!$level): ?> -<div class="navigationtree"> -<?php endif ?> -<ul> -<?php foreach($pages as $page): ?> -<?php $children = $page->getChildren() ?> -<li><a<?php echo $page->isActive() ? " class=\"active\"" : "" ?> href="<?php echo $page->getLocation() ?>"><?php echo $page->getHtml("titleNavigation") ?></a><?php if($children->count()) { echo "\n"; $yellow->snippet($name, $children, $level+1); } ?></li> -<?php endforeach ?> -</ul> -<?php if(!$level): ?> -</div> -<div class="navigation-banner"></div> -<?php endif ?>