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.
@@ -244,18 +244,7 @@ def tmplvars(self):
return {"source": self.source} async def render(self): - 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() - # ) - + return class FediverseStats(object): def __init__(self, postcount=0, commentcount=0):@@ -760,15 +749,6 @@ def __init__(self, parent, size, crop=False):
self.parent = parent self.size = size 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 def suffix(self):@@ -2712,7 +2692,6 @@
# make gone and redirect arrays for PHP for e in glob.glob(os.path.join(content, "*", "*.del")): post = Gone(e) - queue.put(post.render()) rules.add_gone(post.source) for e in glob.glob(os.path.join(content, "*", "*.url")): post = Redirect(e)
@@ -11,23 +11,23 @@ <link rel="feed" title="{{ category.title}} feed" href="http://www.unmung.com/feed?feed={{ category.feed|urlencode }}" />
{% endblock %} {% block content %} -<main id="main" class="h-feed hatom {{ category.name }}"> +<div id="main" class="h-feed hatom {{ category.name }}"> {% set year = [0] %} {% for post in posts %} {% set _year = year.pop() %} {% if _year != post.copyrightYear %} {% if not loop.first %} - </section> + </div> {% endif %} - <section class="year"> + <div class="year"> <h2>{{ post.copyrightYear }}</h2> {% endif %} {% set _ = year.append(post.copyrightYear)%} {% include 'meta-article.j2.html' %} {% if loop.last %} - </section> + </div> {% endif %} {% endfor %} -</main> +</div> {% endblock %}
@@ -14,15 +14,15 @@ <link rel="feed" title="{{ site.name }} feed" href="http://www.unmung.com/feed?feed={{ feed|urlencode }}" />
{% endblock %} {% block content %} -<main id="main" class="h-feed hatom"> - <section id="intro"> +<div id="main" class="h-feed hatom"> + <div class="section" id="intro"> <div> {{ post.text }} </div> - </section> + </div> {% set isFrontPage = 1 %} - <section id="latest"> + <div id="latest"> <h1>Latest entries</h1> {% for category, post in posts %} <h2>in:@@ -33,6 +33,6 @@ </a>
</h2> {% include 'meta-article.j2.html' %} {% endfor %} - </section> -</main> + </div> +</div> {% endblock %}
@@ -120,7 +120,7 @@ {% block lang %}{% endblock %}
{% block title %}Search results for: <?php echo($q); ?>{% endblock %} {% 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> <dl> <?php@@ -129,5 +129,5 @@ printf('<dt><a href="%s">%s</a></dt><dd>%s</dd>', relurl(baseurl, $row['url']), $row['title'], $row["description"]);
} ?> </dl> -</main> +</div> {% endblock %}
@@ -61,8 +61,8 @@ </li>
{% endblock %} {% block content %} -<main id="main"> - <article class="h-entry hentry" lang="{{ post.inLanguage }}" id="article"> +<div id="main"> + <div class="h-entry hentry" lang="{{ post.inLanguage }}" id="article"> <h1 class="p-name entry-title"> {% if post.mentions %} <span>@@ -84,7 +84,7 @@ {% endif %}
</h1> {% 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> <p> By@@ -101,16 +101,16 @@ <span class="best">{{ post.review.reviewRating.bestRating }}</span>
</span> </p> <p class="p-summary summary">{{ post.review.text }}</p> - </section> + </div> {% endif %} {% if post.description|length %} - <section class="e-summary entry-summary"> + <div class="e-summary entry-summary"> {{ post.description|relurl(baseurl) }} - </section> + </div> {% endif %} - <section> + <div class="section"> {% if post.image|length %} {% for image in post.image %} {% if image.representativeOfPage %}@@ -121,12 +121,12 @@ {% endif %}
<div class="e-content entry-content"> {{ post.text|relurl(baseurl) }} </div> - </section> + </div> {% if 'WebPage' != post['@type'] %} {% if post.comment|length %} - <section class="comments"> - <h2><a id="comments"></a>Responses</h2> + <div class="comments" id="comments"> + <h2>Responses</h2> <ol> {% for comment in post.comment %} <li class="h-entry p-comment hentry">@@ -168,12 +168,12 @@ <a href="{{ post.url }}" class="u-in-reply-to"></a>
</li> {% endfor %} </ol> - </section> + </div> {% endif %} {% endif %} - <footer class="entry-footer"> + <div class="entry-footer"> <p>Licenced under <a rel="license" href="{{ post.license }}" class="u-license">{{ post.license | extractlicense }}</a>, created by@@ -238,8 +238,8 @@ </span>
<a class="u-url url" href="{{ post.url }}"></a> </p> {% endif %} - </footer> + </div> - </article> -</main> + </div> +</div> {% endblock %}
@@ -12,7 +12,7 @@ {% endblock %}
{% block pagination %} {% if category.paginated %} -<section id="pagination"> +<div id="pagination"> <ol> {% for y, url in category.years.items() %} {% if (y == category.year) or (not category.year and loop.first) %}@@ -30,28 +30,28 @@ </li>
{% endif %} {% endfor %} </ol> -</section> +</div> {% endif %} {% endblock %} {% block content %} -<main id="main" class="h-feed hatom {{ category.name }}"> +<div id="main" class="h-feed hatom {{ category.name }}"> {% set year = [0] %} {% for post in posts %} {% set _year = year.pop() %} {% if not category.paginated and _year != post.copyrightYear %} {% if not loop.first %} - </section> + </div> {% endif %} - <section class="year"> - <h2>{{ post.copyrightYear }}</h2> + <div class="year"> + <h2>{{ post.copyrightYear }}</h2> {% endif %} {% set _ = year.append(post.copyrightYear)%} {% include 'meta-article.j2.html' %} {% if not category.paginated and loop.last %} - </section class="year"> + </div> {% endif %} {% endfor %} -</main> +</div> {% endblock %}
@@ -39,9 +39,9 @@ or (post is defined and post.genre == name )
or ( category is defined and category.name == name )%}class="active"{% endif %} {% endmacro %} -<header id="header"> +<div id="header"> <div> - <nav> + <div class="nav"> <ul> {% for key, data in menu.items() %} <li>@@ -54,7 +54,7 @@ </a>
</li> {% endfor %} </ul> - </nav> + </div> <div id="header-forms"> {% for action in site.potentialAction %}@@ -72,7 +72,7 @@ {% endif %}
{% endfor %} </div> </div> -</header> +</div> {% block content %} {% endblock %}@@ -80,7 +80,7 @@
{% block pagination %} {% endblock %} -<footer id="footer" class="p-author h-card vcard"> +<div id="footer" class="p-author h-card vcard"> <div> <p> <a href="https://creativecommons.org/">CC</a>,@@ -173,7 +173,7 @@ {% endfor %}
</ul> </div> </div> -</footer> +</div> <script> {% include 'themeswitcher.js' %}
@@ -1,5 +1,5 @@
-<article class="h-entry hentry" lang="{{ post.inLanguage }}"> - <header class="entry-header"> +<div class="h-entry hentry" lang="{{ post.inLanguage }}"> + <div class="entry-header"> <h3 class="p-name entry-title"> {% if post.mentions %} <span>@@ -21,7 +21,7 @@ {% endif %}
</h3> <a href="{{ post.url }}" class="u-url bookmark"></a> - </header> + </div> {% if post.description|length %} {% set summary = post.description %}@@ -47,7 +47,7 @@ </a>
</span> </div> - <footer class="entry-footer" aria-hidden="true" hidden="hidden"> + <div class="entry-footer" aria-hidden="true" hidden="hidden"> Published at <time datetime="{{ post.datePublished }}" class="dt-published published">{{ post.datePublished|printdate }}</time> <time datetime="{{ post.dateModified }}" class="dt-updated updated"></time>@@ -57,5 +57,5 @@ <img class="u-photo photo" src="{{ post.author.image|relurl(baseurl) }}" alt="" />
<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> </span> - </footer> -</article> + </div> +</div>
@@ -51,10 +51,6 @@ overflow:visible !important;
text-overflow:initial !important; } - { - display: none; -} - #header, #footer, video,