From 56d2382c282431115b2964d440b790ce11f19e72 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 23 Dec 2021 14:05:27 -0800 Subject: [PATCH] fix relative link styling, change graph and backlinks to refer to name rather than path --- assets/base.scss | 10 ++++------ content/_index.md | 2 +- layouts/partials/backlinks.html | 5 +++-- layouts/partials/graph.html | 13 +++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/assets/base.scss b/assets/base.scss index bd0b609..f50e9cc 100644 --- a/assets/base.scss +++ b/assets/base.scss @@ -128,9 +128,6 @@ td, th { article a { font-family: Source Sans Pro; font-weight: 600; - text-decoration: underline; - text-decoration-color: var(--tertiary); - text-decoration-thickness: .15em; } sup > a { @@ -191,10 +188,11 @@ hr { } // internal link -a[href^="/"] { +a[href^="./"] { text-decoration: none; - background-color: #afbfc922; + background-color: #afbfc933; padding: 0 0.2em; + font-weight: 600; border-radius: 3px; } @@ -370,4 +368,4 @@ header { } } } -} \ No newline at end of file +} diff --git a/content/_index.md b/content/_index.md index d981591..5f2e267 100644 --- a/content/_index.md +++ b/content/_index.md @@ -15,4 +15,4 @@ Not convinced yet? Look at some [community digital gardens](moc/showcase) built ## Troubleshooting - 🚧 [Troubleshooting and FAQ](notes/troubleshooting.md) -- 🐛 [Submit an Issue](https://github.com/jackyzha0/quartz/issues) \ No newline at end of file +- 🐛 [Submit an Issue](https://github.com/jackyzha0/quartz/issues) diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html index 744f7e3..9020bf7 100644 --- a/layouts/partials/backlinks.html +++ b/layouts/partials/backlinks.html @@ -4,13 +4,14 @@ {{$host := strings.TrimRight "/" $url.Path }} {{$curPage := strings.TrimPrefix $host (strings.TrimRight "/" .Page.RelPermalink) }} {{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}} + {{$contentTable := $.Site.Data.contentIndex}} {{if $inbound}} {{- range $inbound -}} {{$src := index . "source"}} {{$src = replace $src " " "-"}}
  • - {{index . "source"}} + {{index (index $contentTable $src) "title"}}
  • {{- end -}} {{else}} @@ -18,4 +19,4 @@ No backlinks found {{end}} - \ No newline at end of file + diff --git a/layouts/partials/graph.html b/layouts/partials/graph.html index dbd33d1..a963743 100644 --- a/layouts/partials/graph.html +++ b/layouts/partials/graph.html @@ -13,6 +13,7 @@ \ No newline at end of file +