Skip to content
Permalink
Browse files

Modernize the zen family

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 13, 2018
1 parent cbd6a52 commit e962e41d939b59e5c89c161b988ca1477ebf8514
Showing with 5,273 additions and 1 deletion.
  1. +2 −1 site/conf.py
  2. +3 −0 v8/zen-forkawesome/AUTHORS.txt
  3. +11 −0 v8/zen-forkawesome/README.md
  4. +8 −0 v8/zen-forkawesome/assets/css/forkfont.css
  5. +4 −0 v8/zen-forkawesome/bundles
  6. +11 −0 v8/zen-forkawesome/conf.py.sample
  7. +1 −0 v8/zen-forkawesome/parent
  8. +124 −0 v8/zen-forkawesome/templates/base_helper.tmpl
  9. +60 −0 v8/zen-forkawesome/templates/index.tmpl
  10. +49 −0 v8/zen-forkawesome/templates/post.tmpl
  11. +9 −0 v8/zen-forkawesome/zen-forkawesome.theme
  12. +2 −0 v8/zen-jinja/AUTHORS.txt
  13. +11 −0 v8/zen-jinja/README.md
  14. +1,062 −0 v8/zen-jinja/assets/css/theme.css
  15. BIN v8/zen-jinja/assets/images/blue-mocha-grunge.jpg
  16. BIN v8/zen-jinja/assets/images/cream-dust.png
  17. BIN v8/zen-jinja/assets/images/glyphicons-halflings-white.png
  18. BIN v8/zen-jinja/assets/images/glyphicons-halflings.png
  19. +6 −0 v8/zen-jinja/assets/js/jquery-1.10.2.min.js
  20. +193 −0 v8/zen-jinja/assets/js/jquery.timeago.js
  21. +4 −0 v8/zen-jinja/bundles
  22. +13 −0 v8/zen-jinja/conf.py.sample
  23. +1 −0 v8/zen-jinja/parent
  24. +51 −0 v8/zen-jinja/templates/base.tmpl
  25. +49 −0 v8/zen-jinja/templates/base_header.tmpl
  26. +123 −0 v8/zen-jinja/templates/base_helper.tmpl
  27. +60 −0 v8/zen-jinja/templates/index.tmpl
  28. +49 −0 v8/zen-jinja/templates/post.tmpl
  29. +67 −0 v8/zen-jinja/templates/post_header.tmpl
  30. +10 −0 v8/zen-jinja/zen-jinja.theme
  31. +2 −0 v8/zen/AUTHORS.txt
  32. +3 −0 v8/zen/Makefile
  33. +11 −0 v8/zen/README.md
  34. +1,062 −0 v8/zen/assets/css/theme.css
  35. BIN v8/zen/assets/images/blue-mocha-grunge.jpg
  36. BIN v8/zen/assets/images/cream-dust.png
  37. BIN v8/zen/assets/images/glyphicons-halflings-white.png
  38. BIN v8/zen/assets/images/glyphicons-halflings.png
  39. +6 −0 v8/zen/assets/js/jquery-1.10.2.min.js
  40. +193 −0 v8/zen/assets/js/jquery.timeago.js
  41. +4 −0 v8/zen/bundles
  42. +13 −0 v8/zen/conf.py.sample
  43. +82 −0 v8/zen/less/blog-mixins.less
  44. +51 −0 v8/zen/less/blog.less
  45. +68 −0 v8/zen/less/code.less
  46. +107 −0 v8/zen/less/layout.less
  47. +66 −0 v8/zen/less/lists.less
  48. +494 −0 v8/zen/less/mixins.less
  49. +43 −0 v8/zen/less/pager.less
  50. +123 −0 v8/zen/less/pagination.less
  51. +53 −0 v8/zen/less/prettify.less
  52. +170 −0 v8/zen/less/reset.less
  53. +1 −0 v8/zen/less/targets
  54. +15 −0 v8/zen/less/theme.less
  55. +53 −0 v8/zen/less/thumbnails.less
  56. +161 −0 v8/zen/less/type.less
  57. +98 −0 v8/zen/less/variables.less
  58. +1 −0 v8/zen/parent
  59. +51 −0 v8/zen/templates/base.tmpl
  60. +49 −0 v8/zen/templates/base_header.tmpl
  61. +123 −0 v8/zen/templates/base_helper.tmpl
  62. +60 −0 v8/zen/templates/index.tmpl
  63. +49 −0 v8/zen/templates/post.tmpl
  64. +67 −0 v8/zen/templates/post_header.tmpl
  65. +11 −0 v8/zen/zen.theme
@@ -1277,7 +1277,8 @@
# USE_BUNDLES = True

# Plugins you don't want to use. Be careful :-)
DISABLED_PLUGINS = ["classify_indexes"]
DISABLED_PLUGINS = []
DISABLE_INDEXES = True

# Add the absolute paths to directories containing plugins to use them.
# For example, the `plugins` directory of your clone of the Nikola plugins
@@ -0,0 +1,3 @@
Damián Avila <https://github.com/damianavila>
Chris Warrick <https://github.com/Kwpolska>
Anke K <https://github.com/encarsia>
@@ -0,0 +1,11 @@
This is the `zen` theme modified to use icons from the [ForkAwesome](https://forkawesome.github.io) project instead of the originally used [FontAwesome](http://fontawesome.io) icons. Note that icon names and classes are different.

The zen and zen-based themes are very customizable, so to make these themes work, you have to use the sample config file.

More info about the zen themes family [here](http://www.damian.oquanta.info/posts/nikolas-zen-theme-finally-released.html).

Enjoy!

Damián

**WARNING:** The themes use Less for their styles, but you don't need a Less compiler installed to use it.
@@ -0,0 +1,8 @@
/* use Fork Awesome font family */

[class^="fa-"],
[class*=" fa-"],
.post .meta .authordate:before,
.post .meta .stats a:after {
font-family: ForkAwesome;
}
@@ -0,0 +1,4 @@
assets/css/all-nocdn.css=rst_base.css,nikola_rst.css,code.css,baguetteBox.min.css,theme.css,forkfont.css,custom.css
assets/css/all.css=rst_base.css,nikola_rst.css,code.css,baguetteBox.min.css,theme.css,custom.css
assets/js/all-nocdn.js=baguetteBox.min.js,moment-with-locales.min.js,fancydates.js
assets/js/all.js=fancydates.js
@@ -0,0 +1,11 @@
NAVIGATION_LINKS = {
DEFAULT_LANG: (
('/index.html', 'Home', 'fa fa-home'),
('/archive.html', 'Archives', 'fa fa-folder-open'),
('/categories/index.html', 'Tags', 'fa fa-tags'),
('/rss.xml', 'RSS', 'fa fa-rss'),
('https://getnikola.com', 'About me', 'fa fa-user'),
('https://twitter.com/getnikola', 'My Twitter', 'fa fa-twitter'),
('https://github.com/getnikola', 'My Github', 'fa fa-github'),
)
}
@@ -0,0 +1 @@
zen
@@ -0,0 +1,124 @@
## -*- coding: utf-8 -*-
<%namespace name="feeds_translations" file="feeds_translations_helper.tmpl" import="*"/>

<%def name="html_headstart()">
<!DOCTYPE html>
<html \
prefix='\
og: http://ogp.me/ns# article: http://ogp.me/ns/article# \
%if comment_system == 'facebook':
fb: http://ogp.me/ns/fb# \
%endif
' \
vocab="http://ogp.me/ns" \
% if is_rtl:
dir="rtl" \
% endif
\
lang="${lang}">
<head>
<meta charset="utf-8">
%if description:
<meta name="description" content="${description|h}">
%endif
<meta name="viewport" content="width=device-width">
%if title == blog_title:
<title>${blog_title|h}</title>
%else:
<title>${title|h} | ${blog_title|h}</title>
%endif

${html_stylesheets()}
<meta name="theme-color" content="${theme_color}">
% if meta_generator_tag:
<meta name="generator" content="Nikola (getnikola.com)">
% endif
${feeds_translations.head(classification=None, kind='index', other=False)}
<link rel="canonical" href="${abs_link(permalink)}">

%if favicons:
%for name, file, size in favicons:
<link rel="${name}" href="${file}" sizes="${size}"/>
%endfor
%endif

% if comment_system == 'facebook':
<meta property="fb:app_id" content="${comment_system_id}">
% endif

%if prevlink:
<link rel="prev" href="${prevlink}" type="text/html">
%endif
%if nextlink:
<link rel="next" href="${nextlink}" type="text/html">
%endif

%if use_cdn:
<!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script><![endif]-->
%else:
<!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5shiv-printshiv.min.js', lang, url_type)}"></script><![endif]-->
%endif

${extra_head_data}
</%def>

<%def name="late_load_js()">
% if use_bundles:
% if use_cdn:
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.9.1/baguetteBox.min.js" integrity="sha256-SoEATAB7PgNWyyK100I7yQXYm5V08k5SFupDP0h72MY=" crossorigin="anonymous"></script>
% else:
<script src="/assets/js/all-nocdn.js"></script>
% endif
% else:
% if use_cdn:
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.9.1/baguetteBox.min.js" integrity="sha256-SoEATAB7PgNWyyK100I7yQXYm5V08k5SFupDP0h72MY=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment-with-locales.min.js" integrity="sha256-ZykW30UBCXWkPGsVyVPdJlUrce9/PawgYCEzinA4pnU=" crossorigin="anonymous"></script>
% else:
<script src="/assets/js/baguetteBox.min.js"></script>
<script src="/assets/js/moment-with-locales.min.js"></script>
% endif
% endif
${social_buttons_code}
</%def>

<%def name="html_stylesheets()">
<link href="https://fonts.googleapis.com/css?family=Bitter:400,400i,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.0.11/css/fork-awesome.min.css" integrity="sha256-MGU/JUq/40CFrfxjXb5pZjpoZmxiP2KuICN5ElLFNd8=" crossorigin="anonymous">
%if use_bundles:
%if use_cdn:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.9.1/baguetteBox.min.css" integrity="sha256-GrjD69ygFQ+lWqlAOC6LzoNUE4jKrvgkQJrtIukHAi4=" crossorigin="anonymous" />
<link href="/assets/css/all.css" rel="stylesheet" type="text/css">
%else:
<link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
%endif
%else:
<link href="/assets/css/baguetteBox.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/rst_base.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_rst.css" rel="stylesheet" type="text/css">
<link href="/assets/css/code.css" rel="stylesheet" type="text/css">
<link href="/assets/css/theme.css" rel="stylesheet" type="text/css">
<link href="/assets/css/forkfont.css" rel="stylesheet" type="text/css">
%if has_custom_css:
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
%endif
%endif
% if needs_ipython_css:
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
% endif
</%def>

### This function is deprecated; use feed_helper directly.
<%def name="html_feedlinks()">
${feeds_translations.head(classification=None, kind='index', other=False)}
</%def>

<%def name="html_translations()">
<ul class="translations">
%for langname in sorted(translations):
%if langname != lang:
<li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li>
%endif
%endfor
</ul>
</%def>
@@ -0,0 +1,60 @@
## -*- coding: utf-8 -*-
<%namespace name="helper" file="index_helper.tmpl"/>
<%namespace name="math" file="math_helper.tmpl"/>
<%namespace name="comments" file="comments_helper.tmpl"/>
<%namespace name="pagination" file="pagination_helper.tmpl"/>
<%namespace name="feeds_translations" file="feeds_translations_helper.tmpl" import="*"/>
<%inherit file="base.tmpl"/>

<%block name="extra_head">
${parent.extra_head()}
% if posts and (permalink == '/' or permalink == '/' + index_file):
<link rel="prefetch" href="${posts[0].permalink()}" type="text/html">
% endif
${math.math_styles_ifposts(posts)}
</%block>

<%block name="content">
<%block name="content_header">
${feeds_translations.translation_link(kind)}
</%block>
% if 'main_index' in pagekind:
${front_index_header}
% endif
% if page_links:
${pagination.page_navigation(current_page, page_links, prevlink, nextlink, prev_next_links_reversed)}
% endif
<div class="postindex">
% for post in posts:
<article class="h-entry post-${post.meta('type')}" itemscope="itemscope" itemtype="http://schema.org/Article">
<header>
<h1 class="p-name entry-title"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1>
<div class="metadata">
<p class="dateline"><a href="${post.permalink()}" rel="bookmark"><i class="fa fa-clock-o"></i> <time class="published dt-published" datetime="${post.formatted_date('webiso')}" title="${post.formatted_date(date_format)|h}">${post.formatted_date(date_format)|h}</time></a></p>
<p class="byline author vcard"> <i class="fa fa-user"></i> <span class="byline-name fn" itemprop="author">
% if author_pages_generated:
<a href="${_link('author', post.author())}">${post.author()|h}</a>
% else:
${post.author()|h}
% endif
</span></p>
% if not post.meta('nocomments') and site_has_comments:
<p class="commentline"><i class="fa fa-comment"></i> ${comments.comment_link(post.permalink(), post._base_path)}
% endif
</div>
</header>
%if index_teasers:
<div class="p-summary entry-summary">
${post.text(teaser_only=True)}
%else:
<div class="e-content entry-content">
${post.text(teaser_only=False)}
%endif
</div>
</article>
% endfor
</div>
${helper.html_pager()}
${comments.comment_link_script()}
${math.math_scripts_ifposts(posts)}
</%block>
@@ -0,0 +1,49 @@
## -*- coding: utf-8 -*-
<%namespace name="helper" file="post_helper.tmpl"/>
<%namespace name="pheader" file="post_header.tmpl"/>
<%namespace name="comments" file="comments_helper.tmpl"/>
<%namespace name="math" file="math_helper.tmpl"/>
<%inherit file="base.tmpl"/>

<%block name="extra_head">
${parent.extra_head()}
% if post.meta('keywords'):
<meta name="keywords" content="${smartjoin(', ', post.meta('keywords'))|h}">
% endif
<meta name="author" content="${post.author()|h}">
%if post.prev_post:
<link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html">
%endif
%if post.next_post:
<link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()|h}" type="text/html">
%endif
% if post.is_draft:
<meta name="robots" content="noindex">
% endif
${helper.open_graph_metadata(post)}
${helper.twitter_card_information(post)}
${helper.meta_translations(post)}
${math.math_styles_ifpost(post)}
</%block>

<%block name="content">
<article class="post-${post.meta('type')} h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article">
${pheader.html_post_header()}
<div class="e-content entry-content" itemprop="articleBody text">
${post.text()}
</div>
<aside class="postpromonav">
<nav>
${helper.html_pager(post)}
</nav>
</aside>
% if not post.meta('nocomments') and site_has_comments:
<section class="comments hidden-print">
<h2>${messages("Comments")}</h2>
${comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path)}
</section>
% endif
${math.math_scripts_ifpost(post)}
</article>
${comments.comment_link_script()}
</%block>
@@ -0,0 +1,9 @@
[Theme]
engine = mako
parent = zen
author = Damián Avila, Chris Warrick, Anke K
author_url = http://www.damian.oquanta.info/
license = MIT

[Family]
family = zen
@@ -0,0 +1,2 @@
Damián Avila <https://github.com/damianavila>
Chris Warrick <https://github.com/Kwpolska>
@@ -0,0 +1,11 @@
The zen and zen-based themes are very customizable, so to make these themes
work, you have to use the sample config file. The theme uses Font Awesome v5
icons.

More info about the zen themes family [here](http://www.damian.oquanta.info/posts/nikolas-zen-theme-finally-released.html).

Enjoy!

Damián

**WARNING:** The themes use Less for their styles, but you don't need a Less compiler installed to use it.

0 comments on commit e962e41

Please sign in to comment.
You can’t perform that action at this time.