Skip to content

Commit 21cca7b

Browse files
committed
Quartz sync: May 18, 2025, 1:24 PM
1 parent 3051c92 commit 21cca7b

File tree

5 files changed

+91
-39
lines changed

5 files changed

+91
-39
lines changed

quartz.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ const config: QuartzConfig = {
1717
},
1818
locale: "en-US",
1919
baseUrl: "yoma.kr",
20-
ignorePatterns: ["private", "templates", ".obsidian"],
20+
ignorePatterns: [
21+
"private",
22+
"templates",
23+
".obsidian"
24+
],
2125
defaultDateType: "modified",
2226
theme: {
2327
fontOrigin: "googleFonts",

quartz.layout.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export const defaultContentPageLayout: PageLayout = {
3939
Component.TagList(),
4040
],
4141
left: [
42-
Component.PageTitle(),
42+
Component.MobileOnly(Component.PageTitle()),
43+
Component.DesktopOnly(Component.PageTitleWithLogo()),
4344
Component.MobileOnly(Component.Spacer()),
4445
Component.Flex({
4546
components: [
@@ -48,7 +49,7 @@ export const defaultContentPageLayout: PageLayout = {
4849
grow: true,
4950
},
5051
{ Component: Component.Darkmode() },
51-
// { Component: Component.ReaderMode() },
52+
{ Component: Component.DesktopOnly(Component.ReaderMode()) },
5253
],
5354
}),
5455
// Component.Explorer(),
@@ -59,9 +60,7 @@ export const defaultContentPageLayout: PageLayout = {
5960
}
6061
},
6162
}),
62-
// Component.RecentNotes({
63-
// limit: 5,
64-
// }),
63+
// Component.RecentNotes({ limit: 5}),
6564
],
6665
right: [
6766
Component.Graph(),
@@ -74,7 +73,8 @@ export const defaultContentPageLayout: PageLayout = {
7473
export const defaultListPageLayout: PageLayout = {
7574
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
7675
left: [
77-
Component.PageTitle(),
76+
Component.MobileOnly(Component.PageTitle()),
77+
Component.DesktopOnly(Component.PageTitleWithLogo()),
7878
Component.MobileOnly(Component.Spacer()),
7979
Component.Flex({
8080
components: [
@@ -83,6 +83,7 @@ export const defaultListPageLayout: PageLayout = {
8383
grow: true,
8484
},
8585
{ Component: Component.Darkmode() },
86+
{ Component: Component.DesktopOnly(Component.ReaderMode()) },
8687
],
8788
}),
8889
// Component.Explorer(),

quartz/components/PageTitle.tsx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,32 @@ import { classNames } from "../util/lang"
44
import { i18n } from "../i18n"
55

66
const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => {
7-
const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
8-
const baseDir = pathToRoot(fileData.slug!)
9-
return (
10-
<h2 class={classNames(displayClass, "page-title")}>
11-
<a href={baseDir}>{title}</a>
12-
</h2>
13-
)
7+
const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
8+
const baseDir = pathToRoot(fileData.slug!)
9+
return (
10+
<h2 class={classNames(displayClass, "page-title")}>
11+
<a href={baseDir}>
12+
{title}
13+
<img class="logo" src="https://avatars.githubusercontent.com/u/71107230?v=4" />
14+
</a>
15+
</h2>
16+
)
1417
}
1518

1619
PageTitle.css = `
1720
.page-title {
1821
font-size: 1.75rem;
1922
margin: 0;
2023
font-family: var(--titleFont);
24+
display: flex;
25+
align-items: center;
26+
}
27+
.logo {
28+
width: 2rem;
29+
height: 2rem;
30+
padding-left: 0.25rem;
31+
margin: 0;
32+
vertical-align: text-top;
2133
}
2234
`
2335

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { pathToRoot } from "../util/path"
2+
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
3+
import { classNames } from "../util/lang"
4+
import { i18n } from "../i18n"
5+
6+
const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => {
7+
const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
8+
const baseDir = pathToRoot(fileData.slug!)
9+
return (
10+
<h2 class={classNames(displayClass, "page-title")}>
11+
<a href={baseDir}>
12+
{title}
13+
<img class="page-logo" src="https://avatars.githubusercontent.com/u/71107230?v=4" />
14+
</a>
15+
</h2>
16+
)
17+
}
18+
19+
PageTitle.css = `
20+
.page-title {
21+
font-size: 1.75rem;
22+
margin: 0;
23+
font-family: var(--titleFont);
24+
display: flex;
25+
}
26+
.page-logo {
27+
justify-content: center;
28+
align-items: center;
29+
margin: 0;
30+
}
31+
`
32+
33+
export default (() => PageTitle) satisfies QuartzComponentConstructor

quartz/components/index.ts

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Darkmode from "./Darkmode"
77
import ReaderMode from "./ReaderMode"
88
import Head from "./Head"
99
import PageTitle from "./PageTitle"
10+
import PageTitleWithLogo from "./PageTitleWithLogo"
1011
import ContentMeta from "./ContentMeta"
1112
import Spacer from "./Spacer"
1213
import TableOfContents from "./TableOfContents"
@@ -25,29 +26,30 @@ import Flex from "./Flex"
2526
import ConditionalRender from "./ConditionalRender"
2627

2728
export {
28-
ArticleTitle,
29-
Content,
30-
TagContent,
31-
FolderContent,
32-
Darkmode,
33-
ReaderMode,
34-
Head,
35-
PageTitle,
36-
ContentMeta,
37-
Spacer,
38-
TableOfContents,
39-
Explorer,
40-
TagList,
41-
Graph,
42-
Backlinks,
43-
Search,
44-
Footer,
45-
DesktopOnly,
46-
MobileOnly,
47-
RecentNotes,
48-
NotFound,
49-
Breadcrumbs,
50-
Comments,
51-
Flex,
52-
ConditionalRender,
29+
ArticleTitle,
30+
Content,
31+
TagContent,
32+
FolderContent,
33+
Darkmode,
34+
ReaderMode,
35+
Head,
36+
PageTitle,
37+
PageTitleWithLogo,
38+
ContentMeta,
39+
Spacer,
40+
TableOfContents,
41+
Explorer,
42+
TagList,
43+
Graph,
44+
Backlinks,
45+
Search,
46+
Footer,
47+
DesktopOnly,
48+
MobileOnly,
49+
RecentNotes,
50+
NotFound,
51+
Breadcrumbs,
52+
Comments,
53+
Flex,
54+
ConditionalRender,
5355
}

0 commit comments

Comments
 (0)