giovannisalmeri / yellow-burger Goto Github PK
View Code? Open in Web Editor NEWHamburger menu.
License: GNU General Public License v2.0
Hamburger menu.
License: GNU General Public License v2.0
Hello,
many thanks for the good work, I was looking for something like this.
There is a small problem on my web server. If the burger.svg remains in the source directory, it is only displayed on the "home" page, on all other pages the burger.svg is not found.
If the burger.svg is in the root directory and the source code is extended with a "/burger.svg" there are no problems.
<?php list($name, $pages, $level) = $this->yellow->getLayoutArguments() ?>
<?php if (!$pages) $pages = $this->yellow->content->top() ?>
<?php $this->yellow->page->setLastModified($pages->getModified()) ?>
<?php if (!$level): ?>
<?php $extensionLocation = $this->yellow->system->get("coreServerBase").$this->yellow->system->get("coreExtensionLocation"); ?>
<a id="navigation-menu" href=""><img src="<?php echo $extensionLocation. '/burger.svg'; ?>" alt="<?php echo $this->yellow->language->getTextHtml("burgerMenu") ?>"></a>
<nav id="navigation-tree" data-sitename="<?php echo $this->yellow->system->getHtml('sitename') ?>">
<?php endif ?>
<ul>
<?php foreach ($pages as $page): ?>
<?php $children = $page->getChildren() ?>
<li>
<?php if ($page->get("layout") == "transit"): ?>
<span><?php echo $page->getHtml("titleNavigation") ?></span>
<?php else: ?>
<a<?php echo $page->isActive() ? " class=\"active\" aria-current=\"page\"" : "" ?> href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getHtml("titleNavigation") ?></a>
<?php endif ?>
<?php if ($children->count()) { echo "\n"; $this->yellow->layout($name, $children, $level+1); } ?></li>
<?php endforeach ?>
</ul>
<?php if (!$level): ?>
</nav>
<div class="navigation-banner"></div>
<?php endif ?>
Greetings Silver
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.