-
Notifications
You must be signed in to change notification settings - Fork 17
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
book: make sure that the ads are actually readable #146
Conversation
book/update-theme.py
Outdated
INDEX_HBS_HEADERS = { | ||
"user-agent": "Update index.hbs for +https://github.com/rinja-rs/rinja", | ||
} | ||
|
||
ETHICALADS_THEME = r''' | ||
<style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have a style file or something? It's pretty bad for loading speed to keep the style in a style
node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I append the content to a css file now during readthedocs' build process. More difficult to test now, but it should be sane.
book/update-theme.py
Outdated
ETHICALADS_THEME = r''' | ||
<style> | ||
.ethical-sidebar { | ||
margin-left: auto; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also what happened with the indent here. XD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simply kept the default of scss
. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, please fix it. :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. :)
@@ -0,0 +1 @@ | |||
.ethical-sidebar{margin-left:auto}.ethical-sidebar .ea-content{background:var(--bg) !important;color:var(--fg) !important}.ethical-sidebar .ea-content a:is(:link, :visited){color:var(--fg) !important}.ethical-sidebar .ea-content a:is(:hover, :active, :focus){color:var(--sidebar-active) !important}.ethical-sidebar .ea-content strong{color:var(--sidebar-active) !important}.ethical-sidebar .ea-callout a:is(:link, :visited){color:var(--sidebar-non-existant) !important}.ethical-sidebar .ea-callout a:is(:hover, :active, :focus){color:var(--sidebar-fg) !important} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will close my eyes and try to forget about this. 🤣
Thanks! |
Hm, I did not not have the gray background in my local tests. It's quite obtrusive, but well, it's an ad after all? |
We are using a free service, after all.