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) mkdocs-material-0.x.x (2016-xx-xx)
* Fixed styles for deep navigational hierarchies
* Fixed webfont delivery problem when hosted in subdirectories * Fixed webfont delivery problem when hosted in subdirectories
* Added option to configure fonts in mkdocs.yml with fallbacks * Added option to configure fonts in mkdocs.yml with fallbacks
* Set download link to latest version if available * 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; font-style: normal;
} }
</style> </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' %} {% if config.extra.font != 'none' %}
{% set text = 'Ubuntu' %} {% set text = 'Ubuntu' %}
{% if config.extra.font and config.extra.font.text %} {% if config.extra.font and config.extra.font.text %}

View File

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

View File

@ -2,5 +2,5 @@
"assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico", "assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico",
"assets/javascripts/application.js": "assets/javascripts/application-c6d2e828bd.js", "assets/javascripts/application.js": "assets/javascripts/application-c6d2e828bd.js",
"assets/javascripts/modernizr.js": "assets/javascripts/modernizr-4ab42b99fd.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 %} {% if nav_item.children %}
<li> <li>
<hr>
<span class="section">{{ nav_item.title }}</span> <span class="section">{{ nav_item.title }}</span>
<ul> <ul>
{% for nav_item in nav_item.children %} {% for nav_item in nav_item.children %}

View File

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

View File

@ -66,10 +66,25 @@
} }
/* /*
* Links to chapters inside the current article * Links to anchors
*/ */
.toc li.anchor a { .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 { .section {
display: block; display: block;
font-size: 11px;
padding: 14.5px 24px; padding: 14.5px 24px;
} }

View File

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

View File

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

View File

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