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
ENH: Add ABlog support #796
Conversation
// HACK: ABlog articles always seem to have the structure: | ||
// <section id="POST-TITLE-ID">{{ POST CONTENT }} | ||
// <div class="section"> | ||
// <div class="section" | ||
// <span>previous button | ||
// <span>empty space | ||
// <span>next button | ||
// | ||
// So these rules make that assumption | ||
article.bd-article > section + div.section { | ||
font-size: 1.2em; | ||
|
||
span:first-child:before { | ||
content: "\f104"; | ||
font-family: "Font Awesome 5 Free"; | ||
font-weight: 800; | ||
} | ||
|
||
span:last-child:after { | ||
content: "\f105"; | ||
font-family: "Font Awesome 5 Free"; | ||
font-weight: 800; | ||
} | ||
} |
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.
What about overriding the template for the post nav? https://github.com/sunpy/ablog/blob/main/ablog/templates/postnavy.html
That could help avoiding the current hanging arrow at the ends of the post list and include next/previous and the arrow as part of the <a>
like the rest of the theme.
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 think it's actually not that easy to over-ride templates with ABlog until this one is resolved:
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.
Ah, I was wondering how the ordering of extension/theme template path worked in relation to dropping a template override in for an individual site.
Anybody object to merging this one in as an iterative improvement, and then making further improvements in follow-up PRs? |
This adds ABlog as an extension in our demo documentation, and adds a few lightweight but hacky CSS rules that style it in a nice way. They don't do anything crazy, but fix up padding / whitespace, and make the buttons behave similarly to our other buttons.
I also opened an issue asking for some improvements on the CSS wrapping so maybe that'll simplify things here a bit as well: