styling, navigation bar, theming, article lists, page routing.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
$current_page = $_SERVER['SCRIPT_NAME'];
|
||||
$nav = '
|
||||
<nav>
|
||||
<div class="row_no_margin">
|
||||
<div class="site_navigation">
|
||||
<ul>
|
||||
<li><a href="/index.php"' . ($current_page == '/index.php' ? ' class="underline"' : '') . '>Home</a></li>
|
||||
<li><a href="/articles.php"' . ($current_page == '/articles.php' ? ' class="underline"' : '') . '>Articles</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<form method="post">
|
||||
';
|
||||
|
||||
$theme_toggle = '';
|
||||
if ($_SESSION['theme'] == 'dark')
|
||||
$theme_toggle = 'light';
|
||||
else
|
||||
$theme_toggle = 'dark';
|
||||
|
||||
$nav .= '
|
||||
<button id="theme-toggle" value="' . $theme_toggle . '" name="theme" onchange="this.form.submit()"><i class="nf ' . ($theme_toggle == 'dark' ? 'nf-oct-moon' : 'nf-oct-sun') . '"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
';
|
||||
|
||||
echo $nav;
|
||||
Reference in New Issue
Block a user