Improve tab titles and add favicon

This commit is contained in:
Dominic Ferrando
2025-04-28 10:34:33 -04:00
parent eaf5313d5f
commit 564a7f3ff9
7 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ package views
import "github.com/dominicf2001/comfychan/web/views/shared"
templ NotFound() {
@shared.Layout() {
@shared.Layout("404 - Comfychan") {
<div class="container not-found-container">
<div class="box">
<h2>404 not found.</h2>
+1 -1
View File
@@ -3,7 +3,7 @@ package admin
import "github.com/dominicf2001/comfychan/web/views/shared"
templ AdminLogin() {
@shared.Layout() {
@shared.Layout("Authorize - Comfychan") {
<div class="admin-login-container">
<div style="display: none" id="adminLoginWarning" class="warning"></div>
<form
+1 -1
View File
@@ -20,7 +20,7 @@ templ BoardHeader(board database.Board) {
}
templ Board(board database.Board, isAdmin bool) {
@shared.Layout() {
@shared.Layout(fmt.Sprintf("/%s/ - %s", board.Slug, board.Name)) {
@BoardHeader(board)
<div class="new-post-container">
<button
+1 -1
View File
@@ -3,7 +3,7 @@ package views
import "github.com/dominicf2001/comfychan/web/views/shared"
templ Index() {
@shared.Layout() {
@shared.Layout("Comfychan") {
<section class="container">
<img id="clavis" src="/static/media/clavis.png"/>
<div class="box">
+3 -2
View File
@@ -1,17 +1,18 @@
package shared
templ Layout() {
templ Layout(title string) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>Comfychan</title>
<title>{ title }</title>
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
<script src="https://unpkg.com/hyperscript.org@0.9.14"></script>
<script src="/static/index.js"></script>
<link rel="stylesheet" href="/static/reset.css"/>
<link rel="stylesheet" href="/static/index.css"/>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico"/>
</head>
<body>
<div id="boardList">
+1 -1
View File
@@ -219,7 +219,7 @@ templ ThreadActionBar(thread database.Thread, pos string) {
}
templ Thread(board database.Board, thread database.Thread, posts []database.Post, threadContext ThreadContext) {
@shared.Layout() {
@shared.Layout(fmt.Sprintf("/%s/ - %s", board.Slug, thread.Subject+" "+posts[0].Body)) {
<script src="/static/thread.js" defer></script>
@BoardHeader(board)
<div class="new-post-container">