refactor: migrate from templ to html/template
This commit is contained in:
22
templates/login.gohtml
Normal file
22
templates/login.gohtml
Normal file
@@ -0,0 +1,22 @@
|
||||
{{define "title"}}Login{{end}}
|
||||
{{define "content"}}
|
||||
<div class="max-w-md mx-auto mt-20">
|
||||
<h2 class="text-3xl font-bold mb-8 text-center">Login</h2>
|
||||
{{if .Error}}
|
||||
<div class="bg-red-500 text-white p-3 rounded mb-4">{{.Error}}</div>
|
||||
{{end}}
|
||||
<form method="POST" action="/login" class="space-y-4">
|
||||
<div>
|
||||
<label for="username" class="block text-sm font-medium mb-2">Username</label>
|
||||
<input type="text" id="username" name="username" value="{{.Username}}" class="w-full p-2 rounded bg-gray-800 border border-gray-700 focus:border-blue-500 outline-none">
|
||||
</div>
|
||||
<div>
|
||||
<label for="password" class="block text-sm font-medium mb-2">Password</label>
|
||||
<input type="password" id="password" name="password" class="w-full p-2 rounded bg-gray-800 border border-gray-700 focus:border-blue-500 outline-none">
|
||||
</div>
|
||||
<button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||
Login
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user