Skip to content

Commit

Permalink
center images in toki pages
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeee committed Jan 30, 2024
1 parent 87c88ec commit 0fffdaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addHandlebarsHelper(
"sitelen",
(file, alt) =>
`<a href="/images/${file}"><img src="/images/${file}" alt="${alt}"></a>`
`<a class="image" href="/images/${file}"><img src="/images/${file}" alt="${alt}"></a>`
);

// image shortcode - reduce filesize etc
Expand Down
6 changes: 4 additions & 2 deletions public/stylesheet-toki-wan.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ h1 {
text-align: justify;
}

.nimi img {
p:has(.image) {
align-self: center;
}
.nimi .image img {
max-width: 100%;
max-height: 20rem;
margin: 0 auto;
}

0 comments on commit 0fffdaf

Please sign in to comment.