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

[CSS] Local fonts, working fonts! #123

Merged
merged 4 commits into from
Dec 6, 2023

Conversation

sneakers-the-rat
Copy link
Contributor

@sneakers-the-rat sneakers-the-rat commented Dec 6, 2023

Currently the css specifies two fonts - 'Poppins' and 'Itim' that are supposed to be loaded by a header.html partial that is never included in the page.

Rather than loading them from google fonts and compromise our visitors privacy it's relatively simple to self-host them, and blammo they work!

Sorry for the non-modular PR, but I was ending up repeating the content of #122 which this is based on

Before:

Screen Shot 2023-12-05 at 10 38 51 PM

After:

Screen Shot 2023-12-05 at 10 34 28 PM

not strictly comparable because my window was narrower in the after, but ya get it

@sneakers-the-rat sneakers-the-rat changed the title [CSS] - Local fonts, working fonts! [CSS] Local fonts, working fonts! Dec 6, 2023
@lwasser
Copy link
Member

lwasser commented Dec 6, 2023

@sneakers-the-rat THANK YOU. i really wanted to self host them but didn't understand how to do it. i've actually been thinking about creating a pyos sphinx theme based on top of pydata theme like 2i2c has done so we just have the same theme for all of our books.

but i really appreciate this help here as i was trying to vendor the fonts and didn't understand how to make it work!!

}

/* poppins-italic - latin */
@font-face {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok so somehow you're telling sass to find the fonts in our local fonts folder here so they are vendored rather than called from google fonts.

it would be great to make these changes everywhere - our website as well calls the google fonts website.

@lwasser
Copy link
Member

lwasser commented Dec 6, 2023

pre-commit.ci autofix

Copy link
Member

@lwasser lwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh everything is passing now. i'll merge this as well. @sneakers-the-rat i pulled down the template that chris made for 2i2c and i'll try to incorporate your changes here into a pyos-sphinx-theme. that way we only have to make changes in one place to update all of our guidebooks. it will build on top of the pydata_sphinx_theme as we are doing here.

@lwasser lwasser merged commit 31461de into pyOpenSci:main Dec 6, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants