mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
fix: bizstyle theme: a complicated css query to modify long title in the breadcrumb doesn't work with some mobile browser (iPhone5s safari). Now basic layout has class "nav-item" and "nav-item-N" (like nav-item-0, 1, 2...) for breadcrumb items.
This commit is contained in:
parent
7475ac14f4
commit
8ed5272a61
@ -35,10 +35,10 @@
|
|||||||
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
|
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- block rootrellink %}
|
{%- block rootrellink %}
|
||||||
<li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
|
<li class="nav-item nav-item-0"><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{%- for parent in parents %}
|
{%- for parent in parents %}
|
||||||
<li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
|
<li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- block relbaritems %} {% endblock %}
|
{%- block relbaritems %} {% endblock %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
if (navigator.userAgent.indexOf('iPhone') > 0 ||
|
if (navigator.userAgent.indexOf('iPhone') > 0 ||
|
||||||
navigator.userAgent.indexOf('Android') > 0) {
|
navigator.userAgent.indexOf('Android') > 0) {
|
||||||
$("div.related ul li:not(.right) a").text("Top");
|
$("li.nav-item-0 a").text("Top");
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div.related:first ul li:not(.right) a").slice(1).each(function(i, item){
|
$("div.related:first ul li:not(.right) a").slice(1).each(function(i, item){
|
||||||
@ -33,11 +33,9 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
$(window).resize(function(){
|
$(window).resize(function(){
|
||||||
if ($(window).width() <= 776) {
|
if ($(window).width() <= 776) {
|
||||||
$("div.related:first ul li:not(.right):first a").text("Top");
|
$("li.nav-item-0 a").text("Top");
|
||||||
$("div.related:last ul li:not(.right):first a").text("Top");
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("div.related:first ul li:not(.right):first a").text("{{ shorttitle|e }}");
|
$("li.nav-item-0 a").text("{{ shorttitle|e }}");
|
||||||
$("div.related:last ul li:not(.right):first a").text("{{ shorttitle|e }}");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user