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

ENH: Add ABlog support #796

Merged
merged 3 commits into from Jul 19, 2022
Merged

ENH: Add ABlog support #796

merged 3 commits into from Jul 19, 2022

Conversation

choldgraf
Copy link
Collaborator

@choldgraf choldgraf commented Jul 11, 2022

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:

Comment on lines +21 to +44
// 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;
}
}

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.

image

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 think it's actually not that easy to over-ride templates with ABlog until this one is resolved:

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.

@choldgraf
Copy link
Collaborator Author

Anybody object to merging this one in as an iterative improvement, and then making further improvements in follow-up PRs?

@choldgraf choldgraf changed the title Adding ABlog support ENH: Add ABlog support Jul 19, 2022
@choldgraf choldgraf merged commit ffbd028 into pydata:main Jul 19, 2022
@choldgraf choldgraf deleted the enh-ablog branch July 19, 2022 20:10
@jarrodmillman jarrodmillman added this to the 0.10 milestone Jul 26, 2022
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.

Add style support for ABlog
3 participants