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 dark mode theme to website #139

Merged
merged 38 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e67c2e1
Theme Update
Bashamega May 4, 2024
38ef211
Merge branch 'pybamm-team:main' into main
Bashamega May 4, 2024
4212d99
Short Codes Updates
Bashamega May 4, 2024
c6f7b15
style: pre-commit fixes
pre-commit-ci[bot] May 4, 2024
e76fd37
Netlify Packages update
Bashamega May 5, 2024
733f4f5
Netlify.toml updare
Bashamega May 5, 2024
ae58bcd
style: pre-commit fixes
pre-commit-ci[bot] May 5, 2024
1f29038
Changes make to nox
Bashamega May 5, 2024
b6a910a
Update build command to run Hugo
agriyakhetarpal May 5, 2024
afd7724
Links updare
Bashamega May 6, 2024
0876948
Captions fix
Bashamega May 6, 2024
921f2de
Teams Page Fixed
Bashamega May 6, 2024
021e1b1
Removed Override css
Bashamega May 6, 2024
18e2ace
Remove Gitpod
Bashamega May 6, 2024
af1949d
Dark Images Background
Bashamega May 6, 2024
486dba2
style: pre-commit fixes
pre-commit-ci[bot] May 6, 2024
3eb287a
Documentation update
Bashamega May 6, 2024
d1a8a16
Homepage fix
Bashamega May 6, 2024
a1172fc
style: pre-commit fixes
pre-commit-ci[bot] May 6, 2024
810bedc
Fix order of instructions
agriyakhetarpal May 6, 2024
9f27093
Whitespace for CSS rules
agriyakhetarpal May 6, 2024
e839803
Remove captions because alt text is present
agriyakhetarpal May 6, 2024
efb69de
Other cleanups
agriyakhetarpal May 6, 2024
a905261
Fix copyright notice
agriyakhetarpal May 6, 2024
b35e92e
Clear out `nbsp` attributes
agriyakhetarpal May 6, 2024
d761bed
Fix homepage title
agriyakhetarpal May 6, 2024
f1d2946
Link to Training section directly
agriyakhetarpal May 6, 2024
d2dfeff
Override basic post layout for adding ToC
agriyakhetarpal May 6, 2024
91e4a96
Add ToC to Contribute page
agriyakhetarpal May 6, 2024
e6d910e
Add ToC to Learn page
agriyakhetarpal May 6, 2024
f948818
Update title for Changelog page
agriyakhetarpal May 6, 2024
b7d9dd1
Reorganise Contact page to Community
agriyakhetarpal May 6, 2024
ea5fc1e
Add LinkedIn link for Scott Marquis
agriyakhetarpal May 6, 2024
6473604
Rename Contact page to Community
agriyakhetarpal May 6, 2024
193635d
Ensure navbar is on top + comments
agriyakhetarpal May 6, 2024
66cd5ae
https://ion-works.com ➡️ https://ionworks.com
agriyakhetarpal May 6, 2024
ce990c1
Contact ➡️ Community
agriyakhetarpal May 6, 2024
d848d8f
Remove Contribute and Twitter headings from navbar
agriyakhetarpal May 6, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BSD-3-Clause License.

1. Fork this repository
2. Install the extended version of Hugo from [https://gohugo.io/installation/](https://gohugo.io/installation/)
and add it to your `PATH`
and [`dart-sass`](https://sass-lang.com/dart-sass/) and add them to your `PATH`
3. Clone your forked repository and add the theme repository as a submodule,
from [https://github.com/scientific-python/scientific-python-hugo-theme](https://github.com/scientific-python/scientific-python-hugo-theme). You
may update the submodule and pull the latest changes with
Expand Down
173 changes: 12 additions & 161 deletions assets/css/overrides.css
Original file line number Diff line number Diff line change
@@ -1,168 +1,19 @@
/* Overrides for the PyBaMM hero on the homepage */
/* White backgrounds behind images */

/* We use these styles to provide precedence over submodule theme changes to come close
to near-parity with NumPy and SciPy websites (which use older versions of the theme) */


/* Make PyBaMM logo smaller */
.hero-logo {
max-height: 75px;
padding: 0px 0 0 15px;
}

/* Hero button should be left aligned */
.hero-cta {
padding: 15px 0;
display: flex;
flex-wrap: wrap;
align-self: normal;
}

/* Add space between navbar and hero, reduce distance between title and subtitle */
.hero-title-content {
margin: 6vh auto;
max-width: 1200px;
}

/* Move PyBaMM logo in hero to text superscript */
.hero-title {
align-content: auto;
align-items: normal;
display: flex;
flex-direction: row;
font-family: var(--fontFamily), sans-serif;
font-weight: 900;
font-size: 6em;
color: var(--colorPrimaryDark);
}

/* Removes padding between hero title and subtitle */
.hero-title {
padding: 0 0 0 0;
}

/* General improvements */

/* Do not induce padding on code blocks */
.highlight {
padding: 10px 0px;
}

/* Media settings for narrower screens */

@media only screen and (max-width: 1090px) {
.hero-content {
flex-direction: column;
padding: 0;
align-items: center;
}

.hero-title-content {
flex-direction: column;
align-items: center;
align-self: center;
justify-content: center;
}

button.cta-button {
align-items: center;
align-self: center;
}

.hero-cta {
align-self: center;
}

.flex-column {
/* align all items center */
align-items: center;
}

.footer-column {
padding-inline-end: 20px;
}
}

@media only screen and (max-width: 600px) {
.flex-column {
margin: 0 30px;
}

.hero-title {
font-size: 4em;
}

.hero-subtitle {
text-align: center;
padding-top: 20px;
}

.hero-cta {
align-self: center;
}

.hero-title {
flex-direction: column;
}

}

@media only screen and (max-width: 400px) {
.hero-title {
flex-direction: column;
}

.hero-logo {
align-self: center;
}
}

/* Accessibility improvements */

.footer-link, .footer-link:hover {
line-height: 2rem;
}

.copyright {
font-size: 16px;
}

.footer-link:hover {
color: var(--colorHighlight);
}

/* Individual highlights */

.cta-button:hover {
color: var(--colorHighlight);
}

.news-title a:hover, .news-date a:hover {
color: var(--colorHighlight);
}

/* Animations */

a, a:hover, a:active {
transition: color 0.25s ease-in-out;
}

/* Adjustments for headings */

.content-container h2, .content-container h3, .content-container h4, .content-container h5, .content-container h6 {
margin-top: 0.75rem;
}

.title:not(.is-spaced) + .subtitle {
margin-top: -0.2rem;
figure {
background-color: white;
padding: 15px;
border-radius: 15px;
}

/* Navigation bar dropdown */
/* Captions should be black above white background */

.navbar.is-fresh .navbar-item.has-dropdown .navbar-link {
color: var(--colorPrimaryDark);
figure figcaption p span {
color: black !important;
}

.navbar.is-fresh .navbar-item.has-dropdown .navbar-link:hover {
color: #4DABCF
/* Let table of contents inherit the bounds set by the
content-container class */
#TableOfContents {
position: inherit;
}
40 changes: 6 additions & 34 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ markup:
unsafe: true

params:
title: PyBaMM Team # for copyright
title: PyBaMM website
description: "PyBaMM (Python Battery Mathematical Modelling) is an open-source battery simulation package written in Python."

author:
name: PyBaMM Team
# Privacy-preserving analytics
plausible:
dataDomain: pybamm.org
Expand Down Expand Up @@ -81,10 +82,7 @@ params:
- title: About PyBaMM
url: /about/
- title: Ionworks
url: https://ion-works.com/
is_external: true
- title: PyBaMM on Twitter
url: https://twitter.com/pybamm_/
url: https://ionworks.com/
is_external: true
- title: Governance
url: /governance/
Expand All @@ -94,32 +92,6 @@ params:
- title: News
url: /news/

- title: Contribute
url: /contribute/

# Grid of features
keyfeatures:
features:

- title: Enhanced Simulation Performance
text: PyBaMM enables efficient simulations of battery performance and aging, accelerating battery design and innovation.

- title: Modular Framework
text: The flexible nature of PyBaMM allows for quick model interchangeability, making it useful in different stages of battery R&D.

- title: Open Source
text: PyBaMM is open source, which means anyone can use, modify, and distribute the software. This makes it accessible to researchers worldwide,
enhancing global battery technology research.

- title: Comprehensive Model Library
text: PyBaMM's model library includes a wide range of physics-based models, making it a vital tool in diverse battery research.

- title: Detailed Visualization Tools
text: PyBaMM includes data visualization tools that enable researchers to better interpret their simulation results, facilitating the identification of trends and potential improvements.

- title: Python Ecosystem
text: PyBaMM can be combined with any of the advanced data science and machine learning tools in Python's extensive ecosystem.

footer:
logo: pybamm_logo_whitetext.svg
socialmediatitle: ""
Expand Down Expand Up @@ -156,7 +128,7 @@ params:
title: ""
links:
- text: Contact
link: /contact/
link: /community/

- text: Get involved
link: /contribute/
Expand All @@ -165,7 +137,7 @@ params:
link: /training/

- text: Ionworks
link: https://ion-works.com/
link: https://ionworks.com/

- text: News
link: /news/
Expand Down
2 changes: 1 addition & 1 deletion content/404.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It looks like you've followed a broken link or entered a URL that doesn't exist

[Go back to PyBaMM Home](/)

Seeing something you shouldn't? Please feel free to [contact us](/contact) and let us know what you were looking for, or open
Seeing something you shouldn't? Please feel free to [contact us](/community) and let us know what you were looking for, or open
an issue on our [GitHub repository](https://www.github.com/pybamm-team/pybamm.org/issues).

<div style="height: 100px"></div>
2 changes: 1 addition & 1 deletion content/GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ handled on a case-by-case basis.

- [Ferran Brosa Planella](https://www.brosaplanella.xyz) - University of Warwick and Ionworks
- [Saransh Chopra](https://saransh-cpp.github.io) - Cluster Innovation Centre, University of Delhi
- Scott Marquis - Northvolt
- [Scott Marquis](https://se.linkedin.com/in/scottmar93) - Northvolt
- [Gregory Offer](https://www.imperial.ac.uk/people/gregory.offer) - Imperial College London
- [Valentin Sulzer](https://sites.google.com/view/valentinsulzer) - Ionworks
- [Martin Robinson](https://www.sabsr3.ox.ac.uk/people/dr-martin-robinson) - University of Oxford
Expand Down
47 changes: 47 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Homepage
---

{{< grid columns="1 2 2 3" >}}
[[item]]
type = 'card'
title = 'Enhanced Simulation Performance'
body = '''
PyBaMM enables efficient simulations of battery performance and aging, accelerating battery design and innovation.
'''

[[item]]
type = 'card'
title = 'Modular Framework'
body = '''
The flexible nature of PyBaMM allows for quick model interchangeability, making it useful in different stages of battery R&D.
'''

[[item]]
type = 'card'
title = 'Open Source'
body = '''
PyBaMM is open source, which means anyone can use, modify, and distribute the software. This makes it accessible to researchers worldwide, enhancing global battery technology research.
'''

[[item]]
type = 'card'
title = 'Comprehensive Model Library'
body = '''
PyBaMM's model library includes a wide range of physics-based models, making it a vital tool in diverse battery research.
'''

[[item]]
type = 'card'
title = 'Detailed Visualization Tools'
body = '''
PyBaMM includes data visualization tools that enable researchers to better interpret their simulation results, facilitating the identification of trends and potential improvements.
'''

[[item]]
type = 'card'
title = 'Python Ecosystem'
body = '''
PyBaMM can be combined with any of the advanced data science and machine learning tools in Python's extensive ecosystem.
'''
{{< /grid >}}
Loading