Give that frontend a bit of a kick #2

Merged
sad merged 6 commits from css-update into main 2024-03-11 21:57:36 +00:00
3 changed files with 71 additions and 185 deletions
Showing only changes of commit 85cf4e4fac - Show all commits

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
data/ data/
comments.db/ comments.db/
notes notes
sass

View File

@ -9,60 +9,76 @@
</head> </head>
<body> <body>
<header> <header>
<h1>TCP.WIKI</h1> <div class="navbar bg-base-200">
<div class="flex-1">
<h1 class="btn btn-ghost text-xl">TCP.WIKI</h1>
</div>
<nav> <nav>
<ul> <div class="flex-none">
<ul class="menu menu-horizontal px-1">
<li><a href="/">Home</a></li> <li><a href="/">Home</a></li>
<!-- Add more links to your menubar here --> <!-- Add more links to your menubar here -->
<li><a href="/what">What</a></li> <li><a href="/what">What</a></li>
<li><a href="/who">Who</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> </ul>
</div>
</details>
</li>
</ul>
</div>
</nav> </nav>
</div>
</header> </header>
<main> <main class="bg-base-300">
<div class="content"> <div class="prose content-center">
{{ .Content }} {{ .Content }}
</div> </div>
<hr>
{{ if .UseGit }} {{ if .UseGit }}
<div class="page-info"> <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 -}} {{- if eq .Author .LastModifier -}}
Authored: {{ .Author }} @ {{ .AuthoredDate.Format "2006/01/02" }} Authored: {{ .Author }} @ {{ .AuthoredDate.Format "2006/01/02" }}
{{- else -}} {{- else -}}
Authored: {{ .Author }} @ {{ .AuthoredDate.Format "2006/01/02" }} - Modified: {{ .LastModifier }} @ {{ .LastModifiedDate.Format "2006/01/02" }} Authored: {{ .Author }} @ {{ .AuthoredDate.Format "2006/01/02" }} - Modified: {{ .LastModifier }} @ {{ .LastModifiedDate.Format "2006/01/02" }}
{{- end -}} {{- end -}}
</div> </div>
</footer>
{{ end }} {{ end }}
<div class="comments"> <div class="card bg-base-100 shadow-xl bg-base-250 text-neutral-content">
<h2>Comments</h2> <div class="card-body">
<h2 class="card-title">Comments</h2>
{{ range .Comments }} {{ range .Comments }}
<div class="comment"> <div class="chat chat-start">
<p>{{ .Content }}</p> <p class="chat-header">{{ .Author }}</p>
<p><small>{{ .Author }} at {{ .Date }}</small></p> <p class="chat-bubble">{{ .Content }}</p>
<time class="chat-footer text-xs opacity-50">Sent at {{ .Date }}<time>
</div> </div>
{{ end }} {{ end }}
</div>
</main>
<form method="POST" action="/submit_comment"> <form method="POST" action="/submit_comment">
<input type="hidden" name="path" value="{{ .Path }}"> <input type="hidden" name="path" value="{{ .Path }}"></input>
<div class="form-group"> <div class="form-control">
<label for="author">Name:</label> <label for="author" class="Label">Name:</label>
<input type="text" id="author" name="author"> <input type="text" id="author" name="author" class="input input-bordered max-w-md" placeholder="Your Name" required></input>
</div> </div>
<div class="form-group"> <div class="form-control space-y-0.5">
<label for="body">Comment:</label> <label for="content" class="label">Comment:</label>
<textarea id="content" name="content"></textarea> <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> </div>
<button type="submit">Submit</button>
</form> </form>
<div class="sidebar">
<h2>Pages</h2>
<ul>
{{ range .Pages }}
<li><a href="/{{ . }}">{{ . }}</a></li>
{{ end }}
</ul>
</div> </div>
</div>
</main>
</body> </body>
</html> </html>

File diff suppressed because one or more lines are too long