mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
♻️ refactor: Move similar javascript inline code out of line
- Move variables oid, oid_likes out of line - Move background-blur out of line - Move fetch-repo code out of line
This commit is contained in:
@@ -6,10 +6,6 @@
|
||||
{{ partial "header/basic.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.addEventListener('scroll', function (e) {
|
||||
var scroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
||||
var background_blur = document.getElementById('menu-blur');
|
||||
background_blur.style.opacity = (scroll / 300);
|
||||
});
|
||||
</script>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="menu-blur"></script>
|
||||
|
||||
Reference in New Issue
Block a user