1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-10-31 21:33:00 +00:00

continuing work on the new theme. $settings->navlinks is now $settings->nav_links

This commit is contained in:
Starbeamrainbowlabs 2015-07-16 10:16:02 +01:00
parent c02243921c
commit 505eae21d0
5 changed files with 8 additions and 9 deletions

View file

@ -288,6 +288,7 @@ class page_renderer
<p>Powered by Pepperminty Wiki, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or open an issue <a href='//github.com/sbrl/Pepperminty-Wiki'>on github</a>.</p>
<p>Your local friendly administrators are {admins-name-list}.
<p>This wiki is managed by <a href='mailto:{admin-details-email}'>{admin-details-name}</a>.</p>
{nav-bottom}
</footer>
{all-pages-datalist}";
public static $minimal_content_template = "{content}
@ -322,7 +323,7 @@ class page_renderer
$settings->favicon,
self::get_css_as_html(),
self::render_navigation_bar(),
self::render_navigation_bar($settings->navlinks),
$settings->admindetails["name"],
$settings->admindetails["email"],
@ -367,7 +368,7 @@ class page_renderer
public static $nav_divider = "<span class='nav-divider inflexible'> | </span>";
public static function render_navigation_bar()
public static function render_navigation_bar($nav_links)
{
global $settings, $user, $isloggedin, $page;
$result = "<nav>\n";
@ -382,7 +383,7 @@ class page_renderer
$result .= "<span class='inflexible'>Browsing as Anonymous.</span>" . /*page_renderer::$nav_divider . */"<span><a href='index.php?action=login'>Login</a></span>" . page_renderer::$nav_divider;
// Loop over all the navigation links
foreach($settings->navlinks as $item)
foreach($nav_links as $item)
{
if(is_string($item))
{

View file

@ -29,7 +29,7 @@
"author": "Starbeamrainbowlabs",
"description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
"id": "page-edit",
"lastupdate": 1436889893
"lastupdate": 1437037943
},
{
"name": "Help page",

View file

@ -118,8 +118,6 @@ register_module([
file_put_contents("./pageindex.json", json_encode($pageindex, JSON_PRETTY_PRINT));
// Todo Update the parent page entries in the page index if they exist
if(isset($_GET["newpage"]))
http_response_code(201);
else

View file

@ -91,7 +91,7 @@ $settings->admindetails = [
// search: Expands to a search box.
// divider: Expands to a divider to separate links.
// more: Expands to the "More..." submenu.
$settings->navlinks = [
$settings->nav_links = [
[ "Home", "index.php" ],
[ "Login", "index.php?action=login" ],
"search",