diff options
| author | Danilo M. <danix@danix.xyz> | 2026-05-08 10:00:20 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-05-08 10:00:20 +0200 |
| commit | 16be7b046b8c10cefa3fbc5a1883d73cfc627a01 (patch) | |
| tree | 958d63743e2630cf5a9c78a398e2a83b49826550 | |
| parent | cb09e76adc9d09765b3c3e19e0c2ee32c480c2fd (diff) | |
| download | cgit-theme-danix-16be7b046b8c10cefa3fbc5a1883d73cfc627a01.tar.gz cgit-theme-danix-16be7b046b8c10cefa3fbc5a1883d73cfc627a01.zip | |
feat: add welcome text to index page via root-readme
Inject site-desc.html on the repo list page using cgit's root-readme
option. Mirrors the welcome text and signature from the gitweb theme.
| -rw-r--r-- | cgit.css | 40 | ||||
| -rw-r--r-- | cgitrc.example | 1 | ||||
| -rw-r--r-- | images/signature.png | bin | 0 -> 9765 bytes | |||
| -rw-r--r-- | site-desc.html | 15 |
4 files changed, 56 insertions, 0 deletions
@@ -352,6 +352,46 @@ div.content { } /* ============================================================= + SITE DESCRIPTION (index page, root-readme) + ============================================================= */ + +div.site-desc { + max-width: 680px; + margin: 2rem auto 2.5rem; + padding: 0 1rem; + color: var(--text); + font-family: 'IBM Plex Sans', sans-serif; + font-size: 0.95rem; + line-height: 1.7; +} + +div.site-desc h2 { + font-family: 'Oxanium', sans-serif; + font-size: 1.4rem; + color: var(--accent); + margin-bottom: 0.75rem; +} + +div.site-desc a { + color: var(--accent2); + text-decoration: none; +} + +div.site-desc a:hover { + text-decoration: underline; + opacity: 1; +} + +div.site-desc .welcome-close { + color: var(--text-dim); + font-style: italic; +} + +div.site-desc .signature-wrap { + margin-top: 1rem; +} + +/* ============================================================= REPO LIST PAGE ============================================================= */ diff --git a/cgitrc.example b/cgitrc.example index fba2002..1a4ae80 100644 --- a/cgitrc.example +++ b/cgitrc.example @@ -13,6 +13,7 @@ logo=/cgit-theme/images/lampD.png logo-link=https://danix.xyz head-include=/var/www/cgit-theme-danix/head.html footer=/usr/share/cgit/cgit-theme-danix/footer.html +root-readme=/var/www/cgit-theme-danix/site-desc.html source-filter=/usr/share/cgit/cgit-theme-danix/syntax-highlight.py # ---- Site settings ---- diff --git a/images/signature.png b/images/signature.png Binary files differnew file mode 100644 index 0000000..47f5fed --- /dev/null +++ b/images/signature.png diff --git a/site-desc.html b/site-desc.html new file mode 100644 index 0000000..b833182 --- /dev/null +++ b/site-desc.html @@ -0,0 +1,15 @@ +<div class="site-desc"> + <h2>My work</h2> + <p> + Welcome to my git repository. Here's what I've been working on in the past, + today, and what I'll be (probably) working on in the future. + </p> + <p> + Feel free to have a look at the code I've written and don't hesitate to + <a href="https://danix.xyz/is/here/">drop me a few lines</a> if you want to. + </p> + <p class="welcome-close">I wish you a great day!</p> + <p class="signature-wrap"> + <img height="100" width="200" src="/cgit-theme/images/signature.png" alt="danix's signature" /> + </p> +</div> |
