finished theme v1
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="post">
|
||||
<h1 class="post_title"><a class="post_link" href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
|
||||
|
||||
{% set section = get_section(path="_index.md") %}
|
||||
|
||||
{{ post::list(pages=section.pages) }}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
+361
-39
@@ -1,12 +1,28 @@
|
||||
{% import "post.html" as post -%}
|
||||
<!-- vim: set ft=html: -->
|
||||
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="{%- if config.default_language -%}{{ config.default_language }}{%- else -%}en{%- endif -%}">
|
||||
<head>
|
||||
<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") | safe }}">
|
||||
{%- endif %}
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") | safe }}">
|
||||
|
||||
{% if config.extra.katex_enable %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/contrib/mathtex-script-type.min.js" integrity="sha384-zWYbd0NBwgTsgIdFKVprSfTh1mbMPe5Hz1X3yY4Sd1h/K1cQoUe36OGwAGz/PcDy" crossorigin="anonymous"></script>
|
||||
{% if config.extra.katex_auto_render %}
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"
|
||||
onload="renderMathInElement(document.body);"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{%- if config.extra.favicon %}
|
||||
<link rel="shortcut icon" type="{{ config.extra.favicon_mimetype | default(value="image/x-icon") }}" href="{{ config.extra.favicon | safe }}">
|
||||
@@ -17,11 +33,10 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "UtsukushiMincho";
|
||||
src: url(UtsukushiMincho.ttf);
|
||||
src: url(/UtsukushiMincho.ttf);
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
font-family: UtsukushiMincho;
|
||||
{%- if config.extra.base00 %}
|
||||
background-color: {{ config.extra.base00 }};
|
||||
@@ -34,27 +49,47 @@
|
||||
{% else %}
|
||||
color: #575279;
|
||||
{% endif -%}
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
text-size-adjust: none;
|
||||
-webkit-text-size-adjust: none;
|
||||
-moz-text-size-adjust: none;
|
||||
-ms-text-size-adjust: none;
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 992px) {
|
||||
.main {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.header_title {
|
||||
font-weight: bolder;
|
||||
font-size: 2.5rem;
|
||||
font-size: 44.8px;
|
||||
|
||||
}
|
||||
|
||||
.header {
|
||||
|
||||
width: 50%;
|
||||
width: 100%;
|
||||
margin-top: 7rem;
|
||||
padding-top: 1rem;
|
||||
padding-left: 1rem;
|
||||
padding-bottom: 1.5rem;
|
||||
border-radius: 5px;
|
||||
{%- if config.extra.base00 %}
|
||||
border: solid {{ config.extra.base00 }};
|
||||
{%- if config.extra.base05 %}
|
||||
border: solid {{ config.extra.base05 }};
|
||||
{% else %}
|
||||
border: solid #575279;
|
||||
{% endif -%}
|
||||
@@ -70,6 +105,7 @@
|
||||
padding-left: 0.3rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
text-size-adjust: none;
|
||||
}
|
||||
|
||||
.menu_list {
|
||||
@@ -78,6 +114,36 @@
|
||||
|
||||
.menu_item {
|
||||
|
||||
{%- if config.extra.base0e %}
|
||||
color: {{ config.extra.base0e }};
|
||||
{% else %}
|
||||
color: #907aa9;
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.pagination_buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.pag_button {
|
||||
border-radius: 10px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.1rem;
|
||||
appearance: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.button_text {
|
||||
padding: 8px 16px;
|
||||
text-decoration: none;
|
||||
{%- if config.extra.base0d %}
|
||||
color: {{ config.extra.base0d }};
|
||||
{% else %}
|
||||
@@ -85,51 +151,307 @@
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
.menu_item:visited {
|
||||
.footer {
|
||||
width: 100%;
|
||||
flex-grow: 0;
|
||||
padding: 40px 0;
|
||||
}
|
||||
|
||||
.arial {
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
}
|
||||
.post {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.post_contents a {
|
||||
{%- if config.extra.base0d %}
|
||||
color: {{ config.extra.base0d }};
|
||||
{% else %}
|
||||
color: #286983;
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
.post_contents a:visited {
|
||||
{%- if config.extra.base0e %}
|
||||
color: {{ config.extra.base0e }};
|
||||
{% else %}
|
||||
color: #907aa9;
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
|
||||
.post_contents pre {
|
||||
padding: 12px;
|
||||
overflow: auto;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.post_contents pre[data-linenos] {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.post_contents pre table td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.post_contents pre table td:nth-of-type(1) {
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.post_contents pre mark {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.post_contents pre table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.post_contents img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.post_contents img.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.post_contents img.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.post_contents img.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.post_contents blockquote {
|
||||
{%- if config.extra.base09 %}
|
||||
border-left: 3px solid {{ config.extra.base09 }};
|
||||
{% else %}
|
||||
border-left: 3px solid #ea9d34;
|
||||
{% endif -%}
|
||||
padding-left: 10px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
height: 1px;
|
||||
{%- if config.extra.base03 %}
|
||||
background: {{ config.extra.base03 }};
|
||||
{% else %}
|
||||
background: #9893a5;
|
||||
{% endif -%}
|
||||
|
||||
}
|
||||
|
||||
.post_link {
|
||||
{%- if config.extra.base0c %}
|
||||
color: {{ config.extra.base0c }};
|
||||
{% else %}
|
||||
color: #56949f;
|
||||
{% endif -%}
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post_title {
|
||||
font-weight: bolder;
|
||||
font-size: 2.2rem;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 25px;
|
||||
{%- if config.extra.base0c %}
|
||||
border-bottom: 2px solid {{ config.extra.base0c }};
|
||||
{% else %}
|
||||
border-bottom: 2px solid #56949f;
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
.post_meta {
|
||||
font-weight: bold;
|
||||
{%- if config.extra.base04 %}
|
||||
color: {{ config.extra.base04 }};
|
||||
{% else %}
|
||||
color: #797593;
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
.post_tag {
|
||||
{%- if config.extra.base04 %}
|
||||
color: {{ config.extra.base04 }};
|
||||
{% else %}
|
||||
color: #797593;
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
.post_list_link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post_date {
|
||||
{%- if config.extra.base0c %}
|
||||
color: {{ config.extra.base0c }};
|
||||
{% else %}
|
||||
color: #56949f;
|
||||
{% endif -%}
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post_list_title {
|
||||
{%- if config.extra.base05 %}
|
||||
color: {{ config.extra.base05 }};
|
||||
{% else %}
|
||||
color: #575279;
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
.show_all_tags {
|
||||
font-weight: bold;
|
||||
{%- if config.extra.base05 %}
|
||||
color: {{ config.extra.base05 }};
|
||||
{% else %}
|
||||
color: #575279;
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
.tag_list {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.tag_item {
|
||||
font-weight: bold;
|
||||
{%- if config.extra.base04 %}
|
||||
color: {{ config.extra.base04 }};
|
||||
{% else %}
|
||||
color: #797593;
|
||||
{% endif -%}
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.button_read_more {
|
||||
float: right;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.pagination_link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.postview_title_text {
|
||||
padding: 5px 10px;
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.2rem;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.pagination_title {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block header %}
|
||||
<div class="header">
|
||||
<div class="main">
|
||||
{% block header %}
|
||||
<div class="header">
|
||||
|
||||
<div class="header_title">
|
||||
{% block title_content %}
|
||||
{%- if config.extra.title_text %}
|
||||
{{ config.extra.title_text }}
|
||||
{% elif config.title %}
|
||||
{{ config.title }}
|
||||
{% else %}
|
||||
Dawn Theme
|
||||
{% endif -%}
|
||||
{% endblock title_content %}
|
||||
</div>
|
||||
|
||||
{% block header_menu %}
|
||||
<div class="header_menu">
|
||||
<nav class="header_nav">
|
||||
<ul class="menu_inner">
|
||||
{% for item in config.extra.menu %}
|
||||
<li class = "menu_list">
|
||||
<a class = "menu_item" href="{{ item.url | replace(from="$BASE_URL", to=config.base_url) }}">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{% endblock header_menu %}
|
||||
|
||||
<div class="header_title">
|
||||
{% block title_content %}
|
||||
{%- if config.extra.title_text %}
|
||||
{{ config.extra.title_text }}
|
||||
{% elif config.title %}
|
||||
{{ config.title }}
|
||||
{% else %}
|
||||
Dawn Theme
|
||||
{% endif -%}
|
||||
{% endblock title_content %}
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block header_menu %}
|
||||
<div class="header_menu">
|
||||
<nav class="header_nav">
|
||||
<ul class="menu_inner">
|
||||
{% for item in config.extra.menu %}
|
||||
<li class = "menu_list">
|
||||
<a class = "menu_item" href="{{ item.url | replace(from="$BASE_URL", to=config.base_url) }}">
|
||||
{{ item.name }}
|
||||
|
||||
<div class="content">
|
||||
{% block content %}
|
||||
<div class="posts">
|
||||
{%- if paginator %}
|
||||
{%- set show_pages = paginator.pages -%}
|
||||
{% else %}
|
||||
{%- set show_pages = section.pages -%}
|
||||
{% endif -%}
|
||||
|
||||
{%- for page in show_pages %}
|
||||
<div class="post on-list">
|
||||
{{ post::header(page=page, summary=true) }}
|
||||
{{ post::content(page=page, summary=true) }}
|
||||
</div>
|
||||
{% endfor -%}
|
||||
|
||||
<div class="pagination">
|
||||
<div class="pagination_buttons">
|
||||
{%- if paginator.previous %}
|
||||
<span class="pag_button next">
|
||||
<a class="pagination_link" href="{{paginator.previous | safe }}">
|
||||
<span class="button_text"><span class="arial">⇐</span> Newer posts</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</span>
|
||||
{% endif -%}
|
||||
{%- if paginator.next %}
|
||||
<span class="pag_button previous">
|
||||
<a class="pagination_link" href="{{paginator.next | safe }}">
|
||||
<span class="button_text">Older posts <span class="arial">⇒</span></span>
|
||||
</a>
|
||||
</span>
|
||||
{% endif -%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
</div>
|
||||
{% endblock header_menu %}
|
||||
|
||||
{% block footer %}
|
||||
<footer class="footer">
|
||||
<div class="footer_inner">
|
||||
{%- if config.extra.extra_copyright %}
|
||||
<div class="copyright">{{ config.extra.extra_copyright | safe }}</div>
|
||||
{% else %}
|
||||
<div class="copyright">
|
||||
<span>
|
||||
<span class="arial">©</span> {{ now() | date(format="%Y") }} {{ config.extra.author }}</span>
|
||||
</div>
|
||||
{% endif -%}
|
||||
</div>
|
||||
</footer>
|
||||
{% endblock footer %}
|
||||
</div>
|
||||
{% endblock header %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="post">
|
||||
{{ post::header(page=page) }}
|
||||
{{ post::content(page=page, summary=false) }}
|
||||
{{ post::postview(page=page) }}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,92 @@
|
||||
{% macro content(page, summary) %}
|
||||
{%- if summary and page.summary %}
|
||||
<div class="post">
|
||||
<div class="post_contents">
|
||||
{{ page.summary | safe }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="read_more">
|
||||
<a class="button_read_more" href="{{ page.permalink | safe }}">
|
||||
<span class="button_text">Read More</span>
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<hr>
|
||||
{% else %}
|
||||
<div class="post">
|
||||
<div class="post_contents">
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif -%}
|
||||
{% endmacro content %}
|
||||
|
||||
{% macro header(page) %}
|
||||
<h1 class="post_title"><a class="post_link" href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
|
||||
<div class="post_meta">
|
||||
{{ post::date(page=page) }}
|
||||
{{ post::tags(page=page) }}
|
||||
</div>
|
||||
{% endmacro header %}
|
||||
|
||||
{% macro date(page) %}
|
||||
<span class="post_date">
|
||||
{%- if page.date %}
|
||||
{{ page.date | date(format="%Y-%m-%d") }}
|
||||
{% endif -%}
|
||||
</span>
|
||||
{% endmacro post_date %}
|
||||
|
||||
{% macro postview(page) %}
|
||||
{%- if config.extra.enable_postview %}
|
||||
<div class="pagination">
|
||||
<div class="pagination_title">
|
||||
<span class="postview_title_text">{{ config.extra.postview_prompt }}</span>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="pagination_buttons">
|
||||
{%- if page.later %}
|
||||
<span class="pag_button previous">
|
||||
<a class="pagination_link" href="{{ page.later.permalink | safe }}">
|
||||
<span class="button_text"><span class="arial">⇐</span> {{ page.later.title }}</span>
|
||||
</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{%- if page.earlier %}
|
||||
<span class="pag_button next">
|
||||
<a class="pagination_link" href="{{ page.earlier.permalink | safe }}">
|
||||
<span class="button_text">{{ page.earlier.title }} <span class="arial">⇒</span></span>
|
||||
</a>
|
||||
</span>
|
||||
{% endif -%}
|
||||
</div>
|
||||
</div>
|
||||
{% endif -%}
|
||||
{% endmacro postview %}
|
||||
|
||||
{% macro tags(page) %}
|
||||
{%- if page.taxonomies and page.taxonomies.tags %}
|
||||
<span class="post_tags_inline">
|
||||
|
|
||||
{%- for tag in page.taxonomies.tags %}
|
||||
<a class="post_tag" href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}">::{{ tag }}</a>
|
||||
{%- if not loop.last %} {% endif -%}
|
||||
{% endfor -%}
|
||||
</span>
|
||||
{% endif -%}
|
||||
{% endmacro tags %}
|
||||
|
||||
{% macro list(pages) %}
|
||||
<ul class="post_list">
|
||||
{%- for page in pages %}
|
||||
{%- if page.draft %}
|
||||
{% continue %}
|
||||
{% endif -%}
|
||||
<li class="post_list_item">
|
||||
<a class="post_list_link" href="{{ page.permalink | safe }}">
|
||||
<span class="post_date">{{ page.date }}</span><span class="post_list_title"> :: {{ page.title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor -%}
|
||||
</ul>
|
||||
{% endmacro list %}
|
||||
@@ -0,0 +1,3 @@
|
||||
{% if src %}
|
||||
<img src="{{ src | safe }}"{% if alt %} alt="{{ alt }}"{% endif %} class="{% if position %}{{ position }}{% else -%} center {%- endif %}" {%- if style %} style="{{ style | safe }}" {%- endif %} />
|
||||
{% endif %}
|
||||
@@ -0,0 +1 @@
|
||||
<script type="math/tex{% if block %};mode=display{% endif %}">{{body | safe}}</script>
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="post">
|
||||
<h1 class="post_title">all tags</h1>
|
||||
|
||||
<ul class="tag_list">
|
||||
{% for term in terms %}
|
||||
<li class="tag_list_item">
|
||||
<a class = "tag_item" href="{{ term.permalink | safe }}">
|
||||
:: {{ term.name }} ({{ term.pages | length }} post{{ term.pages | length | pluralize }})
|
||||
</a>
|
||||
</li>
|
||||
{% endfor -%}
|
||||
<ul>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,16 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="post">
|
||||
<h1 class="post_title">
|
||||
::{{ term.name }}
|
||||
</h1>
|
||||
|
||||
<a class="show_all_tags" href="{{ config.base_url | safe }}/tags">
|
||||
see all tags
|
||||
</a>
|
||||
|
||||
{{ post::list(pages=term.pages) }}
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user