From 93e05bdeb96596598c4270b30442ae249c1fdbd6 Mon Sep 17 00:00:00 2001
From: Fritz Benning
Date: Mon, 13 Feb 2023 17:54:49 +0100
Subject: [PATCH] feat: add tree animation
---
app/globals.css | 14 ++++++++++++++
app/layout.js | 16 +++++++++-------
app/page.js | 10 +---------
app/page.module.css | 13 -------------
app/party/page.js | 7 +++++++
app/tree/page.js | 7 +++++++
components/Nav/index.js | 22 ++++++++++++++++++++++
components/Nav/styles.module.css | 24 ++++++++++++++++++++++++
public/animations/tree.riv | Bin 0 -> 11083 bytes
9 files changed, 84 insertions(+), 29 deletions(-)
delete mode 100644 app/page.module.css
create mode 100644 app/party/page.js
create mode 100644 app/tree/page.js
create mode 100644 components/Nav/index.js
create mode 100644 components/Nav/styles.module.css
create mode 100644 public/animations/tree.riv
diff --git a/app/globals.css b/app/globals.css
index ae8973b..ec99b9b 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -1,3 +1,17 @@
body {
height: 100vh;
}
+
+.main {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ width: 100%;
+ position: relative;
+}
+
+.animation {
+ width: min(72%, 480px);
+ aspect-ratio: 1 / 1;
+}
diff --git a/app/layout.js b/app/layout.js
index fca8f5b..2c2b44e 100644
--- a/app/layout.js
+++ b/app/layout.js
@@ -1,14 +1,16 @@
-import './globals.css'
+import Nav from "@/components/Nav";
+import "./globals.css";
export default function RootLayout({ children }) {
return (
- {/*
- will contain the components returned by the nearest parent
- head.js. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
- */}
{children}
+
+
+ {children}
+
+
+
- )
+ );
}
diff --git a/app/page.js b/app/page.js
index 31373e8..284927b 100644
--- a/app/page.js
+++ b/app/page.js
@@ -1,13 +1,5 @@
"use client";
-import Rive from "@rive-app/react-canvas";
-import styles from "./page.module.css";
export default function RivLab() {
- return (
-
-
-
-
-
- );
+ return <>Hallo>;
}
diff --git a/app/page.module.css b/app/page.module.css
deleted file mode 100644
index 235c5a3..0000000
--- a/app/page.module.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.main {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- width: 100%;
-}
-
-.animation {
- width: 30vw;
- height: 30vw;
- transform: rotate(45deg);
-}
diff --git a/app/party/page.js b/app/party/page.js
new file mode 100644
index 0000000..8df7a66
--- /dev/null
+++ b/app/party/page.js
@@ -0,0 +1,7 @@
+"use client";
+
+import Rive from "@rive-app/react-canvas";
+
+export default function Tree() {
+ return ;
+}
diff --git a/app/tree/page.js b/app/tree/page.js
new file mode 100644
index 0000000..5a67751
--- /dev/null
+++ b/app/tree/page.js
@@ -0,0 +1,7 @@
+"use client";
+
+import Rive from "@rive-app/react-canvas";
+
+export default function Tree() {
+ return ;
+}
diff --git a/components/Nav/index.js b/components/Nav/index.js
new file mode 100644
index 0000000..2b9ddca
--- /dev/null
+++ b/components/Nav/index.js
@@ -0,0 +1,22 @@
+"use client";
+import Link from "next/link";
+import styles from "./styles.module.css";
+
+export default function Nav() {
+ return (
+
+ );
+}
diff --git a/components/Nav/styles.module.css b/components/Nav/styles.module.css
new file mode 100644
index 0000000..c064223
--- /dev/null
+++ b/components/Nav/styles.module.css
@@ -0,0 +1,24 @@
+.navigation {
+ position: absolute;
+ bottom: 10vh;
+ left: 50%;
+ transform: translate(-50%, 0);
+}
+
+.list {
+ list-style-type: none;
+ display: flex;
+ margin: 0;
+ padding: 0;
+}
+
+.item {
+ font-family: sans-serif;
+ font-size: 1.2rem;
+ padding: 0 2rem;
+}
+
+.link {
+ text-decoration: none;
+ color: #cccccc;
+}
diff --git a/public/animations/tree.riv b/public/animations/tree.riv
new file mode 100644
index 0000000000000000000000000000000000000000..ad367c98bb0937c8510eb17d538024d286fdf343
GIT binary patch
literal 11083
zcmai42~-rv*6sl&D9YlJI0Y!EQBk8P6GYUR?im!(K%&@-fD4O&pn`01$9;{cal@Dx
zm*B2(4H|=VGf|_@^+n=>nxN6RBpPF)iA(g=t*(J0@BQcJ9Oiso_1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