-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
395 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[block] | ||
name = Recent Posts | ||
|
||
[fields.title] | ||
label = Title | ||
type = string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ order_by = -pub_date, title | |
|
||
[pagination] | ||
enabled = yes | ||
per_page = 10 | ||
per_page = 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
themes/vocabulary_theme/templates/blocks/recent-posts.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{% from "macros/author_name.html" import render_author_name %} | ||
|
||
<section class="recent-posts"> | ||
<div class="container"> | ||
<div class="level"> | ||
<h4 class="is-paddingless level-left"> | ||
{{ this.title }} | ||
</h4> | ||
<span class="level-right"> | ||
<a class="posts-link" href="/blog">See all posts <i class="icon angle-right"></i></a> | ||
</span> | ||
</div> | ||
<div class="columns"> | ||
{% for post in site.query('/blog/entries') %} | ||
{% if loop.index <= 3 %} | ||
{% set author = post.parent.parent.children.get('authors').children.get(post.author) %} | ||
<div class="column is-one-third is-paddingless padding-horizontal-big padding-top-bigger"> | ||
<article class="card entry-post horizontal no-border blog-entry"> | ||
<header> | ||
<figure class="image blog-image"> | ||
{% if author.about %} | ||
{% if author.md5_hashed_email %} | ||
<img class="profile" src="https://secure.gravatar.com/avatar/{{ author.md5_hashed_email }}?size=200" | ||
alt="gravatar" /> | ||
{% endif %} | ||
{% endif %} | ||
</figure> | ||
</header> | ||
<div class="blog-content"> | ||
<h4 class="b-header"><a class="has-color-dark-slate-gray" href="{{ post|url }}">{{ post.title }}</a></h4> | ||
<span class="blog-author">by <a class="author-name" href="{{ author|url }}">{{ render_author_name(author) }}</a> | ||
on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</span> | ||
<div class="excerpt"> | ||
{{ post.body | excerpt | string | striptags() | truncate(100) }} | ||
</div> | ||
</div> | ||
</article> | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% from "macros/categories.html" import render_categories %} | ||
{% block title %}{{ this.parent.children.get('entries').title }}{% endblock %} | ||
{% block header %}{{ this.parent.children.get('entries').title }}{% endblock %} | ||
|
||
{% block body %} | ||
<h2>Categories</h2> | ||
{{ render_categories(this) }} | ||
<div class="all-categories"> | ||
<div class="title"> | ||
<h1 class="container">Categories</h1> | ||
</div> | ||
<div class="categories-list container"> | ||
{{ render_categories(this) }} | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
{% extends "layout.html" %} | ||
{% from "macros/categories.html" import render_categories %} | ||
{% block title %}{{ this.parent.children.get('entries').title }}{% endblock %} | ||
{% block header %}{{ this.parent.children.get('entries').title }}{% endblock %} | ||
|
||
{% from "macros/series.html" import render_series %} | ||
|
||
{% block body %} | ||
<h2>All Series</h2> | ||
{{ render_categories(this) }} | ||
<div class="all-series"> | ||
<div class="title"> | ||
<h1 class="container">All Series</h1> | ||
</div> | ||
<div class="series-list container"> | ||
{{ render_series(this) }} | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
{% from "macros/posts.html" import render_posts %} | ||
|
||
{% macro render_categories(categories) %} | ||
<ul class="list-unstyled"> | ||
{% for category in site.query(categories.path) %} | ||
<li><a href="{{ category|url }}">{{ category.name }}</a></li> | ||
<a class="button tag margin-vertical-small margin-horizontal-smaller" href="{{ category|url }}">{{ category.name }}</a> | ||
{% endfor %} | ||
</ul> | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
{% macro render_pagination(pagination) %} | ||
<ul class="pagination table-responsive mb-2"> | ||
{% if pagination.has_prev %} | ||
<li class="page-item"><a class="page-link" href="{{ pagination.prev|url }}">Previous</a></li> | ||
{% else %} | ||
<li class="page-item disabled"><a class="page-link">Previous</a></li> | ||
{% endif %} | ||
{% for p in range(pagination.pages) %} | ||
{% if pagination.current|url == pagination.for_page(p+1)|url %} | ||
<li class="page-item active"><a class="page-link" href="{{ pagination.for_page(p+1)|url}}">{{p+1}}</a></li> | ||
<nav class="pagination" role="navigation" aria-label="pagination"> | ||
<ul class="pagination-list"> | ||
<!-- {% if pagination.has_prev %} | ||
<li class="page-item"><a class="page-link" href="{{ pagination.prev|url }}">Previous</a></li> | ||
{% else %} | ||
<li class="page-item"><a class="page-link" href="{{ pagination.for_page(p+1)|url}}">{{p+1}}</a></li> | ||
{% endif %} | ||
{% endfor %} | ||
{% if pagination.has_next %} | ||
<li class="page-item"><a class="page-link" href="{{ pagination.next|url }}">Next</a></li> | ||
{% else %} | ||
<li class="page-item disabled"><a class="page-link">Next</a></li> | ||
{% endif %} | ||
</ul> | ||
<li class="page-item disabled"><a class="page-link">Previous</a></li> | ||
{% endif %} --> | ||
{% for p in range(pagination.pages) %} | ||
{% if pagination.current|url == pagination.for_page(p+1)|url %} | ||
<li class="common"> | ||
<a class="pagination-link is-current common-link" aria-label="Goto page {{p+1}}" aria-current="page" href="{{ pagination.for_page(p+1)|url}}">{{p+1}}</a> | ||
</li> | ||
{% else %} | ||
<li class="inactive"> | ||
<a class="pagination-link inactive-link" aria-label="Goto page {{p+1}}" href="{{ pagination.for_page(p+1)|url}}">{{p+1}}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
<!-- {% if pagination.has_next %} | ||
<li class="page-item"><a class="page-link" href="{{ pagination.next|url }}">Next</a></li> | ||
{% else %} | ||
<li class="page-item disabled"><a class="page-link">Next</a></li> | ||
{% endif %} --> | ||
</ul> | ||
</nav> | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
{% from "macros/author_name.html" import render_author_name %} | ||
|
||
{% macro render_posts(posts) %} | ||
<ul class="blog-index list-unstyled"> | ||
<div class="columns is-multiline blog-entries"> | ||
{% for post in posts %} | ||
{% set author = post.parent.parent.children.get('authors').children.get(post.author) %} | ||
<li> | ||
<a href="{{ post|url }}">{{ post.title }}</a> | ||
<p class="text-muted small">by <a href="{{ author|url }}">{{ render_author_name(author) }}</a> | ||
on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</p> | ||
</li> | ||
<article class="card entry-post horizontal no-border blog-entry column is-one-third"> | ||
<header> | ||
<figure class="image blog-image"> | ||
{% if author.about %} | ||
{% if author.md5_hashed_email %} | ||
<img class="profile" src="https://secure.gravatar.com/avatar/{{ author.md5_hashed_email }}?size=200" alt="gravatar" /> | ||
{% else %} | ||
<img class="profile" src="./blank_profile.svg" alt="gravatar" /> | ||
{% endif %} | ||
{% endif %} | ||
</figure> | ||
</header> | ||
<div class="blog-content"> | ||
<h4 class="b-header"><a class="blog-title" href="{{ post|url }}">{{ post.title }}</a></h4> | ||
<span class="blog-author">by <a href="{{ author|url }}">{{ render_author_name(author) }}</a> | ||
on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</span> | ||
<div class="excerpt"> | ||
{{ post.body | excerpt | string | striptags() | truncate(100) }} | ||
</div> | ||
</div> | ||
</article> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% from "macros/posts.html" import render_posts %} | ||
|
||
{% macro render_series(series) %} | ||
{% for serie in site.query(series.path) %} | ||
<h4 class="series-link"><a class="link" href="{{ serie|url }}">{{ serie.name }}</a></h4> | ||
{% endfor %} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,65 @@ | ||
{% extends "layout.html" %} | ||
{% block title %}{{ this.title }}{% endblock %} | ||
|
||
{% block body %} | ||
<div class="card toc-card bg-light"> | ||
<div class="card-body"> | ||
<ul class="toc list-unstyled"> | ||
{% for item in this.body.toc %} | ||
<li><a href="#{{ item.anchor }}">{{ item.title }}</a></li> | ||
{% if item.children %} | ||
<ul class="toc list-unstyled pl-4"> | ||
{% for subitem in item.children %} | ||
<li><a href="#{{ subitem.anchor }}">{{ subitem.title }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
<div class="code-guidelines"> | ||
<header class="code-guidelines-title"> | ||
<div class="container is-paddingless"> | ||
<h1>{{ this.title }}</h1> | ||
<div class="description column is-9 is-paddingless"> | ||
{{ this.description }} | ||
</div> | ||
</div> | ||
</header> | ||
<div class="container code-guidelines-body"> | ||
<div class="columns"> | ||
<div class="column is-one-quarter"> | ||
<div class="row"> | ||
{% if this.is_child_of('/contributing-code') %} | ||
<aside class="menu sidebar-menu"> | ||
<ul class="menu-list"> | ||
<li> | ||
<a class="{% if this.is_child_of('/contributing-code/projects') %} is-active {% endif%} link" href="{{ '/contributing-code/projects'|url }}">Project List</a> | ||
</li> | ||
<hr class="divider"> | ||
<li> | ||
<a class="{% if this.is_child_of('/contributing-code') %} is-active {% endif%} link" href="{{ '/contributing-code'|url }}">Contribution Guidelines</a> | ||
<ul> | ||
<li><a class="{% if this.is_child_of('/contributing-code/pr-guidelines') %} is-active {% endif%} link" href="{{ '/contributing-code/pr-guidelines'|url }}"><i class="icon circle-filled"></i>PR Guidelines</a></li> | ||
<li><a class="{% if this.is_child_of('/contributing-code/github-repo-guidelines') %} is-active {% endif%} link" href="{{ '/contributing-code/github-repo-guidelines'|url }}"><i class="icon circle-filled"></i>Github Repo Guidelines</a></li> | ||
</ul> | ||
</li> | ||
<hr class="divider"> | ||
<li> | ||
<a class="link" href="{{ '/contributing-code/cc-search'|url }}">CC Search</a> | ||
</li> | ||
</ul> | ||
</aside> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
<div class="row"> | ||
<h4 class="b-header">On this page</h4> | ||
<aside class="menu table-of-contents"> | ||
<ul class="menu-list"> | ||
{% for item in this.body.toc %} | ||
<li> | ||
<a class="link" href="#{{ item.anchor }}">{{ item.title }}</a> | ||
{% if item.children %} | ||
<ul> | ||
{% for subitem in item.children %} | ||
<li><a class="link" href="#{{ subitem.anchor }}"><i class="icon circle-filled"></i>{{ subitem.title }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</aside> | ||
</div> | ||
</div> | ||
<div class="column markdown content"> | ||
{{ this.body }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{ this.body }} | ||
{% endblock %} |
Oops, something went wrong.