From 72ae001fd378026c7084ef33fb8920ff2445aff1 Mon Sep 17 00:00:00 2001 From: CheariX Date: Tue, 23 Apr 2024 00:39:22 +0000 Subject: [PATCH] Feat reworked project layout (closing #2246) (#2357) The current state of project looks a bit unharmonized. # Vertical layout before: Bildschirmfoto 2024-04-20 um 18 09 16 # Vertical layout after: Bildschirmfoto 2024-04-20 um 18 10 28 # Horizontal layout before: Bildschirmfoto 2024-04-20 um 18 08 54 # Horizontal layout after: Bildschirmfoto 2024-04-20 um 18 07 46 *** These improvements are not perfect, but to be honest, I have no deep experiences with bootstrap. Actually, I just read the [docs](https://getbootstrap.com/docs/4.4/components/card/) and tried my best. But I think it looks way better than before. I'm pretty happy with the vertical layout, but the horizontal could be improved. I tried various things to get a better alignment of the image, without any success. In theroy, there is e.g. `card-img-top`, but I could not make it work. I changed the project descriptions to make some of these edge-cases visible. Feedback and improvements (especially code) are more than welcome Closes #2246 --- _includes/projects.liquid | 8 ++++---- _includes/projects_horizontal.liquid | 12 ++++++------ _pages/blog.md | 2 +- _pages/projects.md | 8 ++++---- _projects/1_project.md | 2 +- _projects/3_project.md | 2 +- _sass/_base.scss | 27 ++++----------------------- 7 files changed, 21 insertions(+), 40 deletions(-) diff --git a/_includes/projects.liquid b/_includes/projects.liquid index 926ad1e7da39..0ada935d291a 100644 --- a/_includes/projects.liquid +++ b/_includes/projects.liquid @@ -1,7 +1,6 @@ -
-
+
-
+
{% if project.img %} {% include figure.liquid @@ -9,10 +8,11 @@ path=project.img sizes = "250px" alt="project thumbnail" + class="card-img-top" %} {% endif %}
-

{{ project.title }}

+

{{ project.title }}

{{ project.description }}

{% if project.github %} diff --git a/_includes/projects_horizontal.liquid b/_includes/projects_horizontal.liquid index b0f12b4c8907..8630e69e1d72 100644 --- a/_includes/projects_horizontal.liquid +++ b/_includes/projects_horizontal.liquid @@ -1,15 +1,15 @@ -
+
-
-
+
+
{% if project.img %} -
- {% include figure.liquid loading="eager" path=project.img sizes="(min-width: 768px) 156px, 50vw" alt="project thumbnail" %} +
+ {% include figure.liquid loading="eager" path=project.img sizes="(min-width: 768px) 156px, 50vw" alt="project thumbnail" class="card-img" %}
{% endif %}
-

{{ project.title }}

+

{{ project.title }}

{{ project.description }}

{% if project.github %} diff --git a/_pages/blog.md b/_pages/blog.md index a4ae82162620..62ce6dabf9ab 100644 --- a/_pages/blog.md +++ b/_pages/blog.md @@ -64,7 +64,7 @@ pagination: {% assign is_even = featured_posts.size | modulo: 2 %}