Design tweaks

This commit is contained in:
Maël Brunet 2021-05-22 18:32:25 +02:00
parent 4513881b55
commit b51b8c5a2c
8 changed files with 27 additions and 12 deletions

View file

@ -23,7 +23,7 @@ bodyClass: c-home
{% if collections["Favourite ⭐"] %} {% if collections["Favourite ⭐"] %}
<section class="u-bgc-grey-100"> <section class="u-bgc-grey-100">
<div class="l-container"> <div class="l-container">
<h2>{{ favouriteRecipes }}</h2> <h2 class="u-mb-large">{{ favouriteRecipes }}</h2>
<div class="c-card__wrapper"> <div class="c-card__wrapper">
{% set favouriteRecipes = collections["Favourite ⭐"] | limit(4) %} {% set favouriteRecipes = collections["Favourite ⭐"] | limit(4) %}
{% for recipe in favouriteRecipes %} {% for recipe in favouriteRecipes %}

View file

@ -54,7 +54,7 @@
</template> </template>
</div> </div>
<div class="c-recipe__instructions-wrapper"> <div class="c-recipe__instructions-wrapper u-free-text">
{% if sourceLabel and sourceURL %} {% if sourceLabel and sourceURL %}
<p>Source : <a href="{{ sourceURL }}">{{ sourceLabel }}</a></p> <p>Source : <a href="{{ sourceURL }}">{{ sourceLabel }}</a></p>
{% endif %} {% endif %}

View file

@ -6,7 +6,9 @@
<div class="l-container"> <div class="l-container">
<h1>{{ selectedTag }}{{ " " if selectedTag }}{{title}}</h1> <h1>{{ selectedTag }}{{ " " if selectedTag }}{{title}}</h1>
{% include 'components/taglist.njk' %} {% if not selectedTag %}
{% include 'components/taglist.njk' %}
{% endif %}
</div> </div>
</section> </section>
<section class="u-bgc-grey-100"> <section class="u-bgc-grey-100">
@ -38,5 +40,12 @@
</div> </div>
</div> </div>
</section> </section>
{% if selectedTag %}
<section>
<div class="l-container">
{% include 'components/taglist.njk' %}
</div>
</section>
{% endif %}
</main> </main>
{% endblock %} {% endblock %}

View file

@ -1,7 +1,7 @@
--- ---
layout: layouts/base.njk layout: layouts/base.njk
title: About title: About
bodyClass: about bodyClass: u-free-text
--- ---
![A picture of a black pug wearing a pilot jacket](/img/about.jpg) ![A picture of a black pug wearing a pilot jacket](/img/about.jpg)
\ \

View file

@ -40,21 +40,22 @@ section {
} }
} }
h1, h2, h3, h4, h5, h6 {
margin: 0;
}
h1 { h1 {
text-align: center; text-align: center;
font-size: clamp(3rem,calc(1rem + 3vw),4rem); font-size: clamp(3rem,calc(1rem + 3vw),4rem);
margin-bottom: 18px;
} }
h2 { h2 {
text-align: center; text-align: center;
font-size: clamp(2rem,calc(1rem + 2vw),3.4rem); font-size: clamp(2rem,calc(1rem + 2vw),3.4rem);
margin-bottom: 42px;
} }
h3 { h3 {
font-size: clamp(1.6rem,calc(1rem + 1vw),2.6rem); font-size: clamp(1.6rem,calc(1rem + 1vw),2.6rem);
margin-bottom: 18px;
} }
a { a {

View file

@ -33,3 +33,13 @@
.u-highlight { .u-highlight {
background-color: rgba(250, 243, 145, 0.5); background-color: rgba(250, 243, 145, 0.5);
} }
.u-free-text {
p, h2, h3, h4, h5, h6 {
margin-bottom: 18px;
}
}
.u-mb-large {
margin-bottom: 30px;
}

View file

@ -81,5 +81,4 @@
.c-card__title { .c-card__title {
font-size: 1.4rem; font-size: 1.4rem;
margin: 0;
} }

View file

@ -87,8 +87,4 @@
@include mq(medium) { @include mq(medium) {
grid-area: instructions; grid-area: instructions;
} }
p {
margin-bottom: 18px;
}
} }