fixing header

This commit is contained in:
Gianmarco Pettinato 2023-05-27 23:32:07 +02:00 committed by jatus
parent eabc979c62
commit 8b000c1ecf
4 changed files with 34 additions and 34 deletions

View File

@ -4,6 +4,7 @@
"scripts": { "scripts": {
"update-model": "json2ts ./src/lib/model/schemas/job.json ./src/lib/model/job.ts && json2ts ./src/lib/model/schemas/logo.json ./src/lib/model/logo.ts", "update-model": "json2ts ./src/lib/model/schemas/job.json ./src/lib/model/job.ts && json2ts ./src/lib/model/schemas/logo.json ./src/lib/model/logo.ts",
"dev": "vite dev", "dev": "vite dev",
"dev-exposed": "vite dev --host",
"build": "vite build", "build": "vite build",
"postbuild": "npx svelte-sitemap --domain https://pettinato.eu", "postbuild": "npx svelte-sitemap --domain https://pettinato.eu",
"preview": "vite preview", "preview": "vite preview",
@ -50,4 +51,4 @@
"svelte-sitemap": "^2.6.0", "svelte-sitemap": "^2.6.0",
"typesafe-i18n": "^5.20.0" "typesafe-i18n": "^5.20.0"
} }
} }

View File

@ -51,7 +51,7 @@
function setOpen() { function setOpen() {
menuOpen = !menuOpen; menuOpen = !menuOpen;
const animation = menuContainer.animate([{ height: '0px' }, { height: '360px' }], { const animation = menuContainer.animate([{ height: '0px' }, { height: '240px' }], {
duration: 100, duration: 100,
fill: 'both' fill: 'both'
}); });
@ -61,7 +61,7 @@
</script> </script>
<div class="menu-container"> <div class="menu-container">
<div class="header"> <div class="header {menuOpen ? 'borderclass' : ''}">
<button on:click={setOpen} tabindex="0" title={menuButton[Number(menuOpen)][currentLanguage]}> <button on:click={setOpen} tabindex="0" title={menuButton[Number(menuOpen)][currentLanguage]}>
{#if !menuOpen}<FontAwesomeIcon icon={barsDefinition} size="lg" /> {#if !menuOpen}<FontAwesomeIcon icon={barsDefinition} size="lg" />
{:else} {:else}
@ -75,7 +75,7 @@
</div> </div>
<ul class="wrapper" bind:this={menuContainer}> <ul class="wrapper" bind:this={menuContainer}>
<li> <li>
<a class="menu-element" href="#top"> <a on:click={setOpen} class="menu-element" href="#top">
<i> <i>
<FontAwesomeIcon icon={homeIconDefinition} /> <FontAwesomeIcon icon={homeIconDefinition} />
</i> </i>
@ -83,28 +83,28 @@
> >
</li> </li>
<li> <li>
<a class="menu-element" href="#jobs" <a on:click={setOpen} class="menu-element" href="#jobs"
><i> ><i>
<FontAwesomeIcon icon={userTieDefinition} /> <FontAwesomeIcon icon={userTieDefinition} />
</i><span>{menu.job[currentLanguage]}</span></a </i><span>{menu.job[currentLanguage]}</span></a
> >
</li> </li>
<li> <li>
<a class="menu-element" href="#training" <a on:click={setOpen} class="menu-element" href="#training"
><i> ><i>
<FontAwesomeIcon icon={graduationDefinition} /> <FontAwesomeIcon icon={graduationDefinition} />
</i><span>{menu.school[currentLanguage]}</span></a </i><span>{menu.school[currentLanguage]}</span></a
> >
</li> </li>
<li> <li>
<a class="menu-element" href="#portfolio" <a on:click={setOpen} class="menu-element" href="#portfolio"
><i> ><i>
<FontAwesomeIcon icon={userClockDefinition} /> <FontAwesomeIcon icon={userClockDefinition} />
</i><span>{menu.portfolio[currentLanguage]}</span></a </i><span>{menu.portfolio[currentLanguage]}</span></a
> >
</li> </li>
<!-- <li> <!-- <li>
<a class="menu-element" href="/blog" <a on:click={setOpen} class="menu-element" href="/blog"
><i> ><i>
<FontAwesomeIcon icon={addressCardDefinition} /> <FontAwesomeIcon icon={addressCardDefinition} />
</i><span>{menu.blog[currentLanguage]}</span></a </i><span>{menu.blog[currentLanguage]}</span></a
@ -115,26 +115,33 @@
<style lang="scss"> <style lang="scss">
@import '../../app.scss'; @import '../../app.scss';
.borderclass {
border-bottom: solid $border-hover-color 2px;
border-radius: $default-border-radius;
}
.header { .header {
display: flex; display: flex;
width: 100%; justify-content: left;
padding-top: 10px;
height: 10%;
justify-content: space-between;
align-items: center; align-items: center;
button { button {
height: 80px; text-align: center;
width: 80px; height: 50px;
width: 50px;
border: none; border: none;
font-size: 40px; font-size: 30px;
background: none; background: none;
} }
.title {
justify-content: center;
text-align: right;
margin: auto;
}
} }
.menu-container { .menu-container {
margin: 0; margin: 0;
padding: 0; padding: 0;
width: 80%;
margin: auto; margin: auto;
} }
ul { ul {
@ -145,31 +152,27 @@
margin: auto; margin: auto;
} }
a { a {
padding-left: 10px;
display: flex; display: flex;
justify-content: start; justify-content: left;
align-items: center; align-items: center;
background-color: $basecolor2; background-color: $basecolor2;
font-size: larger; font-size: 18px;
height: 60px; height: 60px;
border-bottom: solid $border-hover-color 2px;
border-radius: 0px 0px $default-border-radius $default-border-radius;
i { i {
margin-right: 10%; width: 50px;
text-align: center;
}
span {
} }
}
li {
border-left: 1px solid;
border-right: 1px solid;
border-bottom: 1px solid;
}
li:first-of-type {
border-top: 1px solid;
} }
a:hover { a:hover {
background-color: $default-active-color; background-color: $default-active-color;
outline: solid 1px;
} }
.wrapper { .wrapper {
height: 0px; height: 0px;
border-radius: 0px 0px $default-border-radius $default-border-radius;
} }
</style> </style>

View File

@ -1,4 +0,0 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://cloudconvert.com/
HostUrl=https://storage.cloudconvert.com/tasks/d2e68ca0-c4ea-4d5c-a821-99cb9bc0e2a1/photo_2023-05-27_14-07-56.webp?AWSAccessKeyId=cloudconvert-production&Expires=1685275786&Signature=e0WAf7JckXFaWlpmjR2VoxHuGsQ%3D&response-content-disposition=attachment%3B%20filename%3D%22photo_2023-05-27_14-07-56.webp%22&response-content-type=image%2Fwebp

View File

@ -1,5 +1,5 @@
import { sveltekit } from '@sveltejs/kit/vite'; import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite'; import type { UserConfig, defineConfig } from 'vite';
const config: UserConfig = { const config: UserConfig = {
plugins: [sveltekit()] plugins: [sveltekit()]