Couple of li'l adjustments to styles, and formatting of excerpts
All checks were successful
Build and copy to prod / build-and-copy (push) Successful in 1m42s

This commit is contained in:
Lewis Dale 2024-03-14 07:34:33 +00:00
parent 5c0928922f
commit a540c0f1a5
4 changed files with 15 additions and 19 deletions

View File

@ -1,6 +1,10 @@
module.exports = function (eleventyConfig) { module.exports = function (eleventyConfig) {
eleventyConfig.addFilter('excerpt', (content, limit = 250) => { eleventyConfig.addFilter('excerpt', (content, limit = 250) => {
const excerpt = content.replace(/(<([^>]+)>)/gi, "").slice(0, limit) + " […]"; const withoutTags = content.replace(/(<([^>]+)>)/gi, "");
return excerpt;
if (withoutTags.length > limit) {
return withoutTags.slice(0, limit) + " […]";
}
return withoutTags;
}); });
} }

View File

@ -51,11 +51,8 @@
</ul> </ul>
</nav> </nav>
<a href="/feed/" class="rss"> <a href="/feed/" class="rss" aria-label="RSS feed">
<svg xmlns="http://www.w3.org/2000/svg" aria-label="RSS" role="img" viewBox="0 0 512 512"> <i class="fa-solid fa-rss"></i>
<path d="m0 0H512V512H0" fill="none"/>
<path fill="currentColor" d="m109 271A132 133 0 01241 403h60A192 193 0 00109 211v-54A246 247 0 01355 403h60A306 307 0 00109 97m35 235a35 35 0 102 0"/>
</svg>
</a> </a>
<fieldset class="color-scheme"> <fieldset class="color-scheme">

View File

@ -1,17 +1,10 @@
.rss { .rss {
flex-grow: initial; flex-grow: initial;
font-size: var(--text-size-s);
img, svg { padding: 0 var(--space-size-2xs);
width: 20px;
aspect-ratio: 1;
height: auto;
vertical-align: middle;
}
&:hover { &:hover {
svg {
background-color: var(--color-primary); background-color: var(--color-primary);
color: var(--color-secondary); color: var(--color-secondary);
} }
}
} }

View File

@ -2,6 +2,7 @@
title: Saved links title: Saved links
layout: base.njk layout: base.njk
--- ---
<main class="wrapper-lg stack-lg">
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<p> <p>
@ -19,3 +20,4 @@ layout: base.njk
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
</main>