diff --git a/CODEOFCONDUCT.md b/CODEOFCONDUCT.md index 84a563ee..ec9da685 100644 --- a/CODEOFCONDUCT.md +++ b/CODEOFCONDUCT.md @@ -47,7 +47,8 @@ Instances of unacceptable behavior can be brought to the attention of the projec ## Consequences -Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the circumstances. Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits, email, issues, and other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently any contributor for other behaviors that are deemed inappropriate, threatening, offensive, or harmful. Project administrators also have the right to report violations to UCAR HR and/or UCAR’s Office of Diversity, Equity and Inclusion (ODEI), as well as a participant’s home institution and/or law enforcement. In the event an incident is reported to UCAR, UCAR will follow its Harassment Reporting and Complaint Procedure. +Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the circumstances. Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits, email, issues, and other contributions that are not +aligned to this Code of Conduct, or banning temporarily or permanently any contributor for other behaviors that are deemed inappropriate, threatening, offensive, or harmful. Project administrators also have the right to report violations to UCAR HR and/or UCAR’s Office of Diversity, Equity and Inclusion (ODEI), as well as a participant’s home institution and/or law enforcement. In the event an incident is reported to UCAR, UCAR will follow its Harassment Reporting and Complaint Procedure. ## Attribution diff --git a/environment.yml b/environment.yml index 9cbef3a9..573b49da 100644 --- a/environment.yml +++ b/environment.yml @@ -3,13 +3,10 @@ channels: - conda-forge - nodefaults dependencies: +- ablog - matplotlib - myst-nb - pandas -- pip -- pyyaml - pre-commit -- sphinx-panels -- ablog -- pip: - - sphinx-pythia-theme +- pyyaml +- sphinx-pythia-theme diff --git a/portal/_extensions/gallery_generator.py b/portal/_extensions/gallery_generator.py index 089cf6d0..61a033b9 100644 --- a/portal/_extensions/gallery_generator.py +++ b/portal/_extensions/gallery_generator.py @@ -1,6 +1,5 @@ import itertools import pathlib -from textwrap import dedent from truncatehtml import truncate @@ -32,16 +31,16 @@ def _generate_tag_menu(all_items, tag_key): ) return f""" - + """ def generate_menu(all_items, submit_btn_txt=None, submit_btn_link=None): @@ -64,18 +63,18 @@ def generate_menu(all_items, submit_btn_txt=None, submit_btn_link=None): def build_from_items(items, filename, title='Gallery', subtitle=None, subtext=None, menu_html='', max_descr_len=300): # Build the gallery file - panels_body = [] + grid_body = [] for item in items: if not item.get('thumbnail'): - item['thumbnail'] = '/_static/images/ebp-logo.png' - thumbnail = item['thumbnail'] + item['thumbnail'] = '_static/images/ebp-logo.png' + thumbnail = item['thumbnail'][1:] if item['thumbnail'].startswith('/') else item['thumbnail'] tag_list = sorted((itertools.chain(*item['tags'].values()))) tag_list_f = [tag.replace(' ', '-') for tag in tag_list] tags = [f'{tag}' for tag in tag_list_f] tags = '\n'.join(tags) - tag_class_str = ' '.join(tag_list_f) + # tag_class_str = ' '.join(tag_list_f) author_strs = set() affiliation_strs = set() @@ -108,69 +107,69 @@ def build_from_items(items, filename, title='Gallery', subtitle=None, subtext=No if ellipsis_str in short_description: modal_str = f""" - -""" + + """ + modal_str = '\n'.join([m.lstrip() for m in modal_str.split('\n')]) else: modal_str = '' + new_card = f"""\ + :::{{grid-item-card}} + :shadow: md + :class-footer: card-footer + + {modal_str} - panels_body.append( - f"""\ ---- -:column: + tagged-card {tag_class_str} + +++ - -{modal_str} + {tags} -+++ + ::: -{tags} + """ -""" - ) + grid_body.append('\n'.join([m.lstrip() for m in new_card.split('\n')])) - panels_body = '\n'.join(panels_body) + grid_body = '\n'.join(grid_body) stitle = f'#### {subtitle}' if subtitle else '' stext = subtext if subtext else '' - panels = f""" -# {title} + grid = f"""\ + {title} + {'=' * len(title)} -{stitle} -{stext} + {stitle} + {stext} -{menu_html} + {menu_html} -````{{panels}} -:column: col-12 -:card: +mb-4 w-100 -:header: d-none -:body: p-3 m-0 -:footer: p-1 + ::::{{grid}} 1 + :gutter: 4 -{dedent(panels_body)} -```` + {grid_body} - - -""" + + + """ - pathlib.Path(f'{filename}.md').write_text(panels) + grid = '\n'.join([m.lstrip() for m in grid.split('\n')]) + + pathlib.Path(f'{filename}.md').write_text(grid) diff --git a/portal/_static/custom.css b/portal/_static/custom.css index a0133eb5..6a1edd29 100644 --- a/portal/_static/custom.css +++ b/portal/_static/custom.css @@ -1,10 +1,26 @@ +:root { + --pst-color-border: rgba(0, 0, 0, 0.125) !important; +} + +.bd-main .bd-content .bd-article-container { + max-width: 100%; /* default is 60em */ +} +.bd-page-width { + max-width: 100%; /* default is 88rem */ +} + +.sd-card-footer { + background: rgba(var(--spt-color-gray-100), 1) !important; + padding: 4px; +} + main.banner-main #project-pythia { padding-top: 1rem; padding-bottom: 1rem; } main.banner-main #project-pythia p { - font-size: 1.4rem; /* default: 1.25rem */ + font-size: 1.4rem; /* default: 1.25rem * / /* font-weight: 700; default: 300 */ } @@ -74,12 +90,22 @@ main.banner-main #project-pythia a.btn-light { margin: auto 0; padding: 0; max-width: 160px; + background: transparent !important; } .card-subtitle { font-size: 0.8rem; } +.my-2 { + color: inherit; +} + +.text-decoration-none { + text-decoration: none; + color: inherit; +} + @media (max-width: 576px) { .modal { padding: 2rem; diff --git a/portal/_static/images/logos/NCAR-contemp-logo-blue.svg b/portal/_static/images/logos/NCAR-contemp-logo-blue.svg deleted file mode 100644 index 3bcda635..00000000 --- a/portal/_static/images/logos/NCAR-contemp-logo-blue.svg +++ /dev/null @@ -1 +0,0 @@ -NCAR-contemp-logo-blue.a diff --git a/portal/_static/images/logos/NSF-NCAR_Lockup-UCAR-Dark_102523.png b/portal/_static/images/logos/NSF-NCAR_Lockup-UCAR-Dark_102523.png new file mode 100644 index 00000000..2e0073a7 Binary files /dev/null and b/portal/_static/images/logos/NSF-NCAR_Lockup-UCAR-Dark_102523.png differ diff --git a/portal/conf.py b/portal/conf.py index 35ea2ef7..ca5f8c43 100644 --- a/portal/conf.py +++ b/portal/conf.py @@ -24,7 +24,7 @@ project = 'Project Pythia' author = 'the Project Pythia Community' -copyright = '2022' +copyright = '2024' # -- General configuration --------------------------------------------------- @@ -32,11 +32,11 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'myst_nb', - 'sphinx_panels', 'resource_gallery_generator', + 'myst_nb', 'ablog', 'sphinx.ext.intersphinx', + 'sphinx_design', ] # Define what extensions will parse which kind of source file @@ -87,7 +87,9 @@ # HTML Theme-specific Options html_theme_options = { - 'google_analytics_id': 'G-T9KGMX7VHZ', + 'analytics': { + 'google_analytics_id': 'G-T9KGMX7VHZ', + }, 'github_url': 'https://github.com/ProjectPythia', 'twitter_url': 'https://twitter.com/project_pythia', 'icon_links': [ @@ -98,7 +100,11 @@ 'type': 'fontawesome', } ], - 'logo_link': 'https://projectpythia.org', + 'logo': { + 'link': 'https://projectpythia.org', + }, + 'navbar_align': 'left', + 'navbar_start': ['navbar-logo'], 'navbar_links': [ {'name': 'Home', 'url': 'https://projectpythia.org'}, {'name': 'Foundations', 'url': 'https://foundations.projectpythia.org'}, @@ -107,25 +113,24 @@ {'name': 'Community', 'url': 'https://projectpythia.org/#join-us'}, {'name': 'Blog', 'url': 'https://projectpythia.org/blog'}, ], + 'navbar_end': ['navbar-icon-links'], 'page_layouts': { 'index': 'page-banner.html', 'resource-gallery': 'page-standalone.html', }, + 'secondary_sidebar_items': [], 'footer_logos': { - 'NCAR': '_static/images/logos/NCAR-contemp-logo-blue.svg', + 'NCAR': '_static/images/logos/NSF-NCAR_Lockup-UCAR-Dark_102523.png', 'Unidata': '_static/images/logos/Unidata_logo_horizontal_1200x300.svg', 'UAlbany': '_static/images/logos/UAlbany-A2-logo-purple-gold.svg', }, - 'extra_navbar': ('Theme by Project Pythia'), + 'footer_start': ['footer-logos', 'footer-menu', 'footer-info', 'footer-extra'], } -# Panels config -panels_add_bootstrap_css = False - # MyST config myst_enable_extensions = ['amsmath', 'colon_fence', 'deflist', 'html_image'] myst_url_schemes = ['http', 'https', 'mailto'] -jupyter_execute_notebooks = 'off' +nb_execution_mode = 'off' myst_heading_anchors = 3 # List of patterns for linkcheck to skip if broken diff --git a/portal/index.md b/portal/index.md index 54f0efd4..619e2686 100644 --- a/portal/index.md +++ b/portal/index.md @@ -1,7 +1,7 @@ # Project Pythia :::{banner} -:color: rgba(26, 100, 143, 0.85) +:color: rgba(26, 100, 143, 0.9) :image: _static/images/backgrounds/pexels-jeff-stapleton-5792818.jpg :caption: Photo by Jeff Stapleton from Pexels :class: dark-banner diff --git a/portal/posts/cookoff2023.md b/portal/posts/cookoff2023.md index 0437cec8..025c1156 100644 --- a/portal/posts/cookoff2023.md +++ b/portal/posts/cookoff2023.md @@ -17,4 +17,4 @@ During the hackthon, significant additions were made to our Radar Cookbook and i From our post-hackathon exit survey, everyone enjoyed the event, felt that they learned new skills and that their contributions were valued. One scientist commented, “The hackathon for me has become a great place to get a sense of a community. Seeing people enthusiastic about coding up notebooks that would benefit the research community is a gateway for someone starting to code in Python.” This comment mirrors the efforts of Project Pythia as a community-owned resource. -Cookoff Image +Cookoff Image