mirror of
https://github.com/1f349/lavender.git
synced 2025-01-21 06:06:30 +00:00
Convert edit page to Astro
This commit is contained in:
parent
5607bd3a97
commit
713d53b7b2
@ -1,3 +0,0 @@
|
||||
html, body {
|
||||
color-scheme: light dark;
|
||||
}
|
@ -2,71 +2,56 @@
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
---
|
||||
|
||||
<Layout title="">
|
||||
|
||||
</Layout>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{.ServiceName}}</title>
|
||||
<link rel="stylesheet" href="/theme/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>{{.ServiceName}}</h1>
|
||||
</header>
|
||||
<main>
|
||||
<div>Logged in as: {{.User.Name}} ({{.User.Subject}})</div>
|
||||
<Layout title="Edit">
|
||||
<div>Logged in as: [[.User.Name]] ([[.User.Subject]])</div>
|
||||
<div>
|
||||
<form method="POST" action="/edit">
|
||||
<input type="hidden" name="nonce" value="{{.Nonce}}">
|
||||
<input type="hidden" name="nonce" value="[[ .Nonce ]]">
|
||||
<div>
|
||||
<label for="field_name">Name:</label>
|
||||
<input type="text" name="name" id="field_name" value="{{.User.Name}}">
|
||||
<input type="text" name="name" id="field_name" value="[[ .User.Name ]]">
|
||||
</div>
|
||||
<div>
|
||||
<label for="field_picture">Picture:</label>
|
||||
<input type="text" name="picture" id="field_picture" value="{{.User.Picture}}">
|
||||
<input type="text" name="picture" id="field_picture" value="[[ .User.Picture ]]">
|
||||
</div>
|
||||
<div>
|
||||
<label for="field_website">Website:</label>
|
||||
<input type="text" name="website" id="field_website" value="{{.User.Website}}">
|
||||
<input type="text" name="website" id="field_website" value="[[ .User.Website ]]">
|
||||
</div>
|
||||
<div>
|
||||
<label for="field_pronouns">Pronouns:</label>
|
||||
<select name="pronouns" id="field_pronouns">
|
||||
<option value="they/them" {{if eq "they/them" .FieldPronoun}}selected{{end}}>They/Them</option>
|
||||
<option value="he/him" {{if eq "he/him" .FieldPronoun}}selected{{end}}>He/Him</option>
|
||||
<option value="she/her" {{if eq "she/her" .FieldPronoun}}selected{{end}}>She/Her</option>
|
||||
<option value="it/its" {{if eq "it/its" .FieldPronoun}}selected{{end}}>It/Its</option>
|
||||
<option value="one/one's" {{if eq "one/one's" .FieldPronoun}}selected{{end}}>One/One's</option>
|
||||
<option value="they/them" [[ if eq "they/them" .FieldPronoun ]]selected[[ end ]]>They/Them</option>
|
||||
<option value="he/him" [[ if eq "he/him" .FieldPronoun ]]selected[[ end ]]>He/Him</option>
|
||||
<option value="she/her" [[ if eq "she/her" .FieldPronoun ]]selected[[ end ]]>She/Her</option>
|
||||
<option value="it/its" [[ if eq "it/its" .FieldPronoun ]]selected[[ end ]]>It/Its</option>
|
||||
<option value="one/one's" [[ if eq "one/one's" .FieldPronoun ]]selected[[ end ]]>One/One's</option>
|
||||
</select>
|
||||
<label>Reset? <input type="checkbox" name="reset_pronouns"></label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="field_birthdate">Birthdate:</label>
|
||||
<input type="date" name="birthdate" id="field_birthdate" value="{{.User.Birthdate}}">
|
||||
<input type="date" name="birthdate" id="field_birthdate" value="[[ .User.Birthdate ]]">
|
||||
<label>Reset? <input type="checkbox" name="reset_birthdate"></label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="field_zoneinfo">Time Zone:</label>
|
||||
<input type="text" name="zoneinfo" id="field_zoneinfo" value="{{.User.Zoneinfo}}" list="list_zoneinfo">
|
||||
<input type="text" name="zoneinfo" id="field_zoneinfo" value="[[ .User.Zoneinfo ]]" list="list_zoneinfo">
|
||||
<datalist id="list_zoneinfo">
|
||||
{{range .ListZoneInfo}}
|
||||
<option value="{{.}}"></option>
|
||||
{{end}}
|
||||
[[ range .ListZoneInfo ]]
|
||||
<option value="[[ . ]]"></option>
|
||||
[[ end ]]
|
||||
</datalist>
|
||||
<label>Reset? <input type="checkbox" name="reset_zoneinfo"></label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="field_locale">Language:</label>
|
||||
<input type="text" name="locale" id="field_locale" value="{{.User.Locale}}" list="list_locale">
|
||||
<input type="text" name="locale" id="field_locale" value="[[ .User.Locale ]]" list="list_locale">
|
||||
<datalist id="list_locale">
|
||||
{{range .ListLocale}}
|
||||
<option value="{{.Value}}">{{.Label}}</option>
|
||||
{{end}}
|
||||
[[ range .ListLocale ]]
|
||||
<option value="[[ .Value ]]">[[ .Label ]]</option>
|
||||
[[ end ]]
|
||||
</datalist>
|
||||
<label>Reset? <input type="checkbox" name="reset_locale"></label>
|
||||
</div>
|
||||
@ -76,6 +61,4 @@ import Layout from "../layouts/Layout.astro";
|
||||
<button type="submit">Cancel</button>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
</Layout>
|
||||
|
Loading…
Reference in New Issue
Block a user