From d088672fc4a0eeee45f4dd01f8442020d26aa3c0 Mon Sep 17 00:00:00 2001 From: Nino Keldishvili Date: Fri, 21 Apr 2023 18:47:02 +0400 Subject: [PATCH 1/7] Add onmount to wait while component is rendered --- src/routes/+layout.svelte | 364 ++++++++++++++++++++------------------ 1 file changed, 187 insertions(+), 177 deletions(-) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 0817604..77cbdb1 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -3,13 +3,17 @@ import {page} from '$app/stores'; import {fade} from 'svelte/transition'; import {navOpen} from "../store.js"; + import {onMount} from "svelte"; - let path; + let path, pageContent, loading; $: path = $page.url.pathname; $: path && closeNav() + onMount(() => { + pageContent.style.display = 'block'; + }) function openNav() { navOpen.set(true) @@ -44,192 +48,194 @@ {#if ($navOpen)}
{/if} -
- -
- Welcome to Gild Lab - We are a software provider for ESG assets. -
- - - - +
+
+ +
+ Welcome to Gild Lab + We are a software provider for ESG assets. +
+ + + + - {#if !$navOpen} -
{toSentenceCase(path.slice(1, -1))}
- {/if} -
{#if !$navOpen} - {openNav()}}> - - - - +
{toSentenceCase(path.slice(1, -1))}
{/if} - - {#if $navOpen} - - -
- +
+ +