diff --git a/src/lib/components/navbar.svelte b/src/lib/components/navbar.svelte index 1b267b5..8a13830 100644 --- a/src/lib/components/navbar.svelte +++ b/src/lib/components/navbar.svelte @@ -76,7 +76,7 @@ animateForeground(false, navbar_title); }} > - @@ -94,7 +94,7 @@ animateForeground(false, navbar_category); }} > - diff --git a/src/lib/components/post-min.svelte b/src/lib/components/post-min.svelte index 89b2294..5325e8d 100644 --- a/src/lib/components/post-min.svelte +++ b/src/lib/components/post-min.svelte @@ -8,7 +8,7 @@ import anime from "animejs"; export let cover = - "https://share.etheryo.fr/Rando-01.11.2023/Alix%20Mange%20Lac%20Rouge%20Bleu%20Orange%20Midi.jpg"; + "https://share.etheryo.fr/rando/2024.07.28/IMG20240728142327.jpg"; export let title = "Title"; export let date = "01/01/1997"; diff --git a/src/lib/components/project.svelte b/src/lib/components/project.svelte new file mode 100644 index 0000000..1e82263 --- /dev/null +++ b/src/lib/components/project.svelte @@ -0,0 +1,105 @@ + + +
{ + update_gradient(event, post_div); + }} + on:mouseenter={() => { + animateForeground(true, post_div); + animateChevron(true); + title_h1.style.textDecoration = "underline 2px"; + }} + on:mouseleave={() => { + animateForeground(false, post_div); + animateChevron(false); + title_h1.style.textDecoration = ""; + }} +> +
+ imgcool (updateY = false)} + on:mouseleave={() => (updateY = true)} + /> +

{title}

+

{description}

+
+
+ + {topic[0]} +
+
+ +
+
+
+
+
+
diff --git a/src/lib/css/base.css b/src/lib/css/base.css index 5e2fdda..30feca3 100644 --- a/src/lib/css/base.css +++ b/src/lib/css/base.css @@ -53,6 +53,8 @@ h2 { --border-max: 2rem; --profile-content-width-max: 40rem; --profile-content-width-min: 36rem; + --content-width: 50rem; + --content-height: 50rem; --width-min-desktop: 1275px; --width-mobile: 875px; @@ -102,6 +104,10 @@ h2 { margin: 2rem; } +.content { + width: var(--content-width); +} + .flex-row { display: flex; align-items: center; @@ -125,6 +131,10 @@ h2 { box-shadow: #41354340 0px 8px 18px -1px; } +.w-100 { + width: 100%; +} + .h-100 { height: 100%; } @@ -180,6 +190,10 @@ h2 { margin-left: 0.5rem; } +.margin-bot-force { + margin-top: auto; +} + .padding-left-3 { padding-left: 3rem; } diff --git a/src/lib/css/navbar.css b/src/lib/css/navbar.css index 0243626..48f96a6 100644 --- a/src/lib/css/navbar.css +++ b/src/lib/css/navbar.css @@ -57,7 +57,7 @@ a { outline: var(--navbar-outline) } -.content { +.navbar-content { grid-area: overlay; z-index: 1; width: inherit; diff --git a/src/lib/css/person.css b/src/lib/css/person.css index ed58078..096d81e 100755 --- a/src/lib/css/person.css +++ b/src/lib/css/person.css @@ -3,7 +3,7 @@ } .person-container { - width: 50rem; + width: 100%; padding: 1rem; } diff --git a/src/lib/css/pill.css b/src/lib/css/pill.css index 1c5cfee..a93ce8c 100644 --- a/src/lib/css/pill.css +++ b/src/lib/css/pill.css @@ -21,16 +21,6 @@ margin-right: 1rem !important; } -.pill svg { - border-radius: 100% !important; - width: 1.8rem !important; - height: 1.8rem !important; - padding: calc((3rem - 1.8rem)/2); - color: var(--color-background); - background: linear-gradient(180deg, rgb(52, 42, 58), rgb(38, 28, 44)); - margin-right: 1rem; -} - .pill-profile { transition: all .4s ease 0s; } diff --git a/src/lib/css/post-min.css b/src/lib/css/post-min.css index fe0eb34..e6bfe12 100644 --- a/src/lib/css/post-min.css +++ b/src/lib/css/post-min.css @@ -90,12 +90,16 @@ margin-top: auto !important; } -.post-min-pill span { - font-size: 0.8rem; -} - .post-min-pill svg { + border-radius: 100% !important; width: 1.2rem !important; height: 1.2rem !important; padding: calc((2rem - 1.2rem)/2); -} \ No newline at end of file + color: var(--color-background); + background: linear-gradient(180deg, rgb(52, 42, 58), rgb(38, 28, 44)); + margin-right: 1rem; +} + +.post-min-pill span { + font-size: 0.8rem; +} diff --git a/src/lib/css/project.css b/src/lib/css/project.css new file mode 100644 index 0000000..47d98cd --- /dev/null +++ b/src/lib/css/project.css @@ -0,0 +1,127 @@ + + +@media screen and (max-width: 1275px) { + .project-container { + height: calc(var(--content-height)/2); + width: calc((var(--content-width) + 6rem - 4rem)/3); + } + + .project { + height: calc(var(--content-height)/2); + } + + .project img { + height: calc(var(--content-height)/5); + width: calc(var(--content-width)/4); + } +} + +@media screen and (min-width: 1276px) { + .project-container { + height: calc(var(--content-height)/2); + width: calc((var(--content-width) + 6rem - 4rem)/3); + } + + .project { + height: calc(var(--content-height)/2); + } + + .project img { + height: calc(var(--content-height)/5); + width: calc(var(--content-width)/4); + } +} + +.project-container { + display: grid; + grid-template-areas: + "post-min-overlay-back" + "post-min-overlay-front" + "project"; + margin-left: 1rem; + margin-right: 1rem; +} + +.project { + cursor: pointer; + display: flex; + flex-direction: column; + grid-area: overlay; + z-index: var(--z-index-front); +} + +.project img { + width: auto; + width: 100%; + object-fit: cover; + border-top-left-radius: 1rem; + border-top-right-radius: 1rem; + border-bottom-left-radius: 0.6rem; + border-bottom-right-radius: 0.6rem; + margin-bottom: 1rem; +} + +.project h1 { + font-family: 'JetBrains Mono'; + font-weight: 800; + font-size: 1.1rem; + margin-left: 1rem; + margin-right: 1rem; + margin-bottom: 0; + user-select: none; + /* Overflow */ + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + text-overflow: ellipsis; + -webkit-line-clamp: 2; + line-clamp: 2; +} + +.project p { + font-family: 'JetBrains Mono'; + font-weight: 400; + font-style: italic; + font-size: 0.9rem; + margin-left: 1rem; + margin-right: 1rem; + /* Overflow */ + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + text-overflow: ellipsis; + -webkit-line-clamp: 4; + line-clamp: 4; +} + +.project span { + font-family: 'JetBrains Mono'; + color: var(--color-background); + margin: 0.7rem; + padding: 0; + +} + +.project-pill { + background-color: var(--color-text); + margin-bottom: 0.5rem; + width: fit-content; + margin-bottom: 1rem; +} + +.project-pill svg { + border-radius: 100% !important; + padding: calc((2rem - 1.2rem)/2); + padding-right: 0; + color: var(--color-background); +} + +.project-next { + opacity: 0; +} + +.project-next svg { + color: var(--color-text); + margin-right: 0.5rem; + +} \ No newline at end of file diff --git a/src/lib/json/hub.json b/src/lib/json/hub.json index fc674a2..0e0f9a0 100644 --- a/src/lib/json/hub.json +++ b/src/lib/json/hub.json @@ -5,7 +5,28 @@ "person": { "name": "Yohan Boujon", "pronouns": "il/lui", - "description": "Informatics and electronics engineer" + "description": "Informatics and electronics engineer", + "knowme": "Me ConnaƮtre" }, - "projects":"Mes projets" + "project":"Mes projets", + "projects": [ + { + "cover": "https://share.etheryo.fr/INSA/wal/wal.png", + "title": "What A Leak!", + "description": "Water leak detection project with INSA Toulouse in 5th year.", + "topic": "embedded" + }, + { + "cover": "https://share.etheryo.fr/projects/shared-memory/config.png", + "title": "Shared memory cache on multiple kernels", + "description": "Using NFS, programmed a kernel driver that can read/write data onto a shared ram.", + "topic": "kernel" + }, + { + "cover": "https://share.etheryo.fr/projects/yoyo_tetris/yoyotetris.png", + "title": "yoyoTetris", + "description": "A simple game in C++ using Raylib.", + "topic": "videogame" + } + ] } \ No newline at end of file diff --git a/src/lib/ts/topic.ts b/src/lib/ts/topic.ts new file mode 100644 index 0000000..777781f --- /dev/null +++ b/src/lib/ts/topic.ts @@ -0,0 +1,13 @@ +import { mdiMemory, mdiPenguin, mdiGamepadVariant } from "@mdi/js"; + +type TopicKey = "embedded" | "kernel" | "videogame"; + +type Topic = [string, string]; + +const topics: Record = { + embedded: ["Embedded", mdiMemory], + kernel: ["Kernel Dev", mdiPenguin], + videogame: ["Video Game", mdiGamepadVariant], +}; + +export default topics; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 87f494d..7f2d913 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -4,6 +4,10 @@ import CoverImg from "$lib/components/cover-img.svelte"; import Person from "$lib/components/person.svelte"; + import Project from "$lib/components/project.svelte"; + + import topics from "$lib/ts/topic.ts"; + import hubjson from "$lib/json/hub.json"; let hub_cover = @@ -23,14 +27,30 @@

{hubjson.who}

- +
+
+ +
+
-

{hubjson.projects}

+

{hubjson.project}

+
+
+
+ {#each hubjson.projects as project, index} + + {/each} +