@@ -0,0 +1,40 @@
|
||||
{{define "downloadAppFloat"}} {{if .appConfig.AppAddr}}
|
||||
<link rel="stylesheet" href="/static/css/downloadAppFloat.css?v=6" />
|
||||
<a
|
||||
class="download-fab"
|
||||
href="{{.appConfig.AppAddr}}"
|
||||
target="_blank"
|
||||
rel="sponsored nofollow noopener noreferrer"
|
||||
aria-label="下载 App"
|
||||
>
|
||||
<img
|
||||
class="download-fab-icon"
|
||||
src="/static/images/phone.svg"
|
||||
alt="下载黄果短剧APP"
|
||||
/>
|
||||
<span class="download-fab-text">下载 App</span>
|
||||
</a>
|
||||
<script>
|
||||
(function () {
|
||||
var button = document.querySelector(".download-fab");
|
||||
if (!button) return;
|
||||
|
||||
var revealTimer = 0;
|
||||
function reveal() {
|
||||
revealTimer = 0;
|
||||
button.classList.remove("is-scrolling");
|
||||
}
|
||||
function onScroll() {
|
||||
button.classList.add("is-scrolling");
|
||||
if (revealTimer) window.clearTimeout(revealTimer);
|
||||
revealTimer = window.setTimeout(reveal, 180);
|
||||
}
|
||||
|
||||
window.addEventListener("scroll", onScroll, { passive: true });
|
||||
document.addEventListener("scroll", onScroll, {
|
||||
passive: true,
|
||||
capture: true,
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{{end}} {{end}}
|
||||
Reference in New Issue
Block a user