From 28b7a07bbf304e0a8277dfc3434e9ec7ac3082d7 Mon Sep 17 00:00:00 2001 From: donywang922 Date: Fri, 24 Nov 2023 15:38:10 -0800 Subject: [PATCH] taxonomy page --- app/page.tsx | 16 +++++++----- app/taxonomy/page.tsx | 18 ++++++++++++++ app/taxonomy/taxonomy.module.css | 42 ++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 app/taxonomy/page.tsx create mode 100644 app/taxonomy/taxonomy.module.css diff --git a/app/page.tsx b/app/page.tsx index 885cc17..e54a85a 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -24,7 +24,7 @@ export default function Home() { d="M149.1 64.8L138.7 96H64C28.7 96 0 124.7 0 160V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H373.3L362.9 64.8C356.4 45.2 338.1 32 317.4 32H194.6c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/> - + @@ -50,11 +50,13 @@ export default function Home() {
-

PlantSnapify

-

An AI based research tool for plant identification and research.

+

PlantSnapify

+

An AI based research + tool for plant identification and research.

-

Tips

+

Tips

@@ -161,12 +163,14 @@ export default function Home() {
-

Developers

-
+

Developers

+

This project was planned, designed, and implemented by: Layan Barrieshee, Dony Wang, Haoran Miao, Ayana Hussain.

+ GitHub
diff --git a/app/taxonomy/page.tsx b/app/taxonomy/page.tsx new file mode 100644 index 0000000..13c93c0 --- /dev/null +++ b/app/taxonomy/page.tsx @@ -0,0 +1,18 @@ +import {taxonomy} from "@/app/taxonomy"; +import styles from "./taxonomy.module.css" + +export default function Page() { + function tax(n: string, lv: number) { + return
+ + +
{taxonomy[n]["c"].map((s: string) => tax(s, lv + 1))}
+
+ } + + return
+
+ {tax("Viridiplantae", 0)} +
+
+} \ No newline at end of file diff --git a/app/taxonomy/taxonomy.module.css b/app/taxonomy/taxonomy.module.css new file mode 100644 index 0000000..1fb8696 --- /dev/null +++ b/app/taxonomy/taxonomy.module.css @@ -0,0 +1,42 @@ +.tax { + padding: 3em; + overflow: auto; + height: calc(100vh - 96px); + font-weight: bold; +} + +.tax input { + display: none; +} + +.tax label { + padding: 0.2em; + border-radius: 0.2em; + transition: background-color 0.2s ease; +} + +.tax label:hover { + background: #eeffe0 !important; +} + +.tax input:checked ~ label { + background: #deffc4; +} + +.tax input:checked ~ .inner { + display: block; +} + +.outer { + display: flex; + align-items: center; +} + +.inner { + display: none; + margin: 0.2em; + padding: 0.2em; + border-image: linear-gradient(90deg, #78b75f, #fff 20%) 2; + border-width: 2px 0 2px 2px; + border-style: solid; +} \ No newline at end of file