Skip to content

Commit b70489d

Browse files
committed
rename book a call -> call
1 parent 44d0352 commit b70489d

6 files changed

Lines changed: 29 additions & 27 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# =====================================================================
2-
# Configuration for Book a Call (Calendly-like)
2+
# Configuration for Call (Calendly-like)
33
# =====================================================================
44

55
# Note: Hugo's strict security policy requires environment variables

DOCUMENTATION.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,14 +1000,14 @@ Errore durante il push dovuto alla divergenza tra branch locale e remoto (16 com
10001000

10011001
---
10021002

1003-
# Booking System (Calendly-like)
1003+
# Call System (Calendly-like)
10041004
## Date: 2026-04-30
10051005
## Features Implemented
1006-
- **Frontend**: Aggiunta la nuova pagina `/book` per prenotare incontri su Google Meet. Interfaccia utente premium con calendario navigabile integrato nel tema esistente.
1006+
- **Frontend**: Aggiunta la nuova pagina `/call` per prenotare incontri su Google Meet. Interfaccia utente premium con calendario navigabile integrato nel tema esistente.
10071007
- **Backend (Serverless)**: Poiché il sito è hostato staticamente su GitHub Pages, è stato predisposto un backend su **Google Apps Script** (da configurare manualmente, vedi `TO_SIMO_DO.md`). Il backend accetta richieste POST, crea l'evento su Google Calendar e invia una mail di conferma tramite GmailApp.
10081008
- **Data Configuration**: Creazione del file `data/booking.yaml` per gestire i giorni della settimana in cui si è disponibili, gli orari, le date bloccate e le informazioni del profilo, senza dover modificare il codice HTML.
10091009
## Tech Notes
1010-
- File creati: `content/english/book/_index.md`, `layouts/book/list.html`, `data/booking.yaml`, `.env.example`.
1011-
- Modifiche ai menu: Inserita voce "Book" nel file `menus.en.toml`.
1010+
- File creati: `content/english/call/_index.md`, `layouts/call/list.html`, `data/booking.yaml`, `.env.example`.
1011+
- Modifiche ai menu: Inserita voce "Call" nel file `menus.en.toml`.
10121012
- **Avatar Update**: Impostata l'immagine `avatar_calls.png` come avatar nella pagina di booking. Copiato il file da `assets/images/` a `static/images/` per garantirne la corretta visualizzazione.
10131013
- **Security**: Aggiunto `.env` al file `.gitignore` per prevenire il caricamento accidentale di credenziali sensibili su GitHub.

config/_default/menus.en.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ url = "/categories/tech-projects/"
8585

8686

8787
[[main]]
88-
name = "Book"
89-
url = "/book"
88+
name = "Call"
89+
url = "/call"
9090
weight = 6
9191

9292
# footer menu
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
title: "Book a Call"
2+
title: "Call"
33
description: "Schedule a free 30-minute Google Meet call with Simone Mattioli. Let's talk about tech, AI, ideas, or just get to know each other."
44
---

hugo_stats.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,7 @@
969969
"business-value-and-real-world-applications",
970970
"calendar-grid",
971971
"calendar-step",
972+
"call-form",
972973
"citation",
973974
"closeModal",
974975
"code-architecture-patterns",
@@ -1277,6 +1278,7 @@
12771278
"students-and-academics",
12781279
"stuttgart",
12791280
"submit-booking",
1281+
"submit-call",
12801282
"success-metrics-and-user-impact",
12811283
"success-step",
12821284
"summary-of-the-book",
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{{ define "main" }}
2-
{{ $bookingData := site.Data.booking }}
2+
{{ $callData := site.Data.booking }}
33
<div class="container mx-auto px-4 py-12 md:py-20 lg:max-w-5xl">
4-
<!-- Main Booking Card -->
4+
<!-- Main Call Card -->
55
<div class="bg-white dark:bg-neutral-900 rounded-3xl shadow-xl dark:shadow-[0_0_40px_rgba(0,0,0,0.5)] border border-gray-100 dark:border-white/5 overflow-hidden flex flex-col md:flex-row">
66

77
<!-- Left: Profile Info -->
88
<div class="w-full md:w-2/5 p-8 md:p-10 border-b md:border-b-0 md:border-r border-gray-100 dark:border-white/5 bg-gray-50/50 dark:bg-white/5">
99
<div class="mb-8">
10-
<img src="{{ $bookingData.owner_avatar }}" alt="{{ $bookingData.owner_name }}" class="w-20 h-20 rounded-full object-cover border-4 border-white dark:border-neutral-800 shadow-md mb-4">
11-
<h3 class="text-sm font-semibold text-gray-500 dark:text-gray-400 tracking-wider uppercase mb-1">{{ $bookingData.owner_title }}</h3>
12-
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">{{ $bookingData.owner_name }}</h1>
10+
<img src="{{ $callData.owner_avatar }}" alt="{{ $callData.owner_name }}" class="w-20 h-20 rounded-full object-cover border-4 border-white dark:border-neutral-800 shadow-md mb-4">
11+
<h3 class="text-sm font-semibold text-gray-500 dark:text-gray-400 tracking-wider uppercase mb-1">{{ $callData.owner_title }}</h3>
12+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">{{ $callData.owner_name }}</h1>
1313
</div>
1414

1515
<div class="space-y-4 mb-8">
1616
<div class="flex items-center text-gray-600 dark:text-gray-300">
1717
<svg class="w-5 h-5 mr-3 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
18-
<span>{{ $bookingData.meeting_duration }} min meeting</span>
18+
<span>{{ $callData.meeting_duration }} min meeting</span>
1919
</div>
2020
<div class="flex items-center text-gray-600 dark:text-gray-300">
2121
<svg class="w-5 h-5 mr-3 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>
@@ -24,7 +24,7 @@ <h1 class="text-2xl font-bold text-gray-900 dark:text-white">{{ $bookingData.own
2424
</div>
2525

2626
<p class="text-gray-600 dark:text-gray-400 text-sm leading-relaxed">
27-
{{ $bookingData.owner_description }}
27+
{{ $callData.owner_description }}
2828
</p>
2929
</div>
3030

@@ -81,7 +81,7 @@ <h3 id="current-month" class="text-lg font-medium text-gray-900 dark:text-white"
8181
<p id="final-datetime-display" class="font-medium text-blue-800 dark:text-blue-300"></p>
8282
</div>
8383

84-
<form id="booking-form" class="space-y-4">
84+
<form id="call-form" class="space-y-4">
8585
<div>
8686
<label for="guest-name" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Name</label>
8787
<input type="text" id="guest-name" required class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-neutral-800 text-gray-900 dark:text-white outline-none transition-shadow">
@@ -94,7 +94,7 @@ <h3 id="current-month" class="text-lg font-medium text-gray-900 dark:text-white"
9494
<label for="guest-notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Anything to add? (Optional)</label>
9595
<textarea id="guest-notes" rows="3" class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-neutral-800 text-gray-900 dark:text-white outline-none transition-shadow resize-none"></textarea>
9696
</div>
97-
<button type="submit" id="submit-booking" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-xl transition-all duration-300 shadow-md hover:shadow-lg flex items-center justify-center">
97+
<button type="submit" id="submit-call" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-xl transition-all duration-300 shadow-md hover:shadow-lg flex items-center justify-center">
9898
<span id="btn-text">Schedule Event</span>
9999
<svg id="btn-spinner" class="animate-spin -ml-1 mr-3 h-5 w-5 text-white hidden" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
100100
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
@@ -119,7 +119,7 @@ <h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">You are schedu
119119
</div>
120120

121121
<script>
122-
const bookingConfig = {{ $bookingData | jsonify | safeJS }};
122+
const callConfig = {{ $callData | jsonify | safeJS }};
123123
const apiEndpoint = '{{ getenv "HUGO_GOOGLE_APPS_SCRIPT_URL" }}';
124124

125125
// UI Elements
@@ -143,8 +143,8 @@ <h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">You are schedu
143143
// Details Elements
144144
const finalDatetimeDisplay = document.getElementById('final-datetime-display');
145145
const backToTimesBtn = document.getElementById('back-to-times');
146-
const bookingForm = document.getElementById('booking-form');
147-
const submitBtn = document.getElementById('submit-booking');
146+
const callForm = document.getElementById('call-form');
147+
const submitBtn = document.getElementById('submit-call');
148148
const btnText = document.getElementById('btn-text');
149149
const btnSpinner = document.getElementById('btn-spinner');
150150

@@ -189,12 +189,12 @@ <h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">You are schedu
189189
btn.className = "aspect-square flex items-center justify-center rounded-full text-sm transition-all relative font-medium w-10 h-10 mx-auto";
190190

191191
let isAvailable = false;
192-
let availabilityConfig = bookingConfig.availability[dayOfWeekStr];
192+
let availabilityConfig = callConfig.availability[dayOfWeekStr];
193193

194194
if (availabilityConfig && availabilityConfig.enabled && availabilityConfig.slots && availabilityConfig.slots.length > 0) {
195195
isAvailable = true;
196196
}
197-
if (bookingConfig.blocked_dates && bookingConfig.blocked_dates.includes(dateStr)) {
197+
if (callConfig.blocked_dates && callConfig.blocked_dates.includes(dateStr)) {
198198
isAvailable = false;
199199
}
200200
if (dateObj < today) {
@@ -232,7 +232,7 @@ <h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">You are schedu
232232
const options = { weekday: 'long', month: 'long', day: 'numeric' };
233233
selectedDateDisplay.textContent = dateObj.toLocaleDateString('en-US', options);
234234

235-
const slots = bookingConfig.availability[dayOfWeekStr].slots;
235+
const slots = callConfig.availability[dayOfWeekStr].slots;
236236
timeSlotsContainer.innerHTML = '';
237237

238238
slots.forEach(time => {
@@ -271,7 +271,7 @@ <h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">You are schedu
271271
selectedTime = null;
272272
});
273273

274-
bookingForm.addEventListener('submit', async (e) => {
274+
callForm.addEventListener('submit', async (e) => {
275275
e.preventDefault();
276276

277277
const name = document.getElementById('guest-name').value;
@@ -303,7 +303,7 @@ <h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">You are schedu
303303
notes: notes,
304304
date: selectedDate,
305305
time: selectedTime,
306-
duration: bookingConfig.meeting_duration
306+
duration: callConfig.meeting_duration
307307
})
308308
});
309309

@@ -314,10 +314,10 @@ <h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">You are schedu
314314
detailsStep.classList.add('hidden');
315315
successStep.classList.remove('hidden');
316316
} else {
317-
throw new Error(result.error || "Failed to book");
317+
throw new Error(result.error || "Failed to schedule call");
318318
}
319319
} catch (error) {
320-
console.error("Booking error:", error);
320+
console.error("Call error:", error);
321321
alert("Sorry, there was an error processing your request. Please try again.");
322322
resetBtn();
323323
}

0 commit comments

Comments
 (0)