From ebaaf6c074aac8bfaa5d5a371122f082f021f33a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 31 May 2021 11:38:53 -0300 Subject: Add first version of HTML templates Inspired mainly by CGit UI, but also stagit and sourcehut. --- src/static/logo.svg | 62 ++++++++++ src/static/styles.css | 133 ++++++++++++++++++++ src/templates/files.html | 311 +++++++++++++++++++++++++++++++++++++++++++++++ src/templates/log.html | 83 +++++++++++++ src/templates/refs.html | 213 ++++++++++++++++++++++++++++++++ 5 files changed, 802 insertions(+) create mode 100644 src/static/logo.svg create mode 100644 src/static/styles.css create mode 100644 src/templates/files.html create mode 100644 src/templates/log.html create mode 100644 src/templates/refs.html diff --git a/src/static/logo.svg b/src/static/logo.svg new file mode 100644 index 0000000..ce566b2 --- /dev/null +++ b/src/static/logo.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/static/styles.css b/src/static/styles.css new file mode 100644 index 0000000..a1ed48d --- /dev/null +++ b/src/static/styles.css @@ -0,0 +1,133 @@ +:root { + --row-light-gray: #eee; + --row-background-light-gray: #ccc; + --background-light-gray: #999; + font-family: sans-serif; +} + +a { + color: black; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +#horizontal-aligner-of-logo-and-header-items { + display: flex; +} + +#vertical-aligner-of-header-items { + display: flex; + flex-direction: row; +} + +div#vertical-aligner-of-header-items > h2 { + font-weigth: normal; + color: red; +} + +#repository-logo { + width: 5em; + margin: 2em; +} + +hr { + border: none; + height: 5px; + background-color: var(--background-light-gray); +} + +nav ul { + display: flex; + list-style-type: none; + border-bottom: 5px solid var(--background-light-gray); +} + +nav li { + margin-left: 10px; +} + +nav a { + padding-top: 2px; + padding-left: 8px; + padding-right: 8px; +} + +nav .selected-nav-item a { + background-color: var(--background-light-gray); +} + +main { + padding: 2em; +} + +table { + text-align: left; + border: none; + border-collapse: collapse; + width: 100%; +} + +table tr.table-no-highlight-row { + background-color: white; +} + +table tr.table-no-highlight-row:hover { + background-color: white; +} + +table tr:hover { + background-color: var(--row-background-light-gray); +} + +tr:nth-child(odd) { + background-color: white; +} + +tr:nth-child(even) { + background-color: var(--row-light-gray); +} + +footer { + text-align: center; +} + +/* Page log.html */ + +.log-commit-box { + padding: 1em; + background-color: var(--row-light-gray); +} + +.log-head-highlight { + padding: 2px; + background-color: #ff8888; + border: 1px solid; +} + +.log-branch-highlight { + padding: 2px; + background-color: #88ff88; + border: 1px solid; +} + +.log-tag-highlight { + padding: 2px; + background-color: #ffff88; + border: 1px solid; +} + + +/* Page tree.html */ + +table#files-table td:nth-child(1) { + width: 10%; + padding-right: 2em; +} + +.files-row-item-directory { + color: blue; + font-weight: bold; +} diff --git a/src/templates/files.html b/src/templates/files.html new file mode 100644 index 0000000..cba4c0b --- /dev/null +++ b/src/templates/files.html @@ -0,0 +1,311 @@ + + + + + + + + + + + + $PROJECT_NAME - $PROJECT_DESCRIPTION + + + + + + + + +
+
+ +
+

+ $PROJECT_NAME +

+

+ $PROJECT_DESCRIPTION +

+ + git clone $PROJECT_CLONE_URL + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Mode + + Name + + Size +
+ + -rw-r--r-- + + + + + .gitignore + + + + + 123B + +
+ + -rw-r--r-- + + + + + CHAGELOG.md + + + + + 123B + +
+ + -rw-r--r-- + + + + + COPYING + + + + + 123B + +
+ + -rw-r--r-- + + + + + Makefile + + + + + 123B + +
+ + -rw-r--r-- + + + + + README.md + + + + + 123B + +
+ + -rw-r--r-- + + + + + TODOs.md + + + + + 123B + +
+ + d--------- + + + + + aux/ + + + + + 123B + +
+ + -rw-r--r-- + + + + + description + + + + + 123B + +
+ + d--------- + + + + + doc/ + + + + + 123B + +
+ + -rw-r--r-- + + + + + long-description + + + + + 123B + +
+ + d--------- + + + + + src/ + + + + + 123B + +
+ + d--------- + + + + + tests/ + + + + + 123B + +
+
+
+

README

+

This does something.

+
+
+ + + diff --git a/src/templates/log.html b/src/templates/log.html new file mode 100644 index 0000000..decd2f9 --- /dev/null +++ b/src/templates/log.html @@ -0,0 +1,83 @@ + + + + + + + + + + + + $PROJECT_NAME - $PROJECT_DESCRIPTION + + + + + + + + +
+
+ +
+

+ $PROJECT_NAME +

+

+ $PROJECT_DESCRIPTION +

+ + git clone $PROJECT_CLONE_URL + +
+
+ +
+
+
+

+ 739a235c + | + EuAndreh + HEAD + main + v0.2.1 +

+
Only display filename if it's set
+
+This prevents None from showing up in different places when pastes are
+submitted through the API.
+
Notes:
+  See CI logs with:
+    git notes --ref=refs/notes/ci-logs show 92bfa3c5f06558cebcfa06bf78159e76254e07fd
+    git notes --ref=refs/notes/ci-data show 92bfa3c5f06558cebcfa06bf78159e76254e07fd
+
+
+ + + diff --git a/src/templates/refs.html b/src/templates/refs.html new file mode 100644 index 0000000..2257f70 --- /dev/null +++ b/src/templates/refs.html @@ -0,0 +1,213 @@ + + + + + + + + + + + + $PROJECT_NAME - $PROJECT_DESCRIPTION + + + + + + + + +
+
+ +
+

+ $PROJECT_NAME +

+

+ $PROJECT_DESCRIPTION +

+ + git clone $PROJECT_CLONE_URL + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Branch + + Commit message + + Author + + Date +
+ + + main + + + + + aux/workflow/public.sh: Mark as executable + + + EuAndreh + + 2021-01-02 15:26 -3 +
 
+ Tag + + Download + + Author + + Date +
+ + v0.2.1 + + + + remembering-0.2.1.tar.xz + + (sig) + + EuAndreh + + 2021-01-05 15:26 -3 +
+ + v0.2.0 + + + + remembering-0.2.0.tar.xz + + (sig) + + EuAndreh + + 2021-01-04 15:26 -3 +
+ + v0.1.2 + + + + remembering-0.2.1.tar.xz + + (sig) + + EuAndreh + + 2021-01-03 15:26 -3 +
+ + v0.1.1 + + + + remembering-0.2.1.tar.xz + + (sig) + + EuAndreh + + 2021-01-02 15:26 -3 +
+ + v0.1.0 + + + + remembering-0.2.1.tar.xz + + (sig) + + EuAndreh + + 2021-01-01 15:26 -3 +
+
+ + + -- cgit v1.2.3