chore(header): remove all dummy-targets and update smooth scroll

This commit is contained in:
Dillon
2020-02-16 16:42:14 +08:00
parent 4aac6b98a5
commit 69688661f4
11 changed files with 55 additions and 81 deletions

View File

@@ -52,7 +52,7 @@
</div>
{{- /* Dynamic to top button */ -}}
<a href="#" class="dynamic-to-top" id="dynamic-to-top" smooth-scroll>
<a href="#" class="dynamic-to-top" id="dynamic-to-top">
<span>&nbsp;</span>
</a>

View File

@@ -1,5 +1,5 @@
{{- /* Desktop header */ -}}
<header class="desktop">
<header class="desktop" id="header-desktop">
<div class="header-wrapper">
<div class="header-title animated bounceIn">
<a href="{{ .Site.BaseURL }}">
@@ -19,7 +19,7 @@
</header>
{{- /* Mobile header */ -}}
<header class="mobile">
<header class="mobile" id="header-mobile">
<div class="header-wrapper">
<div class="header-container">
<div class="header-title animated bounceIn">

View File

@@ -25,14 +25,4 @@
{{- $REout = `↩︎` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- /* Dummy target */ -}}
{{- $REin = `<(.+) (id="fnref:.+?")>` -}}
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- /* Dummy target */ -}}
{{- $REin = `<li (id="fn:.+?")(.*?)>\s?<p>` -}}
{{- $REout = `<li $2><p><a class="post-dummy-target" $1></a>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- return $content -}}