Added "current" functionality to tabs and made Wordpress use same tabs.php file
This commit is contained in:
parent
e2e9e81fd4
commit
12d663cba6
@ -23,17 +23,7 @@
|
||||
<div id="header">
|
||||
<div id="header-inner">
|
||||
<div id="title"><a href="http://aclindsay.com">aclindsay.com</a></div>
|
||||
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="http://aclindsay.com/home/">Home</a></li>
|
||||
<li><a href="http://aclindsay.com/projects/">Projects</a></li>
|
||||
<li><a href="http://aclindsay.com/about/">About</a></li>
|
||||
<li><a href="http://aclindsay.com/resume/">Resume</a></li>
|
||||
<li><a href="http://aclindsay.com/contact/">Contact</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<?php include("/home1/aclindsa/public_html/tabs.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
18
tabs.php
18
tabs.php
@ -1,9 +1,17 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="http://aclindsay.com/home/">Home</a></li>
|
||||
<li><a href="http://aclindsay.com/projects/">Projects</a></li>
|
||||
<li><a href="http://aclindsay.com/about/">About</a></li>
|
||||
<li><a href="http://aclindsay.com/resume/">Resume</a></li>
|
||||
<li><a href="http://aclindsay.com/contact/">Contact</a></li>
|
||||
<?php
|
||||
$tabs = array("Home" => "/home/",
|
||||
"Projects" => "/projects/",
|
||||
"About" => "/about/",
|
||||
"Resume" => "/resume/",
|
||||
"Contact" => "/contact/");
|
||||
foreach ($tabs as $name => $url) {
|
||||
if ($url == $_SERVER['REQUEST_URI'])
|
||||
echo "<li><a href=\"http://aclindsay.com".$url."\" class=\"current\">".$name."</a></li>";
|
||||
else
|
||||
echo "<li><a href=\"http://aclindsay.com".$url."\">".$name."</a></li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user