Allow to reorder the pages and subpages position. Added doks themepull/674/head
| @ -0,0 +1,57 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <a href="<?php echo $static->url;?>/edit?destination=admin/pages"><?php echo i18n('Edit');?></a> | |||
| <h2 class="post-index"><?php echo $static->title ?></h2> | |||
| <div><?php echo $static->description;?></div> | |||
| <br> | |||
| <a class="btn btn-primary right" href="<?php echo $static->url;?>/add?destination=admin/pages/<?php echo $static->slug;?>"><?php echo i18n('Add_sub');?></a> | |||
| <br><br> | |||
| <script> | |||
| $(function() { | |||
| var order; | |||
| $( "tbody" ).sortable({update: function(e, ui) { | |||
| order = $(this).sortable('toArray'); | |||
| $("#saveButton").css({"display": "block"}); | |||
| }}); | |||
| $("#saveButton").click(function(){ | |||
| $.ajax({ | |||
| type: 'POST', | |||
| url: '<?php echo site_url();?>admin/pages/<?php echo $static->slug;?>', | |||
| dataType: 'json', | |||
| data: {'json': order}, | |||
| success: function (response) { | |||
| alert(response.message); | |||
| location.reload(); | |||
| }, | |||
| }); | |||
| }); | |||
| }); | |||
| </script> | |||
| <?php $posts = find_subpage($p->slug);?> | |||
| <?php if (!empty($posts)) { ?> | |||
| <table class="table post-list"> | |||
| <thead> | |||
| <tr class="head"> | |||
| <th><?php echo i18n('Title');?></th> | |||
| <th><?php echo i18n('Description');?></th> | |||
| <th><?php echo i18n('Operations');?></th> | |||
| </tr> | |||
| </thead> | |||
| <tbody> | |||
| <?php foreach ($posts as $sp): ?> | |||
| <tr id="<?php echo $sp->parent;?>/<?php echo $sp->md;?>" style="cursor:move;"> | |||
| <td><a href="<?php echo $sp->url ?>"><?php echo $sp->title ?></a></td> | |||
| <td><?php echo $sp->description;?></td> | |||
| <td> <span><a class="btn btn-primary btn-xs" href="<?php echo $sp->url;?>/edit?destination=admin/pages/<?php echo $static->slug;?>"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $sp->url;?>/delete?destination=admin/pages/<?php echo $static->slug;?>"><?php echo i18n('Delete');?></a></span></td> | |||
| </tr> | |||
| <?php endforeach; ?> | |||
| </tbody> | |||
| </table> | |||
| <br> | |||
| <button class="btn btn-primary" style="display:none" id="saveButton">Save page order</button> | |||
| <?php } else { | |||
| echo i18n('No_posts_found') . '!'; | |||
| } ?> | |||
| @ -0,0 +1,10 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <article> | |||
| <div class="blog-header"> | |||
| <h1>Search results not found!</h1> | |||
| </div> | |||
| <div class="content-body"> | |||
| <p>Please search again, or would you like to visit our <a href="<?php echo site_url() ?>">homepage</a> instead?</p> | |||
| <?php echo search() ?> | |||
| </div> | |||
| </article> | |||
| @ -0,0 +1,10 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <article> | |||
| <div class="blog-header"> | |||
| <h1>This page doesn't exist!</h1> | |||
| </div> | |||
| <div class="content-body"> | |||
| <p>Please search to find what you're looking for or visit our <a href="<?php echo site_url() ?>">homepage</a> instead.</p> | |||
| <?php echo search() ?> | |||
| </div> | |||
| </article> | |||
| @ -0,0 +1,21 @@ | |||
| MIT License | |||
| Copyright (c) 2023 Hyas | |||
| Permission is hereby granted, free of charge, to any person obtaining a copy | |||
| of this software and associated documentation files (the "Software"), to deal | |||
| in the Software without restriction, including without limitation the rights | |||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
| copies of the Software, and to permit persons to whom the Software is | |||
| furnished to do so, subject to the following conditions: | |||
| The above copyright notice and this permission notice shall be included in all | |||
| copies or substantial portions of the Software. | |||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||
| SOFTWARE. | |||
| @ -0,0 +1,16 @@ | |||
| # HTMLy Doks | |||
| Documentation theme by getdoks.org ported to HTMLy | |||
| ## Installations | |||
| - Upload and extract the zip file into themes directory. | |||
| - Activate it from HTMLy panel. | |||
| ## Doks landing page | |||
| Go to `admin/config/reading` and choose `Front page displays` as `Static page`. | |||
| ## License | |||
| See the LICENSE.txt | |||
| @ -0,0 +1,11 @@ | |||
| (function () { | |||
| document.getElementById("mode").addEventListener("click", () => { | |||
| document.body.classList.toggle("dark"); | |||
| localStorage.setItem("theme", document.body.classList.contains("dark") ? "dark" : "light"); | |||
| }); | |||
| if (localStorage.getItem("theme") === "dark") { | |||
| document.body.classList.add("dark"); | |||
| } | |||
| })(); | |||
| @ -0,0 +1,72 @@ | |||
| /*jslint | |||
| white: true, | |||
| browser: true, | |||
| vars: true | |||
| */ | |||
| /** | |||
| * Generates a table of contents for your document based on the headings | |||
| * present. Anchors are injected into the document and the | |||
| * entries in the table of contents are linked to them. The table of | |||
| * contents will be generated inside of the first element with the id `toc`. | |||
| * @param {HTMLDOMDocument} documentRef Optional A reference to the document | |||
| * object. Defaults to `document`. | |||
| * @author Matthew Christopher Kastor-Inare III | |||
| * @version 20130726 | |||
| * @example | |||
| * // call this after the page has loaded | |||
| * htmlTableOfContents(); | |||
| */ | |||
| /** | |||
| * Modified by @danpros | |||
| * select only in #content | |||
| * using the heading title as the slug IDs | |||
| * insert the anchor inside the heading | |||
| * fix browser not scrolling to the hash | |||
| */ | |||
| function htmlTableOfContents (documentRef) { | |||
| var documentRef = documentRef || document; | |||
| var toc = documentRef.getElementById('toc'); | |||
| var headings = [].slice.call(documentRef.body.querySelectorAll('#content h1, #content h2, #content h3, #content h4, #content h5, #content h6')); | |||
| headings.forEach(function (heading, index) { | |||
| heading.setAttribute('id', 'toc-' + heading.textContent.replace(/\s+/g, '-').toLowerCase()); | |||
| var anchor = documentRef.createElement('a'); | |||
| anchor.setAttribute('href', '#toc-' + heading.textContent.replace(/\s+/g, '-').toLowerCase()); | |||
| anchor.setAttribute('class', 'anchor'); | |||
| anchor.setAttribute('aria-hidden', 'true'); | |||
| anchor.textContent = '#'; | |||
| var link = documentRef.createElement('a'); | |||
| link.setAttribute('href', '#toc-' + heading.textContent.replace(/\s+/g, '-').toLowerCase()); | |||
| link.textContent = heading.textContent; | |||
| var div = documentRef.createElement('div'); | |||
| div.setAttribute('class', heading.tagName.toLowerCase() + '-toc'); | |||
| heading.appendChild(anchor); | |||
| div.appendChild(link); | |||
| toc.appendChild(div); | |||
| }); | |||
| if (window.location.hash) { | |||
| var hash = window.location.hash; | |||
| scrollToHash(hash); | |||
| } | |||
| } | |||
| // fix browser not scrolling to the hash | |||
| function scrollToHash (hash) { | |||
| setTimeout(function() { | |||
| hashtag = hash; | |||
| location.hash = ''; | |||
| location.hash = hashtag; | |||
| }, 300); | |||
| } | |||
| try { | |||
| module.exports = htmlTableOfContents; | |||
| } catch (e) { | |||
| // module.exports is not defined | |||
| } | |||
| @ -0,0 +1,103 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <!DOCTYPE html> | |||
| <html lang="<?php echo blog_language();?>"> | |||
| <head> | |||
| <?php echo head_contents();?> | |||
| <title><?php echo $title;?></title> | |||
| <meta name="description" content="<?php echo $description; ?>"/> | |||
| <link rel="canonical" href="<?php echo $canonical; ?>" /> | |||
| <link rel="preload" as="font" href="<?php echo theme_path();?>fonts/jost/jost-v4-latin-regular.woff2" type="font/woff2" crossorigin> | |||
| <link rel="preload" as="font" href="<?php echo theme_path();?>fonts/jost/jost-v4-latin-700.woff2" type="font/woff2" crossorigin> | |||
| <link rel="stylesheet" href="<?php echo theme_path();?>css/style.css"> | |||
| <meta name="theme-color" content="#fff"> | |||
| </head> | |||
| <body class="docs single" onload="htmlTableOfContents();"> | |||
| <div class="header-bar fixed-top"></div> | |||
| <?php if (facebook()) { echo facebook(); } ?> | |||
| <?php if (login()) { toolbar(); } ?> | |||
| <header class="navbar fixed-top navbar-expand-md navbar-light"> | |||
| <div class="container"> | |||
| <input class="menu-btn order-0" type="checkbox" id="menu-btn"> | |||
| <label class="menu-icon d-md-none" for="menu-btn"><span class="navicon"></span></label> | |||
| <a class="navbar-brand order-1 order-md-0 me-auto" href="<?php echo site_url();?>"> | |||
| <?php echo blog_title();?> | |||
| </a> | |||
| <button id="mode" class="btn btn-link order-2 order-md-4" type="button" aria-label="Toggle mode"> | |||
| <span class="toggle-dark"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></span> | |||
| <span class="toggle-light"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg></span> | |||
| </button> | |||
| <ul class="navbar-nav social-nav order-3 order-md-5"> | |||
| <?php if(!empty(config('social.github'))):?> | |||
| <li class="nav-item"> | |||
| <a class="nav-link" target="_blank" rel="nofollow" href="<?php echo config('social.github');?>"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg><span class="ms-2 visually-hidden">GitHub</span></a> | |||
| </li> | |||
| <?php endif;?> | |||
| <?php if(!empty(config('social.twitter'))):?> | |||
| <li class="nav-item"> | |||
| <a class="nav-link" target="_blank" rel="nofollow" href="<?php echo config('social.twitter');?>"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-twitter"><path d="M23 3a10.9 10.9.0 01-3.14 1.53 4.48 4.48.0 00-7.86 3v1A10.66 10.66.0 013 4s-4 9 5 13a11.64 11.64.0 01-7 2c9 5 20 0 20-11.5a4.5 4.5.0 00-.08-.83A7.72 7.72.0 0023 3z"></path></svg><span class="ms-2 visually-hidden">Twitter</span></a> | |||
| </li> | |||
| <?php endif;?> | |||
| <?php if(!empty(config('social.facebook'))):?> | |||
| <li class="nav-item"> | |||
| <a class="nav-link" target="_blank" rel="nofollow" href="<?php echo config('social.facebook');?>"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-facebook" viewBox="0 0 18 18"><path d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951"/></svg><span class="ms-2 visually-hidden">Twitter</span></a> | |||
| </li> | |||
| <?php endif;?> | |||
| </ul> | |||
| <div class="collapse navbar-collapse order-4 order-md-1 top-menu"> | |||
| <?php | |||
| // just to make sure only print the content from custom menu | |||
| $filename = "content/data/menu.json"; | |||
| if (file_exists($filename)) { | |||
| $json = json_decode(file_get_contents('content/data/menu.json', true)); | |||
| $menus = json_decode($json); | |||
| if (!empty($menus)) { | |||
| echo menu(); | |||
| } | |||
| } ?> | |||
| </div> | |||
| </div> | |||
| </header> | |||
| <div class="wrap container" role="document"> | |||
| <div class="content"> | |||
| <div class="row flex-xl-nowrap"> | |||
| <div class="col-lg-5 col-xl-4 docs-bar"> | |||
| <input class="menu-btn order-0 float-right" type="checkbox" id="menu-btn2"> | |||
| <label class="menu-icon float-right" for="menu-btn2"><span class="navicon"></span></label> | |||
| <div class="docs-sidebar"> | |||
| <nav class="docs-links" aria-label="Main navigation"> | |||
| <?php echo get_menu('list-unstyled collapsible-sidebar', false);?> | |||
| </nav> | |||
| </div> | |||
| </div> | |||
| <?php echo content();?> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <footer class="footer text-muted"> | |||
| <div class="container"> | |||
| <div class="row"> | |||
| <div class="col-lg-8 order-last order-lg-first"> | |||
| <ul class="list-inline"> | |||
| <li class="list-inline-item"><?php echo copyright();?></li> | |||
| </ul> | |||
| </div> | |||
| <div class="col-lg-8 order-last order-lg-last text-lg-end"> | |||
| <ul class="list-inline"> | |||
| <li class="list-inline-item">Design by <a href="https://getdoks.org/" target="_blank" rel="nofollow">Doks</a></li> | |||
| </ul> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </footer> | |||
| <script src="<?php echo theme_path();?>js/toc.js"></script> | |||
| <script src="<?php echo theme_path();?>js/main.js"></script> | |||
| <?php if (analytics()): ?><?php echo analytics() ?><?php endif; ?> | |||
| </body> | |||
| </html> | |||
| @ -0,0 +1,135 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <!DOCTYPE html> | |||
| <html lang="<?php echo blog_language();?>"> | |||
| <head> | |||
| <?php echo head_contents();?> | |||
| <title><?php echo $title;?></title> | |||
| <meta name="description" content="<?php echo $description; ?>"/> | |||
| <link rel="canonical" href="<?php echo $canonical; ?>" /> | |||
| <link rel="preload" as="font" href="<?php echo theme_path();?>fonts/jost/jost-v4-latin-regular.woff2" type="font/woff2" crossorigin> | |||
| <link rel="preload" as="font" href="<?php echo theme_path();?>fonts/jost/jost-v4-latin-700.woff2" type="font/woff2" crossorigin> | |||
| <link rel="stylesheet" href="<?php echo theme_path();?>css/style.css"> | |||
| <meta name="theme-color" content="#fff"> | |||
| </head> | |||
| <body class="blog list"> | |||
| <div class="header-bar fixed-top"></div> | |||
| <?php if (facebook()) { echo facebook(); } ?> | |||
| <?php if (login()) { toolbar(); } ?> | |||
| <header class="navbar fixed-top navbar-expand-md navbar-light"> | |||
| <div class="container"> | |||
| <input class="menu-btn order-0" type="checkbox" id="menu-btn"> | |||
| <label class="menu-icon d-md-none" for="menu-btn"><span class="navicon"></span></label> | |||
| <a class="navbar-brand order-1 order-md-0 me-auto" href="<?php echo site_url();?>"> | |||
| <?php echo blog_title();?> | |||
| </a> | |||
| <button id="mode" class="btn btn-link order-2 order-md-4" type="button" aria-label="Toggle mode"> | |||
| <span class="toggle-dark"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></span> | |||
| <span class="toggle-light"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg></span> | |||
| </button> | |||
| <ul class="navbar-nav social-nav order-3 order-md-5"> | |||
| <?php if(!empty(config('social.github'))):?> | |||
| <li class="nav-item"> | |||
| <a class="nav-link" target="_blank" rel="nofollow" href="<?php echo config('social.github');?>"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg><span class="ms-2 visually-hidden">GitHub</span></a> | |||
| </li> | |||
| <?php endif;?> | |||
| <?php if(!empty(config('social.twitter'))):?> | |||
| <li class="nav-item"> | |||
| <a class="nav-link" target="_blank" rel="nofollow" href="<?php echo config('social.twitter');?>"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-twitter"><path d="M23 3a10.9 10.9.0 01-3.14 1.53 4.48 4.48.0 00-7.86 3v1A10.66 10.66.0 013 4s-4 9 5 13a11.64 11.64.0 01-7 2c9 5 20 0 20-11.5a4.5 4.5.0 00-.08-.83A7.72 7.72.0 0023 3z"></path></svg><span class="ms-2 visually-hidden">Twitter</span></a> | |||
| </li> | |||
| <?php endif;?> | |||
| <?php if(!empty(config('social.facebook'))):?> | |||
| <li class="nav-item"> | |||
| <a class="nav-link" target="_blank" rel="nofollow" href="<?php echo config('social.facebook');?>"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-facebook" viewBox="0 0 18 18"><path d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951"/></svg><span class="ms-2 visually-hidden">Twitter</span></a> | |||
| </li> | |||
| <?php endif;?> | |||
| </ul> | |||
| <div class="collapse navbar-collapse order-4 order-md-1 top-menu"> | |||
| <?php | |||
| // just to make sure only print the content from custom menu | |||
| $filename = "content/data/menu.json"; | |||
| if (file_exists($filename)) { | |||
| $json = json_decode(file_get_contents('content/data/menu.json', true)); | |||
| $menus = json_decode($json); | |||
| if (!empty($menus)) { | |||
| echo menu(); | |||
| } | |||
| } ?> | |||
| </div> | |||
| </div> | |||
| </header> | |||
| <?php if(config('static.frontpage') == 'true' && isset($is_front)) { | |||
| $pages = find_page(); | |||
| $front = get_frontpage(); ?> | |||
| <div class="wrap container" role="document"> | |||
| <div class="content"> | |||
| <section class="section container-fluid mt-n3 pb-3"> | |||
| <div class="row justify-content-center"> | |||
| <div class="col-lg-12 text-center"> | |||
| <h1 class="mt-0"><?php echo $front->title;?></h1> | |||
| <?php if(login()):?><small><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-2"><path d="M17 3a2.828 2.828.0 114 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg> <a href="<?php echo $front->url;?>/edit?destination=front">Edit</a></small><?php endif;?> | |||
| </div> | |||
| <div class="col-lg-9 col-xl-8 text-center"> | |||
| <div class="lead"><?php echo $front->body;?></div> | |||
| <?php if (!empty($pages[0])):?><a class="btn btn-primary btn-lg px-4 mb-2" href="<?php echo $pages[0]->url;?>" role="button">Get Started</a><?php endif;?> | |||
| </div> | |||
| </div> | |||
| </section> | |||
| </div> | |||
| </div> | |||
| <div class="d-flex justify-content-start"><div class="bg-dots"></div></div> | |||
| <section class="section section-sm"> | |||
| <div class="container"> | |||
| <div class="row justify-content-center text-center"> | |||
| <?php foreach ($pages as $pg):?> | |||
| <div class="col-lg-5"> | |||
| <h2 class="h4"><a href="<?php echo $pg->url;?>"><?php echo $pg->title;?></a></h2> | |||
| <p><?php echo $pg->description;?></p> | |||
| </div> | |||
| <?php endforeach;?> | |||
| </div> | |||
| </div> | |||
| </section> | |||
| <?php } else {?> | |||
| <div class="wrap container" role="document"> | |||
| <div class="content"> | |||
| <div class="row justify-content-center"> | |||
| <div class="col-md-12 col-lg-10 col-xl-9"> | |||
| <?php echo content();?> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <?php }?> | |||
| <section class="section section-sm container-fluid"><div class="row justify-content-center text-center"><div class="col-lg-9"></div></div></section> | |||
| <footer class="footer text-muted"> | |||
| <div class="container"> | |||
| <div class="row"> | |||
| <div class="col-lg-8 order-last order-lg-first"> | |||
| <ul class="list-inline"> | |||
| <li class="list-inline-item"><?php echo copyright();?></li> | |||
| </ul> | |||
| </div> | |||
| <div class="col-lg-8 order-last order-lg-last text-lg-end"> | |||
| <ul class="list-inline"> | |||
| <li class="list-inline-item">Design by <a href="https://getdoks.org/" target="_blank" rel="nofollow">Doks</a></li> | |||
| </ul> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </footer> | |||
| <script src="<?php echo theme_path();?>js/main.js"></script> | |||
| <?php if (analytics()): ?><?php echo analytics() ?><?php endif; ?> | |||
| </body> | |||
| </html> | |||
| @ -0,0 +1,147 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <?php if (isset($is_category)):?> | |||
| <div class="row justify-content-center" style="padding-top: 4rem;"> | |||
| <div class="col-md-12 text-center"> | |||
| <h1 class="mt-0"><?php echo $category->title;?></h1> | |||
| </div> | |||
| <div class="col-md-12 text-center"> | |||
| <div class="lead"><?php echo $category->body;?></div> | |||
| </div> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if (isset($is_tag)):?> | |||
| <div class="row justify-content-center" style="padding-top: 4rem;"> | |||
| <div class="col-md-12 text-center"> | |||
| <h1 class="mt-0"><?php echo $tag->title;?></h1> | |||
| </div> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if (isset($is_archive)):?> | |||
| <div class="row justify-content-center" style="padding-top: 4rem;"> | |||
| <div class="col-md-12 text-center"> | |||
| <h1 class="mt-0"><?php echo $archive->title;?></h1> | |||
| </div> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if (isset($is_search)):?> | |||
| <div class="row justify-content-center" style="padding-top: 4rem;"> | |||
| <div class="col-md-12 text-center"> | |||
| <h1 class="mt-0"><?php echo $search->title;?></h1> | |||
| </div> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if (isset($is_type)):?> | |||
| <div class="row justify-content-center" style="padding-top: 4rem;"> | |||
| <div class="col-md-12 text-center"> | |||
| <h1 class="mt-0"><?php echo $type->title;?></h1> | |||
| </div> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if (isset($is_blog)):?> | |||
| <div class="row justify-content-center" style="padding-top: 4rem;"> | |||
| <div class="col-md-12 text-center"> | |||
| <h1 class="mt-0">Blog</h1> | |||
| </div> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if (isset($is_front)):?> | |||
| <div class="row justify-content-center" style="padding-top: 4rem;"> | |||
| <div class="col-md-12 text-center"> | |||
| <h1 class="mt-0"><?php echo blog_title();?></h1> | |||
| </div> | |||
| <div class="col-md-12 text-center"> | |||
| <div class="lead"><?php echo blog_description();?></div> | |||
| </div> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php foreach ($posts as $post):?> | |||
| <?php $img = get_image($post->body);?> | |||
| <article> | |||
| <div class="card-list"> | |||
| <div class="card"> | |||
| <?php if (!empty($post->image)) {?> | |||
| <img src="<?php echo $post->image;?>" width="100%"> | |||
| <?php } elseif (!empty($post->video)) {?> | |||
| <img src="//img.youtube.com/vi/<?php echo get_video_id($post->video);?>/sddefault.jpg" width="100%"> | |||
| <?php } elseif (!empty($post->audio)) {?> | |||
| <img src="<?php echo theme_path();?>img/soundcloud.jpg" width="100%"> | |||
| <?php } elseif (!empty($img)) {?> | |||
| <img src="<?php echo $img;?>" width="100%"> | |||
| <?php } ?> | |||
| <?php if(!empty($post->quote)):?> | |||
| <div class="quote"> | |||
| <blockquote class="quote"><?php echo $post->quote ?></blockquote> | |||
| </div> | |||
| <?php endif;?> | |||
| <div class="card-body"> | |||
| <?php if(!empty($post->link)) { ?> | |||
| <h2 class="h3"> | |||
| <a class="stretched-link text-body" href="<?php echo $post->link;?>" target="_blank"><?php echo $post->title;?> | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="currentColor" class="bi bi-link-45deg" viewBox="0 0 16 16"><path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1 1 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4 4 0 0 1-.128-1.287z"/><path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243z"/></svg> | |||
| </a> | |||
| </h2> | |||
| <?php } else {?> | |||
| <h2 class="h3"><a class="stretched-link text-body" href="<?php echo $post->url;?>"><?php echo $post->title;?></a></h2> | |||
| <?php } ?> | |||
| <div class="content-body"> | |||
| <?php echo $post->description;?> | |||
| </div> | |||
| <p> | |||
| <small> | |||
| <?php echo i18n('posted_on');?> <?php echo format_date($post->date);?> | |||
| <?php echo i18n('by');?> | |||
| <a class="position-relative" href="<?php echo $post->authorUrl;?>"> | |||
| <?php echo $post->authorName;?> | |||
| </a> | |||
| <span class="mx-2">—</span> | |||
| <strong> | |||
| <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 12a9 9 0 1018 0A9 9 0 003 12"></path><path d="M12 7v5l3 3"></path></svg> | |||
| <?php echo $post->readTime;?> min | |||
| </strong> | |||
| </small> | |||
| </p> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </article> | |||
| <?php endforeach;?> | |||
| <?php if (!empty($pagination['next']) || !empty($pagination['prev'])): ?> | |||
| <div class="docs-navigation d-flex justify-content-between"> | |||
| <?php if (!empty($pagination['prev'])): ?> | |||
| <a href="?page=<?php echo $page - 1 ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| ← <?php echo i18n('Newer');?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| <?php if (!empty($pagination['next'])): ?> | |||
| <a class="ms-auto" href="?page=<?php echo $page + 1 ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| <?php echo i18n('Older');?> → | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| </div> | |||
| <?php endif;?> | |||
| @ -0,0 +1,9 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <article> | |||
| <div class="blog-header"> | |||
| <h1>No posts found!</h1> | |||
| </div> | |||
| <div class="content-body"> | |||
| <p>Create a blog post or set the frontpage display to static page to remove this message.</p> | |||
| </div> | |||
| </article> | |||
| @ -0,0 +1,110 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <article> | |||
| <div class="blog-header"> | |||
| <?php if(!empty($post->link)) { ?> | |||
| <h1> | |||
| <a href="<?php echo $post->link;?>" target="_blank"><?php echo $post->title;?> | |||
| <svg xmlns="http://www.w3.org/2000/svg" height="28" width="28" fill="currentColor" class="icon icon-tabler bi bi-link" viewBox="0 0 16 16"><path d="M6.354 5.5H4a3 3 0 0 0 0 6h3a3 3 0 0 0 2.83-4H9q-.13 0-.25.031A2 2 0 0 1 7 10.5H4a2 2 0 1 1 0-4h1.535c.218-.376.495-.714.82-1z"/><path d="M9 5.5a3 3 0 0 0-2.83 4h1.098A2 2 0 0 1 9 6.5h3a2 2 0 1 1 0 4h-1.535a4 4 0 0 1-.82 1H12a3 3 0 1 0 0-6z"/></svg> | |||
| </a> | |||
| </h1> | |||
| <?php } else {?> | |||
| <h1><?php echo $post->title;?></h1> | |||
| <?php } ?> | |||
| <p> | |||
| <small> | |||
| <?php echo i18n('posted_on');?> <?php echo format_date($post->date);?> | |||
| <?php echo i18n('by');?> | |||
| <a class="stretched-link position-relative" href="<?php echo $post->authorUrl;?>"><?php echo $post->authorName;?></a> | |||
| <span class="mx-2">—</span> | |||
| <strong> | |||
| <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 12a9 9 0 1018 0A9 9 0 003 12"></path><path d="M12 7v5l3 3"></path></svg> | |||
| <?php echo $post->readTime;?> min | |||
| </strong> | |||
| <?php if (login()) { echo ' <span class="mx-2">—</span> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-2"><path d="M17 3a2.828 2.828.0 114 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg> <span class="edit-post"><a href="'. $post->url .'/edit?destination=post">' . i18n('Edit') . '</a></span>'; } ?> | |||
| </small> | |||
| </p> | |||
| </div> | |||
| <div class="content-media"> | |||
| <?php if(!empty($post->image)):?> | |||
| <img src="<?php echo $post->image;?>"/> | |||
| <?php endif;?> | |||
| <?php if(!empty($post->video)):?> | |||
| <iframe width="100%" height="315px" class="embed-responsive-item" src="https://www.youtube.com/embed/<?php echo get_video_id($post->video); ?>" frameborder="0" allowfullscreen></iframe> | |||
| <?php endif;?> | |||
| <?php if(!empty($post->audio)):?> | |||
| <iframe width="100%" height="200px" class="embed-responsive-item" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $post->audio;?>&auto_play=false&visual=true"></iframe> | |||
| <?php endif;?> | |||
| <?php if(!empty($post->quote)):?> | |||
| <div class="quote"><blockquote class="quote"><?php echo $post->quote ?></blockquote></div> | |||
| <?php endif;?> | |||
| </div> | |||
| <div class="content-body" id="content"> | |||
| <?php echo $post->body;?> | |||
| <p class="post-footer"> | |||
| <small> | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="icon bi bi-folder" viewBox="0 0 18 18"><path d="M.54 3.87.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.826a2 2 0 0 1-1.991-1.819l-.637-7a2 2 0 0 1 .342-1.31zM2.19 4a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91h10.348a1 1 0 0 0 .995-.91l.637-7A1 1 0 0 0 13.81 4zm4.69-1.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981l.006.139q.323-.119.684-.12h5.396z"/></svg> | |||
| <span class="cat-meta"><?php echo $post->category;?></span> | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-tag" viewBox="0 0 18 18"><path d="M6 4.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m-1 0a.5.5 0 1 0-1 0 .5.5 0 0 0 1 0"/><path d="M2 1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 1 6.586V2a1 1 0 0 1 1-1m0 5.586 7 7L13.586 9l-7-7H2z"/></svg> | |||
| <span class="tag-meta"><?php echo $post->tag;?></span> | |||
| </small> | |||
| </p> | |||
| </div> | |||
| <div class="related docs-navigation"> | |||
| <small> | |||
| <strong><?php echo i18n("Related_posts");?></strong> | |||
| <?php echo get_related($post->related);?> | |||
| </small> | |||
| </div> | |||
| </article> | |||
| <?php if (disqus()): ?> | |||
| <?php echo disqus($post->title, $post->url) ?> | |||
| <?php endif; ?> | |||
| <?php if (facebook() || disqus()): ?> | |||
| <div class="comments-area" id="comments"> | |||
| <?php if (facebook()): ?> | |||
| <div class="fb-comments" data-href="<?php echo $post->url ?>" data-numposts="<?php echo config('fb.num') ?>" data-colorscheme="<?php echo config('fb.color') ?>"></div> | |||
| <?php endif; ?> | |||
| <?php if (disqus()): ?> | |||
| <div id="disqus_thread"></div> | |||
| <?php endif; ?> | |||
| </div> | |||
| <?php endif; ?> | |||
| <?php if (!empty($next) || !empty($prev)): ?> | |||
| <div class="docs-navigation d-flex justify-content-between"> | |||
| <?php if (!empty($next)): ?> | |||
| <a href="<?php echo($next['url']); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| ← <?php echo i18n('next_post');?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| <?php if (!empty($prev)): ?> | |||
| <a class="ms-auto" href="<?php echo($prev['url']); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| <?php echo i18n('prev_post');?> → | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| </div> | |||
| <?php endif;?> | |||
| @ -0,0 +1,95 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <div class="row justify-content-center" style="padding-top: 4rem;"> | |||
| <div class="col-md-12 text-center"> | |||
| <h1 class="mt-0"><?php echo $author->name;?></h1> | |||
| </div> | |||
| <div class="col-md-12 text-center"> | |||
| <div class="lead"><?php echo $author->about;?></div> | |||
| </div> | |||
| </div> | |||
| <?php if (!empty($posts)):?> | |||
| <?php foreach ($posts as $post):?> | |||
| <?php $img = get_image($post->body);?> | |||
| <article> | |||
| <div class="card-list"> | |||
| <div class="card"> | |||
| <?php if (!empty($post->image)) {?> | |||
| <img src="<?php echo $post->image;?>" width="100%"> | |||
| <?php } elseif (!empty($post->video)) {?> | |||
| <img src="//img.youtube.com/vi/<?php echo get_video_id($post->video);?>/sddefault.jpg" width="100%"> | |||
| <?php } elseif (!empty($post->audio)) {?> | |||
| <img src="<?php echo theme_path();?>img/soundcloud.jpg" width="100%"> | |||
| <?php } elseif (!empty($img)) {?> | |||
| <img src="<?php echo $img;?>" width="100%"> | |||
| <?php } ?> | |||
| <?php if(!empty($post->quote)):?> | |||
| <div class="quote"> | |||
| <blockquote class="quote"><?php echo $post->quote ?></blockquote> | |||
| </div> | |||
| <?php endif;?> | |||
| <div class="card-body"> | |||
| <?php if(!empty($post->link)) { ?> | |||
| <h2 class="h3"> | |||
| <a class="stretched-link text-body" href="<?php echo $post->link;?>" target="_blank"><?php echo $post->title;?> | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="currentColor" class="bi bi-link-45deg" viewBox="0 0 16 16"><path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1 1 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4 4 0 0 1-.128-1.287z"/><path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243z"/></svg> | |||
| </a> | |||
| </h2> | |||
| <?php } else {?> | |||
| <h2 class="h3"><a class="stretched-link text-body" href="<?php echo $post->url;?>"><?php echo $post->title;?></a></h2> | |||
| <?php } ?> | |||
| <div class="content-body"> | |||
| <?php echo $post->description;?> | |||
| </div> | |||
| <p> | |||
| <small> | |||
| <?php echo i18n('posted_on');?> <?php echo format_date($post->date);?> | |||
| <?php echo i18n('by');?> | |||
| <a class="position-relative" href="<?php echo $post->authorUrl;?>"> | |||
| <?php echo $post->authorName;?> | |||
| </a> | |||
| <span class="mx-2">—</span> | |||
| <strong> | |||
| <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 12a9 9 0 1018 0A9 9 0 003 12"></path><path d="M12 7v5l3 3"></path></svg> | |||
| <?php echo $post->readTime;?> min | |||
| </strong> | |||
| </small> | |||
| </p> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </article> | |||
| <?php endforeach;?> | |||
| <?php endif;?> | |||
| <?php if (!empty($pagination['next']) || !empty($pagination['prev'])): ?> | |||
| <div class="docs-navigation d-flex justify-content-between"> | |||
| <?php if (!empty($pagination['prev'])): ?> | |||
| <a href="?page=<?php echo $page - 1 ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| ← <?php echo i18n('Newer');?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| <?php if (!empty($pagination['next'])): ?> | |||
| <a class="ms-auto" href="?page=<?php echo $page + 1 ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| <?php echo i18n('Older');?> → | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| </div> | |||
| <?php endif;?> | |||
| @ -0,0 +1,168 @@ | |||
| <?php if (!defined('HTMLY')) die('HTMLy'); ?> | |||
| <nav class="docs-toc d-none d-xl-block col-xl-3" aria-label="Secondary navigation"> | |||
| <div class="page-links"> | |||
| <p class="h3">On this page</p> | |||
| <nav id="toc"></nav> | |||
| <p class="link-to-top"><a href="#main-top-link"><span aria-hidden="true">↑︎</span> Back to top</a></p> | |||
| </div> | |||
| </nav> | |||
| <main class="docs-content col-lg-11 col-xl-9" id="main-top-link"> | |||
| <nav aria-label="breadcrumb"> | |||
| <ol class="breadcrumb"> | |||
| <?php echo $breadcrumb ?> | |||
| </ol> | |||
| </nav> | |||
| <?php if (login()):?> | |||
| <div class="edit-page"><a href="<?php echo $static->url;?>/edit?destination=post"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-2"><path d="M17 3a2.828 2.828.0 114 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg><?php echo i18n('Edit');?></a></div> | |||
| <?php endif;?> | |||
| <h1><?php echo $static->title;?></h1> | |||
| <div id="content"> | |||
| <?php echo $static->body;?> | |||
| <?php if (isset($is_page)):?> | |||
| <div class="subpages"> | |||
| <?php $subpages = find_subpage($static->slug);?> | |||
| <?php if (!empty($subpages)):?> | |||
| <div class="card-list"> | |||
| <h2 class="h4">Sub <?php echo i18n('pages');?></h2> | |||
| <?php foreach ($subpages as $sp):?> | |||
| <div class="card my-3"> | |||
| <div class="card-body"> | |||
| <a class="stretched-link" href="<?php echo $sp->url;?>"><?php echo $sp->title;?> →</a> | |||
| <br><small><?php echo $sp->description;?></small> | |||
| </div> | |||
| </div> | |||
| <?php endforeach;?> | |||
| </div> | |||
| <?php endif;?> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if (isset($is_subpage)):?> | |||
| <?php $pages = find_page($static->parent); ?> | |||
| <?php endif;?> | |||
| </div> | |||
| <div class="docs-navigation d-flex justify-content-between"> | |||
| <?php if (isset($is_page)):?> | |||
| <?php if (!empty($next)): ?> | |||
| <?php $nextSub = find_subpage($next['slug']); $last = end($nextSub);?> | |||
| <?php if (!empty($nextSub)) { ?> | |||
| <a class="me-auto" href="<?php echo($last->url); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| ← <?php echo($last->title); ?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php } else { ?> | |||
| <a class="me-auto" href="<?php echo($next['url']); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| ← <?php echo($next['title']); ?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php } ?> | |||
| <?php endif;?> | |||
| <?php endif;?> | |||
| <?php if (isset($is_subpage)):?> | |||
| <?php if (!empty($next)) { ?> | |||
| <a class="me-auto" href="<?php echo($next['url']); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| ← <?php echo($next['title']); ?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php } else { ?> | |||
| <?php if (!empty($pages['next'])): ?> | |||
| <?php $nextSub = find_subpage($pages['next']->slug); $last = end($nextSub);?> | |||
| <?php if (!empty($nextSub)) { ?> | |||
| <a class="me-auto" href="<?php echo($last->url); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| ← <?php echo($last->title); ?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php } else { ?> | |||
| <a class="me-auto" href="<?php echo($pages['next']->url); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| ← <?php echo($pages['next']->title); ?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php } ?> | |||
| <?php endif;?> | |||
| <?php }?> | |||
| <?php endif;?> | |||
| <?php if (isset($is_subpage)):?> | |||
| <a href="<?php echo($pages['current']->url); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| Back to <?php echo($pages['current']->title); ?> | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| <?php if (isset($is_page)):?> | |||
| <?php if (!empty($subpages[0])) { ?> | |||
| <a class="ms-auto" href="<?php echo($subpages[0]->url); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| <?php echo($subpages[0]->title); ?> → | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php } else { ?> | |||
| <?php if (!empty($prev)): ?> | |||
| <a class="ms-auto" href="<?php echo($prev['url']); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| <?php echo($prev['title']); ?> → | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| <?php }?> | |||
| <?php endif;?> | |||
| <?php if (isset($is_subpage)):?> | |||
| <?php if (!empty($prev)) { ?> | |||
| <a class="ms-auto" href="<?php echo($prev['url']); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| <?php echo($prev['title']); ?> → | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php } else { ?> | |||
| <?php if (!empty($pages['prev'])): ?> | |||
| <a class="ms-auto" href="<?php echo($pages['prev']->url); ?>"> | |||
| <div class="card my-1"> | |||
| <div class="card-body py-2"> | |||
| <?php echo($pages['prev']->title); ?> → | |||
| </div> | |||
| </div> | |||
| </a> | |||
| <?php endif;?> | |||
| <?php }?> | |||
| <?php endif;?> | |||
| </div> | |||
| </main> | |||