Skip to content

Commit

Permalink
Merge pull request #29 from kmpaul/portal-foundations-updates
Browse files Browse the repository at this point in the history
CSS for portal and foundations updates
  • Loading branch information
Kevin Paul authored Jan 6, 2022
2 parents cf5681f + 57bf92d commit efdeb35
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 68 deletions.
39 changes: 21 additions & 18 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ html:

repository:
url: https://github.com/ProjectPythia/sphinx-pythia-theme
branch: master
branch: main
path_to_book: docs

launch_buttons:
Expand Down Expand Up @@ -74,23 +74,26 @@ sphinx:
Unidata: images/Unidata_logo_horizontal_1200x300.svg
UAlbany: images/UAlbany-A2-logo-purple-gold.svg
footer_menu:
"More about...":
- name: Project Pythia
url: https://projectpythia.org/about
- name: Pangeo
url: https://pangeo.io
- name: Project Jupyter
url: https://jupyter.org
"Let us know...":
- name: Submit an issue on GitHub
url: https://github.com/ProjectPythia/sphinx-pythia-theme/issues/new?title=Issue%20with%20Sphinx%20Pythia%20Theme&body=Your%20issue%20content%20here.
- name: Feedback to Project Pythia
url: https://docs.google.com/forms/d/e/1FAIpQLSeVa1TC9xM-dk7qIE2e8bsgSrIP82yYDNw3wew3J46eREJa4w/viewform?usp=sf_link
"Join the community":
- name: Contributor's Guide
url: https://foundations.projectpythia.org/appendix/how-to-contribute.html
- name: Our GitHub Organization
url: https://github.com/ProjectPythia
- title: "More about..."
items:
- name: Project Pythia
url: https://projectpythia.org/about
- name: Pangeo
url: https://pangeo.io
- name: Project Jupyter
url: https://jupyter.org
- title: "Let us know..."
items:
- name: Submit an issue on GitHub
url: https://github.com/ProjectPythia/sphinx-pythia-theme/issues/new?title=Issue%20with%20Sphinx%20Pythia%20Theme&body=Your%20issue%20content%20here.
- name: Feedback to Project Pythia
url: https://docs.google.com/forms/d/e/1FAIpQLSeVa1TC9xM-dk7qIE2e8bsgSrIP82yYDNw3wew3J46eREJa4w/viewform?usp=sf_link
- title: "Join the community"
items:
- name: Contributor's Guide
url: https://foundations.projectpythia.org/appendix/how-to-contribute.html
- name: Our GitHub Organization
url: https://github.com/ProjectPythia
html_sidebars:
index: []
standalone: []
Expand Down
81 changes: 45 additions & 36 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,42 +157,51 @@
"index": "page-banner.html",
"standalone": "page-standalone.html",
},
"footer_menu": {
"More about...": [
{
"name": "Project Pythia",
"url": "https://projectpythia.org/about",
},
{
"name": "Pangeo",
"url": "https://pangeo.io",
},
{
"name": "Project Jupyter",
"url": "https://jupyter.org",
},
],
"Let us know...": [
{
"name": "Submit an issue on GitHub",
"url": "https://github.com/ProjectPythia/sphinx-pythia-theme/issues/new?title=Issue%20with%20Sphinx%20Pythia%20Theme&body=Your%20issue%20content%20here.", # noqa
},
{
"name": "Feedback to Project Pythia",
"url": "https://docs.google.com/forms/d/e/1FAIpQLSeVa1TC9xM-dk7qIE2e8bsgSrIP82yYDNw3wew3J46eREJa4w/viewform?usp=sf_link", # noqa
},
],
"Join the community": [
{
"name": "Contributor's Guide",
"url": "https://foundations.projectpythia.org/appendix/how-to-contribute.html", # noqa
},
{
"name": "Our GitHub Organization",
"url": "https://github.com/ProjectPythia", # noqa
},
],
},
"footer_menu": [
{
"title": "More about...",
"items": [
{
"name": "Project Pythia",
"url": "https://projectpythia.org/about",
},
{
"name": "Pangeo",
"url": "https://pangeo.io",
},
{
"name": "Project Jupyter",
"url": "https://jupyter.org",
},
],
},
{
"title": "Let us know...",
"items": [
{
"name": "Submit an issue on GitHub",
"url": "https://github.com/ProjectPythia/sphinx-pythia-theme/issues/new?title=Issue%20with%20Sphinx%20Pythia%20Theme&body=Your%20issue%20content%20here.", # noqa
},
{
"name": "Feedback to Project Pythia",
"url": "https://docs.google.com/forms/d/e/1FAIpQLSeVa1TC9xM-dk7qIE2e8bsgSrIP82yYDNw3wew3J46eREJa4w/viewform?usp=sf_link", # noqa
},
],
},
{
"title": "Join the community",
"items": [
{
"name": "Contributor's Guide",
"url": "https://foundations.projectpythia.org/appendix/how-to-contribute.html", # noqa
},
{
"name": "Our GitHub Organization",
"url": "https://github.com/ProjectPythia", # noqa
},
],
},
],
"footer_logos": {
"NCAR": "images/NCAR-contemp-logo-blue.svg",
"Unidata": "images/Unidata_logo_horizontal_1200x300.svg",
Expand Down
2 changes: 2 additions & 0 deletions sphinx_pythia_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ def setup(app: Sphinx):
app.connect("builder-inited", copy_config_images)
app.connect("html-page-context", add_functions_to_context)

app.config.templates_path.append("_templates")

return {
"version": "0.0",
"parallel_read_safe": True,
Expand Down
25 changes: 19 additions & 6 deletions sphinx_pythia_theme/footer-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,26 @@
<div class="container-fluid footer-menu pt-4">
<div class="container">
<div class="row justify-content-center">
{% for section in theme_footer_menu %}
{% if theme_footer_menu[section]|length > 0 %}
<div class="col-3 col-footer-menu">
<h1>{{ section }}</h1>
{% for column in theme_footer_menu %}
{% set col_title = column.get('title', '') %}
{% set col_class = column.get('class', 'col-2') %}
{% set col_items = column.get('items', []) %}
{% if col_items %}
<div class="{{ col_class }} footer-menu-col">
{% if col_title %}
<h1>{{ col_title }}</h1>
{% endif %}
<ul class="list-unstyled">
{% for item in theme_footer_menu[section] %}
<li><a href="{{ item['url'] }}">{{ item['name'] }}</a></li>
{% for item in col_items %}
{% set item_name = item.get('name', '') %}
{% set item_url = item.get('url', '') %}
{% if item_url and item_name %}
<li><a href="{{ item_url }}">{{ item_name }}</a></li>
{% elif item_name %}
<li>{{ item_name }}</li>
{% elif item_url %}
<li><a href="{{ item_url }}">{{ item_url }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion sphinx_pythia_theme/static/sphinx-pythia-theme.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/scss/_pydata-sphinx-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

.prev-next-area {
margin: 0;
margin: 2rem 0 0 0;
border-top: 1px solid rgba(var(--spt-color-gray-300), 1);
i {
font-size: 1.1rem;
Expand Down
7 changes: 1 addition & 6 deletions src/scss/sphinx-pythia-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ $document-width: calc(0.5 * (var(--breakpoint-md) + var(--breakpoint-lg)));
// STANDALONE LAYOUT ---------------------------------------------------------

main.standalone-main {
padding: 2rem 0 0 0;
padding: 0 !important;
background-color: white;

div.sectionwrapper-1,
Expand Down Expand Up @@ -223,11 +223,6 @@ main.banner-main {
background-color: rgba(var(--spt-color-dark), 1);
padding-top: 0.4rem;
padding-bottom: 0.4rem;

.col-footer-menu {
min-width: 300px;
max-width: 300px;
}
}

.footer-extra {
Expand Down

0 comments on commit efdeb35

Please sign in to comment.