Add edit function
This commit is contained in:
8
templates/edit.html
Normal file
8
templates/edit.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ define "title" }}編輯{{ end }}
|
||||
{{ define "main" }}
|
||||
<h1>編輯帳本</h1>
|
||||
<form action="/edit" method="POST">
|
||||
<textarea name="data" rows="15" cols="40">{{ . }}</textarea><br>
|
||||
<input type="submit" value="儲存">
|
||||
</form>
|
||||
{{ end }}
|
||||
@@ -1,3 +1,3 @@
|
||||
{{ define "main" }}
|
||||
<h1>Ledger Quick Note</h1>
|
||||
<h1>Ledger 速記</h1>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ block "title" . }}Ledger Quick Note{{ end }}</title>
|
||||
<title>{{ block "title" . }}Ledger 速記{{ end }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<ul>
|
||||
{{ with .User }}
|
||||
{{ .Email }}
|
||||
<li><a href="edit">編輯</a></li>
|
||||
<li><a href="download">下載</a></li>
|
||||
<li><a href="exec">查詢</a></li>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ block "main" .Data }}
|
||||
|
||||
Reference in New Issue
Block a user