mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
fixed anchors
This commit is contained in:
parent
c7156995e7
commit
8ec3504224
3 changed files with 24 additions and 1 deletions
|
@ -3148,6 +3148,14 @@ body:has(#menu-controller:checked) {
|
|||
box-shadow: 5px 5px 20px 1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.anchor {
|
||||
display: block;
|
||||
position: relative;
|
||||
top: -100px;
|
||||
height: 0px;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.thumbnail {
|
||||
min-width: 100%;
|
||||
|
|
|
@ -383,6 +383,14 @@ body:has(#menu-controller:checked) {
|
|||
box-shadow: 5px 5px 20px 1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.anchor {
|
||||
display: block;
|
||||
position: relative;
|
||||
top: -100px;
|
||||
height: 0px;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@screen sm {
|
||||
.thumbnail {
|
||||
min-width: 100%;
|
||||
|
|
|
@ -1 +1,8 @@
|
|||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="relative group">{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<span class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a></span>{{ end }}</h{{ .Level }}>
|
||||
<div id="{{ .Anchor | safeURL }}" class="anchor">{{ .Text | safeHTML }}></div>
|
||||
<h{{ .Level }} class="relative group">{{ .Text | safeHTML }}
|
||||
{{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<span
|
||||
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
|
||||
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700"
|
||||
style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a></span>
|
||||
{{ end }}
|
||||
</h{{ .Level }}>
|
Loading…
Reference in a new issue