From c6600be22d8be51409ef7523e72d0062d1113aaf Mon Sep 17 00:00:00 2001 From: kjellherzke Date: Sun, 2 Jun 2024 14:22:40 +0200 Subject: [PATCH 1/2] fix: button styling, visual links --- src/components/LearningPath.tsx | 25 ++++++++++++------------- src/index.css | 7 ++++++- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/components/LearningPath.tsx b/src/components/LearningPath.tsx index eacb62f..f62d887 100644 --- a/src/components/LearningPath.tsx +++ b/src/components/LearningPath.tsx @@ -12,6 +12,7 @@ function Tab({ isMarkdownOpen, undoNodeLink, isUndoDisabled, + linkUrl, }: { setGraphFullView: (bool: boolean) => void; isGraphFullView: boolean; @@ -19,13 +20,14 @@ function Tab({ isMarkdownOpen: boolean; undoNodeLink: () => void; isUndoDisabled: boolean; + linkUrl: string; }) { return (
- - -
) : ( diff --git a/src/index.css b/src/index.css index e22611f..348c8e9 100644 --- a/src/index.css +++ b/src/index.css @@ -38,8 +38,13 @@ ul li { @apply pl-4; } +button, a { - @apply text-blue-400 underline; + @apply border-2 border-slate bg-background p-2 rounded-xl text-secondary disabled:text-slate hover:bg-secondary hover:text-background focus:bg-primary focus:text-background transition-all; +} + +a { + @apply px-2 py-0.5; } code { From 08b3e8ab4478fa5e03d106e257b5f78b52730e87 Mon Sep 17 00:00:00 2001 From: kjellherzke Date: Sun, 2 Jun 2024 15:45:12 +0200 Subject: [PATCH 2/2] BREAKING: 'homepage' for beacon, with get started button --- src/App.tsx | 91 +++++++++++++++++++++++++-------- src/components/LearningPath.tsx | 5 +- 2 files changed, 71 insertions(+), 25 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c5c7fb2..05170d2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,30 +1,79 @@ +import { useState } from "react"; import LearningPath from "./components/LearningPath"; function App() { + const nodeParam = new URLSearchParams(window.location.search).get("node"); + const [isLearningPathOpen, setLearningPathOpen] = useState(nodeParam != null); + return ( -
-
-
- -

beacon

-
-
- - - - - +
+
+
+
+ +

beacon

+
+
- {/*

Hello, traveller!

*/} - + {isLearningPathOpen ? ( +
+ +
+ ) : ( +
+
+

+ Learn anything and become anyone. +

+

+ Empower Your Growth: Discover Beacon's No-Login, Privacy-Centric + Approach +

+ +

+ * Free, No Signup Required, Forever Secure +

+
+
+
+

+ What is it? +

+
+

+ Dive into a world where learning is limitless and personal growth + is prioritized. Beacon stands as a beacon of light in the digital + landscape, offering a unique platform that values your privacy and + eliminates the need for login hassles. This innovative tool is + designed to expand your knowledge and enhance your skills, all + while ensuring your online activities remain private and secure. + Join us in exploring how Beacon can transform your learning + experience, making every moment count towards achieving your + goals. +

+
+
+ )}
); } diff --git a/src/components/LearningPath.tsx b/src/components/LearningPath.tsx index f62d887..0625416 100644 --- a/src/components/LearningPath.tsx +++ b/src/components/LearningPath.tsx @@ -113,10 +113,7 @@ function Tab({ ); } -export default function Main() { - const nodeParam = - new URLSearchParams(window.location.search).get("node") || "/index"; - +export default function Main({ nodeParam }: { nodeParam: string }) { const [nodeUrl, setNodeUrl] = useState(nodeParam + ".json"); const [markdownUrl, setMarkdownUrl] = useState(nodeParam + ".md");