Skip to content

Commit

Permalink
Merge pull request #1281 from nunocoracao/dev
Browse files Browse the repository at this point in the history
🔖 v2.60.0
  • Loading branch information
nunocoracao authored Mar 6, 2024
2 parents 984320d + fd356e8 commit ec76fb3
Show file tree
Hide file tree
Showing 17 changed files with 542 additions and 3,634 deletions.
3,361 changes: 443 additions & 2,918 deletions assets/css/compiled/main.css

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions assets/js/shortcodes/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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();
});
})();
13 changes: 0 additions & 13 deletions assets/js/zen-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
//}
});
})();
6 changes: 3 additions & 3 deletions assets/lib/chart/chart.min.js

Large diffs are not rendered by default.

467 changes: 25 additions & 442 deletions assets/lib/tw-elements/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
[module.hugoVersion]
extended = true
min = "0.87.0"
max = "0.123.6"
max = "0.123.7"
1 change: 1 addition & 0 deletions exampleSite/content/docs/shortcodes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ The `figure` shortcode accepts six parameters:
| `caption` | Markdown for the image caption, which will be displayed below the image. |
| `class` | Additional CSS classes to apply to the image. |
| `href` | URL that the image should be linked to. |
| `target` | The target attribute for the `href` URL. |
| `nozoom` | `nozoom=true` disables the image "zoom" functionality. This is most useful in combination with a `href` link. |
| `default` | Special parameter to revert to default Hugo `figure` behaviour. Simply provide `default=true` and then use normal [Hugo shortcode syntax](https://gohugo.io/content-management/shortcodes/#figure). |
<!-- prettier-ignore-end -->
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions exampleSite/content/users/karlukle.site/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "karlukle.site"
tags: [Personal blog]
externalUrl: "https://karlukle.site"
date: 9920-08-08
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---
Expand Down
7 changes: 7 additions & 0 deletions exampleSite/content/users/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -562,5 +562,12 @@
"Personal Homepage",
"Blog"
]
},
{
"title": "karlukle.site",
"url": "https://karlukle.site",
"tags": [
"Personal blog"
]
}
]
4 changes: 2 additions & 2 deletions layouts/partials/home/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{{ if $homepageImage }}
<img class="h-full w-full object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}">
<div
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-700 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
</div>
{{ end }}
</div>
Expand Down Expand Up @@ -64,7 +64,7 @@ <h2 class="mt-0 mb-0 text-xl text-neutral-300">
</div>
{{ end }}
</div>
<section class="prose dark:prose-invert">{{ .Content | emojify }}</section>
<section class="prose prose-invert">{{ .Content | emojify }}</section>
</div>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions layouts/shortcodes/carousel.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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>
Expand All @@ -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">
Expand All @@ -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">
Expand Down
3 changes: 2 additions & 1 deletion layouts/shortcodes/figure.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{{ $caption := .Get "caption" }}
{{ $href := .Get "href" }}
{{ $class := .Get "class" }}
{{ $target := .Get "target" }}
{{ $nozoom := .Get "nozoom" | default false }}
{{ if findRE "^https?" $url.Scheme }}
<figure>
Expand All @@ -22,7 +23,7 @@
{{ end }}
{{ with $resource }}
<figure {{ with $class }}class="{{ . }}"{{ end }}>
{{ with $href }}<a href="{{ . }}">{{ end }}
{{ with $href }}<a href="{{ . }}" {{ with $target }}target="{{ . }}"{{ end }}>{{ end }}
{{ if $disableImageOptimization }}
<img
class="my-0 rounded-md{{ if $nozoom }} nozoom{{ end }}"
Expand Down
2 changes: 0 additions & 2 deletions layouts/shortcodes/gitlab.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@

</div>
<script>
console.log({{ $gitlabURL }})
fetch({{ $gitlabURL }}, {
headers: new Headers({
'User-agent': 'Mozilla/4.0 Custom User Agent'
})
})
.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;
Expand Down
Loading

0 comments on commit ec76fb3

Please sign in to comment.