version 2.2.0 - mostly design cleanups

This commit is contained in:
Peter Molnar 2018-04-30 19:44:04 +00:00
parent f84088f311
commit 5e0dc9e0d9
15 changed files with 391 additions and 361 deletions

View file

@ -3,11 +3,11 @@
# vim: set fileencoding=utf-8 : # vim: set fileencoding=utf-8 :
__author__ = "Peter Molnar" __author__ = "Peter Molnar"
__copyright__ = "Copyright 2017, Peter Molnar" __copyright__ = "Copyright 2018, Peter Molnar"
__license__ = "GPLv3" __license__ = "GPLv3"
__version__ = "2.0" __version__ = "2.2.0"
__maintainer__ = "Peter Molnar" __maintainer__ = "Peter Molnar"
__email__ = "hello@petermolnar.eu" __email__ = "mail@petermolnar.net"
__status__ = "Production" __status__ = "Production"
""" """

View file

@ -1,3 +1,35 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8 :
__author__ = "Peter Molnar"
__copyright__ = "Copyright 2017-2018, Peter Molnar"
__license__ = "GPLv3"
__version__ = "2.1.0"
__maintainer__ = "Peter Molnar"
__email__ = "mail@petermolnar.net"
__status__ = "Production"
"""
fancy email module of NASG
Copyright (C) 2017-2018 Peter Molnar
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"""
from email.mime.multipart import MIMEMultipart from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText from email.mime.text import MIMEText
from email.mime.image import MIMEImage from email.mime.image import MIMEImage

64
nasg.py
View file

@ -5,9 +5,9 @@
__author__ = "Peter Molnar" __author__ = "Peter Molnar"
__copyright__ = "Copyright 2017-2018, Peter Molnar" __copyright__ = "Copyright 2017-2018, Peter Molnar"
__license__ = "GPLv3" __license__ = "GPLv3"
__version__ = "2.1.0" __version__ = "2.2.0"
__maintainer__ = "Peter Molnar" __maintainer__ = "Peter Molnar"
__email__ = "hello@petermolnar.eu" __email__ = "mail@petermolnar.net"
__status__ = "Production" __status__ = "Production"
""" """
@ -194,9 +194,10 @@ class Category(NoDupeContainer):
pagedir = 'page' pagedir = 'page'
taxonomy = 'category' taxonomy = 'category'
def __init__(self, name=''): def __init__(self, name='', is_front=False):
self.name = name self.name = name
self.topics = NoDupeContainer() self.topics = NoDupeContainer()
self.is_front = is_front
super().__init__() super().__init__()
def append(self, post): def append(self, post):
@ -297,6 +298,7 @@ class Category(NoDupeContainer):
tmplvars = { tmplvars = {
'taxonomy': { 'taxonomy': {
'add_welcome': self.is_front,
'title': self.title, 'title': self.title,
'name': self.name, 'name': self.name,
'lastmod': arrow.get(self.mtime).format( 'lastmod': arrow.get(self.mtime).format(
@ -364,16 +366,23 @@ class Category(NoDupeContainer):
fg.updated(arrow.get(self.mtime).to('utc').datetime) fg.updated(arrow.get(self.mtime).to('utc').datetime)
for p in reversed(posttmpls): for p in reversed(posttmpls):
link = '%s/%s' % (shared.site.get('url'), p.get('slug')) link = '%s/%s/' % (shared.site.get('url'), p.get('slug'))
dt = arrow.get(p.get('pubtime')).to('utc') dt = arrow.get(p.get('pubtime')).to('utc')
content = p.get('html')
if p.get('photo'):
content = "%s\n\n%s" % (p.get('photo'), content)
fe = fg.add_entry() fe = fg.add_entry()
fe.id(link) fe.id(link)
fe.link(href='%s/' % (link)) fe.link(href=link)
fe.title(p.get('title')) fe.title(p.get('title'))
fe.published(dt.datetime) fe.published(dt.datetime)
fe.updated(dt.datetime) fe.updated(dt.datetime)
fe.content(content=p.get('html'), type='CDATA') fe.content(
content,
type='CDATA'
)
fe.rights('%s %s %s' % ( fe.rights('%s %s %s' % (
dt.format('YYYY'), dt.format('YYYY'),
shared.site.get('author').get('name'), shared.site.get('author').get('name'),
@ -383,6 +392,9 @@ class Category(NoDupeContainer):
with open(o, 'wb') as f: with open(o, 'wb') as f:
f.write(fg.atom_str(pretty=True)) f.write(fg.atom_str(pretty=True))
#with open(o.replace('.xml', '.rss'), 'wb') as f:
#f.write(fg.rss_str(pretty=True))
# ping pubsub # ping pubsub
r = requests.post( r = requests.post(
shared.site.get('websub').get('hub'), shared.site.get('websub').get('hub'),
@ -397,7 +409,12 @@ class Category(NoDupeContainer):
pagination = shared.config.getint('display', 'pagination') pagination = shared.config.getint('display', 'pagination')
pages = ceil(len(self.data) / pagination) pages = ceil(len(self.data) / pagination)
page = 1 page = 1
while page <= pages: while page <= pages:
add_welcome = False
if (self.is_front and page == 1):
add_welcome = True
# list relevant post templates # list relevant post templates
start = int((page - 1) * pagination) start = int((page - 1) * pagination)
end = int(start + pagination) end = int(start + pagination)
@ -413,6 +430,7 @@ class Category(NoDupeContainer):
# is overcomplicated # is overcomplicated
tmplvars = { tmplvars = {
'taxonomy': { 'taxonomy': {
'add_welcome': add_welcome,
'title': self.title, 'title': self.title,
'name': self.name, 'name': self.name,
'page': page, 'page': page,
@ -489,6 +507,8 @@ class Singular(object):
wdb.finish() wdb.finish()
def queue_webmentions(self): def queue_webmentions(self):
if self.is_future:
return
wdb = shared.WebmentionQueue() wdb = shared.WebmentionQueue()
for target in self.urls_to_ping: for target in self.urls_to_ping:
if not wdb.exists(self.url, target, self.published): if not wdb.exists(self.url, target, self.published):
@ -727,6 +747,10 @@ class Singular(object):
return "RE: %s" % self.is_reply return "RE: %s" % self.is_reply
return self.published.format(shared.ARROWFORMAT['display']) return self.published.format(shared.ARROWFORMAT['display'])
@property
def review(self):
return self.meta.get('review', False)
@property @property
def summary(self): def summary(self):
s = self.meta.get('summary', '') s = self.meta.get('summary', '')
@ -785,12 +809,20 @@ class Singular(object):
'reactions': self.reactions, 'reactions': self.reactions,
'syndicate': self.syndicate, 'syndicate': self.syndicate,
'tags': self.tags, 'tags': self.tags,
'photo': False 'photo': False,
'enclosure': False,
'review': self.review
} }
if self.photo: if self.photo:
self._tmplvars.update({ self._tmplvars.update({
'photo': str(self.photo) 'photo': str(self.photo),
'enclosure': {
'mime': self.photo.mime_type,
'size': self.photo.mime_size,
'url': self.photo.href
}
}) })
return self._tmplvars return self._tmplvars
async def render(self): async def render(self):
@ -844,6 +876,16 @@ class WebImage(object):
'tags': list(set(self.meta.get('Subject', []))), 'tags': list(set(self.meta.get('Subject', []))),
} }
@property
def mime_type(self):
return str(self.meta.get('MIMEType', 'image/jpeg'))
@property
def mime_size(self):
if not self.is_downsizeable:
return int(os.path.getsize(self.fpath))
return int(self.sizes[-1][1]['fsize'])
@property @property
def href(self): def href(self):
if len(self.target): if len(self.target):
@ -996,7 +1038,8 @@ class WebImage(object):
'crop', 'crop',
size, size,
fallback=False fallback=False
) ),
'fsize': os.path.getsize(fpath)
} }
)) ))
return sorted(sizes, reverse=False) return sorted(sizes, reverse=False)
@ -1175,7 +1218,6 @@ class WebImage(object):
height height
) )
@property @property
def tmplvars(self): def tmplvars(self):
src_width, src_height = self.src_size src_width, src_height = self.src_size
@ -1481,7 +1523,7 @@ def build():
sdb = shared.SearchDB() sdb = shared.SearchDB()
magic = MagicPHP() magic = MagicPHP()
collector_front = Category() collector_front = Category(is_front=True)
collector_categories = NoDupeContainer() collector_categories = NoDupeContainer()
sitemap = {} sitemap = {}

View file

@ -5,9 +5,9 @@
__author__ = "Peter Molnar" __author__ = "Peter Molnar"
__copyright__ = "Copyright 2017-2018, Peter Molnar" __copyright__ = "Copyright 2017-2018, Peter Molnar"
__license__ = "GPLv3" __license__ = "GPLv3"
__version__ = "2.1.0" __version__ = "2.2.0"
__maintainer__ = "Peter Molnar" __maintainer__ = "Peter Molnar"
__email__ = "hello@petermolnar.eu" __email__ = "mail@petermolnar.net"
__status__ = "Production" __status__ = "Production"
""" """

View file

@ -5,9 +5,9 @@
__author__ = "Peter Molnar" __author__ = "Peter Molnar"
__copyright__ = "Copyright 2017-2018, Peter Molnar" __copyright__ = "Copyright 2017-2018, Peter Molnar"
__license__ = "GPLv3" __license__ = "GPLv3"
__version__ = "2.1.0" __version__ = "2.2.0"
__maintainer__ = "Peter Molnar" __maintainer__ = "Peter Molnar"
__email__ = "hello@petermolnar.eu" __email__ = "mail@petermolnar.net"
__status__ = "Production" __status__ = "Production"
""" """
@ -431,6 +431,7 @@ class SearchDB(BaseDB):
return False return False
def search_by_query(self, query): def search_by_query(self, query):
logging.info("query is: %s", query)
ret = {} ret = {}
cursor = self.db.cursor() cursor = self.db.cursor()
cursor.execute('''SELECT cursor.execute('''SELECT

View file

@ -5,13 +5,21 @@
{% include 'block_header_close.html' %} {% include 'block_header_close.html' %}
{% if taxonomy.add_welcome %}
<aside class="siteinfo limit">
<p>Hi!</p>
<p>Your are on a personal homepage. It has been my home one the Internet for many years, although the URL had changed a few times. It's <a href="https://indieweb.org/">IndieWeb</a>-compatible, and all content is produced by me. </p>
<p>This page is a feed of everything that gets on the site.</p>
</aside>
{% endif %}
<section class="content-body h-feed"> <section class="content-body h-feed">
<aside class="follow"> <aside class="follow">
<p> <p>
<svg class="icon" width="16" height="16"> <svg class="icon" width="16" height="16">
<use xlink:href="#icon-rss" /> <use xlink:href="#icon-rss" />
</svg> </svg>
<a title="follow {{ taxonomy.title }}" href="{{ site.url }}{{ taxonomy.feed }}">Atom feed</a> <a title="follow {{ taxonomy.title }}" rel="feed" href="{{ site.url }}{{ taxonomy.feed }}">Atom feed</a>
</p> </p>
</aside> </aside>

View file

@ -11,7 +11,7 @@
<svg class="icon" width="16" height="16"> <svg class="icon" width="16" height="16">
<use xlink:href="#icon-rss" /> <use xlink:href="#icon-rss" />
</svg> </svg>
<a title="follow {{ taxonomy.title }}" href="{{ site.url }}{{ taxonomy.feed }}">Atom feed</a> <a title="follow {{ taxonomy.title }}" rel="feed" href="{{ site.url }}{{ taxonomy.feed }}">XML feed</a>
</p> </p>
</aside> </aside>

View file

@ -1,9 +1,12 @@
<li class="h-entry p-comment"> <li class="h-entry p-comment">
<span> {% if 'webmention' != comment.type %}
<time class="dt-published" datetime="{{ comment.pubtime }}"> <span class="reaction">
{{ comment.pubdate }} <a class="u-url" href="{{ comment.source }}">{{ comment.type }} </a>
</time>
</span> </span>
{% endif %}
<time class="dt-published" datetime="{{ comment.pubtime }}">
{{ comment.pubdate }}
</time> from
<span class="p-author h-card"> <span class="p-author h-card">
{% if comment.author.url %} {% if comment.author.url %}
<a class="url u-url" href="{{ comment.author.url }}"> <a class="url u-url" href="{{ comment.author.url }}">
@ -12,7 +15,7 @@
{% else %} {% else %}
<span class="p-name fn">{{ comment.author.name }}</span> <span class="p-name fn">{{ comment.author.name }}</span>
{% endif %} {% endif %}
</span> </span><br />
{% if 'webmention' == comment.type %} {% if 'webmention' == comment.type %}
<span class="source"> <span class="source">
<svg class="icon" width="16" height="16"> <svg class="icon" width="16" height="16">
@ -20,9 +23,5 @@
</svg> </svg>
<a class="u-url" href="{{ comment.source }}">{{ comment.source }}</a> <a class="u-url" href="{{ comment.source }}">{{ comment.source }}</a>
</span> </span>
{% else %}
<span class="reaction">
<a class="u-url" href="{{ comment.source }}">{{ comment.type }} </a>
</span>
{% endif %} {% endif %}
</li> </li>

View file

@ -17,6 +17,23 @@
<h1>{% include 'Singular_title.html' %}</h1> <h1>{% include 'Singular_title.html' %}</h1>
</header> </header>
{% if post.review %}
<div class="h-review hreview">
<h2>Review summary</h2>
<p>
<a href="{{ post.review.url }}" class="p-name url fn p-item h-product">{{ post.review.title }}</a>
</p>
<p>
<span class="rating">
<span class="value">{{ post.review.rating }}</span>
out of
<span class="best">5</span>
</span>
</p>
<p class="p-summary">{{ post.review.summary }}</p>
</div>
{% endif %}
{% if post.summary %} {% if post.summary %}
<div class="e-summary entry-summary"> <div class="e-summary entry-summary">
{{ post.summary }} {{ post.summary }}
@ -34,66 +51,72 @@
</div> </div>
<footer> <footer>
<p class="published"> <dl>
<time class="dt-published" datetime="{{ post.pubtime }}">{{ post.pubdate }}</time> <dt>Published</dt>
</p> <dd class="published">
<div class="hide"> <time class="dt-published" datetime="{{ post.pubtime }}">{{ post.pubdate }}</time>
{% include 'block_author.html' %} </dd>
</div> <dt>Author</dt>
<p class="hide"> <dd>
<a class="u-url u-uuid" rel="bookmark" href="{{ site.url}}/{{ post.slug }}/"></a> {% include 'block_author.html' %}
</p> </dd>
<p class="license"> <dt>Entry URL</dt>
<dd>
<a class="u-url u-uuid" rel="bookmark" href="{{ site.url}}/{{ post.slug }}/">{{ site.url}}/{{ post.slug }}/</a>
</dd>
<dt>License</dt>
<dd class="license">
{% if post.licence.text == 'CC BY 4.0' %} {% if post.licence.text == 'CC BY 4.0' %}
<a rel="license" href="https://creativecommons.org/licenses/by/4.0/" class="hide u-license">CC BY 4.0</a> <a rel="license" href="https://creativecommons.org/licenses/by/4.0/" class="u-license">CC BY 4.0</a>
<svg class="icon" width="16" height="16"> <svg class="icon" width="16" height="16">
<use xlink:href="#icon-creative-commons" /> <use xlink:href="#icon-creative-commons" />
</svg> </svg><br />
Licensed under <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International</a>. You are free to share or republish, even if modified, if you link back here and indicate the modifications, even for commercial use. Licensed under <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International</a>. You are free to share or republish, even if modified, if you link back here and indicate the modifications, even for commercial use.
{% elif post.licence.text == 'CC BY-NC 4.0' %} {% elif post.licence.text == 'CC BY-NC 4.0' %}
<a rel="license" href="https://creativecommons.org/licenses/by-nc/4.0/" class="hide u-license">CC BY-NC 4.0</a> <a rel="license" href="https://creativecommons.org/licenses/by-nc/4.0/" class="u-license">CC BY-NC 4.0</a>
<svg class="icon" width="16" height="16"> <svg class="icon" width="16" height="16">
<use xlink:href="#icon-creative-commons" /> <use xlink:href="#icon-creative-commons" />
</svg> </svg><br />
Licensed under <a href="https://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International</a>. You are free to share or republish, even if modified, if you link back here and indicate the modifications, for non commercial use. For commercial use please contact the author. Licensed under <a href="https://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International</a>. You are free to share or republish, even if modified, if you link back here and indicate the modifications, for non commercial use. For commercial use please contact the author.
{% else %} {% else %}
<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" class="hide u-license">CC BY-NC-ND 4.0</a> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" class="u-license">CC BY-NC-ND 4.0</a>
<svg class="icon" width="16" height="16"> <svg class="icon" width="16" height="16">
<use xlink:href="#icon-creative-commons" /> <use xlink:href="#icon-creative-commons" />
</svg> </svg><br />
Licensed under <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International</a>. You are free to share if you link back here for non commercial use, but you can't publish any altered versions of it. For commercial use please contact the author. Licensed under <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International</a>. You are free to share if you link back here for non commercial use, but you can't publish any altered versions of it. For commercial use please contact the author.
{% endif %} {% endif %}
</p> </dd>
<dt class="noprint">Leave a tip</dt>
<dd class="donation">
<p>
{% if post.category == 'photo' %}
Did you like this photo?<br />Leave a tip! If you're interested in prints, please get in touch.
{% elif post.category == 'article' %}
Did you find this article useful?<br />Support me, so I can write more like this.<br />If you want my help for your project, get in touch.
{% elif post.category == 'journal' %}
Did you like this entry?<br />Encourage me to write more of them.
{% else %}
Did you like what you read?<br />Leave a tip!</a>
{% endif %}
</p>
<ul>
{% for method, data in site.tips.items() %}
<li>
<a rel="payment" title="pay {{ site.author.name }} via {{ data.label }} {{ data.value }}" href="{{ data.url }}">
{{ data.value }}
<span class="method">
<svg class="icon" width="16" height="16">
<use xlink:href="#icon-{{ method }}"></use>
</svg>
with {{ data.label }}
</span>
</a>
</li>
{% endfor %}
</ul>
</dd>
</footer> </footer>
<aside class="donation">
<p>
{% if post.category == 'photo' %}
Did you like this photo?<br />Leave a tip! If you're interested in prints, please get in touch.
{% elif post.category == 'article' %}
Did you find this article useful?<br />Buy me a coffee, so I can write more like this.<br />If you want my help for your project, get in touch.
{% elif post.category == 'journal' %}
Did you like this entry?<br />Encourage me to write more of them.
{% else %}
Did you like what you read?<br />Leave a tip!</a>
{% endif %}
</p>
<ul>
{% for method, data in site.tips.items() %}
<li>
<a rel="payment" title="pay {{ site.author.name }} via {{ data.label }} {{ data.value }}" href="{{ data.url }}">
{{ data.value }}
<span class="method">
<svg class="icon" width="16" height="16">
<use xlink:href="#icon-{{ method }}"></use>
</svg>
with {{ data.label }}
</span>
</a>
</li>
{% endfor %}
</ul>
</aside>
{% if post.syndicate|length %} {% if post.syndicate|length %}
<section class="syndication"> <section class="syndication">

View file

@ -3,7 +3,7 @@
<img src="{{ photo.src }}" title="{{ photo.title }}" alt="{{ photo.alt }}" class="adaptimg" width="{{ photo.width }}" height="{{ photo.height }}" /> <img src="{{ photo.src }}" title="{{ photo.title }}" alt="{{ photo.alt }}" class="adaptimg" width="{{ photo.width }}" height="{{ photo.height }}" />
{% if photo.target %}</a>{% endif %} {% if photo.target %}</a>{% endif %}
<figcaption> <figcaption>
{{ photo.alt }}{% if photo.is_photo %}<span class="author"> - photo by {{ photo.author }}</span> <span class="alt">{{ photo.alt }}</span>{% if photo.is_photo %}<span class="author"> - photo by {{ photo.author }}</span>
<dl class="exif"> <dl class="exif">
{% if photo.exif.camera %} {% if photo.exif.camera %}
<dt>Camera</dt> <dt>Camera</dt>

View file

@ -1,23 +0,0 @@
{% include 'block_header_open.html' %}
{% include 'block_header_close.html' %}
<section class="content-body">
{% for tname, posts in taxonomies %}
<details>
<summary>{{ tname }} [{{ posts|length }}]</summary>
<ol>
{% for post in posts %}
<li>
{{ post.title }}
<br />
<a href="{{ post.url }}" title="{{ post.title }}">
{{ post.url }}
</a>
</li>
{% endfor %}
</ol>
</details>
{% endfor %}
</section>
{% include 'block_footer.html' %}

View file

@ -1,13 +1,13 @@
<footer class="content-footer" id="main-footer"> <footer class="content-footer" id="main-footer">
<nav class="footer-contact p-author h-card vcard limit"> <nav class="footer-contact p-author h-card vcard limit">
<h2>Author</h2> <h2>Site author</h2>
<dl> <dl>
<dt> <dt>
<img class="photo avatar u-photo u-avatar" src="{{ site.author.avatar }}" alt="Photo of {{ site.author.name }}" /> <img class="photo avatar u-photo u-avatar" src="{{ site.author.avatar }}" alt="Photo of {{ site.author.name }}" />
</dt> </dt>
<dd> <dd>
<a class="fn p-name url u-url u-uid" href="{{ site.author.url }}/about.html"> <a class="fn p-name url u-url u-uid" href="/about.html">
{{ site.author.name }} {{ site.author.name }}
</a> </a>
</dd> </dd>
@ -34,7 +34,7 @@
{% if site.author.gpg %} {% if site.author.gpg %}
<dt>GPG</dt> <dt>GPG</dt>
<dd> <dd>
<a rel="me" class="u-gpg gpg" href="{{ site.url }}/{{ site.author.gpg }}">key</a> <a rel="me" class="u-gpg gpg" href="/{{ site.author.gpg }}">key</a>
</dd> </dd>
{% endif %} {% endif %}
{% if site.author.flickr %} {% if site.author.flickr %}

View file

@ -1,36 +0,0 @@
{% include 'block_header_open.html' %}
<title>comment #{{ reply.id }} | {{ site.domain }}</title>
<link rel="canonical" href="{{ site.url }}/{{ site.commentspath }}/{{ reply.fname }}/" />
<meta name="author" content="{{ reply.author.name }}">
{% include 'block_header_close.html' %}
<section class="content-body">
<article class="h-entry p-comment">
<a class="u-url u-uuid" href="{{ site.url }}/{{ site.commentspath }}/{{ reply.fname }}/"></a>
<header>
<div class="p-author h-card">
{% if reply.author.url %}
<a class="url u-url" href="{{ reply.author.url }}">
<span class="p-name fn">{{ reply.author.name }}</span>
</a>
{% else %}
<span class="p-name fn">{{ reply.author.name }}</span>
{% endif %}
</div>
<time class="dt-published" datetime="{{ reply.published|date('c') }}">
{{ reply.published|date('%Y-%m-%d %H:%M') }}
</time>
</header>
<div class="e-content">
{{ reply.html }}
</div>
<footer>
{% if reply.source|length > 0 %}
<a href="{{ reply.source }}" class="u-repost-of">{{ reply.source }}</a>
{% endif %}
<a class="u-in-comment-to" href="{{ reply.target }}"></a>
</footer>
</article>
</section>
{% include 'block_footer.html' %}

View file

@ -1,32 +0,0 @@
{% include 'block_header_open.html' %}
{% if post.title %}
<title>{{ post.title }} | {{ site.domain }}</title>
{% else %}
<title>{{ post.name }} | {{ site.domain }}</title>
{% endif %}
{% include 'block_header_close.html' %}
<section class="content-body">
<article class="h-entry singular">
<header>
<div class="content-inner hide">
<h1>
<a class="u-url" href="/{{ post.slug }}" rel="bookmark" title="{{ post.title }}">
<span class="p-name">{{ post.title }}</span>
</a>
</h1>
</div>
</header>
<div class="e-content">
<div class="content-inner">
{{ post.html }}
<br class="clear" />
</div>
</div>
</article>
</section>
{% include 'block_footer.html' %}

View file

@ -68,15 +68,15 @@ em {
} }
p { p {
padding: 0.6rem 0; padding: 0.6em 0;
} }
li { li {
margin-left: 1.3rem; margin-left: 1.3em;
} }
ul li { ul li {
line-height: 1.6rem; line-height: 1.6em;
} }
li p { li p {
@ -85,8 +85,8 @@ li p {
} }
blockquote { blockquote {
margin: 0.6rem; margin: 0.6em;
padding-left: 0.6rem; padding-left: 0.6em;
border-left: 4px solid #999; border-left: 4px solid #999;
color: #999; color: #999;
} }
@ -98,7 +98,7 @@ table {
} }
td, th { td, th {
padding: 0.3rem; padding: 0.3em;
border: 1px solid #111; border: 1px solid #111;
text-align:left; text-align:left;
} }
@ -115,59 +115,69 @@ tr:nth-child(even) {
background-color: #444; background-color: #444;
} }
.content-header a,
.content-header a:hover,
.content-footer a,
.content-footer a:hover,
.footnoteRef a,
pre code,
.h-review h2,
input,
.reactions h2,
.replies h2,
.syndication h2,
hr {
border: none;
}
hr { hr {
display: block; display: block;
height: 1px; height: 1px;
border: none;
border-top: 1px solid #444; border-top: 1px solid #444;
margin: 1rem 0; margin: 1em 0;
clear:both; clear:both;
} }
h1, h2, h3, h4, h5, h6, dt { h1, h2, h3, h4, h5, h6, dt {
font-weight:bold; font-weight:bold;
clear:both; clear:both;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
margin: 1.3rem 0 0.3rem 0; margin: 1.3em 0 0.3em 0;
padding: 0 0 0.3rem 0; padding: 0 0 0.3em 0;
} }
h1 { h1 {
font-size: 1.2rem; font-size: 1.2em;
margin-top: 0; margin-top: 0;
} }
h2 { h2 {
font-size: 1.1rem; font-size: 1.1em;
border-bottom: 2px solid #999; border-bottom: 2px solid #999;
} }
h3 { h3 {
font-size: 1rem; font-size: 1em;
border-bottom: 1px dotted #777; border-bottom: 1px dotted #777;
} }
.icon { .icon {
/* svg sharpness hack */
transform: rotate(0deg); transform: rotate(0deg);
width: 16px; width: 16px;
height: 16px; height: 16px;
display: inline-block; display: inline-block;
fill: currentColor; fill: currentColor;
vertical-align:middle;
overflow: visible; overflow: visible;
vertical-align:calc; vertical-align:middle;
margin-right: 0.1rem;
} }
code, code,
pre { pre {
font-family: "Courier New", "Courier", monospace; font-family: "Courier New", "Courier", monospace;
font-size: 0.8rem; font-size: 0.8em;
color: limegreen; color: limegreen;
background-color: #222; background-color: #222;
border: 1px solid #666; border: 1px solid #666;
@ -178,16 +188,11 @@ pre {
pre { pre {
overflow: auto; overflow: auto;
padding: 0.3rem; padding: 0.3em;
} }
code { code {
padding: 0.1rem; padding: 0.1em;
}
pre code {
border: none;
} }
code.sourceCode span.al { color: limegreen; } code.sourceCode span.al { color: limegreen; }
@ -219,22 +224,30 @@ code.sourceCode span.va { color: turquoise; }
margin: 0 auto; margin: 0 auto;
} }
.siteinfo {
line-height: 1.4em;
font-size: 0.9em;
padding: 1em;
font-style: italic;
color: #999;
}
.footnotes ol li {
margin-bottom: 0.3em;
}
.footnoteRef, .footnoteRef,
.footnoteRef:hover { .footnoteRef:hover {
border: 0; border: 0;
white-space: nowrap; white-space: nowrap;
} }
.footnoteRef a {
border: none;
}
.footnoteRef sup { .footnoteRef sup {
vertical-align: baseline; vertical-align: baseline;
position: relative; position: relative;
top: -0.3rem; top: -0.3em;
font-size: 0.8rem; font-size: 0.8em;
margin-right: 0.1rem; margin-right: 0.1em;
} }
.footnoteRef sup:before, .footnoteRef sup:before,
@ -242,10 +255,6 @@ code.sourceCode span.va { color: turquoise; }
color: #33c; color: #33c;
} }
.footnotes ol li {
margin-bottom: 0.3rem;
}
.comments ol .u-repost-of, .comments ol .u-repost-of,
.footnotes ol li a { .footnotes ol li a {
display: inline-block; display: inline-block;
@ -257,14 +266,14 @@ code.sourceCode span.va { color: turquoise; }
} }
.footnotes ol li a[href^="#"] { .footnotes ol li a[href^="#"] {
margin: 0 0 0 0.6rem; margin: 0 0 0 0.6em;
max-width: 20%; max-width: 20%;
font-size: 0.6rem; font-size: 0.6em;
} }
.footnotes ol li a[href^="#"]:after { .footnotes ol li a[href^="#"]:after {
content: "back to text"; content: "back to text";
margin: 0 0 0 0.2rem; margin: 0 0 0 0.2em;
color: #666; color: #666;
} }
@ -275,25 +284,22 @@ code.sourceCode span.va { color: turquoise; }
.content-header a, .content-header a,
.content-footer a { .content-footer a {
color: #cccccc; color: #cccccc;
border: none;
} }
.content-header a:hover, .content-header a:hover,
.content-footer a:hover { .content-footer a:hover {
color: #fefefe; color: #fefefe;
border: none;
} }
.content-footer { .content-footer {
margin-top: 2rem; margin-top: 2em;
padding: 0.3rem 0; padding: 1em 0 0.6em 0;
text-align: center; text-align: center;
} }
.content-footer * { .content-footer * {
color: #999; color: #999;
display: inline-block; display: inline-block;
vertical-align: top;
} }
.content-footer a { .content-footer a {
@ -305,18 +311,14 @@ code.sourceCode span.va { color: turquoise; }
} }
.content-footer img { .content-footer img {
width: 1rem; width: 1em;
margin: 0 0.3rem 0rem 0; margin: 0 0.3em 0em 0;
} }
.content-footer dl { .content-footer dl {
font-size: 0.86rem; font-size: 0.86em;
} }
.content-footer h2 {
display:none;
visibility: hidden;
}
.content-footer dl dd, .content-footer dl dd,
.content-footer dl dt,{ .content-footer dl dt,{
@ -325,7 +327,7 @@ code.sourceCode span.va { color: turquoise; }
.content-footer dl dd:after { .content-footer dl dd:after {
content: '\00B7'; content: '\00B7';
margin: 0 0.3rem; margin: 0 0.3em;
} }
.content-footer dl dd:last-of-type:after { .content-footer dl dd:last-of-type:after {
@ -334,30 +336,28 @@ code.sourceCode span.va { color: turquoise; }
input { input {
vertical-align:middle; vertical-align:middle;
border: none;
border-bottom: 3px solid #aaa; border-bottom: 3px solid #aaa;
background-color: transparent; background-color: transparent;
color: #ccc; color: #ccc;
height: 1.6rem; height: 1.6em;
width: 6rem; width: 6em;
font-size: 0.8rem; font-size: 0.8em;
} }
input[type=submit] { input.search-submit {
width: 3em;
width: 2.2rem;
cursor: pointer; cursor: pointer;
} }
input:focus, input:focus,
input[type=submit]:hover { input.search-submit:hover {
border-bottom: 3px solid #fff; border-bottom: 3px solid #fff;
color: #fff; color: #fff;
} }
.search-form { .search-form {
display: block; display: block;
padding: 0.3rem 0.1rem; padding: 0.3em 0.1em;
text-align: center; text-align: center;
} }
@ -370,18 +370,18 @@ input[type=submit]:hover {
.content-navigation ul li { .content-navigation ul li {
margin:0; margin:0;
padding: 0.3rem 0.3rem 0.3rem 0; padding: 0.3em 0.3em 0.3em 0;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
} }
.content-navigation ul li a { .content-navigation ul li a {
display:block; display:block;
padding:0 0.2rem; padding:0 0.2em;
font-weight: bold; font-weight: bold;
border-bottom: 3px solid transparent; border-bottom: 3px solid transparent;
text-align: center; text-align: center;
font-size: 0.7rem; font-size: 0.7em;
} }
.content-navigation ul li a svg { .content-navigation ul li a svg {
@ -398,29 +398,29 @@ input[type=submit]:hover {
} }
.h-feed h2 { .h-feed h2 {
margin-bottom: 1rem; margin-bottom: 1em;
} }
.h-feed .h-entry { .h-feed .h-entry {
margin: 0 1rem; margin: 0 1em;
} }
.h-feed .h-entry h3 { .h-feed .h-entry h3 {
font-size: 0.9rem; font-size: 0.9em;
} }
.h-feed .h-entry .e-summary, .h-feed .h-entry .e-summary,
.h-feed .h-entry .e-content { .h-feed .h-entry .e-content {
font-size: 0.8rem; font-size: 0.8em;
} }
.h-feed .h-entry .e-content { .h-feed .h-entry .e-content {
margin-bottom: 3rem; margin-bottom: 3em;
} }
.h-entry.singular { .h-entry.singular {
padding: 0 0.6rem; padding: 0 0.6em;
font-size: 0.9rem; font-size: 0.9em;
} }
.h-entry .e-content a, .h-entry .e-content a,
@ -432,20 +432,19 @@ input[type=submit]:hover {
color:#71B3F4; color:#71B3F4;
} }
/*
.h-feed .h-entry a.has-summary::after {
content: '\00BB';
}
*/
.h-entry.singular h1 { .h-entry.singular h1 {
margin: 2rem 0 1rem 0; margin: 2em 0 1em 0;
}
.h-entry.singular footer {
margin: 2em 0;
font-size: 0.9em;
} }
.h-entry.singular footer p { .h-entry.singular footer p {
color: #999; padding: 0.3em 0;
padding: 0.3rem 0;
display: inline-block; display: inline-block;
color: #aaa;
} }
.h-entry.singular footer a { .h-entry.singular footer a {
@ -456,32 +455,100 @@ input[type=submit]:hover {
color: #eee; color: #eee;
} }
.h-entry.singular footer { .h-entry.singular footer dl,
margin: 2rem 0; .h-entry.singular footer dt,
.h-entry.singular footer dd {
vertical-align:top;
} }
.reactions h2, .h-entry.singular footer dt {
.replies h2, display: inline-block;
.syndication h2 { width: 18%;
border:none; margin: 0 1% 0 0;
text-align: right;
}
.h-entry.singular footer dd {
display: inline-block;
width: 80%;
}
.h-entry.singular footer img {
width: 1em;
height: auto;
}
.donation ul,
.donation li {
list-style-type: none;
}
.donation li {
margin: 0.6em 0.6em 0.6em 0;
display: inline-block;
}
.donation p {
line-height: 1.2em;
}
.donation li a {
display: inline-block;
border: 1px dashed #933;
padding: 0.6em 1em;
background-color: #111;
width: 16em;
}
.donation .method {
margin-left: 0.6em;
}
.donation li a:hover {
border: 1px solid #933;
color: #fff;
} }
figure { figure {
margin: 1rem 0; margin: 1em 0;
position:relative; position:relative;
overflow: hidden;
} }
figcaption dl * { figure figcaption {
font-size: 0.5rem; padding: 0.3em 0;
text-align: center;
} }
figcaption { .exif {
max-width: 72ch; font-size: 0.8em;
margin: 0 auto;
background-color: #111;
padding: 0.6rem;
} }
figcaption .alt,
figcaption .author,
.h-feed figcaption,
.content-footer h2,
.reactions dl dt,
.reactions dl ul time,
.hide,
.exif dt {
display: none;
visibility: hidden;
}
.exif dd {
display: inline-block;
margin: 0 0.6em 0 0;
}
.exif .icon {
margin: 0 0.2em;
width: 1em;
vertical-align:text-bottom;
}
.adaptimg { .adaptimg {
display: block; display: block;
max-height: 98vh; max-height: 98vh;
@ -490,20 +557,20 @@ figcaption {
height:auto; height:auto;
margin: 0 auto; margin: 0 auto;
padding: 0; padding: 0;
outline: 1px solid #000; border: 1px solid #000;
} }
.follow { .follow {
cursor:pointer; cursor:pointer;
display:block; display:block;
text-align:right; text-align:right;
margin: 0.6rem 0; margin: 0.6em 0;
font-size: 0.8rem; font-size: 0.8em;
} }
.follow a, .follow a,
.pagination a { .pagination a {
padding: 0 0 0.3rem 0; padding: 0 0 0.3em 0;
border-bottom: 3px solid #999; border-bottom: 3px solid #999;
} }
@ -515,7 +582,6 @@ figcaption {
.pagination ul { .pagination ul {
text-align:center; text-align:center;
list-style-type: none; list-style-type: none;
font-size: 1.2rem;
} }
.pagination li { .pagination li {
@ -524,23 +590,7 @@ figcaption {
.pagination a, .pagination a,
.pagination span { .pagination span {
padding: 0.3rem 0.6rem; padding: 0.3em;
}
.exif {
font-size: 0.7rem;
margin-top: 0.3rem;
}
.hide,
.exif dt {
display: none;
visibility: hidden;
}
.exif dd {
display: inline-block;
margin: 0 0.6rem 0 0;
} }
.w25, .w25,
@ -557,97 +607,71 @@ figcaption {
} }
.search-section { .search-section {
margin-bottom: 1rem; margin-bottom: 1em;
} }
.search-section summary { .search-section summary {
border-bottom: 2px solid #999; border-bottom: 2px solid #999;
padding: 0.3rem 0; padding: 0.3em 0;
font-weight: bold; font-weight: bold;
} }
.search-section li { .search-section li {
margin: 1rem 0.6rem; margin: 1em 0.6em;
}
.replies {
font-size: 0.9em;
} }
.replies ol { .replies ol {
margin: 0 0 0 1rem; margin: 0 0 0 1em;
} }
.replies li { .replies li {
margin: 0 0 1rem 0; margin: 0 0 1em 0;
}
.replies li .p-author:before {
content: '\00B7';
margin: 0 0.3rem;
}
.replies li time {
font-size: 0.8rem;
} }
.replies li .source { .replies li .source {
display: block; display: block;
} }
.reactions dl dt,
.reactions dl ul time {
display:none;
visibility: hidden;
}
.reactions dl ul, .reactions dl ul,
.reactions dl ul li { .reactions dl ul li {
list-style-type: none; list-style-type: none;
display: inline-block; margin: 0;
padding: 0;
margin: 0 1rem 0 0;
} }
.donation { .h-review {
text-align: center; padding: 1em;
border: 2px dotted #999;
margin: 1em 0;
} }
.donation ul { .h-review h2 {
list-style-type: none; margin: 0;
} }
.donation li { .h-review p {
display: inline; line-height: 1.2em;
margin: 0;
padding: 0.3em 0;
} }
.h-review .rating {
.donation li a { font-size: 0.9em;
display: inline-block;
border: 1px dashed #933;
padding: 0.3rem;
background-color: #111;
width: 8rem;
} }
.donation li .method { .h-review .rating .best,
display: block; .h-review .rating .value {
font-size: 0.7rem;
}
.donation li a:hover {
border: 1px solid #933;
color: #fff; color: #fff;
} font-weight: bold;
/*
.donation li a {
display: block;
} }
*/ @media all and (min-width: 56em) {
/* above is mobile first; this is the desktop */
@media all and (min-width: 56rem) {
.content-navigation ul li a { .content-navigation ul li a {
font-size: 0.9rem; font-size: 0.9em;
} }
.content-navigation ul li a svg { .content-navigation ul li a svg {
display:inline-block; display:inline-block;
@ -660,22 +684,8 @@ figcaption {
.search-form { .search-form {
float:right; float:right;
margin: 0.1rem; margin: 0.1em;
} }
figcaption {
position: absolute;
right: 0;
top: 0;
max-width: 28%;
}
.adaptimg {
max-width: 70%;
margin: 0;
}
} }
@ -704,13 +714,21 @@ figcaption {
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
page-break-after: avoid; page-break-after: avoid;
} }
h3,
a,
.footnotes ol li a,
.h-feed .h-entry,
code,
pre {
border: none;
}
p, li, blockquote, figure, .footnotes { p, li, blockquote, figure, .footnotes {
page-break-inside: avoid !important; page-break-inside: avoid !important;
} }
a { a {
border: none;
color: #000; color: #000;
} }
@ -726,7 +744,8 @@ figcaption {
.footnotes ol li a[href^="#"], .footnotes ol li a[href^="#"],
.footnotes ol li a[href^="#"]:after, .footnotes ol li a[href^="#"]:after,
.exif svg, .exif svg,
.donation { .donation,
.noprint {
display:none; display:none;
visibility: hidden; visibility: hidden;
} }
@ -735,24 +754,22 @@ figcaption {
display: block; display: block;
overflow: visible; overflow: visible;
white-space: normal; white-space: normal;
border: none;
} }
code, pre { code, pre {
max-width: 96%; max-width: 96%;
border: none;
color: #222; color: #222;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
overflow:initial; overflow:initial;
line-height: 1rem;
page-break-inside: enabled; page-break-inside: enabled;
font-family: "Courier", "Courier New", monospace !important; font-family: "Courier", "Courier New", monospace !important;
} }
pre { pre {
border: 1pt solid #999; border: 1pt dotted #666;
padding: 0.6em;
} }
code.sourceCode span { color: black; } code.sourceCode span { color: black; }
@ -792,6 +809,5 @@ figcaption {
.h-feed .h-entry { .h-feed .h-entry {
page-break-after:always; page-break-after:always;
border:none;
} }
} }