-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sort): link sort of a single post to the sorts page
close #6
- Loading branch information
Showing
5 changed files
with
64 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<template> | ||
<div class="annotations"> | ||
<a | ||
:href="withBase(`/sorts#${toDashedHash(frontmatter.sort)}`)" | ||
class="sort" | ||
> | ||
{{ frontmatter.sort?.toUpperCase() }} | ||
</a> | ||
<!-- <Dot /> --> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { useData, withBase } from "vitepress"; | ||
import { toDashedHash } from "../utils"; | ||
// import Dot from "../components/Dot.vue"; | ||
|
||
const { frontmatter } = useData(); | ||
</script> | ||
|
||
<style scoped> | ||
.annotations { | ||
border-top: 1px solid var(--vp-c-divider); | ||
padding: 2rem 0; | ||
font-size: 14px; | ||
} | ||
|
||
.sort { | ||
color: var(--vp-c-neutral-inverse); | ||
background-color: var(--vp-c-brand-3); | ||
font-weight: bold; | ||
border-radius: 4px; | ||
padding: 4px 8px; | ||
} | ||
|
||
.sort:hover { | ||
background-color: var(--vp-c-brand-1); | ||
} | ||
|
||
.dark .sort { | ||
background-color: var(--vp-c-brand-1); | ||
} | ||
|
||
.dark .sort:hover { | ||
background-color: var(--vp-c-brand-2); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters