From 230e6b41753a2d94cf091247f7544df8fd731c11 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Thu, 5 Sep 2024 00:11:30 +0300 Subject: [PATCH] added _ScrollToTop.tsx --- quartz/components/Footer.tsx | 13 +++++++++ quartz/components/_ScrollToTop.tsx | 31 ++++++++++++++++++++++ quartz/components/styles/_scrollToTop.scss | 31 ++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 quartz/components/_ScrollToTop.tsx create mode 100644 quartz/components/styles/_scrollToTop.scss diff --git a/quartz/components/Footer.tsx b/quartz/components/Footer.tsx index 4267c7076..bd10d0314 100644 --- a/quartz/components/Footer.tsx +++ b/quartz/components/Footer.tsx @@ -23,6 +23,19 @@ export default ((opts?: Options) => { ))} +

+ ) } diff --git a/quartz/components/_ScrollToTop.tsx b/quartz/components/_ScrollToTop.tsx new file mode 100644 index 000000000..4f0cf654b --- /dev/null +++ b/quartz/components/_ScrollToTop.tsx @@ -0,0 +1,31 @@ +import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" +import style from "./styles/_scrollToTop.scss" + +// @ts-ignore +import script from "./scripts/_randomPage.inline" +import { classNames } from "../util/lang" +import { i18n } from "../i18n" + +const ScrollToTop: QuartzComponent = ({ displayClass, fileData }: QuartzComponentProps) => { +return ( +
+

Utilities

+ + +
+)} + +ScrollToTop.css = style +ScrollToTop.afterDOMLoaded = script +export default (() => ScrollToTop) satisfies QuartzComponentConstructor \ No newline at end of file diff --git a/quartz/components/styles/_scrollToTop.scss b/quartz/components/styles/_scrollToTop.scss new file mode 100644 index 000000000..c35bf5b9f --- /dev/null +++ b/quartz/components/styles/_scrollToTop.scss @@ -0,0 +1,31 @@ +.scroll-to-top { + &>h3 { + font-size: 1rem; + margin: 0; + } + + &>ul { + list-style: none; + padding: 0; + margin: 0.5rem 0; + + &>li { + &>a { + background-color: transparent; + } + } + } +} + +a { + text-decoration: none; +} + +.external-icon { + height: 1ex; + margin: 0 0.15em; + + > path { + fill: var(--dark); + } +} \ No newline at end of file