chore: Added Zen Browser logo to Page's Tile

This commit is contained in:
Jafeth Garro 2024-08-19 00:16:22 -06:00
parent a87fafd3b3
commit 37584f0e09
2 changed files with 6 additions and 2 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
/content/.obsidian /content/.obsidian
/node_modules
.idea

View file

@ -1,4 +1,4 @@
import { pathToRoot } from "../util/path" import { joinSegments, pathToRoot } from "../util/path"
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
import { classNames } from "../util/lang" import { classNames } from "../util/lang"
import { i18n } from "../i18n" import { i18n } from "../i18n"
@ -6,8 +6,11 @@ import { i18n } from "../i18n"
const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => { const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => {
const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
const baseDir = pathToRoot(fileData.slug!) const baseDir = pathToRoot(fileData.slug!)
const iconPath = joinSegments(baseDir, "static/icon.png")
return ( return (
<h2 class={classNames(displayClass, "page-title")}> <h2 class={classNames(displayClass, "page-title")}>
<img src={iconPath} alt="Zen Browser Logo" width="70px" />
<br/>
<a href={baseDir}>{title}</a> <a href={baseDir}>{title}</a>
</h2> </h2>
) )