Add meta tags and optimize loading
This commit is contained in:
parent
975484a03c
commit
809806c8cd
|
@ -2,7 +2,7 @@
|
||||||
# -*- coding: utf-8 -*- #
|
# -*- coding: utf-8 -*- #
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
AUTHOR = 'Tanner'
|
AUTHOR = 'Tanner Collin'
|
||||||
SITENAME = 'Tanner Collin'
|
SITENAME = 'Tanner Collin'
|
||||||
SITEURL = ''
|
SITEURL = ''
|
||||||
|
|
||||||
|
|
8
themes/theme/static/enable-darkmode.js
Normal file
8
themes/theme/static/enable-darkmode.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
const options = {
|
||||||
|
bottom: '16px',
|
||||||
|
right: '16px',
|
||||||
|
buttonColorDark: '#666',
|
||||||
|
buttonColorLight: '#aaa',
|
||||||
|
label: '🌙',
|
||||||
|
};
|
||||||
|
new Darkmode(options).showWidget();
|
|
@ -1,5 +1,29 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}{{ SITENAME }} - {{ article.title|striptags }}{% endblock %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
{{ super() }}
|
||||||
|
|
||||||
|
{% if article.date %}
|
||||||
|
<meta name="date" content="{{article.date}}" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if article.summary %}
|
||||||
|
<meta name="description" content="{{article.summary|striptags}}" />
|
||||||
|
<meta name="summary" content="{{article.summary|striptags}}" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if article.category %}
|
||||||
|
<meta name="category" content="{{article.category}}" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for tag in article.tags %}
|
||||||
|
<meta name="tags" content="{{tag}}" />
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p><a href="/">← Return to Home</a></p>
|
<p><a href="/">← Return to Home</a></p>
|
||||||
<header>
|
<header>
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
{% block head %}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
|
|
||||||
|
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
|
||||||
|
<meta name="author" content="{{ AUTHOR }}" />
|
||||||
|
{% endblock head %}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
{% include 'style.css' %}
|
{% include 'style.css' %}
|
||||||
|
{% include 'fonts.css' %}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="/theme/fonts/fonts.css" />
|
<script defer src="/theme/darkmode-js.min.js"></script>
|
||||||
|
<script defer src="/theme/enable-darkmode.js"></script>
|
||||||
<title>Tanner Collin</title>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -22,9 +28,9 @@
|
||||||
Tanner Collin
|
Tanner Collin
|
||||||
</p>
|
</p>
|
||||||
<p class="contact-icons">
|
<p class="contact-icons">
|
||||||
<a href="mailto:site@tannercollin.com"><img src="/theme/mail.svg" /></a>
|
<a href="mailto:site@tannercollin.com"><img alt="email icon" src="/theme/mail.svg" /></a>
|
||||||
<a href="https://t.me/tannercollin" target="_blank"><img src="/theme/telegram.svg" /></a>
|
<a href="https://t.me/tannercollin" target="_blank"><img alt="telegram logo" src="/theme/telegram.svg" /></a>
|
||||||
<a href="https://github.com/tannercollin" target="_blank"><img src="/theme/github.svg" /></a>
|
<a href="https://github.com/tannercollin" target="_blank"><img alt="github logo" src="/theme/github.svg" /></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,9 +40,9 @@
|
||||||
<div class="info">
|
<div class="info">
|
||||||
Tanner Collin
|
Tanner Collin
|
||||||
<p class="contact-icons">
|
<p class="contact-icons">
|
||||||
<a href="mailto:site@tannercollin.com"><img src="/theme/mail.svg" /></a>
|
<a href="mailto:site@tannercollin.com"><img alt="email icon" src="/theme/mail.svg" /></a>
|
||||||
<a href="https://t.me/tannercollin" target="_blank"><img src="/theme/telegram.svg" /></a>
|
<a href="https://t.me/tannercollin" target="_blank"><img alt="telegram logo" src="/theme/telegram.svg" /></a>
|
||||||
<a href="https://github.com/tannercollin" target="_blank"><img src="/theme/github.svg" /></a>
|
<a href="https://github.com/tannercollin" target="_blank"><img alt="github logo" src="/theme/github.svg" /></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,18 +50,6 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/theme/darkmode-js.min.js"></script>
|
|
||||||
<script>
|
|
||||||
const options = {
|
|
||||||
bottom: '16px',
|
|
||||||
right: '16px',
|
|
||||||
buttonColorDark: '#666',
|
|
||||||
buttonColorLight: '#aaa',
|
|
||||||
label: '🌙',
|
|
||||||
};
|
|
||||||
new Darkmode(options).showWidget();
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
{{ super() }}
|
||||||
|
|
||||||
|
<meta name="description" content="The personal website of Tanner Collin." />
|
||||||
|
<meta name="summary" content="The personal website of Tanner Collin." />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p>
|
<p>
|
||||||
Hi, I'm Tanner! I do firmware and web development in Calgary.
|
Hi, I'm Tanner! I do firmware and web development in Calgary.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user