Small HTML reconfigure and CSS adjustments
This PHP/HTML change removes the blank UL from child pages and instead uses the parent UL identified in the settings. The change also puts the child list ‘dash’ into the CSS and adds margins to the content.
This commit is contained in:
parent
273d897ec3
commit
52bfcf4d89
|
@ -50,25 +50,25 @@ class pluginPages extends Plugin {
|
||||||
if($Site->homepage()!==$parent->key())
|
if($Site->homepage()!==$parent->key())
|
||||||
{
|
{
|
||||||
// Print the parent
|
// 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()]))
|
if(isset($pagesParents[$parent->key()]))
|
||||||
{
|
{
|
||||||
$children = $pagesParents[$parent->key()];
|
$children = $pagesParents[$parent->key()];
|
||||||
|
|
||||||
// Print the children
|
// Print the children
|
||||||
$html .= '<li><ul>';
|
$html .= '<ul>';
|
||||||
foreach($children as $child)
|
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>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,12 @@ code {
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding-top: 3em;
|
||||||
|
margin-right: 30px;
|
||||||
|
margin-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
#layout {
|
#layout {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -268,6 +274,12 @@ div.plugin-content ul > li > ul > li {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.plugin-content ul > li > ul > li:before {
|
||||||
|
color: #777;
|
||||||
|
content: "—";
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
div.plugin-content ul > li > ul > li > a {
|
div.plugin-content ul > li > ul > li > a {
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue