pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit b0ffb42d60eae19ad240451dcba1150f369e580c
parent 18ee41ee83a8a739739dc64a3743958596f72438
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sun, 28 Apr 2024 18:26:50 +0200

Add styling for the filebrowser

Diffstat:
M.htaccess | 3+++
Aassets/index.css | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mbin/git_create_repo.sh | 3+++
3 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/.htaccess b/.htaccess @@ -13,3 +13,6 @@ RedirectMatch 404 ^/.git/.*$ RedirectMatch 404 ^/bin/.*$ RedirectMatch 404 ^/templates/.*$ #RedirectMatch 404 ^/.*?\.git/.*$ + +# Style filebrowser +IndexStyleSheet /assets/index.css diff --git a/assets/index.css b/assets/index.css @@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: AGPL-3.0-or-later + SPDX-FileCopyrightText: 2021-2024 JayVii <jayvii[AT]posteo[DOT]de> */ + +/* Dark Mode: Default */ +:root { + --fg1: #dadadb; + --fg2: #8d8e8f; + --bg1: #1d1e20; + --bg2: #2e2e33; + --hl1: #8c90d4; + --del: #db4325; + --add: #006164; +} + +/* Bright Mode */ +@media (prefers-color-scheme: light) { + :root { + --fg1: #1e1e1e; + --fg2: #8d8e8f; + --bg1: #f5f5f5; + --bg2: #ffffff; + --hl1: #6c71c4; + --del: #db4325; + --add: #006164; + } +} + +/* Hide server details */ +address { + display: none; +} + +/* Hide Description column in table */ +.indexcoldesc { + display: none; +} + +body { + background-color: var(--bg1); + font-family: sans-serif, serif; + color: var(--fg1); +} + +h1, h2, h3, h4, h5, h6 { + text-align: center; +} + +table { + width: 100%; + max-width: 1000px; + margin-left: auto; + margin-right: auto; +} + +a { + color: var(--hl1); + padding: 5px; + border-radius: 5px; +} + +a:hover, a:active { + background-color: var(--bg2); +} + diff --git a/bin/git_create_repo.sh b/bin/git_create_repo.sh @@ -28,6 +28,9 @@ mkdir -p "${1}/${2}/${3}/" mkdir -p "${1}/${2}/${3}.git/" mkdir -p "${1}/${2}/${3}.exp/" +# Ensure that export-directory is browsable +echo "Options +Indexes" > "${1}/${2}/${3}.exp/.htaccess" + # Git-Repository cd "${1}/${2}/${3}.git" || exit 1;