Daniel Bohry 1 год назад
Родитель
Сommit
6fe0772577
6 измененных файлов с 35 добавлено и 6 удалено
  1. 1 2
      src/app.css
  2. 1 0
      src/app.html
  3. BIN
      src/lib/images/logo.png
  4. 4 1
      src/routes/+layout.svelte
  5. 21 3
      src/routes/+page.svelte
  6. 8 0
      src/routes/Header.svelte

+ 1 - 2
src/app.css

@@ -1,8 +1,7 @@
 @import '@fontsource/fira-mono';
 @import '@fontsource/fira-mono';
 
 
 :root {
 :root {
-	--font-body: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
-		Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+	--font-body: "Roboto", Arial, AppleGothic, serif;
 	--font-mono: 'Fira Mono', monospace;
 	--font-mono: 'Fira Mono', monospace;
 	--color-bg-0: rgb(202, 216, 228);
 	--color-bg-0: rgb(202, 216, 228);
 	--color-bg-1: hsl(209, 36%, 86%);
 	--color-bg-1: hsl(209, 36%, 86%);

+ 1 - 0
src/app.html

@@ -3,6 +3,7 @@
 	<head>
 	<head>
 		<meta charset="utf-8" />
 		<meta charset="utf-8" />
 		<link rel="icon" href="%sveltekit.assets%/favicon.png" />
 		<link rel="icon" href="%sveltekit.assets%/favicon.png" />
+		<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
 		<meta name="viewport" content="width=device-width, initial-scale=1" />
 		<meta name="viewport" content="width=device-width, initial-scale=1" />
 		%sveltekit.head%
 		%sveltekit.head%
 	</head>
 	</head>

BIN
src/lib/images/logo.png


+ 4 - 1
src/routes/+layout.svelte

@@ -1,6 +1,9 @@
 <script>
 <script>
 	import Header from './Header.svelte';
 	import Header from './Header.svelte';
 	import '../app.css';
 	import '../app.css';
+
+	let year = new Date().getFullYear();
+
 </script>
 </script>
 
 
 <div class="app">
 <div class="app">
@@ -11,7 +14,7 @@
 	</main>
 	</main>
 
 
 	<footer>
 	<footer>
-		<p>© 2024 OQuokka</p>
+		<p>© {year} OQuokka</p>
 	</footer>
 	</footer>
 </div>
 </div>
 
 

+ 21 - 3
src/routes/+page.svelte

@@ -1,4 +1,6 @@
-<script></script>
+<script>
+	import logo from '$lib/images/logo.png';
+</script>
 
 
 <svelte:head>
 <svelte:head>
 	<title>Home</title>
 	<title>Home</title>
@@ -6,7 +8,9 @@
 </svelte:head>
 </svelte:head>
 
 
 <section>
 <section>
-	<h1>Welcome</h1>
+	<div id="content">
+		<img id="bounce-image" src="{logo}" alt="OQuokka">
+	</div>
 </section>
 </section>
 
 
 <style>
 <style>
@@ -22,4 +26,18 @@
 		width: 100%;
 		width: 100%;
 	}
 	}
 
 
-</style>
+	#bounce-image {
+		width: 300px;
+		animation: bounce 2s infinite;
+	}
+
+	@keyframes bounce {
+		0%, 100% {
+			transform: translateY(0);
+		}
+		50% {
+			transform: translateY(-50px);
+		}
+	}
+
+</style>

+ 8 - 0
src/routes/Header.svelte

@@ -2,6 +2,7 @@
     import {page} from '$app/stores';
     import {page} from '$app/stores';
     import profile from '$lib/images/profile.png';
     import profile from '$lib/images/profile.png';
     import {auth} from "./store.js";
     import {auth} from "./store.js";
+    import {onMount} from "svelte";
 
 
     let username = null;
     let username = null;
     let profileTitle = null;
     let profileTitle = null;
@@ -11,6 +12,13 @@
         profileTitle = value ? "You are logged in as " + value.username : "login";
         profileTitle = value ? "You are logged in as " + value.username : "login";
     });
     });
 
 
+    onMount(() => {
+        const storedAuth = localStorage.getItem('auth');
+        if (storedAuth) {
+            auth.set(JSON.parse(storedAuth));
+        }
+    });
+
 </script>
 </script>
 
 
 <header>
 <header>