Add lite version of website

This commit is contained in:
Tanner Collin 2021-07-26 18:42:50 +00:00
parent 65b3ad7fbf
commit 600cc9e51f
5 changed files with 70 additions and 66 deletions

View File

@ -26,10 +26,10 @@ MARKDOWN = {
'markdown.extensions.codehilite': {'css_class': 'highlight'}, 'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {}, 'markdown.extensions.extra': {},
'markdown.extensions.meta': {}, 'markdown.extensions.meta': {},
#'markdown.extensions.toc': { 'markdown.extensions.toc': {
# 'toc_depth': '2-3', 'toc_depth': '2-3',
# 'anchorlink': True, 'anchorlink': True,
#}, },
}, },
'output_format': 'html5', 'output_format': 'html5',
} }

View File

@ -26,10 +26,10 @@ MARKDOWN = {
'markdown.extensions.codehilite': {'css_class': 'highlight'}, 'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {}, 'markdown.extensions.extra': {},
'markdown.extensions.meta': {}, 'markdown.extensions.meta': {},
#'markdown.extensions.toc': { 'markdown.extensions.toc': {
# 'toc_depth': '2-3', 'toc_depth': '2-3',
# 'anchorlink': True, 'anchorlink': True,
#}, },
}, },
'output_format': 'html5', 'output_format': 'html5',
} }
@ -56,8 +56,10 @@ TAGS_SAVE_AS = ''
INDEX_SAVE_AS = 'index.html' INDEX_SAVE_AS = 'index.html'
ARTICLE_URL = '{slug}/' ARTICLE_URL = '{slug}/'
ARTICLE_SAVE_AS = '{slug}/index.html' ARTICLE_SAVE_AS = '{category}/{slug}/index.html'
PAGE_URL = '{slug}/' PAGE_URL = '{slug}/'
PAGE_SAVE_AS = '{slug}/index.html' PAGE_SAVE_AS = '{slug}/index.html'
CATEGORY_URL = '{slug}/'
CATEGORY_SAVE_AS = '{slug}/index.html'
PROD = True PROD = True

View File

@ -1,49 +1,42 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ SITENAME }} - {{ article.title|striptags }}{% endblock %} {% block style %}
.summary {
{% block head %} font-style: italic;
{{ super() }} }
.metadata {
{% if article.date %} color: #555;
<meta name="date" content="{{article.date}}" /> }
{% endif %} pre {
font-size: 0.9rem;
{% if article.summary %} line-height: 1.2;
<meta name="description" content="{{article.summary|striptags}}" /> padding: 1rem;
<meta name="summary" content="{{article.summary|striptags}}" /> overflow-x: auto;
{% endif %} background-color: #ddd;
}
{% if article.category %} :not(pre)>code {
<meta name="category" content="{{article.category}}" /> padding: 0 2px;
{% endif %} font-size: 0.8rem;
background-color: #ddd;
{% for tag in article.tags %} }
<meta name="tags" content="{{tag}}" /> .aside {
{% endfor %} display: inline;
float: left;
{% endblock %} position: relative;
width: 8rem;
{% block info %} margin-left: -9rem;
Tanner Collin font-size: 0.9rem;
<p class="contact-icons"> }
<a href="mailto:site2@tannercollin.com" rel="noreferrer noopener"><img alt="email" src="/theme/mail.svg" width="20" height="20" /></a> img {
<a href="https://t.me/tannercollin" target="_blank" rel="noreferrer noopener"><img alt="telegram" src="/theme/telegram.svg" width="20" height="20" /></a> width: 100%;
<a href="https://github.com/tannercollin" target="_blank" rel="noreferrer noopener"><img alt="github" src="/theme/github.svg" width="20" height="20" /></a> height: auto;
</p> }
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>{{ article.title }}</h2>
{% if article.wide %}
<div class="content content-wide">
{% else %}
<div class="content">
{% endif %}
<p><a href="/">← Return to Home</a></p>
<header> <header>
<h1>{{ article.title }}</h1>
<div class="summary"> <div class="summary">
{{ article.summary }} {{ article.summary }}
</div> </div>
@ -54,9 +47,10 @@
{% endif %} {% endif %}
</p> </p>
</header> </header>
<hr /> <hr />
<article> <article>
{{ article.content }} {{ article.content }}
</article> </article>
</div>
{% endblock %} {% endblock %}

View File

@ -1,8 +1,12 @@
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:;base64,=">
<style> <style>
body {background: #eee; font: 1.1rem/1.5 serif;} body {font: 1.1rem/1.5 serif; overflow-y: scroll;}
h1, h2 {margin-left: -24; font-family: sans-serif;} h1, h2 {font-family: sans-serif;}
a {text-decoration: none; color: #000; border-bottom: 1px solid #000;} a {text-decoration: none; color: #000; border-bottom: 1px solid #000;}
{% block style %}
{% endblock %}
</style> </style>
<div style="max-width: 600; margin: auto"> <div style="max-width: 600; margin: auto">
<h1>Tanner Collin</h1> <h1>Tanner Collin</h1>

View File

@ -1,6 +1,10 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<h2>{{ category.title }}</h2> <h2>{{ category }}</h2>
{% for article in articles_page.object_list if article.category == category %}
<h3><a href="{{ article.url }}">{{ article.title }}</a></h3>
{{ article.summary }}
{% endfor %}
{% endblock %} {% endblock %}