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

Bootblog4 featured posts and sidebar #3087

Merged
merged 13 commits into from May 13, 2018
Merged

Bootblog4 featured posts and sidebar #3087

merged 13 commits into from May 13, 2018

Conversation

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 12, 2018

This adds featured posts and a sidebar to bootblog4. Testing needed.
screenshot 2018-05-13 00 16 25

Resolves #2964.

Kwpolska added 4 commits May 12, 2018
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>
@ralsina
Copy link
Member

@ralsina ralsina commented May 13, 2018

Does it move the search form to the sidebar? That may fix our other issue :-)

@Kwpolska
Copy link
Member Author

@Kwpolska Kwpolska commented May 13, 2018

SEARCH_FORM will stay in the top navigation, but with some other tricks needed (so it would collapse). The sidebar is optional; users are free to put anything — including the search form — in their sidebar.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Kwpolska added a commit that referenced this issue May 13, 2018
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska
Copy link
Member Author

@Kwpolska Kwpolska commented May 13, 2018

Mobile improved as well:

image

image

This fixes #3069. The animation isn’t perfect, but it’s the best I can do.

Still to do:

  • docs for featured posts
  • THEME_COLOR → THEME_CONFIG['color']
  • testing, especially of featured posts, is very welcome

Copy link
Member

@ralsina ralsina left a comment

LGTM I want this on my site ;-)

Kwpolska added 4 commits May 13, 2018
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>
@Kwpolska Kwpolska force-pushed the bootblog4-featured-posts branch from b769544 to c2d0b66 May 13, 2018
Kwpolska added 2 commits May 13, 2018
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska requested a review from felixfontein May 13, 2018
Copy link
Contributor

@felixfontein felixfontein left a comment

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

@@ -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],
Copy link
Contributor

@felixfontein felixfontein May 13, 2018

How about untranslated featured posts, when SHOW_UNTRANSLATED_POSTS is set to True?

Copy link
Member Author

@Kwpolska Kwpolska May 13, 2018

Fair point, will do this in a while.

context["is_frontmost_index"] = i == 0

# Add dependencies to featured posts
if 'featured' in context:
Copy link
Contributor

@felixfontein felixfontein May 13, 2018

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.

Kwpolska added 2 commits May 13, 2018
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska merged commit 616bd2d into master May 13, 2018
0 of 4 checks passed
@felixfontein felixfontein deleted the bootblog4-featured-posts branch May 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants