Skip to content

Commit

Permalink
Test theme inheritance on self
Browse files Browse the repository at this point in the history
  • Loading branch information
guyer committed Mar 6, 2024
1 parent 8b00e84 commit 8ed4227
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 1 deletion.
19 changes: 19 additions & 0 deletions docs/_themes/ntd2d/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends "basic/layout.html" %}

{%- block extrahead %}
{{ super() }}

<link rel="stylesheet" href="https://pages.nist.gov/nist-header-footer/css/nist-combined.css">
<script src="https://code.jquery.com/jquery-3.6.2.min.js" type="text/javascript" defer="defer"></script>
{header_footer_script}
{% endblock %}


{%- block footer %}

{{ super() }}

<!-- Taken from https://www.filamentgroup.com/lab/html-includes/#another-demo%3A-including-another-html-file -->
<iframe src="{{ pathto('_static/ntd2d_menu.html', 1) }}" onload="this.before((this.contentDocument.body||this.contentDocument).children[0]);this.remove()"></iframe>

{%- endblock %}
78 changes: 78 additions & 0 deletions docs/_themes/ntd2d/static/ntd2d.css_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
@import url("sphinxdoc.css");


.dropbtn {
position: fixed;
right: 20px;
bottom: 20px;
}

.dropdown {
position: fixed;
display: inline-block;
right: 20px;
left: auto;
width: auto;
bottom: 20px;
top: auto;
height: auto;
z-index: 400;
}

.dropdown-content {
display: none;
position: relative;
background-color: #f1f1f1;
min-width: 160px;
max-width: 250px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
right: 0px;
left: auto;
bottom: 20px;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
font-family: Helvetica;
font-size: smaller;
}

.dropdown-content h2 {
color: #707070;
font-size: smaller;
}

.dropdown-content ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
}

.dropdown-content li {
float: left;
}

.dropdown-content li a {
color: black;
/* padding: 12px 16px; */
text-decoration: none;
display: block;
border-bottom: 0px;
text-align: center;
padding-left: 6px;
padding-right: 6px;
}

.dropdown-content hr {
margin-left: -10px;
width: 100%;
margin-right: -10px;
}

.dropdown-content a:hover {text-decoration: underline;}

.dropdown:hover .dropdown-content {display: block;}

.dropdown:hover .dropbtn {background-color: 'ButtonBorder';}
3 changes: 3 additions & 0 deletions docs/_themes/ntd2d/theme.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[theme]
inherit = sphinxdoc
stylesheet = ntd2d.css
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_theme = 'ntd2d'
html_static_path = ['_static']

html_show_copyright = False

0 comments on commit 8ed4227

Please sign in to comment.