diff --git a/frontend/src/lib/components/pill.svelte b/frontend/src/lib/components/pill.svelte index 18784d5..a76344c 100644 --- a/frontend/src/lib/components/pill.svelte +++ b/frontend/src/lib/components/pill.svelte @@ -1,8 +1,9 @@ @@ -62,10 +68,7 @@

- diff --git a/frontend/src/lib/css/cv.css b/frontend/src/lib/css/cv.css index fcbfd5a..acdca0b 100644 --- a/frontend/src/lib/css/cv.css +++ b/frontend/src/lib/css/cv.css @@ -8,10 +8,9 @@ { .sidebar { position: absolute; - width: 16rem; + width: 15rem; height: 75rem; background-color: var(--color-special); - z-index: 2; transition: all 0s ease 0s; } @@ -20,19 +19,12 @@ flex-basis: 20rem; box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px; background-color: var(--color-special); - z-index: 1; } } @media screen and (max-width: 1200px) { .sidebar { - position: absolute; - width: 16rem; - height: 75rem; - background-color: var(--color-special); - z-index: 2; - transition: all 0s ease 0s; visibility: hidden; } } diff --git a/frontend/src/lib/css/pill.css b/frontend/src/lib/css/pill.css index c4cb9b1..1fdea5c 100644 --- a/frontend/src/lib/css/pill.css +++ b/frontend/src/lib/css/pill.css @@ -38,6 +38,10 @@ margin-right: 0.5rem; } +.pill-container p { + margin-right: 0.5rem; +} + .pill-tooltip { position: absolute; z-index: 1; @@ -56,6 +60,49 @@ padding-right: 1rem; } +.pill-tooltip>div { + display: flex; + flex-direction: row; + align-items: center; +} + +.pill-tooltip svg { + margin: 0 !important; + padding: 0 !important; +} + +.pill-last { + margin-left: auto; +} + +.pill-view { + width: 2.2rem; + height: 2.2rem; + background-color: var(--color-special); + box-shadow: 0px 8px 18px -1px #0174BE50; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + color: var(--color-background); + border: 0; + cursor: grab; + margin: 0 !important; + padding: 0 !important; + transition: none; +} + +.pill-view:hover { + transition: all .3s ease 0s; + color: var(--color-special); + background-color: var(--color-background); +} + +.pill-view:active { + transform: translateY(3px); + box-shadow: 0px 4px 12px -1px #0174BE70; +} + .pill-arrow { position: absolute; z-index: 2; diff --git a/frontend/src/lib/js/popup.js b/frontend/src/lib/js/popup.js index 8bc2cd5..7e76c48 100644 --- a/frontend/src/lib/js/popup.js +++ b/frontend/src/lib/js/popup.js @@ -1,6 +1,6 @@ import {writable} from 'svelte/store'; -export function showPopup(show, popupObject) { +export function showPopup(show, projectId) { const background = document.getElementById('project-popup-background'); const mainPopup = document.getElementById('project-popup-main'); const body = document.getElementsByTagName('body'); @@ -14,11 +14,22 @@ export function showPopup(show, popupObject) { background.style.visibility = 'hidden'; mainPopup.style.visibility = 'hidden'; } - if (popupObject != null) { - popupDatas.update(() => { - return popupObject; + if (projectId != null) { + actualData.update(() => { + let popup; + const unsubscribe = popupDatas.subscribe(value => { + popup = value; + }); + for (const p of popup) { + if (p.id == projectId) { + unsubscribe(); + return p; + } + } + unsubscribe(); }); } } -export let popupDatas = writable(0); \ No newline at end of file +export let popupDatas = writable([]); +export let actualData = writable(0); \ No newline at end of file diff --git a/frontend/src/routes/+page.js b/frontend/src/routes/+page.js index f3ff0f9..50667a8 100644 --- a/frontend/src/routes/+page.js +++ b/frontend/src/routes/+page.js @@ -22,7 +22,7 @@ export async function load(context) { const project_programming = []; const dataToGather = ['info', 'education', 'experience', 'skills/1', 'tags/1']; - for (const [index, url] of dataToGather.entries()) { + for (const url of dataToGather) { const res = await fetchData(url); if (res.status == 0) { // Pushing data