diff --git a/README.md b/README.md index 610f6cb..23741ae 100644 --- 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 index 2b2812f..6ad6abc 100644 --- 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 index 0668d08..c0fe659 100755 --- 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 index 4eaba47..4692307 100644 --- 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 index 7692f42..2ff473b 100755 --- a/system/themes/snippets/content-sidebar.php +++ b/system/themes/snippets/content-sidebar.php @@ -5,16 +5,7 @@ page->setLastModified($page->getModified()) ?> getContent() ?> -page->getParentTop(false) ?> -getChildren(): $yellow->pages->clean() ?> -page->setLastModified($pages->getModified()) ?> - +snippet("navigation-sidebar") ?> diff --git a/system/themes/snippets/header.php b/system/themes/snippets/header.php index 487e595..62de3bf 100755 --- a/system/themes/snippets/header.php +++ b/system/themes/snippets/header.php @@ -21,5 +21,5 @@

">page->getHtml("sitename") ?>

-snippet($yellow->page->isExisting("navigation") ? $yellow->page->get("navigation") : "navigation") ?> +snippet($yellow->page->get("navigation")) ?>
diff --git a/system/themes/snippets/navigation-sidebar.php b/system/themes/snippets/navigation-sidebar.php new file mode 100755 index 0000000..b626299 --- /dev/null +++ b/system/themes/snippets/navigation-sidebar.php @@ -0,0 +1,10 @@ +page->getParentTop(false) ?> +getChildren(): $yellow->pages->clean() ?> +page->setLastModified($pages->getModified()) ?> + diff --git a/system/themes/snippets/navigationtree.php b/system/themes/snippets/navigation-tree.php similarity index 95% rename from system/themes/snippets/navigationtree.php rename to system/themes/snippets/navigation-tree.php index c5d90f2..dbb968c 100755 --- a/system/themes/snippets/navigationtree.php +++ b/system/themes/snippets/navigation-tree.php @@ -2,7 +2,7 @@ pages->top() ?> page->setLastModified($pages->getModified()) ?> -