Compare commits

..

1 commit

Author SHA1 Message Date
dependabot[bot]
b16a21e07e
Bump feedgen from 0.8.0 to 0.9.0
Bumps [feedgen](https://github.com/lkiesow/python-feedgen) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/lkiesow/python-feedgen/releases)
- [Commits](https://github.com/lkiesow/python-feedgen/compare/v0.8.0...v0.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-01-28 22:44:15 +00:00
15 changed files with 157 additions and 140 deletions

73
nasg.py
View file

@ -244,7 +244,18 @@ class Gone(object):
return {"source": self.source} return {"source": self.source}
async def render(self): async def render(self):
return if self.exists:
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):
@ -287,12 +298,18 @@ 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": {"inbound": [], "outbound": []}, "services": {
"software": {"name": "nasg", "version": "6.6"}, "inbound": [],
"outbound": [],
},
"software": {
"name": "nasg",
"version": "6.6"
},
"usage": { "usage": {
"localPosts": self.postcount, "localPosts": self.postcount,
"localComments": self.commentcount, "localComments": self.commentcount,
@ -750,6 +767,15 @@ 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, "")
@ -980,10 +1006,8 @@ class Singular(MarkdownDoc):
@property @property
def is_front(self): def is_front(self):
if self.is_reply: if self.category in settings.notinfeed:
return False return False
# if self.category in settings.notinfeed:
# return False
return True return True
@property @property
@ -1052,7 +1076,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
@ -1279,7 +1303,9 @@ class Singular(MarkdownDoc):
".copy", ".copy",
".cache", ".cache",
] ]
include = ["map.png"] include = [
"map.png"
]
files = glob.glob( files = glob.glob(
os.path.join(os.path.dirname(self.fpath), "*.*") os.path.join(os.path.dirname(self.fpath), "*.*")
) )
@ -1290,7 +1316,9 @@ class Singular(MarkdownDoc):
continue continue
t = os.path.join( t = os.path.join(
settings.paths.get("build"), self.name, fname settings.paths.get("build"),
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
@ -1306,18 +1334,8 @@ class Singular(MarkdownDoc):
style = settings.mapbox.style style = settings.mapbox.style
size = settings.mapbox.size size = settings.mapbox.size
lat = round( lat = round(float(self.photo.jsonld["locationCreated"]["geo"]["latitude"]), 3)
float( lon = round(float(self.photo.jsonld["locationCreated"]["geo"]["longitude"]), 3)
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):
@ -1326,7 +1344,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
@ -1687,12 +1705,11 @@ 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 = {}
@ -2075,8 +2092,7 @@ 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)
output = fg.rss_str(pretty=True) writepath(self.renderfile, 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):
@ -2692,6 +2708,7 @@ 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)
@ -2741,7 +2758,7 @@ def make():
try: try:
logger.info("starting syncing") logger.info("starting syncing")
os.system( os.system(
f"rsync -avuhH --exclude='.git' --delete-after {settings.paths.build}/ {settings.syncserver}:{settings.paths.remotewww}" f"rsync -avuhH --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,20 +141,8 @@ class PandocMD2TXT(Pandoc):
"+autolink_bare_uris", "+autolink_bare_uris",
"-smart", "-smart",
] ]
out_format = "markdown" out_format = "plain"
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

@ -1,13 +1,14 @@
arrow==0.15.4 arrow==0.15.4
certifi==2019.11.28 certifi==2019.11.28
chardet==3.0.4 chardet==3.0.4
feedgen==0.8.0 feedgen==0.9.0
filetype==1.0.5 filetype==1.0.5
idna==2.8 idna==2.8
Jinja2==2.10.3 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,7 +55,9 @@ 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": ["https://t.me/petermolnarnet"], "sameAs": [
"https://t.me/petermolnarnet"
],
"author": { "author": {
"@context": "http://schema.org", "@context": "http://schema.org",
"@type": "Person", "@type": "Person",
@ -71,7 +73,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",
}, },
@ -108,7 +110,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",
@ -118,7 +120,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"
}, },
], ],
} }
@ -155,7 +157,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"
} }
) )
@ -167,7 +169,8 @@ 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": "/usr/local/www/petermolnar.net", "remotewww": "/web/petermolnar.net/web",
"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",
@ -181,11 +184,11 @@ filenames = nameddict(
"atom": "atom.xml", "atom": "atom.xml",
"json": "index.json", "json": "index.json",
"md": "index.md", "md": "index.md",
"txt": "index.md", "txt": "index.txt",
"html": "index.html", "html": "index.html",
"gopher": "gophermap", "gopher": "gophermap",
"sitemap": "sitemap.txt", "sitemap": "sitemap.txt",
"worldmap": "map.html", "worldmap": "map.html"
} }
) )
@ -199,7 +202,7 @@ photo = nameddict(
"default": 720, "default": 720,
"sizes": { "sizes": {
# 90 = s # 90 = s
# 240: "_m", #240: "_m",
720: "", 720: "",
1280: "_b", 1280: "_b",
}, },
@ -207,7 +210,10 @@ photo = nameddict(
} }
) )
mapbox = nameddict({"style": "outdoors-v11", "size": "720x480"}) mapbox = nameddict({
"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/",
@ -236,12 +242,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 %}
<div id="main" class="h-feed hatom {{ category.name }}"> <main 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 %}
</div> </section>
{% endif %} {% endif %}
<div class="year"> <section 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 %}
</div> </section>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </main>
{% endblock %} {% endblock %}

View file

@ -14,15 +14,15 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="main" class="h-feed hatom"> <main id="main" class="h-feed hatom">
<div class="section" id="intro"> <section id="intro">
<div> <div>
{{ post.text }} {{ post.text }}
</div> </div>
</div> </section>
{% set isFrontPage = 1 %} {% set isFrontPage = 1 %}
<div id="latest"> <section 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 %}
</div> </section>
</div> </main>
{% 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 %}
<div id="main" class="h-feed hatom main"> <main id="main" class="h-feed hatom">
<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>
</div> </main>
{% endblock %} {% endblock %}

View file

@ -32,6 +32,9 @@
<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') %}
@ -58,8 +61,26 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="main"> <main id="main">
<div class="h-entry hentry" lang="{{ post.inLanguage }}" id="article"> <article 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>
@ -81,7 +102,7 @@
</h1> </h1>
{% if post.review %} {% if post.review %}
<div class="h-review hreview"> <section 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
@ -98,16 +119,16 @@
</span> </span>
</p> </p>
<p class="p-summary summary">{{ post.review.text }}</p> <p class="p-summary summary">{{ post.review.text }}</p>
</div> </section>
{% endif %} {% endif %}
{% if post.description|length %} {% if post.description|length %}
<div class="e-summary entry-summary"> <section class="e-summary entry-summary">
{{ post.description|relurl(baseurl) }} {{ post.description|relurl(baseurl) }}
</div> </section>
{% endif %} {% endif %}
<div class="section"> <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 %}
@ -118,12 +139,12 @@
<div class="e-content entry-content"> <div class="e-content entry-content">
{{ post.text|relurl(baseurl) }} {{ post.text|relurl(baseurl) }}
</div> </div>
</div> </section>
{% if 'WebPage' != post['@type'] %} {% if 'WebPage' != post['@type'] %}
{% if post.comment|length %} {% if post.comment|length %}
<div class="comments" id="comments"> <section class="comments">
<h2>Responses</h2> <h2><a id="comments"></a>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">
@ -165,12 +186,12 @@
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
</div> </section>
{% endif %} {% endif %}
{% endif %} {% endif %}
<div class="entry-footer"> <footer 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
@ -199,22 +220,6 @@
</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 %}
@ -235,8 +240,8 @@
<a class="u-url url" href="{{ post.url }}"></a> <a class="u-url url" href="{{ post.url }}"></a>
</p> </p>
{% endif %} {% endif %}
</div> </footer>
</div> </article>
</div> </main>
{% endblock %} {% endblock %}

View file

@ -12,7 +12,7 @@
{% block pagination %} {% block pagination %}
{% if category.paginated %} {% if category.paginated %}
<div id="pagination"> <section 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>
</div> </section>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="main" class="h-feed hatom {{ category.name }}"> <main 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 %}
</div> </section>
{% endif %} {% endif %}
<div class="year"> <section 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 %}
</div> </section class="year">
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </main>
{% endblock %} {% endblock %}

View file

@ -13,6 +13,9 @@
{% 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>
@ -36,9 +39,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 %}
<div id="header"> <header id="header">
<div> <div>
<div class="nav"> <nav>
<ul> <ul>
{% for key, data in menu.items() %} {% for key, data in menu.items() %}
<li> <li>
@ -51,7 +54,7 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </nav>
<div id="header-forms"> <div id="header-forms">
{% for action in site.potentialAction %} {% for action in site.potentialAction %}
@ -69,7 +72,7 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div> </header>
{% block content %} {% block content %}
{% endblock %} {% endblock %}
@ -77,7 +80,7 @@
{% block pagination %} {% block pagination %}
{% endblock %} {% endblock %}
<div id="footer" class="p-author h-card vcard"> <footer 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>,
@ -138,13 +141,6 @@
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>
@ -170,7 +166,7 @@
</ul> </ul>
</div> </div>
</div> </div>
</div> </footer>
<script> <script>
{% include 'themeswitcher.js' %} {% include 'themeswitcher.js' %}

View file

@ -1,5 +1,5 @@
<div class="h-entry hentry" lang="{{ post.inLanguage }}"> <article class="h-entry hentry" lang="{{ post.inLanguage }}">
<div class="entry-header"> <header 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>
</div> </header>
{% if post.description|length %} {% if post.description|length %}
{% set summary = post.description %} {% set summary = post.description %}
@ -47,7 +47,7 @@
</span> </span>
</div> </div>
<div class="entry-footer" aria-hidden="true" hidden="hidden"> <footer 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>
</div> </footer>
</div> </article>

View file

@ -51,18 +51,20 @@ td, th {
text-overflow:initial !important; text-overflow:initial !important;
} }
#header, .footnote-back {
#footer, display: none;
}
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,6 +376,11 @@ li p {
} }
*/ */
#syndication {
display: block;
text-align: right;
}
#fediversefollow label { #fediversefollow label {
font-weight: bold; font-weight: bold;
} }
@ -421,4 +426,4 @@ li p {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
} }

View file

@ -91,7 +91,4 @@
<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: 16 KiB

After

Width:  |  Height:  |  Size: 15 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)