From 23719ec405a5c4cf9c587425436af7e6276fabf6 Mon Sep 17 00:00:00 2001 From: Xanazf Date: Wed, 9 Oct 2024 01:14:02 +0300 Subject: [PATCH] footer, root module nav, and main page done --- src/components/Footer.astro | 34 +++++ src/components/Header.astro | 1 + src/components/icons.tsx | 20 +++ src/components/iconsModule.ts | 8 ++ .../navigation/sidebars/nav/Tree.tsx | 40 +++++- src/layouts/BaseLayout.astro | 2 + src/layouts/DocsLayout.astro | 2 + src/pages/docs/types/[type]/index.astro | 40 ++++-- src/pages/index.astro | 30 ++++- src/styles/css-config/animations.css | 55 +++++++- src/styles/css-config/base.css | 12 +- src/styles/docs/docs-types.css | 77 ++++++++++- src/styles/docs/docs.css | 3 +- src/styles/docs/nav/nav.css | 1 + src/styles/docs/nav/search.css | 24 ++-- src/styles/global.css | 77 ++++++++++- src/styles/main-page.css | 127 ++++++++++++++++++ 17 files changed, 519 insertions(+), 34 deletions(-) create mode 100644 src/components/Footer.astro create mode 100644 src/styles/main-page.css diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..8a05ba8 --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,34 @@ +--- +import { getHTMLIcon } from "./iconsModule"; + +const gitString = getHTMLIcon("git"); +const matrixString = getHTMLIcon("matrix"); +--- + diff --git a/src/components/Header.astro b/src/components/Header.astro index e0436ac..f20b8b2 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -56,6 +56,7 @@ const { headings } = Astro.props;
+
|
|
|
diff --git a/src/components/icons.tsx b/src/components/icons.tsx index 2208364..975c37d 100644 --- a/src/components/icons.tsx +++ b/src/components/icons.tsx @@ -475,3 +475,23 @@ export const LoadingSpinner: VoidComponent<{ ); }; + +export const LinkSimple: VoidComponent<{ + class?: string; +}> = props => { + return ( + + Go to + + + ); +}; diff --git a/src/components/iconsModule.ts b/src/components/iconsModule.ts index cba5795..00e8020 100644 --- a/src/components/iconsModule.ts +++ b/src/components/iconsModule.ts @@ -1,9 +1,17 @@ const magnifier = "M232.49 215.51L185 168a92.12 92.12 0 1 0-17 17l47.53 47.54a12 12 0 0 0 17-17ZM44 112a68 68 0 1 1 68 68a68.07 68.07 0 0 1-68-68"; +const git = + "M90.156 41.965 50.036 1.848a5.918 5.918 0 0 0-8.372 0l-8.328 8.332 10.566 10.566a7.03 7.03 0 0 1 7.23 1.684 7.034 7.034 0 0 1 1.669 7.277l10.187 10.184a7.028 7.028 0 0 1 7.278 1.672 7.04 7.04 0 0 1 0 9.957 7.05 7.05 0 0 1-9.965 0 7.044 7.044 0 0 1-1.528-7.66l-9.5-9.497V59.36a7.04 7.04 0 0 1 1.86 11.29 7.04 7.04 0 0 1-9.957 0 7.04 7.04 0 0 1 0-9.958 7.06 7.06 0 0 1 2.304-1.539V33.926a7.049 7.049 0 0 1-3.82-9.234L29.242 14.272 1.73 41.777a5.925 5.925 0 0 0 0 8.371L41.852 90.27a5.925 5.925 0 0 0 8.37 0l39.934-39.934a5.925 5.925 0 0 0 0-8.371"; + +const matrix = + "M72 216a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8V40a8 8 0 0 1 8-8h24a8 8 0 0 1 0 16H48v160h16a8 8 0 0 1 8 8M216 32h-24a8 8 0 0 0 0 16h16v160h-16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8m-32 88a32 32 0 0 0-56-21.13a31.93 31.93 0 0 0-40.71-6.15A8 8 0 0 0 72 96v64a8 8 0 0 0 16 0v-40a16 16 0 0 1 32 0v40a8 8 0 0 0 16 0v-40a16 16 0 0 1 32 0v40a8 8 0 0 0 16 0Z"; + function getHTMLIcon(name: string): string { const hashmap = { magnifier: () => magnifier, + git: () => git, + matrix: () => matrix, }; return hashmap[name as keyof typeof hashmap](); diff --git a/src/components/navigation/sidebars/nav/Tree.tsx b/src/components/navigation/sidebars/nav/Tree.tsx index 6145708..a3e1117 100644 --- a/src/components/navigation/sidebars/nav/Tree.tsx +++ b/src/components/navigation/sidebars/nav/Tree.tsx @@ -1,7 +1,7 @@ import { type Component, Index, For } from "solid-js"; import { Accordion } from "@ark-ui/solid"; -import { ShevronSmallDown } from "@icons"; +import { LinkSimple, ShevronSmallDown } from "@icons"; import type { TreeProps } from "../types"; export const Tree: Component = props => { @@ -118,6 +118,44 @@ export const Tree: Component = props => { + + + + + + + + QtQuick Type Reference + + + + + + + + + + + + Quickshell Examples + + + + ); diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 0520497..cc1b1a0 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,5 +1,6 @@ --- import Header from "@components/Header.astro"; +import Footer from "@src/components/Footer.astro"; import Head from "@config/Head.astro"; import PreTheme from "@config/PreTheme.astro"; import "@styles/global.css"; @@ -25,5 +26,6 @@ const { title, description } = Astro.props;

{title}

+
diff --git a/src/layouts/DocsLayout.astro b/src/layouts/DocsLayout.astro index 16e60e6..c46c247 100644 --- a/src/layouts/DocsLayout.astro +++ b/src/layouts/DocsLayout.astro @@ -10,6 +10,7 @@ import Nav from "@components/navigation/sidebars/Nav.astro"; import CreateQMLCodeButtons from "@components/hooks/CreateQMLCodeButtons.astro"; import "@styles/global.css"; import type { ConfigHeading } from "@src/components/navigation/sidebars/types"; +import Footer from "@src/components/Footer.astro"; interface Props { title: string; @@ -98,6 +99,7 @@ if (url[2]) {
+