Skip to content

Commit

Permalink
feat: add basic css styling
Browse files Browse the repository at this point in the history
  • Loading branch information
JanWennrichPCSG committed Oct 14, 2024
1 parent 1efeb37 commit fecf28f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 22 deletions.
45 changes: 37 additions & 8 deletions assets/style.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
:root {
--font-size: 16px;
--color-background: #242629;
--color-background-darkened: #16161a;
--color-background: #55423d;
--color-background-darkened: #3e332b;
--color-headline: #fffffe;
--color-paragraph: #94a1b2;
--color-button: #7f5af0;
--color-button-text: #fffffe;
--color-highlight: #7f5af0;
--color-secondary: #72757e;
--color-tertiary: #2cb67d;
--color-paragraph: #fff3ec;
--color-button: #ffc0ad;
--color-button-text: #271c19;
--color-highlight: #e78fb3;
--color-secondary: #ffc0ad;
--color-tertiary: #9656a1;
}

@font-face {
Expand All @@ -22,3 +22,32 @@ body {
font-family: "Oswald", sans-serif;
font-size: var(--font-size);
}

h1,h2,h3,h4,h5,h6 {
color: var(--color-headline);
}

.date {
margin-bottom: 50px;
}

.played-boardgames {
display: flex;
flex-direction: row;
flex-wrap: wrap;
column-gap: 50px;
row-gap: 50px;
}


.boardgame {
height: 150px;
width: auto;
display: flex;
justify-content: center;
align-items: baseline;
}

.boardgame-image {
object-fit: contain;
}
33 changes: 19 additions & 14 deletions templates/plays.twig
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<ol>
{% for date, plays in playsGroupedByDate %}
<section>
<span><time datetime="{{ date }}">{{ date|date("d.m.y") }}</time></span>
<ol>
{% for play in plays %}
<li>
<img src="{{ play.boardgame.thumbnailUrl }}" alt="{{ play.boardgame.title }}" title="{{ play.boardgame.title }}"/>
</li>
{% endfor %}
</ol>
</section>
{% endfor %}
</ol>
{% for date, plays in playsGroupedByDate %}
<section class="date">
<span class="date-label">
<time datetime="{{ date }}">{{ date|date("d.m.y") }}</time>
</span>
<div class="played-boardgames">
{% for play in plays %}
<article class="boardgame">
<img class="boardgame-image"
src="{{ play.boardgame.thumbnailUrl }}"
alt="{{ play.boardgame.title }}"
title="{{ play.boardgame.title }}"
loading="lazy"
/>
</article>
{% endfor %}
</div>
</section>
{% endfor %}

0 comments on commit fecf28f

Please sign in to comment.