mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 14:35:43 -06:00
fixes and polish on shortcodes
This commit is contained in:
parent
317245e67d
commit
7c0eacf44f
6 changed files with 30 additions and 465 deletions
|
@ -9,7 +9,6 @@ function _getDefaultPackeryOptions() {
|
|||
(function init() {
|
||||
|
||||
$(window).on("load", function () {
|
||||
console.groupCollapsed('[DEBUG] Gallery feature enable');
|
||||
let packeries = [];
|
||||
let nodeGalleries = document.querySelectorAll('.gallery');
|
||||
|
||||
|
@ -18,8 +17,6 @@ function _getDefaultPackeryOptions() {
|
|||
let packery = new Packery(nodeGallery, _getDefaultPackeryOptions());
|
||||
packeries.push(packery);
|
||||
});
|
||||
|
||||
console.log("Galleries founded and initialized with packery", packeries);
|
||||
console.groupEnd();
|
||||
});
|
||||
})();
|
|
@ -48,23 +48,10 @@ function _registerZendModeButtonClick(zendModeButton) {
|
|||
|
||||
(function init() {
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
console.debug('[DEBUG] Zen-mode feature enable');
|
||||
|
||||
// Register click on 'zen-mode-button' node element
|
||||
const zendModeButton = document.getElementById('zen-mode-button');
|
||||
if(zendModeButton !== null && zendModeButton !== undefined) {
|
||||
_registerZendModeButtonClick(zendModeButton);
|
||||
console.log('[DEBUG] Zen-mode button found');
|
||||
|
||||
}else{
|
||||
console.log('[DEBUG] Zen-mode button not found');
|
||||
}
|
||||
|
||||
// Initialize localstorage option 'blowfish-zen-mode-enabled' to false, if it does not exist, otherwise enable it.
|
||||
//if (localStorage.getItem('blowfish-zen-mode-enabled') === null) {
|
||||
// localStorage.setItem('blowfish-zen-mode-enabled', 'false');
|
||||
//} else if (localStorage.getItem('blowfish-zen-mode-enabled') === 'true') {
|
||||
// _toogleZenMode(zendModeButton)
|
||||
//}
|
||||
});
|
||||
})();
|
463
assets/lib/tw-elements/index.min.js
vendored
463
assets/lib/tw-elements/index.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -16,14 +16,14 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div id="{{ $id }}" class="relative" data-te-carousel-init data-te-ride="carousel">
|
||||
<div id="{{ $id }}" class="relative" data-twe-carousel-init data-twe-ride="carousel">
|
||||
<div class="absolute right-0 bottom-0 left-0 z-[2] mx-[15%] mb-10 flex list-none justify-center p-0"
|
||||
data-te-carousel-indicators>
|
||||
data-twe-carousel-indicators>
|
||||
|
||||
{{ $num := 0 }}
|
||||
{{ range $images }}
|
||||
|
||||
<button type="button" data-te-target="#{{ $id }}" data-te-slide-to="{{ $num }}" {{ if eq $num 0 }} data-te-carousel-active aria-current="true" {{ end }}
|
||||
<button type="button" data-twe-target="#{{ $id }}" data-twe-slide-to="{{ $num }}" {{ if eq $num 0 }} data-twe-carousel-active aria-current="true" {{ end }}
|
||||
class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-neutral bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
|
||||
aria-label="Slide {{ $num }}"></button>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
{{ range $images }}
|
||||
|
||||
<div class="relative float-left -mr-[100%] {{ if not (eq $num 0) }} hidden {{ end }} w-full transition-transform duration-[{{ $interval }}ms] ease-in-out motion-reduce:transition-none"
|
||||
data-te-carousel-item {{ if eq $num 0 }} data-te-carousel-active {{ end }}>
|
||||
data-twe-carousel-item {{ if eq $num 0 }} data-twe-carousel-active {{ end }}>
|
||||
<div class="ratio-{{ $aspect }} single_hero_background">
|
||||
<img src="{{ .RelPermalink }}" class="block absolute top-0 object-cover w-full h-full nozoom" alt="carousel image {{$num}}"/>
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
<button
|
||||
class="absolute top-0 bottom-0 left-0 z-[2] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
|
||||
type="button" data-te-target="#{{ $id }}" data-te-slide="prev">
|
||||
type="button" data-twe-target="#{{ $id }}" data-twe-slide="prev">
|
||||
<span class="inline-block h-8 w-8">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4.5"
|
||||
stroke="currentColor" class="h-6 w-6">
|
||||
|
@ -61,7 +61,7 @@
|
|||
</button>
|
||||
<button
|
||||
class="absolute top-0 bottom-0 right-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
|
||||
type="button" data-te-target="#{{ $id }}" data-te-slide="next">
|
||||
type="button" data-twe-target="#{{ $id }}" data-twe-slide="next">
|
||||
<span class="inline-block h-8 w-8">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4.5"
|
||||
stroke="currentColor" class="h-6 w-6">
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
</div>
|
||||
<script>
|
||||
console.log({{ $gitlabURL }})
|
||||
fetch({{ $gitlabURL }}, {
|
||||
headers: new Headers({
|
||||
'User-agent': 'Mozilla/4.0 Custom User Agent'
|
||||
|
@ -47,7 +46,6 @@
|
|||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log(data)
|
||||
document.getElementById('{{ $id }}-name_with_namespace').innerHTML = data.name_with_namespace;
|
||||
document.getElementById('{{ $id }}-description').innerHTML = data.description;
|
||||
document.getElementById('{{ $id }}-star_count').innerHTML = data.star_count;
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
"to": "assets/lib/packery/packery.pkgd.min.js"
|
||||
},
|
||||
{
|
||||
"from": "node_modules/tw-elements/dist/js/tw-elements.umd.min.js",
|
||||
"from": "node_modules/tw-elements/js/tw-elements.umd.min.js",
|
||||
"to": "assets/lib/tw-elements/index.min.js"
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue