Skip to content

Commit d9085f5

Browse files
committed
4
1 parent 500c2ec commit d9085f5

3 files changed

Lines changed: 83 additions & 61 deletions

File tree

content/_index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ sections:
151151
content:
152152
title:
153153
# Choose which groups/teams of users to display.
154-
# Edit `user_groups` in each user's profile to add them to one or more of these groups.
154+
# Edit `user_groups` in each user's profile to add them to one or more of these groups. Unfortunately with recent redesign in hugoblox authors can't be displayed as https://page/authors
155155
text: ""
156156
user_groups:
157157
- Admin
@@ -257,9 +257,8 @@ sections:
257257
# Make the slides full screen within the browser window?
258258
is_fullscreen: true
259259
# Automatically transition through slides?
260-
loop: false
261-
# Duration of transition between slides (in ms)
262-
interval: 2000
260+
loop: true # This enables autoplay
261+
interval: 2000 # This sets 2-second intervals
263262
- block: tabs
264263
content:
265264
title: "CONFERENCE"

layouts/partials/hbx/blocks/people/block.html

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,22 @@ <h2 class="text-2xl font-semibold text-gray-900 dark:text-white text-center">{{
4848
<div class="flex flex-wrap justify-center gap-6 mb-12">
4949
{{ range $query }}
5050
{{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }}
51-
{{/* Get link to user's profile page. */}}
52-
{{ $link := "" }}
53-
{{ with site.GetPage (printf "/authors/%s" (path.Base .File.Dir)) }}
54-
{{ $link = .RelPermalink }}
51+
52+
{{/* Simple direct author link generation */}}
53+
{{ $author_username := "" }}
54+
{{ if .File }}
55+
{{ $author_username = path.Base .File.Dir }}
56+
{{ else }}
57+
{{ $author_username = .Title | urlize }}
5558
{{ end }}
5659

57-
<div class="people-person flex flex-col items-center p-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-shadow duration-300 max-w-xs">
60+
{{/* Create direct author link */}}
61+
{{ $author_link := printf "/authors/%s/" $author_username }}
62+
63+
{{/* Person card with separate clickable elements */}}
64+
<div class="people-person flex flex-col items-center p-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-lg transition-all duration-300 max-w-xs group">
65+
66+
{{/* Clickable Avatar Image */}}
5867
{{ $src := "" }}
5968
{{ if site.Params.features.avatar.gravatar }}
6069
{{ $src = printf "https://s.gravatar.com/avatar/%s?s=200" (md5 .Params.email) }}
@@ -65,19 +74,30 @@ <h2 class="text-2xl font-semibold text-gray-900 dark:text-white text-center">{{
6574

6675
{{ if $src }}
6776
{{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }}
68-
{{with $link}}<a href="{{.}}" class="block mb-4">{{end}}
69-
<img width="200" height="200" loading="lazy"
70-
class="avatar w-32 h-32 object-cover mx-auto transition-transform duration-300 hover:scale-105 {{if eq $avatar_shape "square"}}rounded-full{{else}}rounded-full{{end}}"
71-
src="{{ $src }}" alt="{{ .Title }} Avatar">
72-
{{if $link}}</a>{{end}}
77+
<a href="{{ $author_link }}" class="block mb-4 transition-transform duration-300 hover:scale-110">
78+
<img width="200" height="200" loading="lazy"
79+
class="avatar w-32 h-32 object-cover mx-auto {{if eq $avatar_shape "square"}}rounded-lg{{else}}rounded-full{{end}} border-4 border-transparent hover:border-primary-200 dark:hover:border-primary-800 transition-all duration-300"
80+
src="{{ $src }}" alt="{{ .Title }} Avatar">
81+
</a>
82+
{{ else }}
83+
{{/* Fallback clickable avatar */}}
84+
<a href="{{ $author_link }}" class="block mb-4 transition-transform duration-300 hover:scale-110">
85+
<div class="avatar w-32 h-32 mx-auto rounded-full bg-gray-200 dark:bg-gray-600 flex items-center justify-center border-4 border-transparent hover:border-primary-200 dark:hover:border-primary-800 transition-all duration-300">
86+
<svg class="w-16 h-16 text-gray-400 dark:text-gray-500" fill="currentColor" viewBox="0 0 20 20">
87+
<path fill-rule="evenodd" d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clip-rule="evenodd" />
88+
</svg>
89+
</div>
90+
</a>
7391
{{ end }}
7492

75-
<div class="portrait-title text-center">
76-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2"
93+
{{/* Portrait Title and Details */}}
94+
<div class="portrait-title text-center w-full">
95+
{{/* Clickable Title */}}
96+
<h3 class="text-xl font-semibold mb-2 transition-colors duration-200"
7797
style="font-size: 1.25rem !important; line-height: 1.75rem !important;">
78-
{{with $link}}<a href="{{.}}" class="hover:text-primary-600 dark:hover:text-primary-400 transition-colors duration-200">{{end}}
79-
{{ .Title }}
80-
{{if $link}}</a>{{end}}
98+
<a href="{{ $author_link }}" class="text-gray-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 no-underline">
99+
{{ .Title }}
100+
</a>
81101
</h3>
82102

83103
{{ if and $show_organizations .Params.organizations }}
@@ -90,18 +110,19 @@ <h2 class="text-2xl font-semibold text-gray-900 dark:text-white text-center">{{
90110
<p class="text-lg text-gray-600 dark:text-gray-400 mb-3">{{ .Params.role | markdownify | emojify }}</p>
91111
{{ end }}
92112

93-
{{ if $show_social }}
94-
<div class="flex justify-center space-x-2 mb-3 text-lg">
95-
{{ partial "social_links" . }}
96-
</div>
97-
{{ end }}
98-
99113
{{ if and $show_interests .Params.interests }}
100-
<p class="people-interests text-lg text-gray-500 dark:text-gray-500">
114+
<p class="people-interests text-sm text-gray-500 dark:text-gray-500">
101115
{{ delimit .Params.interests ", " | markdownify | emojify }}
102116
</p>
103117
{{ end }}
104118
</div>
119+
120+
{{/* Social links */}}
121+
{{ if $show_social }}
122+
<div class="flex justify-center space-x-2 mt-3 text-lg">
123+
{{ partial "social_links" . }}
124+
</div>
125+
{{ end }}
105126
</div>
106127
{{ end }}
107128
</div>

layouts/partials/hbx/blocks/slider/block.html

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -120,28 +120,28 @@
120120
{{ end }}
121121
</div>
122122

123-
<!-- Enhanced Navigation Dots - Maximum visibility on light backgrounds -->
124-
{{ if gt $slide_count 1 }}
125-
<div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3">
126-
{{ range $index, $item := $block.content.slides }}
127-
<button type="button"
128-
class="w-5 h-5 rounded-lg transition-all duration-300
129-
border-2 backdrop-blur-md shadow-xl
130-
{{ if eq $index 0 }}
131-
bg-white border-gray-900 shadow-gray-900/70
132-
ring-2 ring-gray-900/40 ring-offset-2 ring-offset-white/20
133-
{{ else }}
134-
bg-gray-900/70 border-white/80 shadow-black/60
135-
hover:bg-gray-900/90 hover:border-white
136-
hover:shadow-black/80 hover:scale-125
137-
hover:ring-2 hover:ring-white/50
138-
{{ end }}"
139-
aria-current="{{ if eq $index 0 }}true{{ else }}false{{ end }}"
140-
aria-label="Slide {{ add $index 1 }}"
141-
data-carousel-slide-to="{{ $index }}"></button>
123+
<!-- Enhanced Navigation Dots - Maximum visibility on light backgrounds -->
124+
{{ if gt $slide_count 1 }}
125+
<div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3">
126+
{{ range $index, $item := $block.content.slides }}
127+
<button type="button"
128+
class="w-5 h-5 rounded-lg transition-all duration-300
129+
border-2 backdrop-blur-md shadow-xl
130+
{{ if eq $index 0 }}
131+
bg-white border-gray-900 shadow-gray-900/70
132+
ring-2 ring-gray-900/40 ring-offset-2 ring-offset-white/20
133+
{{ else }}
134+
bg-gray-900/70 border-white/80 shadow-black/60
135+
hover:bg-gray-900/90 hover:border-white
136+
hover:shadow-black/80 hover:scale-125
137+
hover:ring-2 hover:ring-white/50
138+
{{ end }}"
139+
aria-current="{{ if eq $index 0 }}true{{ else }}false{{ end }}"
140+
aria-label="Slide {{ add $index 1 }}"
141+
data-carousel-slide-to="{{ $index }}"></button>
142+
{{ end }}
143+
</div>
142144
{{ end }}
143-
</div>
144-
{{ end }}
145145

146146
<!-- Navigation controls - Enhanced visibility for all backgrounds -->
147147
{{ if gt $slide_count 1 }}
@@ -183,7 +183,7 @@
183183

184184
</div>
185185

186-
{{/* Enhanced Carousel JavaScript */}}
186+
{{/* Fixed Carousel JavaScript with proper autoplay configuration */}}
187187
<script>
188188
document.addEventListener('DOMContentLoaded', function() {
189189
const carousel = document.getElementById('{{ $hash_id }}');
@@ -216,12 +216,12 @@
216216
// Update indicators
217217
indicators.forEach((indicator, i) => {
218218
if (i === index) {
219-
indicator.classList.remove('bg-opacity-30');
220-
indicator.classList.add('bg-white');
219+
indicator.classList.remove('bg-gray-900/70', 'border-white/80');
220+
indicator.classList.add('bg-white', 'border-gray-900');
221221
indicator.setAttribute('aria-current', 'true');
222222
} else {
223-
indicator.classList.add('bg-opacity-30');
224-
indicator.classList.remove('bg-white');
223+
indicator.classList.add('bg-gray-900/70', 'border-white/80');
224+
indicator.classList.remove('bg-white', 'border-gray-900');
225225
indicator.setAttribute('aria-current', 'false');
226226
}
227227
});
@@ -263,10 +263,12 @@
263263
});
264264
});
265265

266-
// Auto-play functionality (if enabled)
267-
{{ if $block.design.autoplay }}
266+
// Auto-play functionality - Fixed to use your YAML configuration
267+
{{ $autoplay := $block.design.loop | default false }}
268+
{{ $interval := $block.design.interval | default 5000 }}
269+
{{ if $autoplay }}
268270
function startAutoplay() {
269-
autoplayInterval = setInterval(nextSlide, {{ $block.design.autoplay_interval | default 5000 }});
271+
autoplayInterval = setInterval(nextSlide, {{ $interval }});
270272
}
271273

272274
function stopAutoplay() {
@@ -294,11 +296,11 @@
294296
if (e.key === 'ArrowLeft') {
295297
e.preventDefault();
296298
prevSlide();
297-
{{ if $block.design.autoplay }}resetAutoplay();{{ end }}
299+
{{ if $autoplay }}resetAutoplay();{{ end }}
298300
} else if (e.key === 'ArrowRight') {
299301
e.preventDefault();
300302
nextSlide();
301-
{{ if $block.design.autoplay }}resetAutoplay();{{ end }}
303+
{{ if $autoplay }}resetAutoplay();{{ end }}
302304
}
303305
}
304306
});
@@ -309,14 +311,14 @@
309311

310312
carousel.addEventListener('touchstart', (e) => {
311313
startX = e.touches[0].clientX;
312-
startY = e.touches.clientY;
314+
startY = e.touches[0].clientY;
313315
});
314316

315317
carousel.addEventListener('touchend', (e) => {
316318
if (!startX || !startY) return;
317319

318-
const endX = e.changedTouches.clientX;
319-
const endY = e.changedTouches.clientY;
320+
const endX = e.changedTouches[0].clientX;
321+
const endY = e.changedTouches[0].clientY;
320322

321323
const diffX = startX - endX;
322324
const diffY = startY - endY;
@@ -328,7 +330,7 @@
328330
} else {
329331
prevSlide();
330332
}
331-
{{ if $block.design.autoplay }}resetAutoplay();{{ end }}
333+
{{ if $autoplay }}resetAutoplay();{{ end }}
332334
}
333335

334336
startX = 0;

0 commit comments

Comments
 (0)