diff --git a/quartz.layout.ts b/quartz.layout.ts index 94264a9..21c3f4e 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -8,11 +8,14 @@ export const sharedPageComponents: SharedLayout = { Component.DesktopOnly(Component.PageImage()), Component.Homebar(), ], - footer: Component.Footer({ - links: { - "Main social profile": "https://derg.social/@ulysia", - }, - }), + footer: [ + Component.Footer({ + links: { + "Main social profile": "https://derg.social/@ulysia", + }, + }), + Component.Rings() + ], } // components for pages that display a single page (e.g. a single note) diff --git a/quartz/components/Rings.tsx b/quartz/components/Rings.tsx new file mode 100644 index 0000000..1eccbdc --- /dev/null +++ b/quartz/components/Rings.tsx @@ -0,0 +1,49 @@ +import { pathToRoot } from "../util/path" +import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" +import { classNames } from "../util/lang" +import { i18n } from "../i18n" + +const Homebar: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => { + const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title + const baseDir = pathToRoot(fileData.slug!) + return ( +
+
+

Fediring:

+ + Random + +
+
+ ) +} + +Homebar.css = ` +.ring { + display:flex; + flex-flow: row wrap; +} + +.ringbtn { + font-size: 0.9rem !important; + border-radius: 16px !important; + border:none !important; + background-color: rgba(100,100,100, 0.3) !important; + padding: 0.4rem 0.8rem !important; + margin: 0.2rem 0.4rem !important; + text-decoration: none !important; + width: fit-content !important; + height: fit-content !important; + cursor:pointer !important; +} + +.ringbtn:hover{ + background-color: rgba(100,100,100, 0.5) !important; +} + +.ring svg { + display:none !important; +} +` + +export default (() => Homebar) satisfies QuartzComponentConstructor diff --git a/quartz/components/index.ts b/quartz/components/index.ts index 111ce9b..2219b11 100644 --- a/quartz/components/index.ts +++ b/quartz/components/index.ts @@ -21,6 +21,7 @@ import RecentNotes from "./RecentNotes" import Breadcrumbs from "./Breadcrumbs" import PageImage from "./PageImage" import Homebar from "./Homebar" +import Rings from "./Rings" export { ArticleTitle, @@ -46,4 +47,5 @@ export { Breadcrumbs, PageImage, Homebar, + Rings, } diff --git a/quartz/styles/custom.scss b/quartz/styles/custom.scss index d2d1376..b0c09dc 100644 --- a/quartz/styles/custom.scss +++ b/quartz/styles/custom.scss @@ -1,28 +1,3 @@ @use "./base.scss"; // put your custom CSS here! -.ring { - display:flex; - flex-flow: row wrap; -} - -.ringbtn { - font-size: 0.9rem !important; - border-radius: 16px !important; - border:none !important; - background-color: rgba(100,100,100, 0.3) !important; - padding: 0.4rem 0.8rem !important; - margin: 0.2rem 0.4rem !important; - text-decoration: none !important; - width: fit-content !important; - height: fit-content !important; - cursor:pointer !important; -} - -.ringbtn:hover{ - background-color: rgba(100,100,100, 0.5) !important; -} - -.ring svg { - display:none !important; -} \ No newline at end of file