diff --git a/config.py b/config.py index b348fc3..ca60d84 100644 --- a/config.py +++ b/config.py @@ -1,5 +1,9 @@ DAILY_HASH_BITS = 9 +ASSETS_URL = '/pkgs.void/static' + +VOIDLINUX_URL = 'https://voidlinux.org' + DATASOURCE_CLASS = 'SqliteDataSource' DATASOURCE_ARGUMENTS = ['index.sqlite3'] diff --git a/present.py b/present.py index bb579a5..c7ee400 100644 --- a/present.py +++ b/present.py @@ -58,6 +58,8 @@ def escape_attr(arg): def web_parameters(): return { 'root_url': config.ROOT_URL, + 'assets_url': config.ASSETS_URL, + 'voidlinux_url': config.VOIDLINUX_URL, 'escape_attr': escape_attr, } diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..fd3ec04 Binary files /dev/null and b/static/favicon.png differ diff --git a/static/style.css b/static/style.css index a331961..1c1162b 100644 --- a/static/style.css +++ b/static/style.css @@ -1,68 +1,70 @@ -html, body { - background: #ddd; - color: #222; +html { + --void-green: #478061; + --void-green-link: #478061; + --void-green-light: #478061; + --text: #333; + --background: white; + --border: #ddd; } -header { - font-size: 1.2em; - text-align: right; +body { + background-color: var(--background); + color: var(--text); } -.searchbox { - margin: 1ex; -} - -.content { - max-width: 90ex; - max-width: 90ch; - margin: auto; +.btn-primary { + background-color: var(--void-green); + border-color: var(--void-green); } a { - color: #0000E0; + color: var(--void-green-light); } -.horizontal { - display: inline; - padding: 0; +.bg-void { + background-color: var(--void-green); } -.horizontal li { - display: inline; - margin: auto 1ex; +.card { + background-color: inherit; + border: 1px solid var(--border); } -dd { - margin-bottom: 1ex; +.card-body { + padding: 2rem 3rem; } -ul, .breakable { - columns: 40ex 2; - columns: 40ch 2; +.nav-link { + color: white; } -ul.continuous { - columns: auto 1; +.nav-link:focus, .nav-link:hover { + color: white; + text-decoration: inherit; } -li, .non-breakable { - break-inside: avoid; +a:hover { + color: var(--text); + text-decoration: underline; } -hr { - max-width: 20ex; - max-width: 20ch; - color: #bfb; - border: none; - border-top: dotted 0.4em #bfb; - margin: 1.3em auto; +.btn-primary:hover { + background-color: var(--background); + border-color: var(--text); } -li > aside, .masked > aside { - font-size: 0.8em; - display: inline; +.form-control, .form-control:focus { + background-color: inherit; + color: var(--text); } -.archs-per-version a { - white-space: nowrap; +@media (prefers-color-scheme: dark) { + html { + --void-green: #295340; + --void-green-link: #62b086; + --void-green-light: #478061; + --text: #ccc; + --background: #222; + --border: #666; + } } diff --git a/templates/base.html b/templates/base.html index e199068..4219c46 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,34 +1,57 @@ - + + + + + ${_context.get('title', 'Packages')} from Void + + + + + - - - - - - - ${_context.get('title', 'Packages')} from Void - - - - - - -
- -
-{== _content ==} - + + + + {== _content ==} + + diff --git a/templates/main.html b/templates/main.html index b301ed7..def19a9 100644 --- a/templates/main.html +++ b/templates/main.html @@ -1,12 +1,14 @@ -
-
-
- - - - -
-

Site was updated at ${updated}.

-
-
+
+
+
+ + + +
+
+ +
diff --git a/templates/small/main_list.html b/templates/small/main_list.html index 0ca35cc..20888e3 100644 --- a/templates/small/main_list.html +++ b/templates/small/main_list.html @@ -1,17 +1,17 @@ -
-

${entry['title']}

- - <{== tag ==}> - - -
  • - ${i} -
  • - - - - ${entry['more']} - -
    - +
    +
    +
    ${entry['title']}
    + + <{== tag ==} class="card-text"> + + +
  • + ${i} +
  • + + + + ${entry['more']} + +
    +