1
0
mirror of https://github.com/Damillora/Yuika synced 2024-11-21 16:57:32 +00:00

fix(theme): update exclude page to use Shian

This commit is contained in:
Damillora 2021-04-15 11:27:14 +07:00
parent fa3ce87d57
commit 6bd40414b0

View File

@ -1,77 +1,65 @@
{{!< ../default}} {{!< ../default}} {{> header-background background=@site.cover_image}}
<div class="relative group index-header large"> <div class="page-header">
{{> header-background background=@site.cover_image}} {{!--Special header-image.hbs partial to generate the <div class="page-header__background responsive-header-img">
background image--}} <div class="page-header__overlay"></div>
<div class="w-full h-full opacity-50 bg-black">
</div> </div>
</div> <div class="page-header__contents">
<div class="absolute left-0 right-0 top-0 bottom-0 flex flex-row items-center justify-center"> <div class="post-header container mx-auto main">
<div class="container mx-auto content-full"> <div>
<div class="text-white"> <h1>Plausible Exclude</h1>
<div id="subscribe-form"> <p>Click the button below to toggle your exclusion in analytics for this
<div> site</p>
<h1 class="text-2xl md:text-4xl">Plausible Exclude</h1> <p>You currently <span id="plausible_not">are not</span><span id="plausible_yes">are</span>
<p>Click the button below to toggle your exclusion in analytics for this excluding your visits.</p>
site</p> <a class=""
<p></p>You currently <span id="plausible_not">are not</span><span id="plausible_yes">are</span> href="javascript:toggleExclusion()">Exclude my visits</a>
excluding your visits.</p>
<div class="py-4">
<a class="px-4 py-2 appearance-none focus:outline-none bg-yuika-blue-700 rounded-none hover:bg-yuika-blue-500 transition duration-300 ease-in-out" href="javascript:toggleExclusion()">Exclude my visits</a>
</div>
</div>
<script>
window.addEventListener('load', function (e) {
var exclusionState = window.localStorage.plausible_ignore == "true"
if (exclusionState) {
document.getElementById("plausible_not").style.display = "none"
document.getElementById("plausible_yes").style.display = "inline"
document.getElementById("plausible_button").innerHTML = 'Stop excluding my visits'
} else {
document.getElementById("plausible_yes").style.display = "none"
document.getElementById("plausible_not").style.display = "inline"
document.getElementById("plausible_button").innerHTML = 'Exclude my visits'
}
});
function toggleExclusion(e) {
var exclusionState = window.localStorage.plausible_ignore == "true"
if (exclusionState) {
delete window.localStorage.plausible_ignore
document.getElementById("plausible_yes").style.display = "none"
document.getElementById("plausible_not").style.display = "inline"
document.getElementById("plausible_button").innerHTML = 'Exclude my visits'
} else {
window.localStorage.plausible_ignore = "true"
document.getElementById("plausible_not").style.display = "none"
document.getElementById("plausible_yes").style.display = "inline"
document.getElementById("plausible_button").innerHTML = 'Stop excluding my visits'
}
}
</script>
</div> </div>
<script>
window.addEventListener('load', function (e) {
var exclusionState = window.localStorage.plausible_ignore == "true"
if (exclusionState) {
document.getElementById("plausible_not").style.display = "none"
document.getElementById("plausible_yes").style.display = "inline"
document.getElementById("plausible_button").innerHTML = 'Stop excluding my visits'
} else {
document.getElementById("plausible_yes").style.display = "none"
document.getElementById("plausible_not").style.display = "inline"
document.getElementById("plausible_button").innerHTML = 'Exclude my visits'
}
});
function toggleExclusion(e) {
var exclusionState = window.localStorage.plausible_ignore == "true"
if (exclusionState) {
delete window.localStorage.plausible_ignore
document.getElementById("plausible_yes").style.display = "none"
document.getElementById("plausible_not").style.display = "inline"
document.getElementById("plausible_button").innerHTML = 'Exclude my visits'
} else {
window.localStorage.plausible_ignore = "true"
document.getElementById("plausible_not").style.display = "none"
document.getElementById("plausible_yes").style.display = "inline"
document.getElementById("plausible_button").innerHTML = 'Stop excluding my visits'
}
}
</script>
</div> </div>
</div> </div>
</div> </div>
</div>
<article class="post-article"> <main id="post" class="container mx-auto main">
<main class="content container" id="post"> </main>
<div class="content-full">
{{#post}} {{#contentFor "scripts"}}
{{content}} <script>
{{/post}} $(document).ready(function () {
</div> // FitVids - start
</main> var $postContent = $("#post");
{{#contentFor "scripts"}} $postContent.fitVids();
<script> // FitVids - end
$(document).ready(function () { });
// FitVids - start </script>
var $postContent = $("#post"); {{/contentFor}}
$postContent.fitVids();
// FitVids - end
});
</script>
{{/contentFor}}