This commit is contained in:
Imbus 2024-09-10 02:07:53 +02:00
commit b51493546b
6 changed files with 111 additions and 0 deletions

25
views/index.html Normal file
View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src="htmx.min.js"></script>
<title>{{ .Title }}</title>
</head>
<body>
<h1>{{ .Title }}</h1>
{{ if .Name }}
<p>Hello, {{ .Name }}!</p>
{{ else }}
<p>Hello, World!</p>
{{ end }}
<form method="POST" action="/">
<label for="name">Enter your name:</label>
<input type="text" id="name" name="name">
<input type="submit" value="Submit">
</form>
</body>
</html>

19
views/style.css Normal file
View file

@ -0,0 +1,19 @@
html {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
}
body {
width: 80%;
margin: 0 auto;
padding: 20px;
background: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 80px;
color: blue !important;
}