diff --git a/src/Gemfile.lock b/src/Gemfile.lock index e6944d9..7fc24d3 100644 --- a/src/Gemfile.lock +++ b/src/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/Garanas/jekyll-transcode-image-filters - revision: cfbd3a11d44b97e68b07a18f9b5186661f650b0c + revision: 51ef1db66f135f9849e1a26a8d43010bf2570ed0 specs: jekyll-transcode-image-filters (0.0.1) jekyll (> 3.3, < 5.0) diff --git a/src/_includes/post/regular.html b/src/_includes/post/regular.html deleted file mode 100644 index fddb844..0000000 --- a/src/_includes/post/regular.html +++ /dev/null @@ -1,27 +0,0 @@ -{% comment %} - Input parameters: - - post: an instance of a post -{% endcomment %} - - -
- {% include components/thumbnail.html path=include.post.path alt=include.post.alt %} - - {%- if include.post.event -%} - - {% include post/event/schedule.html event=include.post.event %} - - {%- endif -%} -
-
-

{{ include.post.title | escape }}

- - {% comment %} - We can only support so many characters in the overview, therefore we truncate it. - {% endcomment %} - - - {{ include.post.excerpt | strip_html | truncate: 400 }} - -
-
diff --git a/src/_includes/post/small.html b/src/_includes/post/small.html index 958ca07..25ecacc 100644 --- a/src/_includes/post/small.html +++ b/src/_includes/post/small.html @@ -7,7 +7,7 @@ {% include components/thumbnail.html path=include.post.image.path alt=include.post.image.alt %} {%- if include.post.event -%} - + {% include post/event/schedule.html event=include.post.event %} {%- endif -%} diff --git a/src/_sass/components/_thumbnail.scss b/src/_sass/components/_thumbnail.scss index 5276015..1332e9c 100644 --- a/src/_sass/components/_thumbnail.scss +++ b/src/_sass/components/_thumbnail.scss @@ -2,8 +2,9 @@ border-radius: 5px; aspect-ratio: 16/9; + width: 100%; height: 100%; - + object-fit: cover; object-position: center; } diff --git a/src/_sass/initialize.scss b/src/_sass/initialize.scss index d863936..7efc401 100644 --- a/src/_sass/initialize.scss +++ b/src/_sass/initialize.scss @@ -44,5 +44,5 @@ $on-large: $on-laptop !default; @import // Hook to override predefined variables. "normalize", - "base", "header", "footer", "wrapper", "layout", "icomoon", "post/regular", "post/featured", "post/small", "post/event", "post/page", "post/common", + "base", "header", "footer", "wrapper", "layout", "icomoon", "post/featured", "post/small", "post/event", "post/page", "post/common", "components/copy-button", "components/url-button", "components/brand", "components/divider", "components/banner", "components/thumbnail", "components/socials"; diff --git a/src/_sass/post/_regular.scss b/src/_sass/post/_regular.scss deleted file mode 100644 index 3a23f4b..0000000 --- a/src/_sass/post/_regular.scss +++ /dev/null @@ -1,64 +0,0 @@ -.post-regular-container { - display: grid; - grid-template-columns: repeat(3, 1fr); - gap: 1em; - margin: 1em; - - // mobile layout - @media (max-width: 768px) { - grid-template-columns: 1fr; - } - margin: 0; - list-style: none; - - grid-column: content-start / content-end; - grid-row: 2/2; -} - -.post-regular-item-container { - display: flex; - flex-direction: column; - - height: 100%; - width: 100%; -} - -.post-regular-text-container { - display: block; - padding: 1em; -} - -.post-regular-header { -} - -.post-regular-image-container { - position: relative; - overflow: hidden; - /* Ensures excess image content is clipped */ - display: flex; - justify-content: center; - /* Center the image horizontally */ - align-items: center; - /* Center the image vertically */ - - aspect-ratio: 16 / 9; - width: 100%; -} - -.post-regular-image { - border-radius: 5px; - - height: 100%; - width: auto; -} - -.post-regular-meta { - font-size: $small-font-size; - color: $brand-color; - position: absolute; - bottom: 10px; - left: 10px; - padding: 5px; - background-color: $background-color; - border-radius: 5px; -} diff --git a/src/_sass/post/_small.scss b/src/_sass/post/_small.scss index 0d40e3e..03a2bf4 100644 --- a/src/_sass/post/_small.scss +++ b/src/_sass/post/_small.scss @@ -5,21 +5,17 @@ margin: 0; list-style: none; - display: flex; - flex-direction: row; - flex-wrap: wrap; - gap: 1em; - @media (min-width: $on-medium) { - padding: 1em; - } + display: grid; + grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); + gap: 1rem; + + gap: 1em; } .post-small-item-container { - flex-grow: 1; - flex-shrink: 1; - display: flex; + flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 0.5rem 1rem; @@ -30,18 +26,18 @@ } .post-small-text-container { + flex-grow: 3; + display: flex; - flex-direction: row; + justify-content: space-between; + flex-direction: column; padding: 1em; - - flex-grow: 3; - flex-shrink: 1; - flex-basis: 400px; } .post-small-text-body-container { display: flex; + justify-content: space-between; flex-direction: column; gap: 0.5rem 1rem; } @@ -57,15 +53,10 @@ .post-small-image-container { position: relative; - flex-grow: 1; - flex-shrink: 1; + max-height: 200px; flex-basis: 400px; - // Keep the images of a given row the same size - display: flex; - justify-content: center; - align-items: start; - overflow: hidden; + overflow: hidden; } .post-small-meta { @@ -81,8 +72,7 @@ .post-small-actions { display: flex; - justify-self: end; - flex-direction: column; + justify-content: end; padding: 1ch; gap: 1em;