dustin.web/templates/index.html

38 lines
1.1 KiB
HTML

{% extends "base.html" %}
{% block init %}
{% set page_class = "index" %}
{% endblock%}
{% block links %}
<link rel="alternate" type="application/atom+xml" title="Atom Feed"
href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
{% endblock %}
{% block header %}{% endblock %}
{% block content %}
<section class="home">
<h1 class="my-name">Dustin C. Hatch</h1>
<ul class="my-attributes">
<li>Software Engineer</li>
<li>Linux Administrator</li>
<li>Tinkerer</li>
<li>Writer</li>
</ul>
<div class="recent-posts">
<h2>Recent Posts</h2>
{% set blog = get_section(path="blog/_index.md") %}
{% for page in blog.pages | slice(end=3) %}
<a href="{{ page.path }}" class="post-summary">
<h3 class="post-title">{{ page.title }}</h3>
<div class="post-date">
<time datetime="{{ page.date }}">{{ page.date | date(format="%d %b %Y") }}</time>
</div>
{% if page.summary %}
<p>{{ page.summary }}</p>
{% else %}
<p>{{ page.content | striptags | split(pat=" ") | slice(end=20) | join(sep=" ") | safe }}{% if page.word_count > 20 %}…{% endif %}</p>
{% endif %}
</a>
{% endfor %}
</div>
</section>
{% endblock %}