From a164fd4aad6406900de2bc443e31e580b46550fc Mon Sep 17 00:00:00 2001 From: Jordan Date: Thu, 4 Mar 2021 21:48:18 -0700 Subject: add category links, styling --- screenshots/admin.png | Bin 105502 -> 167799 bytes templates/admin-edit.html | 35 +++++++++++---------- templates/admin.html | 3 ++ templates/index.html | 5 ++- templates/layout.html | 77 ++++++++++++++++++++++++++-------------------- templates/list.html | 27 ++++++++-------- 6 files changed, 80 insertions(+), 67 deletions(-) diff --git a/screenshots/admin.png b/screenshots/admin.png index 6eea084..add23f7 100644 Binary files a/screenshots/admin.png and b/screenshots/admin.png differ diff --git a/templates/admin-edit.html b/templates/admin-edit.html index 8455e25..a4cf2c7 100644 --- a/templates/admin-edit.html +++ b/templates/admin-edit.html @@ -19,6 +19,9 @@ {{ end }} +
+ {{ range $category, $paper := .Papers }}[{{ $category }}] {{ end }} +
@@ -27,6 +30,7 @@
{{ if gt $categoryCount 0 }}
+
-
Back
+ +
{{ range $category, $papers := .Papers }} {{ $paperCount := len $papers }} -
- - +
+ + +
{{ range $path, $paper := $papers }} - +
{{ if $paper.Meta.Title }} -
+ {{ $paper.Meta.Title }}
{{ else }} - +
{{ end }} - - + {{ if $paper.Meta.Title }} - - {{ else }} - + {{ range $index, $contributor := $paper.Meta.Contributors }}{{if $index}}, {{end}}{{ $contributor.FirstName }} {{ $contributor.LastName }}{{end}}
+ {{ $paper.Meta.PubYear }} - {{ $paper.Meta.DOI }} - {{ $paper.Meta.Journal }} {{ end }} - + {{ end }} {{ end }} {{ end }} -
- - -
{{ $paper.Meta.PubYear }} - {{ $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 }} - {{ $paper.Meta.DOI }} - {{ $paper.Meta.Journal }}
+ {{ end }} diff --git a/templates/admin.html b/templates/admin.html index 8c5222c..697b391 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -38,6 +38,9 @@ {{ end }} {{ if gt $categoryCount 0 }} +
+ {{ range $category, $paper := .Papers }}[{{ $category }}] {{ end }} +
diff --git a/templates/index.html b/templates/index.html index 7de21f7..30023cd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,10 +4,13 @@
Edit
{{ $categoryCount := len .Papers }} {{ if gt $categoryCount 0 }} +
+ {{ range $category, $paper := .Papers }}[{{ $category }}] {{ end }} +
Manage
-
+
{{ block "list" . }}{{ end }}
{{ else }} diff --git a/templates/layout.html b/templates/layout.html index 39bb8bb..ae89ff1 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -18,15 +18,15 @@ div#crane { font-family: monospace; - padding: 0em; background: white; padding: 4px; - max-width: 45em; + max-width: 55em; margin: auto; + overflow-wrap: break-word; } div#crane a { - color: blue; + color: #000; text-decoration: none; } @@ -62,13 +62,6 @@ div#crane .btn { border-radius: 0; } -div#crane a:hover { - text-decoration: underline; -} -div#crane a { - color: #000; -} - div#crane table { border-collapse: collapse; } @@ -99,11 +92,6 @@ div#crane table#header td.form { white-space: nowrap; } -div#crane table#header td.form form, -div#crane table#header td.form input, -div#crane table#header td.form select { -} - div#crane table#header td.sub { color: #777; border-top: solid 1px #ccc; @@ -140,51 +128,72 @@ div#crane table.tabs td.form form { padding-left: 1em; } -div#crane table.tabs td.form input, -div#crane table.tabs td.form select { -} - div#crane div.content { margin-top: 1em; padding-bottom: 1em; border-bottom: solid 2px #ccc; } -div#crane table.list { +div#crane div.cat { + font-size: 80%; + color: #555; + padding-bottom: 1em; +} + +div#crane div.list { width: 100%; border: none; border-collapse: collapse; + text-align: left; } -div#crane table.list:first-child tr:first-child td:first-child { - padding-top: 0em; +div#crane div.content div.action { + padding-top: 1em; + padding-bottom: 1em; } -div#crane table.list td.sub { - padding-left: 4em; +div#crane div.list div.paper { + padding-top: 0.5em; + padding-bottom: 0.5em; + padding-left: 10px; +} + +div#crane div.list span.authors { font-size: 80%; + color: #900; } -div#crane table.list td { +div#crane div.list span.year { + font-size: 80%; + color: #090; +} + +div#crane div.list span.doi a { + font-size: 80%; +} + +div#crane div.list span.journal { + font-size: 80%; +} + +div#crane div.list span { border: none; - padding: 0.1em 0.5em 0.1em 0.5em; } -div#crane table.list td.title { - text-decoration: underline; +div#crane div.list span.title { padding-top: 0.5em; - padding-left: 1.5em; } -div#crane table.list td a:hover { - color: #00f; +div#crane div.list span.title a { + text-decoration: underline; } -div#crane table.list td.papersection { +div#crane div.list div.papersection { font-weight: bold; - padding-top: 1em; - padding-bottom: .5em; + padding-top: 0.5em; + padding-bottom: 0.5em; color: black; + font-size: 120%; } div#crane div.footer { diff --git a/templates/list.html b/templates/list.html index 1a482d1..8f6382d 100644 --- a/templates/list.html +++ b/templates/list.html @@ -1,29 +1,26 @@ {{ define "list" }} - +
{{ range $category, $papers := .Papers }} {{ $paperCount := len $papers }} {{ if ge $paperCount 1 }} -
- - +
+ {{ $category }} +
{{ range $path, $paper := $papers }} - +
{{ if $paper.Meta.Title }} -
+ {{ $paper.Meta.Title }}
{{ else }} - + {{ $paper.PaperName }}
{{ end }} - - + {{ if $paper.Meta.Title }} - - {{ else }} - + {{ range $index, $contributor := $paper.Meta.Contributors }}{{if $index}}, {{end}}{{ $contributor.FirstName }} {{ $contributor.LastName }}{{end}}
+ {{ $paper.Meta.PubYear }} - {{ $paper.Meta.DOI }} - {{ $paper.Meta.Journal }} {{ end }} - + {{ end }} - {{ else }} {{ end }} {{ end }} -
{{ $category }}
{{ $paper.Meta.Title }}{{ $paper.PaperName }}
{{ $paper.Meta.PubYear }} - {{ $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 }} - {{ $paper.Meta.DOI }} - {{ $paper.Meta.Journal }}
+
{{ end }} -- cgit v1.2.3-54-g00ecf