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

Theme update - Update all the layout sections/components and css features #59

Merged
merged 118 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
ad91b60
Re-populate layout
erogluorhan Feb 5, 2024
505a6a0
Remove docs-navbar block from layout
erogluorhan Feb 5, 2024
9a089a6
Remove docs-sidebar block from layout
erogluorhan Feb 5, 2024
2e3172c
Remove topbar.html block from layout
erogluorhan Feb 5, 2024
ae72d75
Remove _templates/prev-next.html block from layout
erogluorhan Feb 5, 2024
d809c0e
Add super() call to content block in layout
erogluorhan Feb 5, 2024
692671b
Add super() call to content block in layout
erogluorhan Feb 5, 2024
d21ce54
Cut the block content
erogluorhan Feb 5, 2024
1ab2637
Add banner and shim back
erogluorhan Feb 5, 2024
197718a
Add super() call back
erogluorhan Feb 6, 2024
131e7b7
Include _templates/prev-next.html
erogluorhan Feb 6, 2024
b6c362c
Add shim back
erogluorhan Feb 6, 2024
272511d
Add more into layout
erogluorhan Feb 6, 2024
6171011
Remove block docs_sidebar
erogluorhan Feb 6, 2024
d4157bf
Remove include topbar.html
erogluorhan Feb 6, 2024
d1da3f1
Convert _templates/ to components/
erogluorhan Feb 6, 2024
fb2a790
Remove super() call
erogluorhan Feb 6, 2024
93549b1
Convert components/ to _templates/components/
erogluorhan Feb 6, 2024
0343cbc
Footer and prev-next from parent
erogluorhan Feb 6, 2024
ef8ad6e
prev-next from parent
erogluorhan Feb 6, 2024
0167464
More layout
erogluorhan Feb 7, 2024
afa5983
More layout
erogluorhan Feb 7, 2024
1d830cd
Fix super.super() call in layout
erogluorhan Feb 7, 2024
e9cc5dc
More layout
erogluorhan Feb 7, 2024
33a805e
docs_navbar
erogluorhan Feb 7, 2024
e5eca4c
docs_navbar
erogluorhan Feb 7, 2024
04782ce
docs_navbar
erogluorhan Feb 7, 2024
01490fb
docs_navbar
erogluorhan Feb 8, 2024
7c8d359
docs_navbar
erogluorhan Feb 8, 2024
d309679
docs_navbar
erogluorhan Feb 8, 2024
253c61a
footer and silenced elements
erogluorhan Feb 8, 2024
a611b68
docs_navbar
erogluorhan Feb 8, 2024
33d92b6
docs_navbar
erogluorhan Feb 8, 2024
795551e
shim and banner
erogluorhan Feb 8, 2024
c23644e
--breakpoint-md to --bs-breakpoint-md
erogluorhan Feb 14, 2024
7da7ea8
--breakpoint-md to --bs-breakpoint-md
erogluorhan Feb 14, 2024
2b75ae2
footer
erogluorhan Feb 14, 2024
262c772
remove footer and more
erogluorhan Feb 14, 2024
c4ae549
Add back footer
erogluorhan Feb 14, 2024
2b1005c
footer
erogluorhan Feb 14, 2024
35ec2d0
footer
erogluorhan Feb 14, 2024
ccd125b
footer
erogluorhan Feb 15, 2024
82915bb
footer
erogluorhan Feb 15, 2024
64bcc97
footer
erogluorhan Feb 15, 2024
977bb6e
docs_body
erogluorhan Feb 15, 2024
9421890
docs_main super call
erogluorhan Feb 15, 2024
d9df853
footer
erogluorhan Feb 15, 2024
483250c
footer
erogluorhan Feb 15, 2024
e1c9552
bd-footer
erogluorhan Feb 15, 2024
9e04e22
bd-footer
erogluorhan Feb 15, 2024
6a32965
bd-footer
erogluorhan Feb 15, 2024
76e3272
bd-footer
erogluorhan Feb 15, 2024
330cd38
remove footer
erogluorhan Feb 15, 2024
33ab49c
add back footer
erogluorhan Feb 15, 2024
4c3ae1a
bd-footer
erogluorhan Feb 15, 2024
001f590
bd-footer super
erogluorhan Feb 15, 2024
c87c2b9
footer
erogluorhan Feb 15, 2024
a90249b
footer
erogluorhan Feb 15, 2024
be7395d
footer
erogluorhan Feb 15, 2024
f8eab8e
footer
erogluorhan Feb 15, 2024
bd57526
footer
erogluorhan Feb 15, 2024
4cfb35c
footer
erogluorhan Feb 15, 2024
b5e52e6
footer.html
erogluorhan Feb 15, 2024
cac7c33
footer.html
erogluorhan Feb 15, 2024
92c8309
footer.html debug
erogluorhan Feb 15, 2024
5305bdb
footer.html debug
erogluorhan Feb 15, 2024
065cad7
footer
erogluorhan Feb 15, 2024
5618720
footer
erogluorhan Feb 15, 2024
53ec0fb
sections/footer
erogluorhan Feb 15, 2024
e73349d
footer
erogluorhan Feb 16, 2024
ed25706
footer
erogluorhan Feb 16, 2024
6cb59b6
footer-logos.html
erogluorhan Feb 16, 2024
adfa884
footer-info.html
erogluorhan Feb 16, 2024
dcdfd11
revert footer-info.html footer-logos.html
erogluorhan Feb 16, 2024
a4a1783
footer.html
erogluorhan Feb 16, 2024
53e5d96
footer.html
erogluorhan Feb 16, 2024
2396146
footer.html
erogluorhan Feb 16, 2024
da97d6e
footer.html
erogluorhan Feb 16, 2024
fea95aa
footer.html
erogluorhan Feb 16, 2024
9e52162
footer.html
erogluorhan Feb 16, 2024
c864c19
footer
erogluorhan Feb 16, 2024
100c888
footer
erogluorhan Feb 16, 2024
a47b3ee
footer
erogluorhan Feb 16, 2024
1e6e280
footer
erogluorhan Feb 16, 2024
70bf76b
footer
erogluorhan Feb 16, 2024
7b32cf4
footer
erogluorhan Feb 16, 2024
2649b0a
footer
erogluorhan Feb 16, 2024
a5abd9c
layout
erogluorhan Feb 16, 2024
a712cc3
css
erogluorhan Feb 16, 2024
c565073
css colors
erogluorhan Feb 16, 2024
e3bd741
css colors
erogluorhan Feb 16, 2024
bccfabd
css colors
erogluorhan Feb 16, 2024
83338ca
layout banner
erogluorhan Feb 16, 2024
d99bb10
css colors
erogluorhan Feb 16, 2024
591410f
css colors
erogluorhan Feb 16, 2024
51fe08b
css colors
erogluorhan Feb 16, 2024
bb47c3f
css colors
erogluorhan Feb 16, 2024
dd2d0f1
css colors
erogluorhan Feb 16, 2024
ee89325
footer.html
erogluorhan Feb 16, 2024
3222a55
css
erogluorhan Feb 16, 2024
f1bff06
css
erogluorhan Feb 16, 2024
bd51105
css
erogluorhan Feb 16, 2024
a794ce5
css
erogluorhan Feb 16, 2024
5c2680b
css
erogluorhan Feb 16, 2024
24029cb
scss
erogluorhan Feb 16, 2024
63ae130
css
erogluorhan Feb 16, 2024
8a1ffb8
css
erogluorhan Feb 16, 2024
5422dcd
css
erogluorhan Feb 16, 2024
a2daf3d
css and scss
erogluorhan Feb 16, 2024
95604a9
sphinx basic scss
erogluorhan Feb 16, 2024
86b294e
sphinx basic scss
erogluorhan Feb 16, 2024
14fb8a3
sphinx basic scss
erogluorhan Feb 16, 2024
8f9ac0f
css colors
erogluorhan Feb 16, 2024
b89d89c
css colors
erogluorhan Feb 16, 2024
b975243
css colors
erogluorhan Feb 16, 2024
cb06128
css colors
erogluorhan Feb 17, 2024
3b5eeae
Update docs
erogluorhan Feb 17, 2024
48c771a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 17, 2024
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
21 changes: 14 additions & 7 deletions docs/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,26 @@ Footer Bar
----------

In addition to the top navigation bar at the top of each page, the full-width footer
bar from the PyData Sphinx Theme has been readded to the bottom of every page. By default, the
footer bar only contains copyright and additional information about the Sphinx version (if configured).
bar from the PyData Sphinx Theme has been re-added to the bottom of every page.

.. note::
While PyData Sphinx Theme has ``footer_start``, ``footer_center``, and ``footer_end`` to set,
our theme supports only ``footer_start``, and allows to add below structures into it.

By default, the footer bar only contains copyright and additional information about the Sphinx version (if configured).
Three additional sections can be added to the footer: a *logo bar*, a *bottom navigation menu*, and
an *extras* section.

Footer Logo Bar
^^^^^^^^^^^^^^^

The *logo bar* section can be used to add logo images for various partner or collaboration
institutions, products, or other entities involved with site itself. These are spread out
institutions, products, or other entities involved with site itself. These are spread out
evenly across the footer in a light-gray full-width box.

To add logo images to the *logo bar* in the footer, use the ``footer_logos`` option of the
``html_theme_options``. The name given to each logo is used as the alternate name of
the image in HTML.
``html_theme_options`` and then add it to ``footer_start``. The name given to each logo is
used as the alternate name of the image in HTML.

.. tab-set-code:: Sphinx

Expand All @@ -99,7 +104,8 @@ the image in HTML.
'footer_logos': {
'name1': 'images/logo1.svg',
'name2': 'images/logo2.svg',
}
},
"footer_start": ["footer-logos"]
}

.. tab-set-code:: Jupyter Book
Expand Down Expand Up @@ -162,6 +168,7 @@ the keys in the ``navbar_links`` option above).
],
},
],
"footer_start": ["footer-menu"]
}

.. tab-set-code:: Jupyter Book
Expand Down Expand Up @@ -195,7 +202,7 @@ Extra Footer
The *extra* section of the footer is displayed immediately below the *info* section, and
it can be set with the
`extra footer <https://sphinx-book-theme.readthedocs.io/en/latest/customize/index.html?highlight=extra_footer#theme-options>`_
(``extra_footer``) Sphinx Book Theme option.
(``extra_footer``) Sphinx Book Theme option and then added to the ``footer_start``.

Special Page layouts
--------------------
Expand Down
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}

jupyter_cache = ""
jupyter_execute_notebooks = "cache"
nb_execution_mode = "cache"
execution_allow_errors = False
execution_excludepatterns = []
execution_in_temp = False
Expand Down Expand Up @@ -146,7 +146,9 @@
"use_repository_button": True,
"use_download_button": True,
"logo_only": True,
"logo_link": "https://sphinx-pythia-theme.readthedocs.io",
"logo": {
"link": "https://sphinx-pythia-theme.readthedocs.io",
},
"show_toc_level": 2,
"navbar_align": "left",
"navbar_links": [
Expand All @@ -172,6 +174,7 @@
},
"UAlbany": "images/UAlbany-A2-logo-purple-gold.svg",
},
"footer_start": ["footer-logos", "footer-menu", "footer-info", "footer-extra"],
"extra_navbar": ('Theme by <a href="https://projectpythia.org">Project Pythia</a>'),
}

Expand Down
21 changes: 13 additions & 8 deletions sphinx_pythia_theme/footer.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<footer class="footer">
<div class="container-fluid m-0 p-0">
{% for footer_item in theme_footer_items %}
<div class="footer-item">
{% include footer_item %}
{% if theme_footer_start or theme_footer_center or theme_footer_end %}
{# Implement only footer_start to house all the #}
{# footer items in it, e.g. logos, menu, etc. Use of #}
{# footer_center and footer_end may probably break how the rest looks #}
{% if theme_footer_start %}
<div class="footer-items__start">
<div class="container-fluid m-0 p-0">
{% for item in theme_footer_start %}
<div class="footer-item">{% include item %}</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</footer>
{% endif %}
{% endif %}
70 changes: 69 additions & 1 deletion sphinx_pythia_theme/layout.html
Original file line number Diff line number Diff line change
@@ -1 +1,69 @@
{%- extends "sphinx_book_theme/layout.html" %}
{%- extends "sphinx_book_theme/layout.html" %}

{%- block body_tag %}
{# set up with scrollspy to update the toc as we scroll #}
{{ super.super() }}
{%- endblock %}

{%- block content %}
{%- block docs_navbar %}
<header class="navbar navbar-dark navbar-expand-lg bg-dark fixed-top bd-header shadow" id="navbar-main">
{%- include "sections/header.html" %}
</header>
{%- endblock %}

{%- if theme_page_layouts and pagename in theme_page_layouts %}
<div class="container-fluid">
{%- else %}
<div class="container-xl">
{%- endif %}
<div class="row">
{%- block docs_toc %}
{%- if sidebars %}
{{ super() }}
{%- else %}
<div class="d-none col-12 col-md-1 col-xl-2 bd-sidebar no-sidebar"></div>
{%- endif %}
{%- endblock %}

{# Main content area #}
{%- block docs_main %}
{%- if theme_page_layouts and pagename in theme_page_layouts %}
{%- include theme_page_layouts[pagename] %}
{%- else %}
<main class="col py-md-3 pl-md-4 bd-content overflow-auto" role="main">
{%- block docs_body %}
<div id="main-content" class="row">
<div class="col-12 col-md-9 pl-md-3 pr-md-0">
{{ super.super() }}
</div>
</div>
{%- endblock %}
{{ super.super() }}
</main>
{%- endif %}
{%- endblock %}

</div>
</div>
</div>

{%- block scripts_end %}
{{ _webpack.body_post() }}
{%- endblock %}

{%- endblock %}

{# Use our own footer to use only footer_start and display multiple #}
{# structures in it, e.g. logos, menu, etc. #}
{%- block footer %}
<footer class="bd-footer">
{% include "footer.html" %}
</footer>
{%- endblock %}

{# Silence the sidebars and relbars since we define our own #}
{% block header %}{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}
5 changes: 2 additions & 3 deletions sphinx_pythia_theme/page-standalone.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<div class="col p-0">
{{ apply_denested_layout(body) }}
{% if theme_show_prev_next %}
{% include "_templates/prev-next.html" %}
{% endif %}
</div>
{% include "components/prev-next.html" %}
{% endif %} </div>
</div>
</main>
3 changes: 2 additions & 1 deletion sphinx_pythia_theme/static/sphinx-pythia-theme.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sphinx_pythia_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ navbar_center = navbar-menu.html
navbar_links =
footer_logos =
footer_menu =
footer_items = footer-logos.html, footer-menu.html, footer-info.html, footer-extra.html
footer-items__start = footer-logos.html, footer-menu.html, footer-info.html, footer-extra.html
page_sidebar_items = page-toc.html
75 changes: 38 additions & 37 deletions src/scss/sphinx-pythia-theme.scss
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
@import 'sphinx-book-theme.css';

:root {
--spt-font-body: 'Poppins';
--spt-font-headings: 'Poppins';
--spt-font-footnote: 'Cormorant';

--spt-color-gray-100: 248, 249, 250;
--spt-color-gray-200: 233, 236, 239;
--spt-color-gray-300: 222, 226, 230;
--spt-color-gray-400: 206, 212, 218;
--spt-color-gray-500: 173, 181, 189;
--spt-color-gray-600: 108, 117, 125;
--spt-color-gray-700: 73, 80, 87;
--spt-color-gray-800: 52, 58, 64;
--spt-color-gray-900: 33, 37, 41;
--spt-color-light: var(--spt-color-gray-100);
--spt-color-dark: var(--spt-color-gray-800);
--spt-color-green: 0, 121, 124;
--spt-color-green-lighter: 20, 141, 144;
--spt-color-green-lightest: 130, 231, 234;
--spt-color-blue: 26, 101, 143;
--spt-color-blue-lighter: 46, 121, 163;
--spt-color-blue-lightest: 156, 191, 213;
--spt-color-deep-blue: 1, 33, 105;
--spt-color-green-highlight: 168, 199, 0;

--pst-color-primary: var(--spt-color-blue);
--pst-color-primary-hover: var(--spt-color-blue-lighter);
--pst-color-link: var(--pst-color-primary);
--pst-color-link-hover: var(--pst-color-primary);
--pst-color-headerlink: var(--spt-color-gray-500);
--pst-color-headerlink-hover: var(--spt-color-gray-500);

--tabs-size-label: 0.8rem !important;
--tabs-color-label-active: rgba(var(--pst-color-primary), 1) !important;
--tabs-color-label-inactive: rgba(var(--spt-color-blue-lightest), 1) !important;
:root{
--spt-font-body: 'Poppins';
--spt-font-headings: 'Poppins';
--spt-font-footnote: 'Cormorant';

--spt-color-gray-100: 248, 249, 250;
--spt-color-gray-200: 233, 236, 239;
--spt-color-gray-300: 222, 226, 230;
--spt-color-gray-400: 206, 212, 218;
--spt-color-gray-500: 173, 181, 189;
--spt-color-gray-600: 108, 117, 125;
--spt-color-gray-700: 73, 80, 87;
--spt-color-gray-800: 52, 58, 64;
--spt-color-gray-900: 33, 37, 41;
--spt-color-light: var(--spt-color-gray-100);
--spt-color-dark: var(--spt-color-gray-800);
--spt-color-green: 0, 121, 124;
--spt-color-green-lighter: 20, 141, 144;
--spt-color-green-lightest: 130, 231, 234;
--spt-color-blue: 26, 101, 143;
--spt-color-blue-lighter: 46, 121, 163;
--spt-color-blue-lightest: 156, 191, 213;
--spt-color-deep-blue: 1, 33, 105;
--spt-color-green-highlight: 168, 199, 0;

--pst-color-primary: var(--spt-color-blue) !important;
--pst-color-primary-hover: var(--spt-color-blue-lighter) !important;
--pst-color-secondary: var(--spt-color-blue-lightest) !important;
--pst-color-link: var(--pst-color-primary) !important;
--pst-color-link-hover: var(--pst-color-secondary) !important;
--pst-color-headerlink: var(--spt-color-gray-300) !important;
--pst-color-headerlink-hover: var(--spt-color-gray-100) !important;

--tabs-size-label: 0.8rem !important;
--tabs-color-label-active: rgba(var(--pst-color-primary), 1) !important;
--tabs-color-label-inactive: rgba(var(--spt-color-blue-lightest), 1) !important
}

$document-width: calc(0.5 * (var(--breakpoint-md) + var(--breakpoint-lg)));
$document-width: calc(0.5 * (var(--bs-breakpoint-md) + var(--bs-breakpoint-lg)));

@import "general";
@import "bootstrap4";
Expand Down Expand Up @@ -193,7 +194,7 @@ main.banner-main {

// FOOTER --------------------------------------------------------------------

.footer {
.bd-footer {
color: rgba(var(--spt-color-light), 1);
font-size: 0.8rem;
font-family: var(--spt-font-footnote);
Expand Down
Loading