Skip to content

Commit

Permalink
Mark built-in themes as such (via #100)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 26, 2018
1 parent e63e33d commit 83006e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion site/plugins/pkgindex_scan/pkgindex_scan.plugin
Expand Up @@ -8,6 +8,6 @@ MinVersion = 7.8.1+

[Documentation]
Author = Chris Warrick
Version = 0.2.2
Version = 0.4.1
Website = https://plugins.getnikola.com/
Description = Scan packages for package indexes
4 changes: 4 additions & 0 deletions site/plugins/pkgindex_scan/pkgindex_scan.py
Expand Up @@ -73,6 +73,8 @@ def scan(self):
compiler
)
post.is_two_file = True
for d in post.meta.values():
d['is_special_entry'] = False
timeline.append(post)
self.site.pkgindex_entries[topdir].append(post)
self._update_name_multiver(post)
Expand All @@ -89,6 +91,8 @@ def scan(self):
compiler
)
post.is_two_file = True
for d in post.meta.values():
d['is_special_entry'] = True
timeline.append(post)
self.site.pkgindex_entries[topdir].append(post)
self._update_name_multiver(post)
Expand Down
4 changes: 4 additions & 0 deletions site/templates/theme.tmpl
Expand Up @@ -35,7 +35,11 @@
</div>
</header>
<div class="e-content entry-content" itemprop="articleBody text">
% if post.meta('is_special_entry'):
<div class="well well-sm">This theme is built-in (Nikola v${post.meta('dirver')})</div>
% else:
<div class="well well-sm">To install, run <code>nikola theme -i ${post.meta('slug')}</code></div>
% endif
<div class="thumbnail demo-thumbnail">
<a href="${post.meta('demo_link')}"><img src="${post.meta('previewimage')}" alt="Screenshot of ${post.meta('title')}" title="See demo of theme ${post.meta('title')}"><p class="demo-thumbnail-link">See demo</p></a>
</div>
Expand Down

0 comments on commit 83006e2

Please sign in to comment.