diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-02-23 10:35:22 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-02-23 10:35:22 +0100 |
| commit | 4abcce013c9ee3053badf2abda77190233066676 (patch) | |
| tree | 450de7e8fed3c3c7501a9d2e2eb60a676bdfa09e /_posts/notes/2023-06-24-making-cgit-look-nicer.md | |
| parent | cdf50cb2e3051200c6ea0628c318d66220b7d1a1 (diff) | |
| download | mitjafelicijan.com-4abcce013c9ee3053badf2abda77190233066676.tar.gz | |
Testing thoughts page
Diffstat (limited to '_posts/notes/2023-06-24-making-cgit-look-nicer.md')
| -rw-r--r-- | _posts/notes/2023-06-24-making-cgit-look-nicer.md | 207 |
1 files changed, 207 insertions, 0 deletions
diff --git a/_posts/notes/2023-06-24-making-cgit-look-nicer.md b/_posts/notes/2023-06-24-making-cgit-look-nicer.md new file mode 100644 index 0000000..0140a3e --- /dev/null +++ b/_posts/notes/2023-06-24-making-cgit-look-nicer.md | |||
| @@ -0,0 +1,207 @@ | |||
| 1 | --- | ||
| 2 | title: "Making cgit look nicer" | ||
| 3 | permalink: /making-cgit-look-nicer.html | ||
| 4 | date: 2023-06-24T13:33:58+02:00 | ||
| 5 | layout: post | ||
| 6 | type: note | ||
| 7 | draft: false | ||
| 8 | tags: [git] | ||
| 9 | --- | ||
| 10 | |||
| 11 | For personal use I have a [private Git server](https://git.mitjafelicijan.com) | ||
| 12 | set up and I use GitHub just as a mirror. By default the cgit theme looks a bit | ||
| 13 | dated so I made the flowing theme. | ||
| 14 | |||
| 15 | - `/etc/cgitrc` | ||
| 16 | |||
| 17 | ```ini | ||
| 18 | css=/cgit.css | ||
| 19 | logo=/startrek.gif | ||
| 20 | favicon=/favicon.png | ||
| 21 | source-filter=/usr/lib/cgit/filters/syntax-highlighting-edited.sh | ||
| 22 | about-filter=/usr/lib/cgit/filters/about-formatting.sh | ||
| 23 | |||
| 24 | local-time=1 | ||
| 25 | snapshots=tar.gz | ||
| 26 | repository-sort=age | ||
| 27 | cache-size=1000 | ||
| 28 | branch-sort=age | ||
| 29 | summary-log=200 | ||
| 30 | max-atom-items=50 | ||
| 31 | max-repo-count=100 | ||
| 32 | |||
| 33 | enable-index-owner=0 | ||
| 34 | enable-follow-links=1 | ||
| 35 | enable-log-filecount=1 | ||
| 36 | enable-log-linecount=1 | ||
| 37 | |||
| 38 | root-title=Place for code, experiments and other bullshit! | ||
| 39 | root-desc= | ||
| 40 | clone-url=git@git.mitjafelicijan.com:/home/git/$CGIT_REPO_URL | ||
| 41 | |||
| 42 | mimetype.gif=image/gif | ||
| 43 | mimetype.html=text/html | ||
| 44 | mimetype.jpg=image/jpeg | ||
| 45 | mimetype.jpeg=image/jpeg | ||
| 46 | mimetype.pdf=application/pdf | ||
| 47 | mimetype.png=image/png | ||
| 48 | mimetype.svg=image/svg+xml | ||
| 49 | |||
| 50 | readme=:README.md | ||
| 51 | readme=:readme.md | ||
| 52 | |||
| 53 | # Must be at the end! | ||
| 54 | virtual-root=/ | ||
| 55 | scan-path=/home/git/ | ||
| 56 | ``` | ||
| 57 | |||
| 58 | For `syntax-highlighting-edited.sh` follow instructions on | ||
| 59 | [https://wiki.archlinux.org/title/Cgit](https://wiki.archlinux.org/title/Cgit#Using_highlight). | ||
| 60 | |||
| 61 | - `/usr/share/cgit/cgit.css` | ||
| 62 | |||
| 63 | ```css | ||
| 64 | * { | ||
| 65 | font-size: 11pt; | ||
| 66 | } | ||
| 67 | |||
| 68 | body { | ||
| 69 | font-family: monospace; | ||
| 70 | background: white; | ||
| 71 | padding: 1em; | ||
| 72 | } | ||
| 73 | |||
| 74 | th, td { | ||
| 75 | text-align: left; | ||
| 76 | } | ||
| 77 | |||
| 78 | /* HEADER */ | ||
| 79 | |||
| 80 | #header { | ||
| 81 | margin-bottom: 1em; | ||
| 82 | } | ||
| 83 | |||
| 84 | #header .logo img { | ||
| 85 | display: block; | ||
| 86 | height: 3em; | ||
| 87 | margin-right: 10px; | ||
| 88 | } | ||
| 89 | |||
| 90 | #header .sub.right { | ||
| 91 | display: none; | ||
| 92 | } | ||
| 93 | |||
| 94 | /* FOOTER */ | ||
| 95 | |||
| 96 | .footer { | ||
| 97 | margin-top: 2em; | ||
| 98 | font-style: italic; | ||
| 99 | } | ||
| 100 | |||
| 101 | .footer, .footer a { | ||
| 102 | color: gray; | ||
| 103 | } | ||
| 104 | |||
| 105 | /* TABS */ | ||
| 106 | |||
| 107 | .tabs a { | ||
| 108 | margin-bottom: 2em; | ||
| 109 | display: inline-block; | ||
| 110 | margin-right: 1em; | ||
| 111 | } | ||
| 112 | |||
| 113 | .tabs td a:only-child { | ||
| 114 | display: none; | ||
| 115 | } | ||
| 116 | |||
| 117 | /* HIDING ELEMENTS */ | ||
| 118 | |||
| 119 | .cgit-panel, .form { | ||
| 120 | display: none; | ||
| 121 | } | ||
| 122 | |||
| 123 | /* LISTS */ | ||
| 124 | |||
| 125 | .list td, .list th { | ||
| 126 | padding-right: 2em; | ||
| 127 | } | ||
| 128 | |||
| 129 | .list .nohover a { | ||
| 130 | color: black; | ||
| 131 | } | ||
| 132 | |||
| 133 | .list .button { | ||
| 134 | padding-right: 0.5em; | ||
| 135 | } | ||
| 136 | |||
| 137 | /* COMMIT */ | ||
| 138 | |||
| 139 | .commit-subject { | ||
| 140 | padding: 1em 0; | ||
| 141 | } | ||
| 142 | |||
| 143 | .decoration a { | ||
| 144 | padding-left: 0.5em; | ||
| 145 | } | ||
| 146 | |||
| 147 | .commit-info th { | ||
| 148 | padding-right: 1em; | ||
| 149 | } | ||
| 150 | |||
| 151 | .commit-subject { | ||
| 152 | padding: 2em 0; | ||
| 153 | } | ||
| 154 | |||
| 155 | table.diff div.head { | ||
| 156 | padding-top: 2em; | ||
| 157 | } | ||
| 158 | |||
| 159 | table.diffstat td { | ||
| 160 | padding-right: 1em; | ||
| 161 | } | ||
| 162 | |||
| 163 | /* CONTENT */ | ||
| 164 | |||
| 165 | .linenumbers { | ||
| 166 | padding-right: 0.5em; | ||
| 167 | } | ||
| 168 | |||
| 169 | .linenumbers a { | ||
| 170 | color: gray; | ||
| 171 | } | ||
| 172 | |||
| 173 | .pager { | ||
| 174 | display: flex; | ||
| 175 | list-style-type: none; | ||
| 176 | padding: 0; | ||
| 177 | gap: 0.5em; | ||
| 178 | } | ||
| 179 | |||
| 180 | /* DIFF COLORS */ | ||
| 181 | |||
| 182 | table.diff { | ||
| 183 | width: 100%; | ||
| 184 | } | ||
| 185 | |||
| 186 | table.diff td { | ||
| 187 | white-space: pre; | ||
| 188 | } | ||
| 189 | |||
| 190 | table.diff td div.head { | ||
| 191 | font-weight: bold; | ||
| 192 | margin-top: 1em; | ||
| 193 | color: black; | ||
| 194 | } | ||
| 195 | |||
| 196 | table.diff td div.hunk { | ||
| 197 | color: #009; | ||
| 198 | } | ||
| 199 | |||
| 200 | table.diff td div.add { | ||
| 201 | color: green; | ||
| 202 | } | ||
| 203 | |||
| 204 | table.diff td div.del { | ||
| 205 | color: red; | ||
| 206 | } | ||
| 207 | ``` | ||
