Skip to content

adding configuration page and a few options #57

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

Merged
merged 3 commits into from
Dec 20, 2019

Conversation

choldgraf
Copy link
Collaborator

Decided to refresh myself on how to use variables in themes :-)

This does the following:

  • Adds a theme option to show/hide the "previous/next" buttons
  • Adds a theme option to include social media icons that point to configurable URLs
  • Adds FontAwesome CSS (which fixes the broken social media icon links)
  • Adds a theme option to add external links
  • Adds content to the configuration page for each of these things

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this!

html_theme_options = {
"external_links": [
{
'url': "https://pandas.pydata.org/pandas-docs/stable/",
Copy link
Member

Choose a reason for hiding this comment

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

Could also be a tuples of (name, url), but the dict is also good for me (and a dict is more easily extendable, if needed in the future).

Copy link
Member

Choose a reason for hiding this comment

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

And I suppose the dict is also nicer to use in the jinja layout

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah I was thinking a dict because it'll be more obvious in the templates


i.fa-github-square:before {
content: "\f092";
Copy link
Member

Choose a reason for hiding this comment

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

For the font-awesome noob: what is this doing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the unicode version of a fontawesome icon. FontAwesome is a standard icon pack that you can load via CDN and then use for icons on your site. The Bokeh docs are using fontawesome for their github / twitter logos so I figured we can just copy the same pattern here

@choldgraf
Copy link
Collaborator Author

I updated the fontawesome bits to use <i> instead of the unicode CSS hack, since that's what they recommend. Also upgraded to FA5 per @stijnvanhoey's suggestion.

@jorisvandenbossche jorisvandenbossche merged commit f2faa76 into pydata:master Dec 20, 2019
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.

3 participants