From 6bee8c7b5368aed44ddf9a84a550b0ddfe689651 Mon Sep 17 00:00:00 2001 From: Yohan Boujon Date: Mon, 5 Feb 2024 16:52:33 +0100 Subject: [PATCH] Backend: fixed unordered education and experience. Frontend: Adapted footer for mobile. --- backend/src/main.rs | 6 +- frontend/src/lib/css/cv.css | 54 +++++++--- frontend/src/routes/lang=[lang]/+page.svelte | 104 +++++++++++++------ 3 files changed, 115 insertions(+), 49 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 5749999..a4a3c0c 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -103,7 +103,8 @@ async fn education(Path(lang_id): Path, State(pool): State) -> 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, State(pool): State) -> 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 ) diff --git a/frontend/src/lib/css/cv.css b/frontend/src/lib/css/cv.css index 64d4fb2..7e94a46 100644 --- a/frontend/src/lib/css/cv.css +++ b/frontend/src/lib/css/cv.css @@ -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; diff --git a/frontend/src/routes/lang=[lang]/+page.svelte b/frontend/src/routes/lang=[lang]/+page.svelte index 3de2c4e..4e74930 100644 --- a/frontend/src/routes/lang=[lang]/+page.svelte +++ b/frontend/src/routes/lang=[lang]/+page.svelte @@ -180,39 +180,79 @@ + {:else}

Oops, could not load database :/