Fixed styles for deep navigational hierarchies

This commit is contained in:
squidfunk 2016-02-16 14:49:37 +01:00
parent cec4f1885b
commit 42ba9c32cf
13 changed files with 88 additions and 69 deletions

View File

@ -1,5 +1,6 @@
mkdocs-material-0.x.x (2016-xx-xx)
* Fixed styles for deep navigational hierarchies
* Fixed webfont delivery problem when hosted in subdirectories
* Added option to configure fonts in mkdocs.yml with fallbacks
* Set download link to latest version if available

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -53,7 +53,7 @@
font-style: normal;
}
</style>
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-fdabd46b62.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-aa50e5707f.css">
{% if config.extra.font != 'none' %}
{% set text = 'Ubuntu' %}
{% if config.extra.font and config.extra.font.text %}

View File

@ -34,35 +34,35 @@
</ul>
<hr>
{% endif %}
<ul class="toc">
{% for nav_item in nav %}
{% include "nav.html" %}
{% endfor %}
<div class="toc">
<ul>
{% for nav_item in nav %}
{% include "nav.html" %}
{% endfor %}
</ul>
{% if config.extra.author %}
<li>
<hr>
<span class="section">The author</span>
<ul>
{% if config.extra.author.twitter %}
{% set author = config.extra.author.twitter %}
<li>
<a href="https://twitter.com/{{ author }}" target="_blank" title="@{{ author }} on Twitter">
@{{ author }} on Twitter
</a>
</li>
{% endif %}
{% if config.extra.author.github %}
{% set author = config.extra.author.github %}
<li>
<a href="https://github.com/{{ author }}" target="_blank" title="@{{ author }} on GitHub">
@{{ author }} on GitHub
</a>
</li>
{% endif %}
</ul>
</li>
<hr>
<span class="section">The author</span>
<ul>
{% if config.extra.author.twitter %}
{% set author = config.extra.author.twitter %}
<li>
<a href="https://twitter.com/{{ author }}" target="_blank" title="@{{ author }} on Twitter">
@{{ author }} on Twitter
</a>
</li>
{% endif %}
{% if config.extra.author.github %}
{% set author = config.extra.author.github %}
<li>
<a href="https://github.com/{{ author }}" target="_blank" title="@{{ author }} on GitHub">
@{{ author }} on GitHub
</a>
</li>
{% endif %}
</ul>
{% endif %}
</ul>
</div>
</div>
</div>
</nav>

View File

@ -2,5 +2,5 @@
"assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico",
"assets/javascripts/application.js": "assets/javascripts/application-c6d2e828bd.js",
"assets/javascripts/modernizr.js": "assets/javascripts/modernizr-4ab42b99fd.js",
"assets/stylesheets/application.css": "assets/stylesheets/application-fdabd46b62.css"
"assets/stylesheets/application.css": "assets/stylesheets/application-aa50e5707f.css"
}

View File

@ -1,6 +1,5 @@
{% if nav_item.children %}
<li>
<hr>
<span class="section">{{ nav_item.title }}</span>
<ul>
{% for nav_item in nav_item.children %}

View File

@ -50,10 +50,17 @@
* Hovered link
*/
&:hover, &:focus {
color: $accent;
color: $primary;
}
}
/*
* Color anchors menu
*/
.anchor a {
border-left: 2px solid $primary;
}
/*
* Main sections
*/

View File

@ -66,10 +66,25 @@
}
/*
* Links to chapters inside the current article
* Links to anchors
*/
.toc li.anchor a {
padding: 10px 24px 10px 48px;
margin-left: 12px;
padding: 10px 24px 10px 12px;
}
/*
* Nested links
*/
.toc li ul {
margin-left: 12px;
}
/*
*
*/
.current + ul {
margin-bottom: 9px;
}
/*
@ -77,7 +92,6 @@
*/
.section {
display: block;
font-size: 11px;
padding: 14.5px 24px;
}

View File

@ -47,7 +47,6 @@
* Main sections
*/
.section {
text-transform: uppercase;
font-weight: 700;
}
}

View File

@ -55,43 +55,43 @@
{% endif %}
<!-- Table of contents -->
<ul class="toc">
{% for nav_item in nav %}
{% include "nav.html" %}
{% endfor %}
<div class="toc">
<ul>
{% for nav_item in nav %}
{% include "nav.html" %}
{% endfor %}
</ul>
<!-- Author-related links -->
{% if config.extra.author %}
<li>
<hr />
<span class="section">The author</span>
<ul>
<hr />
<span class="section">The author</span>
<ul>
<!-- Twitter -->
{% if config.extra.author.twitter %}
{% set author = config.extra.author.twitter %}
<li>
<a href="https://twitter.com/{{ author }}" target="_blank"
title="@{{ author }} on Twitter">
@{{ author }} on Twitter
</a>
</li>
{% endif %}
<!-- Twitter -->
{% if config.extra.author.twitter %}
{% set author = config.extra.author.twitter %}
<li>
<a href="https://twitter.com/{{ author }}" target="_blank"
title="@{{ author }} on Twitter">
@{{ author }} on Twitter
</a>
</li>
{% endif %}
<!-- GitHub -->
{% if config.extra.author.github %}
{% set author = config.extra.author.github %}
<li>
<a href="https://github.com/{{ author }}" target="_blank"
title="@{{ author }} on GitHub">
@{{ author }} on GitHub
</a>
</li>
{% endif %}
</ul>
</li>
<!-- GitHub -->
{% if config.extra.author.github %}
{% set author = config.extra.author.github %}
<li>
<a href="https://github.com/{{ author }}" target="_blank"
title="@{{ author }} on GitHub">
@{{ author }} on GitHub
</a>
</li>
{% endif %}
</ul>
{% endif %}
</ul>
</div>
</div>
</div>
</nav>

View File

@ -1,7 +1,6 @@
<!-- Render sections -->
{% if nav_item.children %}
<li>
<hr />
<span class="section">{{ nav_item.title }}</span>
<ul>