Merge pull request #19 from joryphillips/master

Modify UL/LI structure in sidebar/menu, minor CSS change
This commit is contained in:
Diego Najar 2015-08-11 10:29:15 -03:00
commit 5554d517bf
2 changed files with 18 additions and 6 deletions

View File

@ -50,25 +50,25 @@ class pluginPages extends Plugin {
if($Site->homepage()!==$parent->key())
{
// Print the parent
$html .= '<li><a class="parent" href="'.$parent->permalink().'">'.$parent->title().'</a></li>';
$html .= '<li><a class="parent" href="'.$parent->permalink().'">'.$parent->title().'</a>';
// Check if the parent hash children
// Check if the parent has children
if(isset($pagesParents[$parent->key()]))
{
$children = $pagesParents[$parent->key()];
// Print the children
$html .= '<li><ul>';
$html .= '<ul>';
foreach($children as $child)
{
$html .= '<li><a class="children" href="'.$child->permalink().'">'.$child->title().'</a></li>';
$html .= '<li><a class="children" href="'.$child->permalink().'">'.$child->title().'</a></li>';
}
$html .= '</ul></li>';
$html .= '</ul>';
}
}
}
$html .= '</ul>';
$html .= '</li></ul>';
$html .= '</div>';
$html .= '</div>';

View File

@ -64,6 +64,12 @@ code {
letter-spacing: 0.1em;
}
.content {
padding-top: 3em;
margin-right: 30px;
margin-left: 30px;
}
#layout {
padding: 0;
}
@ -268,6 +274,12 @@ div.plugin-content ul > li > ul > li {
margin: 0;
}
div.plugin-content ul > li > ul > li:before {
color: #777;
content: "—";
padding-right: 5px;
}
div.plugin-content ul > li > ul > li > a {
color: #777;
}