Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11 a couple of things #12

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 12 additions & 52 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import "../app.css";
import "../../static/app.css";

import {page} from '$app/stores';
import {fade} from 'svelte/transition';
import {navOpen} from "../store.js";
Expand All @@ -10,7 +11,6 @@

$: path && closeNav()


function openNav() {
navOpen.set(true)
}
Expand All @@ -30,25 +30,20 @@
return txtArr.join(' ').replace("-", " ")
}

let isPdfOpen = false;
let scrolled = false;

$: path && (isPdfOpen = path !== "/")

let y;

$: y && (scrolled = y > 10)

</script>
<svelte:window bind:scrollY={y}/>
<svelte:head>
<link rel="stylesheet" href="/app.css"/>
</svelte:head>

{#if ($navOpen)}
<div class="overlay"></div>
{/if}
<div class={isPdfOpen || scrolled? "header pt-3 pb-3" : "header" }>
<div class="header pt-3 pb-3">
<div class="logo">
<a class="" href="/">
<svg width="174" viewBox="0 0 174 60" fill="none" xmlns="http://www.w3.org/2000/svg" id="gildlab-logo"
style={isPdfOpen || scrolled? 'width: 70%;' : 'width: 100%;'}>
style="width: 70%">
<g clip-path="url(#clip0_748_33)">
<path
d="M95.4062 60C64.1838 60 32.9576 60 1.7352 60C0.142414 60 0.00374774 59.8601 0.00374774 58.264C0 39.4327 0 20.6051 0 1.77383C0 0.155069 0.157405 9.27015e-07 1.79517 9.27015e-07C64.2175 9.27015e-07 109.775 9.27015e-07 172.194 9.27015e-07C172.505 9.27015e-07 172.819 -0.0189098 173.123 0.026476C173.644 0.105901 173.959 0.419819 173.989 0.972013C174 1.20651 173.996 1.441 173.996 1.67549C173.996 20.5598 173.996 39.4402 173.996 58.3245C173.996 59.8411 173.846 59.9924 172.366 59.9924C141.091 59.9924 126.681 59.9924 95.4024 59.9924L95.4062 60ZM172.014 2.01967H1.9938V58.0257H172.014V2.01967Z"
Expand Down Expand Up @@ -89,11 +84,6 @@
</svg>
</a>
</div>
<div class={isPdfOpen || scrolled? "header-text header-text-hidden": "header-text" } id="header-text">
<span class="fw-700">Welcome to Gild Lab</span>
<span>We are a software provider for ESG assets.</span>
</div>

<div class="navigation breakpoint-1">
<ul class="nav">
<li class="nav-item">
Expand Down Expand Up @@ -144,7 +134,6 @@
</ul>
</div>


{#if !$navOpen}
<div class="location fw-700">{toSentenceCase(path.slice(1, -1))}</div>
{/if}
Expand Down Expand Up @@ -228,10 +217,11 @@
</div>

</div>
<div class={ scrolled || isPdfOpen ? "content content-short" : "content content-tall" }>
<div class="content">
<slot></slot>
</div>


<style>
@import url("https://use.typekit.net/fmp1hyo.css");
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100;300;400;500;700;900&display=swap');
Expand Down Expand Up @@ -265,22 +255,13 @@
width: 100%;
background: #ffffff;
z-index: 2;
transition: 0.3s;
}

.content-tall {
margin-top: 180px;
transition: 0.5s;
height: 75px;
}

.content-short {
.content {
margin-top: 70px;
transition: 0.5s;
}

#gildlab-logo {
transition: 0.3s;
}

.navigation a {
padding-left: 15px;
Expand All @@ -290,18 +271,6 @@
color: #000000;
}

.header-text {
display: flex;
flex-direction: column;
font-size: 20px;
transition: opacity 0.3s linear;
opacity: 1;
}

.header-text-hidden {
opacity: 0;
transition: opacity 0.3s linear;
}

.nav-item, .dropdown-item {
font-size: 20px;
Expand Down Expand Up @@ -385,19 +354,10 @@
display: block;
}

.header-text {
display: none;
}

.content-tall {
margin-top: 70px;
}

.navigation {
display: none;
}


.logo svg {
width: 99px;
}
Expand Down
File renamed without changes.
9 changes: 7 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';

export default defineConfig({
plugins: [sveltekit()]
});
plugins: [sveltekit()],
server: {
fs: {
// Allow serving files from one level up to the project root
allow: ['static'],
},
},});