Add tuicss library

This commit is contained in:
2025-12-12 11:55:37 +01:00
parent e5bbdcab42
commit 4bbc7975b3
7 changed files with 293 additions and 431 deletions

View File

@@ -1,8 +1,8 @@
{{define "day.html"}}
<div class="day-detail">
<header class="day-header">
<h2>{{.Date.Format "Monday, January 2, 2006"}}</h2>
</header>
<div class="day-header white-255-text">
{{.Date.Format "Monday, January 2, 2006"}}
</div>
<div id="day-detail-content">
{{template "day_content.html" .}}
@@ -13,20 +13,20 @@
{{define "day_content.html"}}
<div class="day-content">
{{/* Events Section */}}
<section class="day-section events-section">
<h3>📅 Events</h3>
<fieldset class="tui-input-fieldset">
<legend class="cyan-255-text">Events</legend>
{{if .Content.Events}}
<ul class="event-list">
{{range .Content.Events}}
<li class="event-item">
<strong>{{.Title}}</strong>
<span class="white-255-text">{{.Title}}</span>
{{if not .AllDay}}
<span class="event-time">{{formatTime .Start}} - {{formatTime .End}}</span>
<span class="green-255-text">{{formatTime .Start}} - {{formatTime .End}}</span>
{{else}}
<span class="event-time">All day</span>
<span class="green-255-text">All day</span>
{{end}}
{{if .Location}}
<span class="event-location">📍 {{.Location}}</span>
<span class="yellow-255-text">@ {{.Location}}</span>
{{end}}
{{if .Description}}
<p class="event-description">{{.Description}}</p>
@@ -37,16 +37,16 @@
{{else}}
<p class="empty-message">No events scheduled.</p>
{{end}}
</section>
</fieldset>
{{/* Diary Section */}}
<section class="day-section diary-section">
<h3>📝 Journal</h3>
<fieldset class="tui-input-fieldset">
<legend class="purple-255-text">Journal</legend>
{{if .Content.Diary}}
<div class="diary-display">
<p class="diary-text">{{.Content.Diary.Text}}</p>
<p class="diary-text white-255-text">{{.Content.Diary.Text}}</p>
<button
class="btn btn-small"
class="tui-button"
data-action="toggle-diary-edit">
Edit
</button>
@@ -56,18 +56,18 @@
hx-post="/diary/{{formatDate .Date}}"
hx-target="#day-detail-content"
hx-swap="innerHTML">
<textarea name="text" rows="5" placeholder="Write your thoughts...">{{.Content.Diary.Text}}</textarea>
<textarea name="text" class="tui-input full-width" rows="5" placeholder="Write your thoughts...">{{.Content.Diary.Text}}</textarea>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="submit" class="tui-button green-168 white-text">Save</button>
<button
type="button"
class="btn btn-secondary"
class="tui-button"
data-action="cancel-diary-edit">
Cancel
</button>
<button
type="button"
class="btn btn-danger"
class="tui-button red-168 white-text"
hx-delete="/diary/{{formatDate .Date}}"
hx-target="#day-detail-content"
hx-swap="innerHTML"
@@ -82,17 +82,17 @@
hx-post="/diary/{{formatDate .Date}}"
hx-target="#day-detail-content"
hx-swap="innerHTML">
<textarea name="text" rows="5" placeholder="Write your thoughts..."></textarea>
<textarea name="text" class="tui-input full-width" rows="5" placeholder="Write your thoughts..."></textarea>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="submit" class="tui-button green-168 white-text">Save</button>
</div>
</form>
{{end}}
</section>
</fieldset>
{{/* Photos Section */}}
<section class="day-section photos-section">
<h3>📷 Photos</h3>
<fieldset class="tui-input-fieldset">
<legend class="orange-255-text">Photos</legend>
{{if .Content.Photos}}
<div class="photo-gallery">
{{range .Content.Photos}}
@@ -100,13 +100,13 @@
<a href="{{.URLPath}}" target="_blank">
<img src="{{.URLPath}}" alt="{{.Description}}" loading="lazy">
</a>
<figcaption>{{.Description}}</figcaption>
{{if .Description}}<figcaption>{{.Description}}</figcaption>{{end}}
</figure>
{{end}}
</div>
{{else}}
<p class="empty-message">No photos for this day.</p>
{{end}}
</section>
</fieldset>
</div>
{{end}}