-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d71e54
commit 8bafcfe
Showing
4 changed files
with
72 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script lang="ts" setup> | ||
import { h } from 'vue'; | ||
const props = defineProps<{ | ||
hash?: string; | ||
}>(); | ||
const Hashtag = () => { | ||
return h( | ||
'a', | ||
{ | ||
href: `#${props.hash}`, | ||
class: | ||
'absolute left-0 -ml-6 opacity-0 group-hover:opacity-100 transition-opacity text-primary-500 dark:text-primary-400 select-none', | ||
}, | ||
'#', | ||
); | ||
}; | ||
</script> | ||
|
||
<template> | ||
<div :id="hash" class="relative group scroll-mt-24"> | ||
<slot :Hashtag></slot> | ||
</div> | ||
</template> |
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