diff --git a/server.go b/server.go index f920e57..2606c6b 100644 --- a/server.go +++ b/server.go @@ -167,9 +167,11 @@ func (s *Server) ViewHandler() httprouter.Handle { struct { ID string URL string + Ori string }{ ID: u.ID, URL: fullURL.String(), + Ori: u.URL, }, ) } diff --git a/templates/edit.html b/templates/edit.html index 4ae9379..c3adb33 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -6,8 +6,8 @@
- - + + View @@ -17,3 +17,20 @@
{{end}} +{{define "scripts"}} + + +{{end}} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 9446c45..b822c85 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,31 +3,51 @@
{{ range $URL := .URLList }} -
- - {{ $URL.ID }} - - {{ $URL.URL -}} - - + {{end}}
- - + +
{{end}} +{{define "scripts"}} + + +{{end}} \ No newline at end of file diff --git a/templates/view.html b/templates/view.html index 392e3f8..35a17d5 100644 --- a/templates/view.html +++ b/templates/view.html @@ -2,9 +2,10 @@