Reorganize sidebar menu so that child pages are listed under the current page, instead of in a whole other menu.
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
This commit is contained in:
3
templates/base.css
Normal file
3
templates/base.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#sidebar .highlight ul {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>{{ page.name }}</title>
|
<title>{{ page.title }}</title>
|
||||||
<meta name="Author" content="John Zaitseff, J.Zaitseff@zap.org.au" />
|
<meta name="Author" content="John Zaitseff, J.Zaitseff@zap.org.au" />
|
||||||
<meta name="Description" content="A minimal template page to use with the Sinorcaish CSS stylesheet" />
|
<meta name="Description" content="A minimal template page to use with the Sinorcaish CSS stylesheet" />
|
||||||
<meta name="Copyright" content="This file may be redistributed and/or modified without limitation" />
|
<meta name="Copyright" content="This file may be redistributed and/or modified without limitation" />
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
<link rev="made" href="mailto:J.Zaitseff@zap.org.au" />
|
<link rev="made" href="mailto:J.Zaitseff@zap.org.au" />
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
<link rel="StyleSheet" href="{{ relative_root | safe }}sinorcaish-screen.css" type="text/css" media="screen" />
|
<link rel="StyleSheet" href="{{ relative_root | safe }}sinorcaish-screen.css" type="text/css" media="screen" />
|
||||||
|
<link rel="StyleSheet" href="{{ relative_root | safe }}base.css" type="text/css" media="screen" />
|
||||||
<link rel="StyleSheet" href="{{ relative_root | safe }}sinorcaish-print.css" type="text/css" media="print" />
|
<link rel="StyleSheet" href="{{ relative_root | safe }}sinorcaish-print.css" type="text/css" media="print" />
|
||||||
{% endblock styles %}
|
{% endblock styles %}
|
||||||
</head>
|
</head>
|
||||||
@@ -81,18 +82,25 @@
|
|||||||
<p class="title"><a href="{{ relative_root | safe }}{{ page.parent.url }}">{{ page.parent.name }}</a></p>
|
<p class="title"><a href="{{ relative_root | safe }}{{ page.parent.url }}">{{ page.parent.name }}</a></p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for child in page.parent.children %}
|
{% for child in page.parent.children %}
|
||||||
<li{% if child == page.name %} class="highlight"{% endif %}><a href="{% if page.is_directory %}../{% endif %}{{ child }}">{{ child }}</a></li>
|
<li{% if child == page.name %} class="highlight"{% endif %}>
|
||||||
|
<a href="{% if page.is_directory %}../{% endif %}{{ child }}">{{ child | file_stem }}</a>
|
||||||
|
{% if page.is_directory and child == page.name %}
|
||||||
|
<ul>
|
||||||
|
{% for child in page.children %}
|
||||||
|
<li><a href="{{ child }}">{{ child | file_stem }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% else %}
|
||||||
|
|
||||||
{% if page.is_directory %}
|
|
||||||
<div>
|
<div>
|
||||||
<p class="title"><a href="{{ relative_root | safe }}{{ page.url }}">{{ page.name }}</a></p>
|
<p class="title"><a href="{{ relative_root | safe }}{{ page.url }}">{{ page.name }}</a></p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for child in page.children %}
|
{% for child in page.children %}
|
||||||
<li><a href="{{ child }}">{{ child }}</a></li>
|
<li><a href="{{ child }}">{{ child | file_stem }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -110,7 +118,7 @@
|
|||||||
{% for ancestor in ancestors %}
|
{% for ancestor in ancestors %}
|
||||||
<a href="{{ relative_root | safe }}{{ ancestor.url }}">{% if ancestor.name %} {{ ancestor.name }} {% else %} Home {% endif %}</a> »
|
<a href="{{ relative_root | safe }}{{ ancestor.url }}">{% if ancestor.name %} {{ ancestor.name }} {% else %} Home {% endif %}</a> »
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a href="{{ relative_root | safe }}{{ page.url }}">{% if page.name %} {{ page.name }} {% else %} Home {% endif %}</a>
|
<a href="{{ relative_root | safe }}{{ page.url }}">{% if page.name %} {{ page.title }} {% else %} Home {% endif %}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
Reference in New Issue
Block a user