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 2 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 @@ -30,3 +30,9 @@
:caption: This is an incredibly long caption for a long menu

demo/long

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

demo/level1/index.rst
6 changes: 3 additions & 3 deletions sphinx_rtd_theme/breadcrumbs.html
Expand Up @@ -29,11 +29,11 @@
<div role="navigation" aria-label="{{ _('Breadcrumbs') }}">
<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
20 changes: 9 additions & 11 deletions src/sass/_theme_breadcrumbs.sass
@@ -1,21 +1,19 @@
.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: "/ "
benjaoming marked this conversation as resolved.
Show resolved Hide resolved

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