From baa10aeb413a5ac109e56db5fd7a8d62a4d5965f Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 16 Feb 2021 16:48:56 -0700 Subject: initial commit --- templates/admin-edit.html | 69 +++++++++++ templates/admin.html | 50 ++++++++ templates/index.html | 16 +++ templates/layout.html | 296 ++++++++++++++++++++++++++++++++++++++++++++++ templates/list.html | 29 +++++ 5 files changed, 460 insertions(+) create mode 100644 templates/admin-edit.html create mode 100644 templates/admin.html create mode 100644 templates/index.html create mode 100644 templates/layout.html create mode 100644 templates/list.html (limited to 'templates') diff --git a/templates/admin-edit.html b/templates/admin-edit.html new file mode 100644 index 0000000..58d93f5 --- /dev/null +++ b/templates/admin-edit.html @@ -0,0 +1,69 @@ +{{ template "layout.html" . }} +{{ define "content" }} +

{{ .Status }}

+ + + {{ $categoryCount := len .Papers }} + {{ if gt $categoryCount 0 }} + + {{ end }} + + + + + + +
Back
+
+{{ if gt $categoryCount 0 }} +
+ + + +{{ range $category, $papers := .Papers }} + {{ $paperCount := len $papers }} + + + + {{ range $path, $paper := $papers }} + + {{ if $paper.Meta.Title }} + + {{ else }} + + {{ end }} + + + {{ if $paper.Meta.Title }} + + {{ else }} + + {{ end }} + + {{ end }} +{{ end }} +{{ end }} +
+ + +
author: {{ $contCount := len $paper.Meta.Contributors }} {{ if gt $contCount 0 }}{{ $author := index $paper.Meta.Contributors 0 }}{{ $author.LastName }}{{ if gt $contCount 1 }} et al.{{ end }}{{ end }} yr: {{ $paper.Meta.PubYear }} doi: {{ $paper.Meta.DOI }} journal: {{ $paper.Meta.Journal }}
+{{ end }} diff --git a/templates/admin.html b/templates/admin.html new file mode 100644 index 0000000..8c5222c --- /dev/null +++ b/templates/admin.html @@ -0,0 +1,50 @@ +{{ template "layout.html" . }} +{{ define "content" }} +{{ if .LastPaperDL }} +

{{ .Status }} (download)

+{{ else }} +

{{ .Status }}

+{{ end }} + + + + + {{ $categoryCount := len .Papers }} + {{ if gt $categoryCount 0 }} + + + + {{ end }} + +{{ if gt $categoryCount 0 }} + + + + +
Edit
+
+{{ block "list" . }}{{ end }} +
+{{ end }} +{{ end }} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..7de21f7 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,16 @@ +{{ template "layout.html" . }} +{{ define "content" }} + + +{{ $categoryCount := len .Papers }} +{{ if gt $categoryCount 0 }} + + +
Manage
+
+{{ block "list" . }}{{ end }} +
+{{ else }} +

nothing here yet, create a category to start downloading papers

+{{ end }} +{{ end }} diff --git a/templates/layout.html b/templates/layout.html new file mode 100644 index 0000000..26130d0 --- /dev/null +++ b/templates/layout.html @@ -0,0 +1,296 @@ + + + + + +Crane + + + +
+
+ + + + +{{ block "content" . }}{{ end }} + +
+
+ + diff --git a/templates/list.html b/templates/list.html new file mode 100644 index 0000000..718a732 --- /dev/null +++ b/templates/list.html @@ -0,0 +1,29 @@ +{{ define "list" }} + +{{ range $category, $papers := .Papers }} + {{ $paperCount := len $papers }} + {{ if ge $paperCount 1 }} + + + + {{ range $path, $paper := $papers }} + + {{ if $paper.Meta.Title }} + + {{ else }} + + {{ end }} + + + {{ if $paper.Meta.Title }} + + {{ else }} + + {{ end }} + + {{ end }} + {{ else }} + {{ end }} +{{ end }} +
{{ $category }}
{{ $paper.Meta.Title }}{{ $paper.PaperName }}
author: {{ $contCount := len $paper.Meta.Contributors }} {{ if gt $contCount 0 }}{{ $author := index $paper.Meta.Contributors 0 }}{{ $author.LastName }}{{ if gt $contCount 1 }} et al.{{ end }}{{ end }} yr: {{ $paper.Meta.PubYear }} doi: {{ $paper.Meta.DOI }} journal: {{ $paper.Meta.Journal }}
+{{ end }} -- cgit v1.2.3-54-g00ecf