Support setting an article as "wide"

This commit is contained in:
Tanner Collin 2021-04-09 05:17:51 +00:00
parent 3e0e0beb0f
commit 21c25413fc
4 changed files with 79 additions and 61 deletions

View File

@ -32,21 +32,33 @@
{% endblock %}
{% block content %}
<p><a href="/">← Return to Home</a></p>
<header>
<h1>{{ article.title }}</h1>
<div class="summary">
{{ article.summary }}
{% if article.wide %}
<div class="content content-wide">
{% else %}
<div class="content">
{% endif %}
<div class="topbar">
{{ info() }}
</div>
<p><a href="/">← Return to Home</a></p>
<header>
<h1>{{ article.title }}</h1>
<div class="summary">
{{ article.summary }}
</div>
<p class="metadata">
{{ article.locale_date }}
{% if article.modified %}
— updated {{ article.locale_modified }}
{% endif %}
</p>
</header>
<hr />
<article>
{{ article.content }}
</article>
</div>
<p class="metadata">
{{ article.locale_date }}
{% if article.modified %}
— updated {{ article.locale_modified }}
{% endif %}
</p>
</header>
<hr />
<article>
{{ article.content }}
</article>
{% endblock %}

View File

@ -44,27 +44,23 @@
</noscript>
</head>
{% if PROD %}
<body class="<?php echo $themeClass; ?>">
{% else %}
<body>
{% endif %}
{% if PROD %}
<body class="<?php echo $themeClass; ?>">
{% else %}
<body>
{% endif %}
{%- macro info() -%}
{% block info %}{% endblock %}
{%- endmacro -%}
{%- macro info() -%}
{% block info %}{% endblock %}
{%- endmacro -%}
<div class="container">
<div class="sidebar">
{{ info() }}
</div>
<div class="content">
<div class="topbar">
{{ info() }}
</div>
{% block content %}
{% endblock %}
</div>
{% block content %}
{% endblock %}
</div>
<p class="copyright">

View File

@ -23,42 +23,48 @@
{% endblock %}
{% block content %}
<p>
Hi, I'm Tanner! I do firmware and web development in Calgary.
</p>
<div class="content">
<h2>Contact Info</h2>
<div class="topbar">
{{ info() }}
</div>
<p>
Email: <a href="mailto:site2@tannercollin.com">site2@tannercollin.com</a> <br />
Telegram: <a href="https://t.me/tannercollin" target="_blank" rel="noreferrer noopener">@tannercollin</a>
</p>
<p>
Hi, I'm Tanner! I do firmware and web development in Calgary.
</p>
<h2>Resume</h2>
<h2>Contact Info</h2>
<ul>
<li>Firmware Engineer at <a href="https://cabanablockchain.com" target="_blank" rel="noreferrer noopener">Cabana Blockchain</a>, 2018</li>
<li>Lead Hardware Engineer at <a href="https://criticalcontrol.com/" target="_blank" rel="noreferrer noopener">Critical Control</a>, 20162018</li>
<li>Electrical Engineer at <a href="https://www.opener.aero/" target="_blank" rel="noreferrer noopener">Opener Aero</a>, 20162016</li>
<li>Electrical Engineer Intern at <a href="https://www.pason.com/" target="_blank" rel="noreferrer noopener">Pason Systems</a>, 20142015</li>
<li>BSc. Electrical Engineering from University of Calgary</li>
</ul>
<p>
Email: <a href="mailto:site2@tannercollin.com">site2@tannercollin.com</a> <br />
Telegram: <a href="https://t.me/tannercollin" target="_blank" rel="noreferrer noopener">@tannercollin</a>
</p>
<h2>Projects</h2>
<h2>Resume</h2>
<p>
My main hobby is working on technical projects. I typically design websites or
build tools that make my life easier. Sometimes art.
</p>
<ul>
<li>Firmware Engineer at <a href="https://cabanablockchain.com" target="_blank" rel="noreferrer noopener">Cabana Blockchain</a>, 2018</li>
<li>Lead Hardware Engineer at <a href="https://criticalcontrol.com/" target="_blank" rel="noreferrer noopener">Critical Control</a>, 20162018</li>
<li>Electrical Engineer at <a href="https://www.opener.aero/" target="_blank" rel="noreferrer noopener">Opener Aero</a>, 20162016</li>
<li>Electrical Engineer Intern at <a href="https://www.pason.com/" target="_blank" rel="noreferrer noopener">Pason Systems</a>, 20142015</li>
<li>BSc. Electrical Engineering from University of Calgary</li>
</ul>
<p>
You can find my code on <a href="https://github.com/tannercollin" target="_blank" rel="noreferrer noopener">GitHub</a>.
</p>
<h2>Projects</h2>
{% for article in articles_page.object_list if article.category.name == 'Projects' %}
<h3><a href="{{ article.url }}">{{ article.title }}</a></h3>
<div class="summary">
{{ article.summary }}
</div>
{% endfor %}
<p>
My main hobby is working on technical projects. I typically design websites or
build tools that make my life easier. Sometimes art.
</p>
<p>
You can find my code on <a href="https://github.com/tannercollin" target="_blank" rel="noreferrer noopener">GitHub</a>.
</p>
{% for article in articles_page.object_list if article.category.name == 'Projects' %}
<h3><a href="{{ article.url }}">{{ article.title }}</a></h3>
<div class="summary">
{{ article.summary }}
</div>
{% endfor %}
{% endblock %}

View File

@ -135,6 +135,10 @@ pre {
max-width: 36rem;
}
.content-wide {
max-width: none;
}
.content p {
font: 1.2rem/1.5 Apparatus SIL,serif;
}