mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 21:16:21 +00:00
feat: grey out broken links
This commit is contained in:
parent
902d0f2a0f
commit
c51573efa9
3 changed files with 20 additions and 9 deletions
|
@ -185,6 +185,11 @@ article {
|
||||||
padding: 0 0.1em;
|
padding: 0 0.1em;
|
||||||
margin: auto -0.1em;
|
margin: auto -0.1em;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
|
||||||
|
&.broken {
|
||||||
|
opacity: 0.5;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
title: 🪴 Quartz 3.1
|
title: 🪴 Quartz 3.1
|
||||||
---
|
---
|
||||||
Host your second brain and [digital garden](https://jzhao.xyz/posts/digital-gardening) for free. Quartz features
|
Host your second brain and [digital garden](https://jzhao.xyz/posts/digital-gardening) for free. Quartz features
|
||||||
1. Extremely fast full-text search by pressing `/`
|
1. Extremely fast full-text search by pressing `ctrl` + `k`
|
||||||
2. Display for backlinks of each note
|
2. Wikilink support
|
||||||
3. Fully customizable local graph view
|
3. Display for backlinks of each note
|
||||||
4. Endlessly powerful page and theme customization using CSS
|
4. Fully customizable local graph view
|
||||||
5. Automatically generated tag and section lists of content
|
5. Endlessly powerful page and theme customization using CSS
|
||||||
6. Beautiful link previews
|
6. Automatically generated tag and section lists of content
|
||||||
|
7. Beautiful link previews
|
||||||
|
|
||||||
## Get Started
|
## Get Started
|
||||||
> 📚 [Setup your own digital garden using Quartz](notes/setup.md)
|
> 📚 [Setup your own digital garden using Quartz](notes/setup.md)
|
||||||
|
@ -18,7 +19,7 @@ Not convinced yet? Look at some [community digital gardens](notes/showcase.md) b
|
||||||
If you prefer browsing the contents of this site through a list instead of a graph, you can find content lists here too:
|
If you prefer browsing the contents of this site through a list instead of a graph, you can find content lists here too:
|
||||||
|
|
||||||
- [All Notes](/notes)
|
- [All Notes](/notes)
|
||||||
- [Setup-related Notes](/tags/setup)
|
- [Setup-related Notes](/tags/set)
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
- 🚧 [Troubleshooting and FAQ](notes/troubleshooting.md)
|
- 🚧 [Troubleshooting and FAQ](notes/troubleshooting.md)
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{$spacedurl := replace $trimmed "%20" " " }}
|
{{$spacedurl := replace $trimmed "%20" " " }}
|
||||||
{{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}}
|
{{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}}
|
||||||
|
{{$nonexistent := eq (.Page.GetPage $spacedurl).RelPermalink ""}}
|
||||||
{{$rooted := default $spacedurl (strings.TrimRight "/" (.Page.GetPage $spacedurl).RelPermalink) }}
|
{{$rooted := default $spacedurl (strings.TrimRight "/" (.Page.GetPage $spacedurl).RelPermalink) }}
|
||||||
<a href="{{$rooted}}" rel="noopener" class="internal-link" data-src="{{$rooted}}">{{ .Text | safeHTML }}</a>
|
<a
|
||||||
{{- end -}}
|
{{if not $nonexistent}}href="{{$rooted}}"{{end}}
|
||||||
|
rel="noopener" class="internal-link{{if $nonexistent}} broken{{end}}"
|
||||||
|
data-src="{{$rooted}}">{{ .Text | safeHTML }}
|
||||||
|
</a>
|
||||||
|
{{- end -}}
|
||||||
|
|
Loading…
Reference in a new issue