Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Breadcrumb Styles #1073

Merged
merged 7 commits into from Aug 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/demo/level1/index.rst
@@ -0,0 +1,9 @@

******************
Breadcrumb Level 1
******************

.. toctree::
:maxdepth: 3

level2/index.rst
9 changes: 9 additions & 0 deletions docs/demo/level1/level2/index.rst
@@ -0,0 +1,9 @@

******************************************
:mod:`Breadcrumb Level 2 <test_py_module>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clever test this!

******************************************

.. toctree::
:maxdepth: 3

level3/index.rst
9 changes: 9 additions & 0 deletions docs/demo/level1/level2/level3/index.rst
@@ -0,0 +1,9 @@

******************
Breadcrumb Level 3
******************

.. toctree::
:maxdepth: 3

level4/index.rst
9 changes: 9 additions & 0 deletions docs/demo/level1/level2/level3/level4/index.rst
@@ -0,0 +1,9 @@

******************
Breadcrumb Level 4
******************

.. toctree::
:maxdepth: 3

level5/index.rst
9 changes: 9 additions & 0 deletions docs/demo/level1/level2/level3/level4/level5/index.rst
@@ -0,0 +1,9 @@

******************
Breadcrumb Level 5
******************

.. toctree::
:maxdepth: 3

level6/index.rst
@@ -0,0 +1,4 @@

******************
Breadcrumb Level 6
******************
6 changes: 6 additions & 0 deletions docs/index.rst
Expand Up @@ -82,3 +82,9 @@ Development
:hidden:

demo/long

.. toctree::
:maxdepth: 3
:caption: Breadcrumbs

demo/level1/index.rst
6 changes: 3 additions & 3 deletions sphinx_rtd_theme/breadcrumbs.html
Expand Up @@ -22,11 +22,11 @@
<div role="navigation" aria-label="{{ _('Page navigation') }}">
<ul class="wy-breadcrumbs">
{%- block breadcrumbs %}
<li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a> &raquo;</li>
<li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a></li>
{%- for doc in parents %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
<li class="breadcrumb-item"><a href="{{ doc.link|e }}">{{ doc.title }}</a></li>
{%- endfor %}
<li>{{ title }}</li>
<li class="breadcrumb-item active">{{ title }}</li>
{%- endblock %}
{%- block breadcrumbs_aside %}
<li class="wy-breadcrumbs-aside">
Expand Down
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions src/sass/_theme_breadcrumbs.sass
@@ -1,21 +1,22 @@
.wy-breadcrumbs
+clearfix

.wy-breadcrumbs li
.wy-breadcrumbs > li
display: inline-block
padding-top: 5px
&.wy-breadcrumbs-aside
float: right
a
display: inline-block
padding: 5px
&:first-child
padding-left: 0
/* Style literals as links */
code
padding: 5px
border: none
background: none
&.literal
color: $text-color
all: inherit
color: inherit

.breadcrumb-item::before
content: "/"
color: #bbb
font-size: 13px
padding: 0 6px 0 3px

.wy-breadcrumbs-extra
margin-bottom: 0
color: $text-light
Expand Down