mirror of
https://github.com/TrentSPalmer/attentionspanhistory.git
synced 2025-07-12 06:53:16 -07:00
rebuild with purecss instead of bootstrap
This commit is contained in:
5
themes/simple/static/css/article.css
Normal file
5
themes/simple/static/css/article.css
Normal file
@ -0,0 +1,5 @@
|
||||
.entry-content p{
|
||||
text-align: justify;
|
||||
line-height: 1.5;
|
||||
font-size: 1.1em;
|
||||
}
|
13
themes/simple/static/css/index.css
Normal file
13
themes/simple/static/css/index.css
Normal file
@ -0,0 +1,13 @@
|
||||
.entry-content {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.entry-content a{
|
||||
text-decoration: none;
|
||||
font-style: oblique;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
margin-bottom: 1em;
|
||||
}
|
45
themes/simple/static/css/main.css
Normal file
45
themes/simple/static/css/main.css
Normal file
@ -0,0 +1,45 @@
|
||||
:root {
|
||||
--black: #343a40;
|
||||
--gray: #6c757d;
|
||||
}
|
||||
|
||||
html, a{
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
body {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto 0 auto;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--gray);
|
||||
}
|
||||
|
||||
.pure-menu-heading {
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
h1 a{
|
||||
font-size: smaller;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#about {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.paginator text{
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.paginator a{
|
||||
font-size: 4em;
|
||||
text-decoration: none;
|
||||
-webkit-tap-highlight-color:transparent;
|
||||
}
|
12
themes/simple/static/css/search.css
Normal file
12
themes/simple/static/css/search.css
Normal file
@ -0,0 +1,12 @@
|
||||
.tipue_search_group {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#tipue_search_content {
|
||||
margin: 0 auto 0 auto;
|
||||
}
|
||||
|
||||
.tipue_search_content_text {
|
||||
text-align: justify;
|
||||
}
|
16
themes/simple/templates/archives.html
Normal file
16
themes/simple/templates/archives.html
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - Archives{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Archives for {{ SITENAME }}</h1>
|
||||
|
||||
<dl class="pure-menu-list">
|
||||
{% for article in dates %}
|
||||
<dt>{{ article.locale_date }}</dt>
|
||||
<dd class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
|
||||
</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endblock %}
|
85
themes/simple/templates/article.html
Normal file
85
themes/simple/templates/article.html
Normal file
@ -0,0 +1,85 @@
|
||||
{% extends "base.html" %}
|
||||
{% block html_lang %}{{ article.lang }}{% endblock %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - {{ article.title }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{% if translations.entry_hreflang(article) %}
|
||||
{{ translations.entry_hreflang(article) }}
|
||||
{% endif %}
|
||||
|
||||
{% if article.description %}
|
||||
<meta name="description" content="{{article.description}}" />
|
||||
{% endif %}
|
||||
|
||||
{% for tag in article.tags %}
|
||||
<meta name="tags" content="{{tag}}" />
|
||||
{% endfor %}
|
||||
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/article.css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section id="content" class="body">
|
||||
<header>
|
||||
<h2 class="entry-title">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
|
||||
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(article) }}
|
||||
</header>
|
||||
<footer class="post-info">
|
||||
<time class="published" datetime="{{ article.date.isoformat() }}">
|
||||
{{ article.locale_date }}
|
||||
</time>
|
||||
{% if article.modified %}
|
||||
<time class="modified" datetime="{{ article.modified.isoformat() }}">
|
||||
{{ article.locale_modified }}
|
||||
</time>
|
||||
{% endif %}
|
||||
{% if article.authors %}
|
||||
<address class="vcard author">
|
||||
By {% for author in article.authors %}
|
||||
<a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
</address>
|
||||
{% endif %}
|
||||
{% if article.category %}
|
||||
<div class="category">
|
||||
Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if article.tags %}
|
||||
<div class="tags">
|
||||
Tags:
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</footer><!-- /.post-info -->
|
||||
<div class="entry-content">
|
||||
{{ article.content }}
|
||||
</div><!-- /.entry-content -->
|
||||
</section>
|
||||
{% if article.prev_article and article.next_article %}
|
||||
<div class="paginator" style="display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 15px;">
|
||||
<a href="{{ SITEURL }}/{{ article.next_article.url }}">«</a>
|
||||
<a href="{{ SITEURL }}/{{ article.prev_article.url }}">»</a>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if article.prev_article %}
|
||||
<div class="paginator" style="display: flex; align-items: flex-end; margin-bottom: 15px; flex-direction: row-reverse">
|
||||
<a href="{{ SITEURL }}/{{ article.prev_article.url }}">»</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if article.next_article %}
|
||||
<div class="paginator" style="display: flex; align-items: flex-end; margin-bottom: 15px;">
|
||||
<a href="{{ SITEURL }}/{{ article.next_article.url }}">«</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
98
themes/simple/templates/base.html
Normal file
98
themes/simple/templates/base.html
Normal file
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
|
||||
<head>
|
||||
<link rel="shortcut icon" href="{{ SITEURL }}/images/favicon.ico?v=2" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.6/build/pure-min.css" integrity="sha384-Uu6IeWbM+gzNVXJcM9XV3SohHtmWE+3VGi496jvgX1jyvDTXfdK+rfZc8C1Aehk5" crossorigin="anonymous"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}" />
|
||||
{% block head %}
|
||||
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
|
||||
<meta charset="utf-8" />
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ALL_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_ATOM and category %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL|format(category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM|format(category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_RSS and category %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL|format(category.slug) }}{% else %}{{ CATEGORY_FEED_RSS|format(category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
|
||||
{% endif %}
|
||||
{% if TAG_FEED_ATOM and tag %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_ATOM|format(tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
|
||||
{% endif %}
|
||||
{% if TAG_FEED_RSS and tag %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_RSS|format(tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
|
||||
{% endif %}
|
||||
{% endblock head %}
|
||||
{% include 'open_graph.html' %}
|
||||
{% block extra_head %}
|
||||
{% endblock extra_head %}
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
<header id="banner" class="body">
|
||||
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1><hr>
|
||||
</header><!-- /#banner -->
|
||||
<nav id="menu" class="pure-menu pure-menu-horizontal pure-menu-scrollable">
|
||||
<a href="{{ SITEURL }}/" class="pure-menu-link pure-menu-heading" >Home</a>
|
||||
<ul class="pure-menu-list">
|
||||
|
||||
{% for title, link in MENUITEMS %}
|
||||
<li class="pure-menu-item">
|
||||
<a href="{{ link }}" class="pure-menu-link">{{ title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% for p in pages %}
|
||||
{% if p == page %}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" style="color: #343a40;" href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" style="color: #6c757d;" href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU %}
|
||||
{% for cat, null in categories %}
|
||||
{% if cat == category %}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" style="color: #343a40;" href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" style="color: #6c757d;" href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" style="color: #6c757d;" href="{{ SITEURL }}/archives.html">Archives</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav><!-- /#menu -->
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
<footer id="contentinfo" class="body">
|
||||
<address id="about" class="vcard body">
|
||||
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
|
||||
which takes great advantage of <a href="http://python.org">Python</a>.
|
||||
</address><!-- /#about -->
|
||||
</footer><!-- /#contentinfo -->
|
||||
</body>
|
||||
</html>
|
33
themes/simple/templates/index.html
Normal file
33
themes/simple/templates/index.html
Normal file
@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<section id="content">
|
||||
{% block content_title %}
|
||||
<h2>All articles</h2>
|
||||
{% endblock %}
|
||||
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/index.css" />
|
||||
{% for article in articles_page.object_list %}
|
||||
<article class="hentry">
|
||||
<header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
|
||||
<footer class="post-info">
|
||||
<time class="published" datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time>
|
||||
<address class="vcard author">By
|
||||
{% for author in article.authors %}
|
||||
<a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
</address>
|
||||
</footer><!-- /.post-info -->
|
||||
<div class="entry-content">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
|
||||
{{ article.summary|striptags }}
|
||||
</a>
|
||||
</div><!-- /.entry-content -->
|
||||
</article>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
{% if articles_page.has_other_pages() %}
|
||||
{% include 'pagination.html' %}
|
||||
{% endif %}
|
||||
</section><!-- /#content -->
|
||||
{% endblock content %}
|
33
themes/simple/templates/open_graph.html
Normal file
33
themes/simple/templates/open_graph.html
Normal file
@ -0,0 +1,33 @@
|
||||
{% if article is defined %}
|
||||
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
|
||||
<meta property="og:title" content="{{ article.title | replace("\"", """) }}" />
|
||||
<meta property="og:description" content="{{ article.content | striptags | replace("\"", """) | truncate(196, False, '...') }}" />
|
||||
<meta property="twitter:title" content="{{ article.title | replace("\"", """) }}" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:description" content="{{ article.content | striptags | replace("\"", """) | truncate(196, False, '...') }}" />
|
||||
|
||||
{% elif page is defined %}
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ page.url }}" />
|
||||
<meta property="og:title" content="{{ SITENAME }} - {{ page.title | replace("\"", """) }}" />
|
||||
<meta property="og:description" content="{{ page.content | striptags | replace("\"", """) | truncate(196, False, '...') }}" />
|
||||
<meta property="twitter:title" content="{{ SITENAME }} - {{ page.title | replace("\"", """) }}" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:description" content="{{ page.content | striptags | replace("\"", """) | truncate(196, False, '...') }}" />
|
||||
|
||||
{% else %}
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ output_file }}" />
|
||||
<meta property="og:title" content="{{ SITENAME }}" />
|
||||
<meta property="og:description" content="A page on Attention Span History" />
|
||||
<meta property="twitter:title" content="{{ SITENAME }}" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:description" content="A page on Attention Span History" />
|
||||
|
||||
{% endif %}
|
||||
|
||||
<meta property="og:image" content="{{ SITEURL }}/images/trent.jpg" />
|
11
themes/simple/templates/pagination.html
Normal file
11
themes/simple/templates/pagination.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% if DEFAULT_PAGINATION %}
|
||||
<div class="paginator" style="display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 15px;">
|
||||
{% if articles_page.has_previous() %}
|
||||
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">«</a>
|
||||
{% endif %}
|
||||
<div style="margin-bottom: 20px;">Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</div>
|
||||
{% if articles_page.has_next() %}
|
||||
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">»</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
35
themes/simple/templates/search.html
Normal file
35
themes/simple/templates/search.html
Normal file
@ -0,0 +1,35 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
Search {{ super() }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block extra_head %}
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Tipue-Search/5.0.0/tipuesearch.css"/>
|
||||
<script src="/tipuesearch_content.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Tipue-Search/5.0.0/tipuesearch.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Tipue-Search/5.0.0/tipuesearch_set.js"></script>
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/search.css" />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tipue_search_input').tipuesearch({
|
||||
'show': 10, // shows 10 found entries
|
||||
'descriptiveWords': 75, // shows 75 words of teaser text
|
||||
'newWindow': false, // don't open a new window, when clicking a result
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Search</h1>
|
||||
<form action="search.html">
|
||||
<div class="tipue_search_group">
|
||||
<input type="text" name="q" id="tipue_search_input">
|
||||
</div>
|
||||
</form>
|
||||
<div id="tipue_search_content"></div>
|
||||
{% endblock content %}
|
14
themes/simple/templates/tags.html
Normal file
14
themes/simple/templates/tags.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - Tags{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Tags for {{ SITENAME }}</h1>
|
||||
<ul class="pure-menu-list">
|
||||
{% for tag, articles in tags|sort %}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ SITEURL }}/{{ tag.url }}">{{ tag }} ({{ articles|count }})</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user