tcp-wiki/assets/_layout.html

85 lines
3.5 KiB
HTML
Raw Permalink Normal View History

2023-04-02 20:06:15 +00:00
<!-- _layout.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TCP.WIKI</title>
<link rel="stylesheet" href="/assets/main.css">
</head>
2024-02-16 08:54:24 +00:00
<body>
2023-04-02 20:06:15 +00:00
<header>
2024-02-16 08:54:24 +00:00
<div class="navbar bg-base-200">
<div class="flex-1">
<h1 class="btn btn-ghost text-xl">TCP.WIKI</h1>
</div>
2023-04-02 20:06:15 +00:00
<nav>
2024-02-16 08:54:24 +00:00
<div class="flex-none">
<ul class="menu menu-horizontal px-1">
<li><a href="/">Home</a></li>
2023-04-02 20:17:56 +00:00
<!-- Add more links to your menubar here -->
2024-02-16 08:54:24 +00:00
<li><a href="/what">What</a></li>
<li><a href="/who">Who</a></li>
<li class="dropdown dropdown-bottom dropdown-end">
<details>
<summary>
Pages
</summary>
<div class="dropdown-content">
<ul class="z-[1] menu p-2 shadow bg-base-100 rounded-box w-52">
{{ range .Pages }}
<li><a href="/{{ . }}">{{ . }}</a></li>
{{ end }}
</ul>
</div>
</details>
</li>
2023-04-02 20:06:15 +00:00
</ul>
2024-02-16 08:54:24 +00:00
</div>
2023-04-02 20:06:15 +00:00
</nav>
2024-02-16 08:54:24 +00:00
</div>
2023-04-02 20:06:15 +00:00
</header>
2024-02-16 08:54:24 +00:00
<main class="bg-base-300">
<div class="prose content-center">
{{ .Content }}
</div>
{{ if .UseGit }}
<footer class="footer px-10 py-4 border-t bg-base-200 text-base-content border-base-300">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info shrink-0 w-6 h-6"><path stroke="oklch(var(--s))" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<div class="md:justify-self-end text-secondary">
{{- if eq .Author .LastModifier -}}
Authored: {{ .Author }} @ {{ .AuthoredDate.Format "2006/01/02" }}
{{- else -}}
Authored: {{ .Author }} @ {{ .AuthoredDate.Format "2006/01/02" }} - Modified: {{ .LastModifier }} @ {{ .LastModifiedDate.Format "2006/01/02" }}
{{- end -}}
</div>
</footer>
{{ end }}
<div class="card bg-base-100 shadow-xl bg-base-250 text-neutral-content">
<div class="card-body">
<h2 class="card-title">Comments</h2>
{{ range .Comments }}
<div class="chat chat-start">
<p class="chat-header">{{ .Author }}</p>
<p class="chat-bubble">{{ .Content }}</p>
<time class="chat-footer text-xs opacity-50">Sent at {{ .Date }}<time>
</div>
2024-02-10 02:27:04 +00:00
{{ end }}
2024-02-16 08:54:24 +00:00
<form method="POST" action="/submit_comment">
<input type="hidden" name="path" value="{{ .Path }}"></input>
<div class="form-control">
<label for="author" class="Label">Name:</label>
<input type="text" id="author" name="author" class="input input-bordered max-w-md" placeholder="Your Name" required></input>
</div>
<div class="form-control space-y-0.5">
<label for="content" class="label">Comment:</label>
<textarea id="content" name="content" class="textarea textarea-bordered max-w-md" required placeholder="Your Comment Here"></textarea>
<button class="btn btn-secondary sm:btn-sm md:btn-md lg:btn-l max-w-xs" type="submit">Submit</button>
</div>
</form>
</div>
2024-02-10 02:27:04 +00:00
</div>
2024-02-16 08:54:24 +00:00
</main>
</body>
2023-04-02 20:06:15 +00:00
</html>