restructured and refactored codebase

For better code organisation the entire Codebase has been restructured and cleaned up. handlers have been separated into an own package, as well as the model.
This commit is contained in:
Patryk Hegenberg 2023-12-04 11:04:06 +01:00
parent 4dd9c18832
commit a408e1487d
12 changed files with 400 additions and 544 deletions

2
templates/about.html Normal file
View file

@ -0,0 +1,2 @@
{{ define "about" }}
{{ end }}

View file

@ -6,7 +6,6 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Title}}</title>
<!-- Hier könnten weitere Meta-Tags, Stylesheets, JavaScript-Dateien usw. eingefügt werden -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css">
<link href="https://cdn.jsdelivr.net/npm/daisyui@2.31.0/dist/full.css" rel="stylesheet" type="text/css">
<script src="https://unpkg.com/htmx.org@1.9.9"
@ -48,6 +47,18 @@
flex-direction: row;
justify-content: space-evenly;
}
.banner {
position: relative;
text-align: center;
}
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
</head>
@ -59,7 +70,6 @@
{{ template "footer" . }}
<!-- Hier könnten weitere Scripts eingefügt werden, z.B., htmx und andere Abhängigkeiten -->
</body>

2
templates/contact.html Normal file
View file

@ -0,0 +1,2 @@
{{ define "contact" }}
{{ end }}

View file

@ -1,15 +1,14 @@
{{ define "header" }}
<header>
<div id="banner" class="bg-gray-800 p-8 text-white">
<!-- Hier könntest du ein Dungeons-and-Dragons-Banner einfügen -->
<nav class="navbar bg-base-100">
<a href="/" class="btn btn-ghost text-xl">Dungeons & Dragons</a>
<a href="/about" class="btn btn-ghost text-xl">About</a>
<a href="/contact" class="btn btn-ghost text-xl">Contact</a>
</nav>
<div id="banner" class="banner bg-gray-800 p-8 text-white">
<img src="/images/images/banner.jpg" alt="Dungeons-and-Dragons-Banner">
<a href="https://dnd.wizards.com/resources/press-assets">image credits</a>
<h1 class="text-4xl font-bold">Dungeons and Dragons</h1>
<h1 class="centered text-4xl font-bold">Dungeons and Dragons</h1>
</div>
<nav class="navbar bg-base-100">
<a href="#" class="btn btn-ghost text-xl">Dungeons & Dragons</a>
<a href="#" class="btn btn-ghost text-xl">About</a>
<a href="#" class="btn btn-ghost text-xl">Contact</a>
</nav>
</header>
{{ end }}