Adding guestbook
This commit is contained in:
parent
8d13c52d18
commit
9f890f2133
9 changed files with 895 additions and 4 deletions
|
|
@ -45,5 +45,11 @@
|
|||
{{ $lavalampAdoptable := resources.Get "js/adoptables/lavalamp-adoptable.js" | resources.Minify | resources.Fingerprint }}
|
||||
<script src="{{ $lavalampAdoptable.RelPermalink }}" integrity="{{ $lavalampAdoptable.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
|
||||
<!-- Guestbook - only load on guestbook page -->
|
||||
{{ if eq .Type "guestbook" }}
|
||||
{{ $guestbook := resources.Get "js/guestbook.js" | resources.Minify | resources.Fingerprint }}
|
||||
<script src="{{ $guestbook.RelPermalink }}" integrity="{{ $guestbook.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
112
layouts/guestbook/single.html
Normal file
112
layouts/guestbook/single.html
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
{{ define "main" }}
|
||||
<article class="guestbook-page">
|
||||
<div class="guestbook-content">
|
||||
<!-- Header Section -->
|
||||
<div>
|
||||
<div class="guestbook-header content-screen">
|
||||
<div class="screen-display crt">
|
||||
<div class="terminal-output">
|
||||
> guestbook --info<br />
|
||||
<span class="info">{{ .Content }}</span><br />
|
||||
<br />
|
||||
<span class="cursor-blink">_</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="guestbook-floppy">
|
||||
{{ partial "elements/floppy.html" (dict "title" "Guestbook Entries"
|
||||
"lines" (slice "" "" "DO NOT DELETE" "" "") "bgColor" "#1a4d8f"
|
||||
"bgColorDark" "#0d2747") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Guestbook Form -->
|
||||
<div class="guestbook-form-container content-screen">
|
||||
<div class="screen-display crt">
|
||||
<div class="terminal-output">> new-entry --interactive<br /></div>
|
||||
<form id="guestbook-form" class="guestbook-form">
|
||||
<div class="form-row">
|
||||
<label for="gb-name">> Name:</label>
|
||||
<input
|
||||
type="text"
|
||||
id="gb-name"
|
||||
name="name"
|
||||
required
|
||||
maxlength="50"
|
||||
placeholder="Your name"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="gb-email">> Email:</label>
|
||||
<input
|
||||
type="email"
|
||||
id="gb-email"
|
||||
name="email"
|
||||
placeholder="your@email.com (optional)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="gb-website">> Website:</label>
|
||||
<input
|
||||
type="url"
|
||||
id="gb-website"
|
||||
name="website"
|
||||
placeholder="https://yoursite.com (optional)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="gb-message">> Message:</label>
|
||||
<textarea
|
||||
id="gb-message"
|
||||
name="message"
|
||||
required
|
||||
maxlength="500"
|
||||
rows="3"
|
||||
placeholder="Your message..."
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div id="form-feedback" class="form-feedback"></div>
|
||||
|
||||
<button type="submit" id="submit-btn" class="terminal-button">
|
||||
<span class="button-text">[ SUBMIT ]</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Guestbook Entries -->
|
||||
<div class="guestbook-entries-container content-screen wide-item">
|
||||
<div class="screen-display crt">
|
||||
<div class="terminal-output">
|
||||
> list-entries --all<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div id="entries-loading" class="loading-state">
|
||||
<span class="loading-text">Loading entries</span
|
||||
><span class="loading-dots">...</span>
|
||||
<span class="cursor-blink">_</span>
|
||||
</div>
|
||||
|
||||
<div id="entries-error" class="error-state" style="display: none">
|
||||
<span class="error-text">ERROR: Failed to load entries</span><br />
|
||||
<span class="dim">Please try again later.</span><br />
|
||||
<span class="cursor-blink">_</span>
|
||||
</div>
|
||||
|
||||
<div id="entries-list" class="entries-list" style="display: none">
|
||||
<!-- Entries will be dynamically inserted here -->
|
||||
</div>
|
||||
|
||||
<div id="pagination" class="pagination" style="display: none">
|
||||
<!-- Pagination controls will be inserted here -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
@ -268,12 +268,22 @@
|
|||
<div>
|
||||
<a href="/resources/">
|
||||
<div class="nav-cube">
|
||||
{{ partial "elements/companion-cube.html" . }}
|
||||
<div class="nav-cube-text">Experiments & Resources</div>
|
||||
{{ partial "elements/companion-cube.html" . }}
|
||||
<div class="nav-cube-text">Experiments & Resources</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="nav-floppy">
|
||||
<a href="/guestbook/">
|
||||
{{ partial "elements/floppy.html" (dict "title" "Guestbook" "lines"
|
||||
(slice "" "" "DO NOT DELETE" "" "") "bgColor" "#1a4d8f" "bgColorDark"
|
||||
"#0d2747") }}
|
||||
<div class="nav-floppy-text">Guestbook</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>{{ partial "elements/crt-tv.html" . }}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
{{ $filtered := slice }}
|
||||
{{ range $remaining }}
|
||||
{{ $path := .RelPermalink }}
|
||||
{{ if and (not (strings.Contains $path "/terminal.js")) (not (strings.Contains $path "/init.js")) (not (strings.Contains $path "/button-generator.js")) (not (strings.Contains $path "/adoptables/")) }}
|
||||
{{ if and (not (strings.Contains $path "/terminal.js")) (not (strings.Contains $path "/init.js")) (not (strings.Contains $path "/button-generator.js")) (not (strings.Contains $path "/adoptables/")) (not (strings.Contains $path "/guestbook.js")) }}
|
||||
{{ $filtered = $filtered | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue