Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tags to blog posts #503

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
<article class="post">
<header>
<h1>{{ page.title }}</h1>
<div class="subtitle">
<time pubdate datetime="{{ page.date | date_to_xmlschema }}">
{{ page.date | date: "%B %-d, %Y" }}
</time>

<time pubdate datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %-d, %Y" }}</time>
<div class="tags">
{% for tag in page.tag %}
<div class="tag"><span>{{ tag }}</span></div>
{% endfor %}
</div>
</div>
{% include authors.html authors=page.author %}
</header>

Expand Down
1 change: 1 addition & 0 deletions _posts/2023-11-06-swift-5.9-backtraces.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ published: true
date: 2023-11-08 10:00:00
title: On-Crash Backtraces in Swift
author: [al45tair]
tag: [swift 5.9, linux, debugging]
---

The new Swift 5.9 release contains a number of helpful, new features for debugging code, including an out-of-process, interactive
Expand Down
48 changes: 34 additions & 14 deletions assets/stylesheets/_screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -490,21 +490,41 @@ article {
padding-top: 0em;
}

time {
display: block;
text-transform: uppercase;
font-size: 14px;
font-weight: 400;
color: var(--color-figure-gray-tertiary);
margin-right: 3em;
margin-bottom: 2em;
}
.subtitle {
display: flex;
justify-content: space-between;
margin-bottom: 1em;

.tags {
display: block;
font-size: 12px;
font-weight: 400;
margin-top: 0;
time {
flex-shrink: 0;
margin-top: 0.2em + 0.15em;
text-transform: uppercase;
font-size: 0.8em;
font-weight: 400;
color: var(--color-figure-gray-tertiary);
}

.tags {
display: flex;
flex-direction: row;
/* Allow tags to wrap to additional lines */
flex-wrap: wrap;
/* Add a small gap between additional lines */
gap: .4em;
/* Align to trailing edge */
justify-content: flex-end;

.tag {
text-transform: uppercase;
font-size: 0.8em;
font-weight: 400;
margin-left: 0.5em; /* Adjust margin as needed for spacing between tags */
color: var(--color-figure-gray-tertiary);
border: 0.15em solid var(--color-nav-rule);
border-radius: .5rem;
padding: .15em .4em;
}
}
}
}

Expand Down
12 changes: 11 additions & 1 deletion blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@
<article id="{{ post.id }}" class="summary">
<header>
<h2 class="title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
<time pubdate datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %-d, %Y" }}</time>
<div class="subtitle">
<time pubdate datetime="{{ post.date | date_to_xmlschema }}">
{{ post.date | date: "%B %-d, %Y" }}
</time>

<div class="tags">
{% for tag in post.tag %}
<div class="tag"><span>{{ tag }}</span></div>
{% endfor %}
</div>
</div>
</header>
<section class="excerpt">
{{ post.excerpt }}
Expand Down