Compare commits
1 commit
main
...
feat/displ
Author | SHA1 | Date | |
---|---|---|---|
![]() |
16945d488a |
2 changed files with 6 additions and 1 deletions
|
@ -189,6 +189,7 @@ type PageData struct {
|
|||
Title string
|
||||
Version string
|
||||
Expirations []int
|
||||
Expiration int
|
||||
Languages []string
|
||||
Err error
|
||||
URL string
|
||||
|
@ -345,6 +346,9 @@ func (h *GetWebNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
h.PageData.Err = fmt.Errorf("jriou")
|
||||
h.Templates.ExecuteTemplate(w, templateName, h.PageData)
|
||||
|
||||
h.PageData.Note = note
|
||||
|
||||
h.logger.Debug("rendering note web page")
|
||||
|
@ -423,6 +427,7 @@ func (s *Server) Start() error {
|
|||
p := PageData{
|
||||
Title: s.config.Title,
|
||||
Expirations: s.config.Expirations,
|
||||
Expiration: s.config.Expiration,
|
||||
Languages: s.config.Languages,
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
</div>
|
||||
<div class="col">
|
||||
<select class="form-select" aria-label="Expiration" id="expiration" name="expiration">
|
||||
<option selected="selected" disabled>Expiration</option>
|
||||
<option selected="selected" disabled>{{HumanDuration .Expiration}}</option>
|
||||
{{range .Expirations}}
|
||||
<option value="{{.}}">{{HumanDuration .}}</option>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue