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