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

Add section with subpages to demo docs + fix hover styling #300

Merged
merged 1 commit into from
Jan 19, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/demo/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ the left sidebar to see how various elements look on this theme.
markdown
example_pandas
mult_headers
subpages/index

.. toctree::
:maxdepth: 3
Expand Down
10 changes: 10 additions & 0 deletions docs/demo/subpages/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Section with sub-pages
======================

To create an additional level of nesting in the sidebar, construct a
nested ``toctree``:

.. toctree::

subpage1
subpage2
9 changes: 9 additions & 0 deletions docs/demo/subpages/subpage1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Sub-page 1
==========

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lorem neque, interdum in ipsum nec,
finibus dictum velit. Ut eu efficitur arcu, id aliquam erat. In sit amet diam gravida, imperdiet tellus eu,
gravida nisl. Praesent aliquet odio eget libero elementum, quis rhoncus tellus tincidunt.
Suspendisse quis volutpat ipsum. Sed lobortis scelerisque tristique. Aenean condimentum risus tellus,
quis accumsan ipsum laoreet ut. Integer porttitor maximus suscipit. Mauris in posuere sapien.
Aliquam accumsan feugiat ligula, nec fringilla libero commodo sed. Proin et erat pharetra.
9 changes: 9 additions & 0 deletions docs/demo/subpages/subpage2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Sub-page 2
==========

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lorem neque, interdum in ipsum nec,
finibus dictum velit. Ut eu efficitur arcu, id aliquam erat. In sit amet diam gravida, imperdiet tellus eu,
gravida nisl. Praesent aliquet odio eget libero elementum, quis rhoncus tellus tincidunt.
Suspendisse quis volutpat ipsum. Sed lobortis scelerisque tristique. Aenean condimentum risus tellus,
quis accumsan ipsum laoreet ut. Integer porttitor maximus suscipit. Mauris in posuere sapien.
Aliquam accumsan feugiat ligula, nec fringilla libero commodo sed. Proin et erat pharetra.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pydata_sphinx_theme/static/webpack-macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

{% macro head_pre_bootstrap() %}
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet" />
<link href="{{ pathto('_static/css/index.e5250f280ebcea5fe1e84e6e44ee735a.css', 1) }}" rel="stylesheet" />
<link href="{{ pathto('_static/css/index.1f01dc88d85638299a1b8a4965d7daed.css', 1) }}" rel="stylesheet" />
{% endmacro %}

{% macro head_js_preload() %}
<link rel="preload" as="script" href="{{ pathto('_static/js/index.316d110deaf8b9ce2406.js', 1) }}">
<link rel="preload" as="script" href="{{ pathto('_static/js/index.884e4d899485f07b15bb.js', 1) }}">
{% endmacro %}

{% macro body_post() %}
<script src="{{ pathto('_static/js/index.316d110deaf8b9ce2406.js', 1) }}"></script>
<script src="{{ pathto('_static/js/index.884e4d899485f07b15bb.js', 1) }}"></script>
{% endmacro %}
6 changes: 6 additions & 0 deletions src/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ table.field-list {
padding: 0.25rem 1.5rem;
font-size: 0.9em;
color: rgba(var(--color-sidebar-link), 1);

&:hover {
color: rgba(var(--color-sidebar-link-hover), 1);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is probably not the most robust way for doing this (also only works for 1 level of additional nesting), but since this is already done like that for the other style elements, this is the quick fix.
But we should probably rework this part a bit more general.

text-decoration: none;
background-color: transparent;
}
}

.active {
Expand Down