Backend: fixed unordered education and experience. Frontend: Adapted footer for mobile.

This commit is contained in:
Yohan Boujon 2024-02-05 16:52:33 +01:00
parent 5beaa1d561
commit 6bee8c7b53
3 changed files with 115 additions and 49 deletions

View file

@ -103,7 +103,8 @@ async fn education(Path(lang_id): Path<i32>, State(pool): State<PgPool>) -> Json
MAX(CASE WHEN et.lang_id = $1 THEN et.school_location END) AS school_location
FROM public.education e
JOIN public.education_text et ON e.id = et.education_id
GROUP BY e.school, e.start_year, e.end_year, e.picture_url;
GROUP BY e.school, e.start_year, e.end_year, e.picture_url
ORDER BY e.start_year ASC;
",
lang_id
)
@ -126,7 +127,8 @@ async fn experience(Path(lang_id): Path<i32>, State(pool): State<PgPool>) -> Jso
MAX(CASE WHEN et.lang_id = $1 THEN et.enterprise_location END) AS enterprise_location
FROM public.experience e
JOIN public.experience_text et ON e.id = et.experience_id
GROUP BY e.enterprise, e.start_year, e.end_year, e.picture_url;
GROUP BY e.enterprise, e.start_year, e.end_year, e.picture_url
ORDER BY e.start_year ASC;
",
lang_id
)

View file

@ -45,6 +45,21 @@
padding-right: 4rem;
}
.footer-btn-container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.footer-text p {
font-family: 'Urbanist', sans-serif;
font-weight: 600;
font-size: 1.25rem;
color: var(--color-background);
margin: 0.5rem;
}
.end {
padding-bottom: 5rem;
}
@ -145,6 +160,30 @@
padding-bottom: 2rem;
}
.footer-mobile-btn {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.footer-btn-container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin-left: 2rem;
margin-right: 2rem;
}
.footer-text p {
font-family: 'Urbanist', sans-serif;
font-weight: 600;
font-size: minmax(2dvh, 1.25rem);
color: var(--color-background);
margin: 0.5rem;
}
.subsection {
margin-left: 5vw;
display: flex;
@ -192,21 +231,6 @@ h2 {
margin-right: 0.5rem;
}
.footer-text p {
font-family: 'Urbanist', sans-serif;
font-weight: 600;
font-size: 1.25rem;
color: var(--color-background);
margin: 0.5rem;
}
.footer-btn-container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.footer-btn {
display: flex;
border-radius: 0.4rem;

View file

@ -180,7 +180,10 @@
</div>
</div>
</div>
<!-- Footer -->
<div class="footer" bind:this={footer}>
<!-- Footer desktop -->
{#if innerWidth >= 1000}
<div class="footer-btn-container">
<button
class="footer-btn"
@ -213,6 +216,43 @@
<p>{text.github}</p>
</a>
</div>
<!-- Footer mobile -->
{:else}
<div class="footer-text">
<p>
{text.madewith}
<SvgIcon size="20" path={mdiHeart} type="mdi" />
{text.usingsvelte}
</p>
<p>{text.copyright}{new Date().getFullYear()}</p>
</div>
<div class="footer-mobile-btn">
<div class="footer-btn-container">
<button
class="footer-btn"
on:click={() => (window.location.href = `/lang=${otherlang}`)}
>
<p>{text.lang}</p>
<span class={`fi fi-${flag} flag-size`}></span>
</button>
</div>
<div class="footer-btn-container">
<a
class="footer-btn footer-github"
href="https://github.com/yoboujon/curriculum-vitae"
target="_blank"
>
<img
height="30"
width="30"
src="https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/github.svg"
alt="github"
/>
<p>{text.github}</p>
</a>
</div>
</div>
{/if}
</div>
{:else}
<h1 class="h1 text-center">Oops, could not load database :/</h1>