Compare commits

...

4 commits

Author SHA1 Message Date
Peter Molnar
4199eb4fd6 This might be the final commit to NASG the way it is.
I wrote about it in details under
<https://petermolnar.net/article/less-features-cleaner-site/index.html>; in essence, it doesn't make sense for a personal static generator to try to be a fully open sourced one-size-fits-all, that only ends with my frustration and no joy.

If you want the stuff that builds my site:
<https://petermolnar.net/fetch.py>
<https://petermolnar.net/build.py>

And for now, that's all.

I'll keep the repo up for historical purposes.
2020-06-06 20:47:28 +01:00
Peter Molnar
67f2978aeb Reverting layout back to divs, because the "semantic" structuring of HTML5 is a mess and only complicates my life.
It's also for more backwards compatibility, though <figure> and <figcaption> is going to stay, because those make a lot of sense.

Coming up next: out with JSON-LD. It was an interesting experiment which didn't bring any good at all, even in the long run.
2020-05-17 18:14:43 +01:00
Peter Molnar
71bf7f7266 before json-ld cleanup 2020-03-09 11:09:46 +00:00
Peter Molnar
02c131b200 mostly cleanups plus gopher shows markdown not plain text; still with 70em cutoff 2020-02-21 12:02:26 +00:00
15 changed files with 139 additions and 156 deletions

73
nasg.py
View file

@ -244,18 +244,7 @@ class Gone(object):
return {"source": self.source} return {"source": self.source}
async def render(self): async def render(self):
if self.exists: return
os.remove(self.renderfile)
os.rmdir(self.renderdir)
# rmtree(self.renderdir)
return
# logger.info(
# "rendering %s to %s", self.__class__, self.renderfile
# )
# writepath(
# self.renderfile, J2.get_template(self.template).render()
# )
class FediverseStats(object): class FediverseStats(object):
def __init__(self, postcount=0, commentcount=0): def __init__(self, postcount=0, commentcount=0):
@ -298,18 +287,12 @@ class FediverseStats(object):
"github": "https://github.com/petermolnar/nasg", "github": "https://github.com/petermolnar/nasg",
"follow": f"{settings.site.url}", "follow": f"{settings.site.url}",
}, },
"email": "webmaster@petermolnar.net" "email": "webmaster@petermolnar.net",
}, },
"openRegistrations": False, "openRegistrations": False,
"protocols": ["activitypub"], "protocols": ["activitypub"],
"services": { "services": {"inbound": [], "outbound": []},
"inbound": [], "software": {"name": "nasg", "version": "6.6"},
"outbound": [],
},
"software": {
"name": "nasg",
"version": "6.6"
},
"usage": { "usage": {
"localPosts": self.postcount, "localPosts": self.postcount,
"localComments": self.commentcount, "localComments": self.commentcount,
@ -767,15 +750,6 @@ class WebImage(object):
self.size = size self.size = size
self.crop = crop self.crop = crop
# @property
# def data(self):
# with open(self.fpath, "rb") as f:
# encoded = base64.b64encode(f.read())
# return "data:%s;base64,%s" % (
# self.parent.mime_type,
# encoded.decode("utf-8"),
# )
@property @property
def suffix(self): def suffix(self):
return settings.photo.get("sizes").get(self.size, "") return settings.photo.get("sizes").get(self.size, "")
@ -1006,8 +980,10 @@ class Singular(MarkdownDoc):
@property @property
def is_front(self): def is_front(self):
if self.category in settings.notinfeed: if self.is_reply:
return False return False
# if self.category in settings.notinfeed:
# return False
return True return True
@property @property
@ -1076,7 +1052,7 @@ class Singular(MarkdownDoc):
urls = self.meta.get("syndicate", []) urls = self.meta.get("syndicate", [])
if not self.is_page: if not self.is_page:
urls.append("https://fed.brid.gy/") urls.append("https://fed.brid.gy/")
#urls.append("https://brid.gy/publish/mastodon") # urls.append("https://brid.gy/publish/mastodon")
if self.is_photo: if self.is_photo:
urls.append("https://brid.gy/publish/flickr") urls.append("https://brid.gy/publish/flickr")
return urls return urls
@ -1303,9 +1279,7 @@ class Singular(MarkdownDoc):
".copy", ".copy",
".cache", ".cache",
] ]
include = [ include = ["map.png"]
"map.png"
]
files = glob.glob( files = glob.glob(
os.path.join(os.path.dirname(self.fpath), "*.*") os.path.join(os.path.dirname(self.fpath), "*.*")
) )
@ -1316,9 +1290,7 @@ class Singular(MarkdownDoc):
continue continue
t = os.path.join( t = os.path.join(
settings.paths.get("build"), settings.paths.get("build"), self.name, fname
self.name,
fname
) )
if os.path.exists(t) and mtime(f) <= mtime(t): if os.path.exists(t) and mtime(f) <= mtime(t):
continue continue
@ -1334,8 +1306,18 @@ class Singular(MarkdownDoc):
style = settings.mapbox.style style = settings.mapbox.style
size = settings.mapbox.size size = settings.mapbox.size
lat = round(float(self.photo.jsonld["locationCreated"]["geo"]["latitude"]), 3) lat = round(
lon = round(float(self.photo.jsonld["locationCreated"]["geo"]["longitude"]), 3) float(
self.photo.jsonld["locationCreated"]["geo"]["latitude"]
),
3,
)
lon = round(
float(
self.photo.jsonld["locationCreated"]["geo"]["longitude"]
),
3,
)
token = keys.mapbox.get("private") token = keys.mapbox.get("private")
mapfpath = os.path.join(self.dirpath, "map.png") mapfpath = os.path.join(self.dirpath, "map.png")
if os.path.exists(mapfpath): if os.path.exists(mapfpath):
@ -1344,7 +1326,7 @@ class Singular(MarkdownDoc):
url = f"https://api.mapbox.com/styles/v1/mapbox/{style}/static/pin-s({lon},{lat})/{lon},{lat},11,20/{size}?access_token={token}" url = f"https://api.mapbox.com/styles/v1/mapbox/{style}/static/pin-s({lon},{lat})/{lon},{lat},11,20/{size}?access_token={token}"
logger.info("requesting map for %s with URL %s", self.name, url) logger.info("requesting map for %s with URL %s", self.name, url)
with requests.get(url, stream=True) as r: with requests.get(url, stream=True) as r:
with open(mapfpath, 'wb') as f: with open(mapfpath, "wb") as f:
copyfileobj(r.raw, f) copyfileobj(r.raw, f)
@property @property
@ -1705,11 +1687,12 @@ class Micropub(PHPFile):
"wallabag": keys.wallabag, "wallabag": keys.wallabag,
"site": settings.site, "site": settings.site,
"paths": settings.paths, "paths": settings.paths,
"tags": { "tags": self.tags } "tags": {"tags": self.tags},
} }
) )
writepath(self.renderfile, r) writepath(self.renderfile, r)
class WorldMap(object): class WorldMap(object):
def __init__(self): def __init__(self):
self.data = {} self.data = {}
@ -2092,7 +2075,8 @@ class Category(dict):
fe.content(post.html_content, type="CDATA") fe.content(post.html_content, type="CDATA")
fg.add_entry(fe) fg.add_entry(fe)
writepath(self.renderfile, fg.rss_str(pretty=True)) output = fg.rss_str(pretty=True)
writepath(self.renderfile, output)
class Year(object): class Year(object):
def __init__(self, parent, year): def __init__(self, parent, year):
@ -2708,7 +2692,6 @@ def make():
# make gone and redirect arrays for PHP # make gone and redirect arrays for PHP
for e in glob.glob(os.path.join(content, "*", "*.del")): for e in glob.glob(os.path.join(content, "*", "*.del")):
post = Gone(e) post = Gone(e)
queue.put(post.render())
rules.add_gone(post.source) rules.add_gone(post.source)
for e in glob.glob(os.path.join(content, "*", "*.url")): for e in glob.glob(os.path.join(content, "*", "*.url")):
post = Redirect(e) post = Redirect(e)
@ -2758,7 +2741,7 @@ def make():
try: try:
logger.info("starting syncing") logger.info("starting syncing")
os.system( os.system(
f"rsync -avuhH --delete-after {settings.paths.build}/ {settings.syncserver}:{settings.paths.remotewww}" f"rsync -avuhH --exclude='.git' --delete-after {settings.paths.build}/ {settings.syncserver}:{settings.paths.remotewww}"
) )
logger.info("syncing finished") logger.info("syncing finished")
except Exception as e: except Exception as e:

View file

@ -141,8 +141,20 @@ class PandocMD2TXT(Pandoc):
"+autolink_bare_uris", "+autolink_bare_uris",
"-smart", "-smart",
] ]
out_format = "plain" out_format = "markdown"
out_options = [] out_options = [
"+footnotes",
"+pipe_tables",
"+strikeout",
"+raw_html",
"+definition_lists",
"+backtick_code_blocks",
"+fenced_code_attributes",
"+shortcut_reference_links",
"+lists_without_preceding_blankline",
"+autolink_bare_uris",
"-smart",
]
columns = "--columns=80" columns = "--columns=80"

View file

@ -8,7 +8,6 @@ Jinja2==2.10.3
langdetect==1.0.7 langdetect==1.0.7
lxml==4.4.2 lxml==4.4.2
MarkupSafe==1.1.1 MarkupSafe==1.1.1
pkg-resources==0.0.0
python-dateutil==2.8.1 python-dateutil==2.8.1
python-frontmatter==0.5.0 python-frontmatter==0.5.0
PyYAML==5.2 PyYAML==5.2

View file

@ -55,9 +55,7 @@ site = nameddict(
"image": "https://petermolnar.net/favicon.ico", "image": "https://petermolnar.net/favicon.ico",
"license": "https://spdx.org/licenses/%s.html" "license": "https://spdx.org/licenses/%s.html"
% (licence["_default"]), % (licence["_default"]),
"sameAs": [ "sameAs": ["https://t.me/petermolnarnet"],
"https://t.me/petermolnarnet"
],
"author": { "author": {
"@context": "http://schema.org", "@context": "http://schema.org",
"@type": "Person", "@type": "Person",
@ -73,7 +71,7 @@ site = nameddict(
"https://t.me/petermolnar", "https://t.me/petermolnar",
"https://twitter.com/petermolnar", "https://twitter.com/petermolnar",
"https://mastodon.social/@petermolnar" "https://mastodon.social/@petermolnar"
"https://www.flickr.com/people/petermolnareu/" "https://www.flickr.com/people/petermolnareu/",
], ],
"follows": "https://petermolnar.net/following.opml", "follows": "https://petermolnar.net/following.opml",
}, },
@ -110,7 +108,7 @@ site = nameddict(
"recipient": author, "recipient": author,
"target": "https://monzo.me/petermolnar/", "target": "https://monzo.me/petermolnar/",
"price": "3", "price": "3",
"priceCurrency": "GBP" "priceCurrency": "GBP",
}, },
{ {
"@context": "http://schema.org", "@context": "http://schema.org",
@ -120,7 +118,7 @@ site = nameddict(
"recipient": author, "recipient": author,
"target": "https://paypal.me/petermolnar/", "target": "https://paypal.me/petermolnar/",
"price": "3", "price": "3",
"priceCurrency": "GBP" "priceCurrency": "GBP",
}, },
], ],
} }
@ -157,7 +155,7 @@ meta = nameddict(
"authorization_endpoint": "https://indieauth.com/auth", "authorization_endpoint": "https://indieauth.com/auth",
"token_endpoint": "https://tokens.indieauth.com/token", "token_endpoint": "https://tokens.indieauth.com/token",
"micropub": "https://petermolnar.net/micropub.php", "micropub": "https://petermolnar.net/micropub.php",
"microsub": "https://aperture.p3k.io/microsub/83" "microsub": "https://aperture.p3k.io/microsub/83",
} }
) )
@ -169,8 +167,7 @@ paths = nameddict(
base, "nasg", "templates", "watermark.png" base, "nasg", "templates", "watermark.png"
), ),
"build": os.path.join(base, "www"), "build": os.path.join(base, "www"),
"remotewww": "/web/petermolnar.net/web", "remotewww": "/usr/local/www/petermolnar.net",
"remotequeue": "/web/petermolnar.net/queue",
"micropub": os.path.join(base, "content", "note"), "micropub": os.path.join(base, "content", "note"),
"home": os.path.join(base, "content", "home", "index.md"), "home": os.path.join(base, "content", "home", "index.md"),
"category": "category", "category": "category",
@ -184,11 +181,11 @@ filenames = nameddict(
"atom": "atom.xml", "atom": "atom.xml",
"json": "index.json", "json": "index.json",
"md": "index.md", "md": "index.md",
"txt": "index.txt", "txt": "index.md",
"html": "index.html", "html": "index.html",
"gopher": "gophermap", "gopher": "gophermap",
"sitemap": "sitemap.txt", "sitemap": "sitemap.txt",
"worldmap": "map.html" "worldmap": "map.html",
} }
) )
@ -202,7 +199,7 @@ photo = nameddict(
"default": 720, "default": 720,
"sizes": { "sizes": {
# 90 = s # 90 = s
#240: "_m", # 240: "_m",
720: "", 720: "",
1280: "_b", 1280: "_b",
}, },
@ -210,10 +207,7 @@ photo = nameddict(
} }
) )
mapbox = nameddict({ mapbox = nameddict({"style": "outdoors-v11", "size": "720x480"})
"style": "outdoors-v11",
"size": "720x480"
})
rewrites = { rewrites = {
"^/(?:sysadmin|it|linux-tech-coding|sysadmin-blog)/?(page.*)?$": "category/article/", "^/(?:sysadmin|it|linux-tech-coding|sysadmin-blog)/?(page.*)?$": "category/article/",
@ -242,12 +236,12 @@ formerdomains = [
formercategories = { formercategories = {
# "article": [ # "article": [
# "linux-tech-coding", # "linux-tech-coding",
# "diy-do-it-yourself", # "diy-do-it-yourself",
# "sysadmin-blog", # "sysadmin-blog",
# "sysadmin", # "sysadmin",
# "szubjektiv-technika", # "szubjektiv-technika",
# "wordpress", # "wordpress",
# ], # ],
# "note": ["blips", "blog", "r"], # "note": ["blips", "blog", "r"],
# "journal": ["blog"], # "journal": ["blog"],

View file

@ -11,23 +11,23 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<main id="main" class="h-feed hatom {{ category.name }}"> <div id="main" class="h-feed hatom {{ category.name }}">
{% set year = [0] %} {% set year = [0] %}
{% for post in posts %} {% for post in posts %}
{% set _year = year.pop() %} {% set _year = year.pop() %}
{% if _year != post.copyrightYear %} {% if _year != post.copyrightYear %}
{% if not loop.first %} {% if not loop.first %}
</section> </div>
{% endif %} {% endif %}
<section class="year"> <div class="year">
<h2>{{ post.copyrightYear }}</h2> <h2>{{ post.copyrightYear }}</h2>
{% endif %} {% endif %}
{% set _ = year.append(post.copyrightYear)%} {% set _ = year.append(post.copyrightYear)%}
{% include 'meta-article.j2.html' %} {% include 'meta-article.j2.html' %}
{% if loop.last %} {% if loop.last %}
</section> </div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</main> </div>
{% endblock %} {% endblock %}

View file

@ -14,15 +14,15 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<main id="main" class="h-feed hatom"> <div id="main" class="h-feed hatom">
<section id="intro"> <div class="section" id="intro">
<div> <div>
{{ post.text }} {{ post.text }}
</div> </div>
</section> </div>
{% set isFrontPage = 1 %} {% set isFrontPage = 1 %}
<section id="latest"> <div id="latest">
<h1>Latest entries</h1> <h1>Latest entries</h1>
{% for category, post in posts %} {% for category, post in posts %}
<h2>in: <h2>in:
@ -33,6 +33,6 @@
</h2> </h2>
{% include 'meta-article.j2.html' %} {% include 'meta-article.j2.html' %}
{% endfor %} {% endfor %}
</section> </div>
</main> </div>
{% endblock %} {% endblock %}

View file

@ -120,7 +120,7 @@ if (isset($_GET['json'])) {
{% block title %}Search results for: <?php echo($q); ?>{% endblock %} {% block title %}Search results for: <?php echo($q); ?>{% endblock %}
{% block content %} {% block content %}
<main id="main" class="h-feed hatom"> <div id="main" class="h-feed hatom main">
<h1>Search results for: <?php echo($q); ?></h1> <h1>Search results for: <?php echo($q); ?></h1>
<dl> <dl>
<?php <?php
@ -129,5 +129,5 @@ if (isset($_GET['json'])) {
} }
?> ?>
</dl> </dl>
</main> </div>
{% endblock %} {% endblock %}

View file

@ -32,9 +32,6 @@
<meta NAME="DC.Creator" content="{{ post.author.name }}" /> <meta NAME="DC.Creator" content="{{ post.author.name }}" />
<meta NAME="DC.Date" content="{{ post.datePublished }}" /> <meta NAME="DC.Date" content="{{ post.datePublished }}" />
<meta NAME="DC.Description" content="{{ post.description|striptags|e }}" /> <meta NAME="DC.Description" content="{{ post.description|striptags|e }}" />
<script type="application/ld+json">
{{ post|tojson(indent=4) }}
</script>
{% if post['@type'] == 'TechArticle' %} {% if post['@type'] == 'TechArticle' %}
<style media="all"> <style media="all">
{% include('prism.css') %} {% include('prism.css') %}
@ -61,26 +58,8 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<main id="main"> <div id="main">
<article class="h-entry hentry" lang="{{ post.inLanguage }}" id="article"> <div class="h-entry hentry" lang="{{ post.inLanguage }}" id="article">
<aside id="entry-meta">
{% if post.sameAs|length %}
<span id="syndication">
this post on other sites:
{% for url in post.sameAs %}
<a class="u-syndication" href="{{ url }}"><svg width="16" height="16" aria-label="{{ url|extractdomain }}"><use xlink:href="#icon-{{ url|extractdomain }}" /></svg></a>
{% endfor %}
</span>
{% endif %}
{% if 'WebPage' != post['@type'] %}
{% for action in post.potentialAction %}
{% if 'InteractAction' == action['@type'] %}
<a href="{{ action.target }}"></a>
{% endif %}
{% endfor %}
{% endif %}
</aside>
<h1 class="p-name entry-title"> <h1 class="p-name entry-title">
{% if post.mentions %} {% if post.mentions %}
<span> <span>
@ -102,7 +81,7 @@
</h1> </h1>
{% if post.review %} {% if post.review %}
<section class="h-review hreview"> <div class="h-review hreview">
<strong>Review summary of: <a href="{{ post.review.url }}" class="p-name u-url p-item h-product item fn url">{{ post.review.name }}</a></strong> <strong>Review summary of: <a href="{{ post.review.url }}" class="p-name u-url p-item h-product item fn url">{{ post.review.name }}</a></strong>
<p> <p>
By By
@ -119,16 +98,16 @@
</span> </span>
</p> </p>
<p class="p-summary summary">{{ post.review.text }}</p> <p class="p-summary summary">{{ post.review.text }}</p>
</section> </div>
{% endif %} {% endif %}
{% if post.description|length %} {% if post.description|length %}
<section class="e-summary entry-summary"> <div class="e-summary entry-summary">
{{ post.description|relurl(baseurl) }} {{ post.description|relurl(baseurl) }}
</section> </div>
{% endif %} {% endif %}
<section> <div class="section">
{% if post.image|length %} {% if post.image|length %}
{% for image in post.image %} {% for image in post.image %}
{% if image.representativeOfPage %} {% if image.representativeOfPage %}
@ -139,12 +118,12 @@
<div class="e-content entry-content"> <div class="e-content entry-content">
{{ post.text|relurl(baseurl) }} {{ post.text|relurl(baseurl) }}
</div> </div>
</section> </div>
{% if 'WebPage' != post['@type'] %} {% if 'WebPage' != post['@type'] %}
{% if post.comment|length %} {% if post.comment|length %}
<section class="comments"> <div class="comments" id="comments">
<h2><a id="comments"></a>Responses</h2> <h2>Responses</h2>
<ol> <ol>
{% for comment in post.comment %} {% for comment in post.comment %}
<li class="h-entry p-comment hentry"> <li class="h-entry p-comment hentry">
@ -186,12 +165,12 @@
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
</section> </div>
{% endif %} {% endif %}
{% endif %} {% endif %}
<footer class="entry-footer"> <div class="entry-footer">
<p>Licenced under <p>Licenced under
<a rel="license" href="{{ post.license }}" class="u-license">{{ post.license | extractlicense }}</a>, <a rel="license" href="{{ post.license }}" class="u-license">{{ post.license | extractlicense }}</a>,
created by created by
@ -220,6 +199,22 @@
</a> </a>
{% endif %} {% endif %}
{% endif %} {% endif %}
.
{% if post.sameAs|length %}
<span id="syndication">
This post also appears on other sites:
{% for url in post.sameAs %}
<a class="u-syndication" href="{{ url }}"><svg width="16" height="16" aria-label="{{ url|extractdomain }}"><use xlink:href="#icon-{{ url|extractdomain }}" /></svg></a>
{% endfor %}.
</span>
{% endif %}
{% if 'WebPage' != post['@type'] %}
{% for action in post.potentialAction %}
{% if 'InteractAction' == action['@type'] %}
<a href="{{ action.target }}"></a>
{% endif %}
{% endfor %}
{% endif %}
</p> </p>
{% if post.subjectOf %} {% if post.subjectOf %}
@ -240,8 +235,8 @@
<a class="u-url url" href="{{ post.url }}"></a> <a class="u-url url" href="{{ post.url }}"></a>
</p> </p>
{% endif %} {% endif %}
</footer> </div>
</article> </div>
</main> </div>
{% endblock %} {% endblock %}

View file

@ -12,7 +12,7 @@
{% block pagination %} {% block pagination %}
{% if category.paginated %} {% if category.paginated %}
<section id="pagination"> <div id="pagination">
<ol> <ol>
{% for y, url in category.years.items() %} {% for y, url in category.years.items() %}
{% if (y == category.year) or (not category.year and loop.first) %} {% if (y == category.year) or (not category.year and loop.first) %}
@ -30,28 +30,28 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ol> </ol>
</section> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<main id="main" class="h-feed hatom {{ category.name }}"> <div id="main" class="h-feed hatom {{ category.name }}">
{% set year = [0] %} {% set year = [0] %}
{% for post in posts %} {% for post in posts %}
{% set _year = year.pop() %} {% set _year = year.pop() %}
{% if not category.paginated and _year != post.copyrightYear %} {% if not category.paginated and _year != post.copyrightYear %}
{% if not loop.first %} {% if not loop.first %}
</section> </div>
{% endif %} {% endif %}
<section class="year"> <div class="year">
<h2>{{ post.copyrightYear }}</h2> <h2>{{ post.copyrightYear }}</h2>
{% endif %} {% endif %}
{% set _ = year.append(post.copyrightYear)%} {% set _ = year.append(post.copyrightYear)%}
{% include 'meta-article.j2.html' %} {% include 'meta-article.j2.html' %}
{% if not category.paginated and loop.last %} {% if not category.paginated and loop.last %}
</section class="year"> </div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</main> </div>
{% endblock %} {% endblock %}

View file

@ -13,9 +13,6 @@
{% for key, value in meta.items() %} {% for key, value in meta.items() %}
<link rel="{{ key }}" href="{{ value }}" /> <link rel="{{ key }}" href="{{ value }}" />
{% endfor %} {% endfor %}
<script type="application/ld+json">
{{ site|tojson(indent=4) }}
</script>
<style media="all"> <style media="all">
{% include('style.css') %} {% include('style.css') %}
</style> </style>
@ -39,9 +36,9 @@
or ( category is defined and category.name == name )%}class="active"{% endif %} or ( category is defined and category.name == name )%}class="active"{% endif %}
{% endmacro %} {% endmacro %}
<header id="header"> <div id="header">
<div> <div>
<nav> <div class="nav">
<ul> <ul>
{% for key, data in menu.items() %} {% for key, data in menu.items() %}
<li> <li>
@ -54,7 +51,7 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </div>
<div id="header-forms"> <div id="header-forms">
{% for action in site.potentialAction %} {% for action in site.potentialAction %}
@ -72,7 +69,7 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</header> </div>
{% block content %} {% block content %}
{% endblock %} {% endblock %}
@ -80,7 +77,7 @@
{% block pagination %} {% block pagination %}
{% endblock %} {% endblock %}
<footer id="footer" class="p-author h-card vcard"> <div id="footer" class="p-author h-card vcard">
<div> <div>
<p> <p>
<a href="https://creativecommons.org/">CC</a>, <a href="https://creativecommons.org/">CC</a>,
@ -141,6 +138,13 @@
flickr flickr
</a> </a>
</li> </li>
{% elif 'xmpp' in url %}
<li>
<a rel="me" href="{{ url }}">
<svg width="16" height="16"><use xlink:href="#icon-xmpp" /></svg>
XMPP
</a>
</li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
@ -166,7 +170,7 @@
</ul> </ul>
</div> </div>
</div> </div>
</footer> </div>
<script> <script>
{% include 'themeswitcher.js' %} {% include 'themeswitcher.js' %}

View file

@ -1,5 +1,5 @@
<article class="h-entry hentry" lang="{{ post.inLanguage }}"> <div class="h-entry hentry" lang="{{ post.inLanguage }}">
<header class="entry-header"> <div class="entry-header">
<h3 class="p-name entry-title"> <h3 class="p-name entry-title">
{% if post.mentions %} {% if post.mentions %}
<span> <span>
@ -21,7 +21,7 @@
</h3> </h3>
<a href="{{ post.url }}" class="u-url bookmark"></a> <a href="{{ post.url }}" class="u-url bookmark"></a>
</header> </div>
{% if post.description|length %} {% if post.description|length %}
{% set summary = post.description %} {% set summary = post.description %}
@ -47,7 +47,7 @@
</span> </span>
</div> </div>
<footer class="entry-footer" aria-hidden="true" hidden="hidden"> <div class="entry-footer" aria-hidden="true" hidden="hidden">
Published at Published at
<time datetime="{{ post.datePublished }}" class="dt-published published">{{ post.datePublished|printdate }}</time> <time datetime="{{ post.datePublished }}" class="dt-published published">{{ post.datePublished|printdate }}</time>
<time datetime="{{ post.dateModified }}" class="dt-updated updated"></time> <time datetime="{{ post.dateModified }}" class="dt-updated updated"></time>
@ -57,5 +57,5 @@
<a class="p-name u-url fn url org" href="{{ post.author.url }}">{{ post.author.name }}</a> <a class="p-name u-url fn url org" href="{{ post.author.url }}">{{ post.author.name }}</a>
<a class="u-email email" href="mailto:{{ post.author.email }}">{{ post.author.email }}</a> <a class="u-email email" href="mailto:{{ post.author.email }}">{{ post.author.email }}</a>
</span> </span>
</footer> </div>
</article> </div>

View file

@ -51,20 +51,18 @@ td, th {
text-overflow:initial !important; text-overflow:initial !important;
} }
.footnote-back { #header,
display: none; #footer,
}
body > header,
body > footer,
video, video,
audio, audio,
.syndication, #syndication,
.footnote-back,
.footnote-backref, .footnote-backref,
.footnote-back, .footnote-back,
.encourage, .encourage,
.noprint { .noprint {
display:none !important; display:none !important;
} }
code, pre { code, pre {

View file

@ -376,11 +376,6 @@ li p {
} }
*/ */
#syndication {
display: block;
text-align: right;
}
#fediversefollow label { #fediversefollow label {
font-weight: bold; font-weight: bold;
} }
@ -426,4 +421,4 @@ li p {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
} }

View file

@ -91,4 +91,7 @@
<symbol id="icon-twitter" viewBox="0 0 16 16"> <symbol id="icon-twitter" viewBox="0 0 16 16">
<path d="M15.969 3.046c-0.59 0.259-1.22 0.436-1.883 0.517 0.676-0.407 1.196-1.049 1.442-1.815-0.634 0.37-1.337 0.639-2.085 0.789-0.597-0.639-1.449-1.039-2.394-1.039-1.811 0-3.28 1.469-3.28 3.278 0 0.26 0.030 0.51 0.085 0.749-2.727-0.129-5.143-1.438-6.761-3.417-0.285 0.481-0.444 1.041-0.444 1.65 0 1.14 0.58 2.142 1.459 2.731-0.538-0.017-1.044-0.165-1.485-0.411v0.041c0 1.59 1.129 2.916 2.631 3.218-0.275 0.074-0.566 0.114-0.864 0.114-0.209 0-0.41-0.020-0.611-0.057 0.421 1.302 1.63 2.251 3.069 2.278-1.12 0.879-2.539 1.403-4.068 1.403-0.26 0-0.519-0.015-0.78-0.045 1.459 0.929 3.179 1.473 5.038 1.473 6.036 0 9.333-4.997 9.333-9.324 0-0.139 0-0.28-0.010-0.42 0.641-0.459 1.2-1.040 1.64-1.699l-0.031-0.013z"></path> <path d="M15.969 3.046c-0.59 0.259-1.22 0.436-1.883 0.517 0.676-0.407 1.196-1.049 1.442-1.815-0.634 0.37-1.337 0.639-2.085 0.789-0.597-0.639-1.449-1.039-2.394-1.039-1.811 0-3.28 1.469-3.28 3.278 0 0.26 0.030 0.51 0.085 0.749-2.727-0.129-5.143-1.438-6.761-3.417-0.285 0.481-0.444 1.041-0.444 1.65 0 1.14 0.58 2.142 1.459 2.731-0.538-0.017-1.044-0.165-1.485-0.411v0.041c0 1.59 1.129 2.916 2.631 3.218-0.275 0.074-0.566 0.114-0.864 0.114-0.209 0-0.41-0.020-0.611-0.057 0.421 1.302 1.63 2.251 3.069 2.278-1.12 0.879-2.539 1.403-4.068 1.403-0.26 0-0.519-0.015-0.78-0.045 1.459 0.929 3.179 1.473 5.038 1.473 6.036 0 9.333-4.997 9.333-9.324 0-0.139 0-0.28-0.010-0.42 0.641-0.459 1.2-1.040 1.64-1.699l-0.031-0.013z"></path>
</symbol> </symbol>
<symbol id="icon-xmpp" width="16" height="16" viewBox="0 0 16 16">
<path d="M0 2.13c0.1 3.83 3.24 7.8 7.020 10-0.87 0.68-1.84 1.2-2.9 1.46v0.18c1.3-0.12 2.6-0.5 3.87-1.1 0.42 0.2 0.85 0.38 1.28 0.54 0.43 0.17 0.88 0.3 1.33 0.4 0.5 0.13 0.97 0.2 1.44 0.25v-0.050h0.030v-0.14c-1.12-0.3-2.14-0.84-3.040-1.56 3.77-2.17 6.87-6.11 6.97-9.99l-2.4 0.94-2.47 0.73v0.36c0 2.28-1.15 5.060-3.080 7.050-1.87-1.97-3-4.7-3-6.95 0-0.12 0-0.24 0.020-0.37l-2.3-0.68-2.77-1.070z"></path>
</symbol>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -9,9 +9,9 @@ import json
import os import os
import logging import logging
import requests import requests
import settings
import arrow import arrow
from time import sleep from time import sleep
import settings
logger = logging.getLogger("wayback") logger = logging.getLogger("wayback")
logger.setLevel(10) logger.setLevel(10)