mirror of
https://github.com/zen-browser/docs.git
synced 2025-07-07 17:05:34 +02:00
chore: Added Zen Browser logo to Page's Tile
This commit is contained in:
parent
a87fafd3b3
commit
37584f0e09
2 changed files with 6 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
|
||||
/content/.obsidian
|
||||
/node_modules
|
||||
.idea
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { pathToRoot } from "../util/path"
|
||||
import { joinSegments, pathToRoot } from "../util/path"
|
||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
import { classNames } from "../util/lang"
|
||||
import { i18n } from "../i18n"
|
||||
|
@ -6,8 +6,11 @@ import { i18n } from "../i18n"
|
|||
const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => {
|
||||
const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
|
||||
const baseDir = pathToRoot(fileData.slug!)
|
||||
const iconPath = joinSegments(baseDir, "static/icon.png")
|
||||
return (
|
||||
<h2 class={classNames(displayClass, "page-title")}>
|
||||
<img src={iconPath} alt="Zen Browser Logo" width="70px" />
|
||||
<br/>
|
||||
<a href={baseDir}>{title}</a>
|
||||
</h2>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue