update theme
This commit is contained in:
parent
57ed60df81
commit
4bcac944b3
27 changed files with 23899 additions and 1 deletions
109
themes/cmd/layout/includes/layout.swig
Normal file
109
themes/cmd/layout/includes/layout.swig
Normal file
|
@ -0,0 +1,109 @@
|
|||
|
||||
{% set pageTitle = page.title || config.subtitle || '' %}
|
||||
|
||||
{% if is_archive() %}
|
||||
{% set pageTitle = 'Archives' %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_tag() %}
|
||||
{% set pageTitle = 'Tag: ' + page.tag %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_category() %}
|
||||
{% set pageTitle = 'Category: ' + page.category %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_month() %}
|
||||
{% set pageTitle = pageTitle + ': ' + page.month + '/' + page.year %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_year() %}
|
||||
{% set pageTitle = pageTitle + ': ' + page.year %}
|
||||
{% endif %}
|
||||
|
||||
{% if pageTitle == '' %}
|
||||
{% set pageTitle = config.title %}
|
||||
{% endif %}
|
||||
|
||||
<!doctype html>
|
||||
<html lang="{{ config.language }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ pageTitle }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
|
||||
{% if theme.stylesheets !== undefined && theme.stylesheets.length > 0 %}
|
||||
{# stylesheet list from _config.yml #}
|
||||
{% for url in theme.stylesheets %}
|
||||
<link rel="stylesheet" href="{{ url }}">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% block add_head %}{% endblock %}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<ul id="nav-mobile" class="sidenav">
|
||||
{% for key in Object.keys(theme.menu) %}
|
||||
<li><a href="{{ theme.menu[key] }}">{{ key }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<nav class="light-blue lighten-1" role="navigation">
|
||||
<a href="#" data-target="nav-mobile" class="sidenav-trigger"><div class="mdi mdi-menu"></div></a>
|
||||
<div class="nav-wrapper">
|
||||
<ul class="right hide-on-med-and-down">
|
||||
{% for key in Object.keys(theme.menu) %}
|
||||
<li><a href="{{ theme.menu[key] }}">{{ key }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main id="content" class="container xscontainer">
|
||||
{% block body %}{% endblock %}
|
||||
</main>
|
||||
|
||||
|
||||
<footer class="page-footer light-blue darken-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{% if theme.about_this_blog %}
|
||||
<div class="col s12 m4">
|
||||
<h5 class="white-text">About {{config.title}}</h5>
|
||||
<p>{{theme.about_this_blog}}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if theme.footer_links %}
|
||||
<div class="col s6 m4">
|
||||
<h5 class="white-text"> Links </h5>
|
||||
<ul>
|
||||
{% for name in Object.keys(theme.footer_links) %}
|
||||
<li><a class="grey-text text-lighten-3" href="{{theme.footer_links[name]}}">{{name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if theme.theme_self_claim %}
|
||||
<div class="col s6 m4">
|
||||
<p>This blog uses Classical Material Design theme.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-copyright">
|
||||
<div class="container truncate">
|
||||
© Copyright {{ theme.copyright_year_string }} {{ config.author }}. {{ theme.copyright_addtional }}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{% if theme.scripts !== undefined && theme.scripts.length > 0 %}
|
||||
{# scripts list from config.yml #}
|
||||
{% for url in theme.scripts %}
|
||||
<script src="{{ url }}"></script>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% block add_scripts %}{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
14
themes/cmd/layout/includes/recent-posts.swig
Normal file
14
themes/cmd/layout/includes/recent-posts.swig
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
{% if page.posts.length > 0 %}
|
||||
<div id="recent-posts">
|
||||
<h1>All Posts</h1>
|
||||
{% for postItem in page.posts.toArray() %}
|
||||
<div class="recent-post-item">
|
||||
<a href="{{ url_for(postItem.path) }}">{{ postItem.title }}</a>
|
||||
<time datetime="{{ postItem.date.toJSON() }}">
|
||||
{{ date(postItem.date) }}
|
||||
</time>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue