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

book: make sure that the ads are actually readable #146

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

Kijewski
Copy link
Collaborator

We are using a free service, after all.

INDEX_HBS_HEADERS = {
"user-agent": "Update index.hbs for +https://github.com/rinja-rs/rinja",
}

ETHICALADS_THEME = r'''
<style>
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

ETHICALADS_THEME = r'''
<style>
.ethical-sidebar {
margin-left: auto; }
Copy link
Collaborator

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

Copy link
Collaborator Author

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. :)

Copy link
Collaborator

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

Copy link
Collaborator Author

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}
Copy link
Collaborator

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. 🤣

@GuillaumeGomez
Copy link
Collaborator

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit e4b5bd9 into askama-rs:master Aug 20, 2024
29 checks passed
@Kijewski Kijewski deleted the pr-ea-colors branch August 20, 2024 13:36
@Kijewski
Copy link
Collaborator Author

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?

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