Initial web
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}{{ config.title }} - 404{% endblock title %}
|
||||
|
||||
{% block navbar %}
|
||||
{% for item in config.extra.zola386_menu %}
|
||||
<li>
|
||||
<a href="{{ config.base_url }}/{{item.path}}"><span>{{ item.name }}</span></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="alert alert-error navmargin">
|
||||
<h1>404 - Not found</h1>
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block main %}
|
||||
<p>
|
||||
The page you requested was not found.<br>
|
||||
You can try to find it by browsing the menus.
|
||||
</p>
|
||||
<p>
|
||||
<a href="{{ config.base_url }}" class="btn btn-info" role="button">Home</a>
|
||||
<a href="{{ config.base_url }}/categories" class="btn btn-info" role="button">Categories</a>
|
||||
<a href="{{ config.base_url }}/tags" class="btn btn-info" role="button">Tags</a>
|
||||
</p>
|
||||
{% endblock main %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}{{ config.title }} - {{ config.extra.label_categories }}{% endblock title %}
|
||||
|
||||
{% block header %}
|
||||
<div class="page-header">
|
||||
<h1>{{ config.extra.label_categories }}</h1>
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block main %}
|
||||
<ul>
|
||||
{% for category in terms %}
|
||||
<li>
|
||||
<a href="{{ category.permalink }}">{{ category.name }}</a> ({{ category.pages | length }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock main %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}{{ config.title }} - {{ config.extra.label_categories }}{% endblock title %}
|
||||
|
||||
{% block header %}
|
||||
<div class="page-header">
|
||||
<h1>{{ config.extra.label_category }}: {{ term.name }}</h1>
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block main %}
|
||||
<ul>
|
||||
{% for page in term.pages %}
|
||||
<li>{{ macro::post_min(page=page) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock main %}
|
||||
@@ -0,0 +1,184 @@
|
||||
{% import "macros.html" as macro %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{% if page.extra.lang %}{{ page.extra.lang }}{% else %}{{ config.default_language }}{% endif %}" itemscope itemtype="http://schema.org/Blog">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<link rel="stylesheet" href="{{ get_url(path="site.css", trailing_slash=false) | safe }}">
|
||||
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
||||
|
||||
{% if config.generate_rss %}
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") }}">
|
||||
{% endif %}
|
||||
|
||||
<meta name="description" itemprop="about" content="{{ config.description }}">
|
||||
<meta name="keywords" itemprop="keywords" content="{{ config.extra.keywords }}">
|
||||
<meta name="author" itemprop="author" content="{{ config.extra.author }}">
|
||||
<meta itemprop="headline" content="{{ config.title }}">
|
||||
<meta itemprop="copyrightYear" content="{{ config.extra.year }}">
|
||||
|
||||
<link rel="icon" href="{{ get_url(path="images/favicon.ico") }}" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="{{ get_url(path="images/apple-icon-57x57.png") }}">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="{{ get_url(path="images/apple-icon-60x60.png") }}">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="{{ get_url(path="images/apple-icon-72x72.png") }}">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="{{ get_url(path="images/apple-icon-76x76.png") }}">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="{{ get_url(path="images/apple-icon-114x114.png") }}">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="{{ get_url(path="images/apple-icon-120x120.png") }}">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ get_url(path="images/apple-icon-144x144.png") }}">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="{{ get_url(path="images/apple-icon-152x152.png") }}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ get_url(path="images/apple-icon-180x180.png") }}">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="{{ get_url(path="images/android-icon-192x192.png") }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ get_url(path="images/favicon-32x32.png") }}">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="{{ get_url(path="images/favicon-96x96.png") }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ get_url(path="images/favicon-16x16.png") }}">
|
||||
<link rel="manifest" href="{{ get_url(path="images/manifest.json") }}">
|
||||
<meta name="msapplication-TileColor" content="{{ config.extra.theme_color }}">
|
||||
<meta name="msapplication-TileImage" content="{{ get_url(path="images/ms-icon-144x144.png") }}">
|
||||
<meta name="theme-color" content="{{ config.extra.theme_color }}">
|
||||
|
||||
<meta property="og:title" content="{% block ogtitle %}{{ config.title }}{% endblock ogtitle %}">
|
||||
<meta property="og:description" content="{% block ogdesc %}{{ config.description }}{% endblock ogdesc %}">
|
||||
<meta property="og:url" content="{% block ogurl %}{{ config.base_url }}{% endblock ogurl%}">
|
||||
<meta property="og:site_name" content="{{ config.title }}">
|
||||
{% if config.extra.image %}
|
||||
<meta property="og:image" content="{% block ogimg %}{{ config.extra.image }}{% endblock ogimg %}">
|
||||
{% endif %}
|
||||
<meta name="twitter:card" content="summary">
|
||||
{% if config.extra.twitter_user %}
|
||||
<meta name="twitter:site" content="{{ config.extra.twitter_user }}">
|
||||
<meta name="twitter:creator" content="{{ config.extra.twitter_user }}">
|
||||
<meta name="twitter:image:alt" content="{% block ogaltimg %}{{ config.title }}{% endblock ogaltimg %}">
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.google_analytics %}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{config.extra.google_analytics}}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{config.extra.google_analytics}}');
|
||||
</script>
|
||||
{% endif %}
|
||||
</head>
|
||||
|
||||
<body data-spy="scroll" data-target=".bs-docs-sidebar">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"></button>
|
||||
<a class="brand" href="{{ config.base_url }}">{{ config.title }}</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
{% block navbar %}
|
||||
{% for item in config.extra.zola386_menu %}
|
||||
<li class="{% if item.path == current_path | replace(from="/", to="") %}active{% endif %}">
|
||||
<a href="{{ config.base_url }}/{{ item.path }}"><span>{{ item.name }}</span></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container navmargin">
|
||||
<header class="jumbotron subhead" id="overview">
|
||||
{% block breadcrumb %}{% endblock breadcrumb %}
|
||||
{% block header %}
|
||||
<div class="page-header">
|
||||
<h1>{{ config.title }} <small>{{ config.description }}</small></h1>
|
||||
</div>
|
||||
{% endblock header %}
|
||||
{% block meta %}{% endblock meta %}
|
||||
</header>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span9 bs-docs-sidebar">
|
||||
{% block main %}
|
||||
{% for page in paginator.pages %}
|
||||
{{ macro::post_max(page=page) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ macro::paginator(ref=paginator, extra=config.extra) }}
|
||||
{% endblock main %}
|
||||
</div> <!-- span9 -->
|
||||
|
||||
<div class="span3 bs-docs-sidebar">
|
||||
{% block sidebar %}
|
||||
<!--<h1>Search</h1>
|
||||
<form class="form-search">
|
||||
<input id="search" type="text" class="input-large search-query">
|
||||
</form>
|
||||
<div class="search-results">
|
||||
<div class="search-results__items"></div>
|
||||
</div>
|
||||
<p></p>-->
|
||||
<h1>Categories</h1>
|
||||
<ul class="nav nav-list bs-docs-sidenav">
|
||||
{% set categories = get_taxonomy(kind="categories") %}
|
||||
{% for cat in categories.items %}
|
||||
<li><a href="{{ config.base_url }}/categories/{{ cat.name }}">{{ cat.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p></p>
|
||||
<h1>Tags</h1>
|
||||
<ul class="nav nav-list bs-docs-sidenav">
|
||||
{% set tags = get_taxonomy(kind="tags") %}
|
||||
{% for tag in tags.items %}
|
||||
<li><a href="{{ config.base_url }}/tags/{{ tag.name }}">{{ tag.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock sidebar %}
|
||||
</div>
|
||||
|
||||
</div> <!-- row -->
|
||||
</div> <!-- container navmargin -->
|
||||
|
||||
<footer class="container">
|
||||
<hr class="soften">
|
||||
<p>
|
||||
{{ config.extra.year }} ©
|
||||
<a href="{{ config.base_url }}">{{ config.extra.author }}</a>
|
||||
|
|
||||
{% if config.extra.twitter_user %}
|
||||
<a href="https://twitter.com/{{ config.extra.twitter_user }}" target="_blank">Twitter</a>
|
||||
{% endif %}
|
||||
{% if config.extra.linkedin_user %}
|
||||
<a href="https://linkedin.com/in/{{ config.extra.linkedin_user }}" target="_blank">Linkedin</a>
|
||||
{% endif %}
|
||||
{% if config.extra.github_user %}
|
||||
<a href="https://github.com/{{ config.extra.github_user }}" target="_blank">GitHub</a>
|
||||
{% endif %}
|
||||
{% if config.extra.gitlab_user %}
|
||||
<a href="https://gitlab.com/{{ config.extra.gitlab_user }}" target="_blank">GitLab</a>
|
||||
{% endif %}
|
||||
|
|
||||
Built on <a href="https://getzola.org" target="_blank">Zola</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<script src="{{ get_url(path="js/jquery.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-386.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-transition.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-alert.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-modal.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-dropdown.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-scrollspy.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-tab.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-tooltip.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-popover.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-button.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-collapse.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-carousel.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-typeahead.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/bootstrap-affix.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/zola.386.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="js/search.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="elasticlunr.min.js", trailing_slash=false) | safe }}"></script>
|
||||
<script src="{{ get_url(path="search_index.en.js", trailing_slash=false) | safe }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,79 @@
|
||||
{% macro post_max(page) %}
|
||||
<div>
|
||||
<h1><a href="{{ page.permalink }}">{{ page.title }}</a></h1>
|
||||
<p>{{ page.description }}</p>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{ config.extra.label_date }}</dt>
|
||||
<dd>{{ page.date | date(format="%Y-%m-%d") }}</dd>
|
||||
|
||||
<dt>{{ config.extra.label_author }}</dt>
|
||||
<dd>
|
||||
{% if page.extra.author %}
|
||||
{{page.extra.author}}
|
||||
{% else %}
|
||||
{{config.extra.author}}
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
{% if page.taxonomies.categories %}
|
||||
<dt>{{ config.extra.label_taxonomy }}</dt>
|
||||
<dd>
|
||||
<a href="{{ get_taxonomy_url(kind="categories", name=page.taxonomies.categories[0]) }}">
|
||||
{{ page.taxonomies.categories[0] }}
|
||||
</a>
|
||||
|
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
<a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a>{% if page.taxonomies.tags | length > 1 %}{% if loop.index != page.taxonomies.tags | length %},{% endif %}{% endif %}
|
||||
{% endfor %}
|
||||
</a>
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>{{ config.extra.label_reading }}</dt>
|
||||
<dd>{{ page.reading_time }}'</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<a href="{{ page.permalink }}" class="btn btn-info" role="button">{{ config.extra.label_read_more }}</a>
|
||||
</p>
|
||||
<hr class="soften">
|
||||
<p></p>
|
||||
</div>
|
||||
{% endmacro post_max %}
|
||||
|
||||
|
||||
{% macro post_min(page) %}
|
||||
<a href="{{ page.permalink }}">{{ page.date }} | {{ page.title }}</a>
|
||||
{% endmacro post_min %}
|
||||
|
||||
|
||||
{% macro paginator(ref, extra) %}
|
||||
<div class="pagination pagination-centered">
|
||||
<ul>
|
||||
{% if ref.current_index != 1 %}
|
||||
<li><a href="{{ ref.first }}">⇤</a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><a href="{{ ref.first }}">⇤</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if ref.next %}
|
||||
<li><a href="{{ ref.previous }}">←</a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><a href="#">←</a></li>
|
||||
{% endif %}
|
||||
|
||||
<li class="disabled"><a href="#">{{ ref.current_index }}/{{ ref.number_pagers }}</a></li>
|
||||
|
||||
{% if ref.next %}
|
||||
<li><a href="{{ ref.next }}">→</a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><a href="#">→</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if ref.current_index != ref.number_pagers %}
|
||||
<li><a href="{{ ref.last }}">⇥</a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><a href="{{ ref.last }}">⇥</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro paginator %}
|
||||
@@ -0,0 +1,63 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}{{ config.title}} - {{ page.title }}{% endblock title %}
|
||||
|
||||
{% block ogtitle %}{{ config.title}} - {{ page.title }}{% endblock ogtitle %}
|
||||
{% block ogdesc %}{{ page.description }}{% endblock ogdesc %}
|
||||
{% block ogurl %}{% if page.slug %}{{ config.base_url }}/{{ page.slug }}{% endif %}{% endblock ogurl %}
|
||||
{% block ogimg %}{% if page.extra.image %}{{ page.extra.image }}{% endif %}{% endblock ogimg %}
|
||||
|
||||
|
||||
{% block breadcrumb %}
|
||||
<p class="lead">
|
||||
<span>>></span>
|
||||
<a href="{{ config.base_url }}">Home</a>
|
||||
{% if page.taxonomies %}
|
||||
<span class="divider">/</span>
|
||||
<a class="category" href="{{ get_taxonomy_url(kind="categories", name=page.taxonomies.categories[0]) }}">{{ page.taxonomies.categories[0] }}</a>
|
||||
<span class="divider">/</span>
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
<a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a>{% if page.taxonomies.tags | length > 1 %}{% if loop.index != page.taxonomies.tags | length %},{% endif %}{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endblock breadcrumb %}
|
||||
|
||||
{% block header %}
|
||||
<div class="page-header">
|
||||
<h1>{{ page.title }}</h1>
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block meta %}
|
||||
<p class="text-right">
|
||||
<span class="label label-success">
|
||||
∵
|
||||
{% if page.extra.author %}
|
||||
{{ page.extra.author }}
|
||||
{% else %}
|
||||
{{ config.extra.author }}
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="label label-success">∴ {{ page.date }}</span>
|
||||
<span class="label label-success">∞ {{ page.reading_time }}'</span>
|
||||
</p>
|
||||
{% endblock meta %}
|
||||
|
||||
{% block main %}
|
||||
{{ page.content | safe }}
|
||||
{% if config.extra.disqus and page.extra.comments %}
|
||||
<div id="disqus">
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = 'https://{{config.extra.disqus}}.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock main %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{% if not width %}
|
||||
{% set width = 240 %}
|
||||
{% endif %}
|
||||
{% if not height %}
|
||||
{% if width %}
|
||||
{% set height = width %}
|
||||
{% else %}
|
||||
{% set height = 180 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not op %}
|
||||
{% set op = 'fill' %}
|
||||
{% endif %}
|
||||
|
||||
{% if caption %}
|
||||
<figure>
|
||||
<a href="{{ get_url(path=path) }}"><img src="{{ resize_image(path=path, width=width, height=height, op=op) }}"/></a>
|
||||
<figcaption>{{ caption }}</figcaption>
|
||||
</figure>
|
||||
{% elif figure %}
|
||||
<figure>
|
||||
<img src="{{ resize_image(path=path, width=width, height=height, op=op) }}"/>
|
||||
</figure>
|
||||
{% else %}
|
||||
<img src="{{ resize_image(path=path, width=width, height=height, op=op) }}"/>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}{{ config.title }} - {{ config.extra.label_tags }}{% endblock title %}
|
||||
|
||||
{% block header %}
|
||||
<div class="page-header">
|
||||
<h1>{{ config.extra.label_tags }}</h1>
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block main %}
|
||||
<ul>
|
||||
{% for category in terms %}
|
||||
<li>
|
||||
<a href="{{ category.permalink }}">{{ category.name }}</a> ({{ category.pages | length }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock main %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}{{ config.title }} - {{ config.extra.label_tags }}{% endblock title %}
|
||||
|
||||
{% block header %}
|
||||
<div class="page-header">
|
||||
<h1>{{ config.extra.label_tag }}: {{ term.name }}</h1>
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block main %}
|
||||
<ul>
|
||||
{% for page in term.pages %}
|
||||
<li>{{ macro::post_min(page=page) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock main %}
|
||||
Reference in New Issue
Block a user