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
Bootblog4 featured posts and sidebar #3087
Conversation
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Does it move the search form to the sidebar? That may fix our other issue :-) |
|
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Mobile improved as well: This fixes #3069. The animation isn’t perfect, but it’s the best I can do. Still to do:
|
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.
LGTM I want this on my site ;-)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
b769544
to
c2d0b66
Compare
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
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 didn't look at the themes themselves, only at the changes to Nikola itself. They LGTM, except the two comments you might want to consider (or not).
nikola/plugins/task/indexes.py
Outdated
@@ -117,6 +117,7 @@ def provide_context_and_uptodate(self, classification, lang, node=None): | |||
"title": self.site.config["INDEXES_TITLE"](lang) or self.site.config["BLOG_TITLE"](lang), | |||
"description": self.site.config["BLOG_DESCRIPTION"](lang), | |||
"pagekind": ["main_index", "index"], | |||
"featured": [p for p in self.site.posts if p.post_status == 'featured' and lang in p.translated_to], |
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.
How about untranslated featured posts, when SHOW_UNTRANSLATED_POSTS
is set to True
?
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.
Fair point, will do this in a while.
context["is_frontmost_index"] = i == 0 | ||
|
||
# Add dependencies to featured posts | ||
if 'featured' in context: |
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 we should mention that in the docstring of generic_index_renderer
, in case someone wants to put something else called featured
in there.
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
This adds featured posts and a sidebar to bootblog4. Testing needed.
Resolves #2964.