{% if article and article.cover %}
<nav class="m-navpanel m-container">
<div class="m-row">
- <div class="m-col-s-4 m-col-l-2 {% if M_SHOW_AUTHOR_LIST %}m-push-l-1{% elif tags %}m-push-s-2 m-push-l-3{% else %}m-push-s-4 m-push-l-5{% endif %}">
+ {# If we have both an author list and tags, put tags into a wider column
+ in the center on M and L size and onto a full-width row below the
+ category/authors on S size -- that way if there's many tags, it
+ doesn't cause a bottom of the page to look weirdly misbalanced.
+
+ In other cases put two columns next to each other with the same size,
+ as there's not really much we can do to make that work. See the
+ article-jumbo.html in Blog, BlogAuthorList and BlogAuthorListTags
+ tests for a visual, don't forget to resize your browser to all
+ T/S/M/l stops when making further changes. #}
+ <div class="{% if M_SHOW_AUTHOR_LIST and tags %}m-col-s-6 m-col-m-3 m-col-l-2 m-push-l-1{% else %}m-col-s-4 m-col-l-2 {% if M_SHOW_AUTHOR_LIST %}m-push-l-1{% elif tags %}m-push-s-2 m-push-l-3{% else %}m-push-s-4 m-push-l-5{% endif %}{% endif %}">
<h3>{{ "Categories"|hyphenate(lang='en') }}</h3>
<ol class="m-block-bar-s">
{% for cat, null in categories %}
</ol>
</div>
{% if M_SHOW_AUTHOR_LIST %}
- <div class="m-col-s-4 m-col-l-2 {% if tags %}m-push-l-3{% else %}m-push-s-4 m-push-l-7{% endif %}">
+ <div class="{% if tags %}m-col-s-6 m-col-m-3 m-push-m-6 m-col-l-2 m-push-l-7{% else %}m-col-s-4 m-col-l-2 m-push-s-4 m-push-l-7{% endif %}">
<h3>{{ "Authors"|hyphenate(lang='en') }}</h3>
<ol class="m-block-bar-s">
{% for author, null in authors %}
</div>
{% endif %}
{% if tags %}
- <div class="m-col-s-4 m-col-l-2 {% if M_SHOW_AUTHOR_LIST %}m-push-l-5{% else %}m-push-s-2 m-push-l-5{% endif %}">
+ <div class="{% if M_SHOW_AUTHOR_LIST and tags %}m-col-s-12 m-col-m-6 m-col-l-4 m-pull-m-3 m-pull-l-0{% else %}m-col-s-4 m-col-l-2 {% if M_SHOW_AUTHOR_LIST %}m-push-l-5{% else %}m-push-s-2 m-push-l-5{% endif %}{% endif %}">
<h3>{{ "Tag cloud"|hyphenate(lang='en') }}</h3>
<ul class="m-tagcloud">
{% set max_articles_per_tag = tags|map(attribute='1')|map('length')|sort|last %}
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>A jumbo article | A Pelican Blog</title>
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i" />
+ <link rel="stylesheet" href="static/m-dark.css" />
+ <link rel="canonical" href="article-jumbo.html" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation" class="m-navbar-cover">
+ <div class="m-container">
+ <div class="m-row">
+ <a href="./" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m">A Pelican Blog</a>
+ </div>
+ </div>
+</nav></header>
+<main>
+ <article id="m-jumbo">
+ <header>
+ <div id="m-jumbo-image" style="background-image: url('image.jpg');">
+ <div id="m-jumbo-cover">
+ <div class="m-container">
+ <div class="m-row">
+ <div class="m-col-t-6 m-col-s-5 m-push-s-1 m-text-left">Dec 09, 2017</div>
+ <div class="m-col-t-6 m-col-s-5 m-push-s-1 m-text-right"><a href="author-an-author.html">An Author</a></div>
+ </div>
+ <div class="m-row">
+ <div class="m-col-t-12 m-col-s-10 m-push-s-1 m-col-m-8 m-push-m-2">
+ <h1><a href="article-jumbo.html" rel="bookmark" title="Permalink to A jumbo article">A jumbo article</a></h1>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </header>
+ <footer class="m-container">
+ <div class="m-row">
+ <div class="m-col-m-10 m-push-m-1 m-nopadb">
+ <p>Posted by <a href="author-an-author.html">An Author</a> on <time datetime="2017-12-09T00:00:00+00:00">Dec 09, 2017</time> in <a href="category-misc.html">misc</a>. Tags: <a href="tag-all.html">All</a>, <a href="tag-the.html">the</a>, <a href="tag-cool.html">Cool</a>, <a href="tag-tags.html">Tags</a>, <a href="tag-which.html">Which</a>, <a href="tag-are.html">Are</a>, <a href="tag-really-really-really.html">Really really really</a>, <a href="tag-a-lot.html">A Lot</a>.</p>
+ </div>
+ </div>
+ </footer>
+ </article>
+ <nav class="m-navpanel m-container">
+ <div class="m-row">
+ <div class="m-col-s-6 m-col-m-3 m-col-l-2 m-push-l-1">
+ <h3>Categories</h3>
+ <ol class="m-block-bar-s">
+ <li><a href="category-misc.html">misc</a></li>
+ </ol>
+ </div>
+ <div class="m-col-s-6 m-col-m-3 m-push-m-6 m-col-l-2 m-push-l-7">
+ <h3>Authors</h3>
+ <ol class="m-block-bar-s">
+ <li><a href="author-an-author.html">An Author</a></li>
+ </ol>
+ </div>
+ <div class="m-col-s-12 m-col-m-6 m-col-l-4 m-pull-m-3 m-pull-l-0">
+ <h3>Tag cloud</h3>
+ <ul class="m-tagcloud">
+ <li class="m-tag-5"><a href="tag-a-lot.html">A Lot</a></li>
+ <li class="m-tag-5"><a href="tag-all.html">All</a></li>
+ <li class="m-tag-5"><a href="tag-are.html">Are</a></li>
+ <li class="m-tag-5"><a href="tag-cool.html">Cool</a></li>
+ <li class="m-tag-5"><a href="tag-really-really-really.html">Really really really</a></li>
+ <li class="m-tag-5"><a href="tag-tags.html">Tags</a></li>
+ <li class="m-tag-5"><a href="tag-the.html">the</a></li>
+ <li class="m-tag-5"><a href="tag-which.html">Which</a></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+</main>
+</body>
+</html>
--- /dev/null
+A jumbo article
+###############
+
+:date: 2017-12-09
+:cover: image.jpg
+:tags: All, the, Cool, Tags, Which, Are, Really really really, A Lot
</article>
<nav class="m-navpanel m-container">
<div class="m-row">
- <div class="m-col-s-4 m-col-l-2 m-push-l-1">
+ <div class="m-col-s-6 m-col-m-3 m-col-l-2 m-push-l-1">
<h3>Categories</h3>
<ol class="m-block-bar-s">
<li><a href="category-and-in-category.html?and&in&url=""">And <&> in category</a></li>
</ol>
</div>
- <div class="m-col-s-4 m-col-l-2 m-push-l-3">
+ <div class="m-col-s-6 m-col-m-3 m-push-m-6 m-col-l-2 m-push-l-7">
<h3>Authors</h3>
<ol class="m-block-bar-s">
<li><a href="author-and-in-author.html?and&in&url=""">And <&> in author</a></li>
</ol>
</div>
- <div class="m-col-s-4 m-col-l-2 m-push-l-5">
+ <div class="m-col-s-12 m-col-m-6 m-col-l-4 m-pull-m-3 m-pull-l-0">
<h3>Tag cloud</h3>
<ul class="m-tagcloud">
<li class="m-tag-5"><a href="tag-and-in-tag.html?and&in&url=""">And <&> in tag</a></li>
})
# Verify both right sidebar and bottom columns on jumbo articles. It's
- # without tags, which is the third option to be considered there.
+ # without tags, which is tested in AuthorListTags below.
self.assertEqual(*self.actual_expected_contents('index.html'))
self.assertEqual(*self.actual_expected_contents('article-jumbo.html'))
+class AuthorListTags(BlogTestCase):
+ def __init__(self, *args, **kwargs):
+ super().__init__(__file__, 'author_list_tags', *args, **kwargs)
+
+ def test(self):
+ self.run_pelican({
+ 'AUTHOR': "An Author",
+ 'M_SHOW_AUTHOR_LIST': True
+ })
+
+ # Verify alignment of categories, tags and authors on the bottom of
+ # the jumbo article
+ self.assertEqual(*self.actual_expected_contents('article-jumbo.html'))
+
class FooterLinks(BlogTestCase):
def __init__(self, *args, **kwargs):
super().__init__(__file__, 'footer_links', *args, **kwargs)
</article>
<nav class="m-navpanel m-container">
<div class="m-row">
- <div class="m-col-s-4 m-col-l-2 m-push-l-1">
+ <div class="m-col-s-6 m-col-m-3 m-col-l-2 m-push-l-1">
<h3>Cat­e­gories</h3>
<ol class="m-block-bar-s">
<li><a href="category-a-category.html">A category</a></li>
</ol>
</div>
- <div class="m-col-s-4 m-col-l-2 m-push-l-3">
+ <div class="m-col-s-6 m-col-m-3 m-push-m-6 m-col-l-2 m-push-l-7">
<h3>Au­thors</h3>
<ol class="m-block-bar-s">
<li><a href="author-an-author.html">An Author</a></li>
</ol>
</div>
- <div class="m-col-s-4 m-col-l-2 m-push-l-5">
+ <div class="m-col-s-12 m-col-m-6 m-col-l-4 m-pull-m-3 m-pull-l-0">
<h3>Tag cloud</h3>
<ul class="m-tagcloud">
<li class="m-tag-5"><a href="tag-tagging-a-name.html">Tagging a name</a></li>
</article>
<nav class="m-navpanel m-container">
<div class="m-row">
- <div class="m-col-s-4 m-col-l-2 m-push-l-1">
+ <div class="m-col-s-6 m-col-m-3 m-col-l-2 m-push-l-1">
<h3>Categories</h3>
<ol class="m-block-bar-s">
<li><a href="category-a-category.html">A category</a></li>
<li><a href="category-minimal-category.html">Minimal category</a></li>
</ol>
</div>
- <div class="m-col-s-4 m-col-l-2 m-push-l-3">
+ <div class="m-col-s-6 m-col-m-3 m-push-m-6 m-col-l-2 m-push-l-7">
<h3>Authors</h3>
<ol class="m-block-bar-s">
<li><a href="author-an-author.html">An Author</a></li>
<li><a href="author-minimal-author.html">Minimal author</a></li>
</ol>
</div>
- <div class="m-col-s-4 m-col-l-2 m-push-l-5">
+ <div class="m-col-s-12 m-col-m-6 m-col-l-4 m-pull-m-3 m-pull-l-0">
<h3>Tag cloud</h3>
<ul class="m-tagcloud">
<li class="m-tag-5"><a href="tag-a-tag.html">A tag</a></li>