diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/git.igorek.dev/README.md | 36 | ||||
| -rw-r--r-- | examples/git.igorek.dev/about/root.html | 1 | ||||
| -rw-r--r-- | examples/git.igorek.dev/colors.css | 121 | ||||
| -rw-r--r-- | examples/git.igorek.dev/compose.yaml | 16 | ||||
| -rw-r--r-- | examples/git.igorek.dev/etc/cgitrc | 20 | ||||
| -rw-r--r-- | examples/git.igorek.dev/etc/repos | 4 | ||||
| -rw-r--r-- | examples/git.igorek.dev/static/favicon.ico | bin | 0 -> 17014 bytes | |||
| -rw-r--r-- | examples/git.igorek.dev/static/image.svg | 86 |
8 files changed, 284 insertions, 0 deletions
diff --git a/examples/git.igorek.dev/README.md b/examples/git.igorek.dev/README.md new file mode 100644 index 0000000..d048150 --- /dev/null +++ b/examples/git.igorek.dev/README.md | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | # How to setup | ||
| 2 | |||
| 3 | ## Create git user | ||
| 4 | |||
| 5 | Create a `git` user in the /repo folder | ||
| 6 | |||
| 7 | ```sh | ||
| 8 | sudo useradd --home-dir $PWD/repos/ git | ||
| 9 | sudo mkdir repos/ | ||
| 10 | sudo chown -R git:git repos/ | ||
| 11 | ``` | ||
| 12 | |||
| 13 | ## Create some repos | ||
| 14 | |||
| 15 | ```sh | ||
| 16 | sudo su - git | ||
| 17 | git init --bare test | ||
| 18 | exit | ||
| 19 | ``` | ||
| 20 | |||
| 21 | ## Edit a repos config file | ||
| 22 | |||
| 23 | Put something like that into `./etc/repos` file | ||
| 24 | |||
| 25 | ```txt | ||
| 26 | repo.url=test | ||
| 27 | repo.path=/app/repos/test | ||
| 28 | repo.desc=The test repository | ||
| 29 | repo.readme=:README.md | ||
| 30 | ``` | ||
| 31 | |||
| 32 | ## Run the docker image | ||
| 33 | |||
| 34 | ```ssh | ||
| 35 | docker compose --up -d | ||
| 36 | ``` | ||
diff --git a/examples/git.igorek.dev/about/root.html b/examples/git.igorek.dev/about/root.html new file mode 100644 index 0000000..1e20823 --- /dev/null +++ b/examples/git.igorek.dev/about/root.html | |||
| @@ -0,0 +1 @@ | |||
| <h1>Git storage</h1> | |||
diff --git a/examples/git.igorek.dev/colors.css b/examples/git.igorek.dev/colors.css new file mode 100644 index 0000000..03e15b0 --- /dev/null +++ b/examples/git.igorek.dev/colors.css | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | @media (prefers-color-scheme: dark) { | ||
| 2 | :root { | ||
| 3 | --color-primary: rgb(131 210 228); | ||
| 4 | --color-surface-tint: rgb(131 210 228); | ||
| 5 | --color-on-primary: rgb(0 54 63); | ||
| 6 | --color-primary-container: rgb(0 78 90); | ||
| 7 | --color-on-primary-container: rgb(164 238 255); | ||
| 8 | --color-secondary: rgb(178 203 209); | ||
| 9 | --color-on-secondary: rgb(28 52 57); | ||
| 10 | --color-secondary-container: rgb(51 74 80); | ||
| 11 | --color-on-secondary-container: rgb(205 231 237); | ||
| 12 | --color-tertiary: rgb(189 197 235); | ||
| 13 | --color-on-tertiary: rgb(38 47 77); | ||
| 14 | --color-tertiary-container: rgb(61 69 101); | ||
| 15 | --color-on-tertiary-container: rgb(220 225 255); | ||
| 16 | --color-error: rgb(255 180 171); | ||
| 17 | --color-on-error: rgb(105 0 5); | ||
| 18 | --color-error-container: rgb(147 0 10); | ||
| 19 | --color-on-error-container: rgb(255 218 214); | ||
| 20 | --color-background: rgb(14 20 22); | ||
| 21 | --color-on-background: rgb(222 227 229); | ||
| 22 | --color-surface: rgb(14 20 22); | ||
| 23 | --color-on-surface: rgb(222 227 229); | ||
| 24 | --color-surface-variant: rgb(63 72 75); | ||
| 25 | --color-on-surface-variant: rgb(191 200 203); | ||
| 26 | --color-outline: rgb(137 146 149); | ||
| 27 | --color-outline-variant: rgb(63 72 75); | ||
| 28 | --color-shadow: rgb(0 0 0); | ||
| 29 | --color-scrim: rgb(0 0 0); | ||
| 30 | --color-inverse-surface: rgb(222 227 229); | ||
| 31 | --color-inverse-on-surface: rgb(43 49 51); | ||
| 32 | --color-inverse-primary: rgb(0 104 119); | ||
| 33 | --color-primary-fixed: rgb(164 238 255); | ||
| 34 | --color-on-primary-fixed: rgb(0 31 37); | ||
| 35 | --color-primary-fixed-dim: rgb(131 210 228); | ||
| 36 | --color-on-primary-fixed-variant: rgb(0 78 90); | ||
| 37 | --color-secondary-fixed: rgb(205 231 237); | ||
| 38 | --color-on-secondary-fixed: rgb(5 31 36); | ||
| 39 | --color-secondary-fixed-dim: rgb(178 203 209); | ||
| 40 | --color-on-secondary-fixed-variant: rgb(51 74 80); | ||
| 41 | --color-tertiary-fixed: rgb(220 225 255); | ||
| 42 | --color-on-tertiary-fixed: rgb(17 26 55); | ||
| 43 | --color-tertiary-fixed-dim: rgb(189 197 235); | ||
| 44 | --color-on-tertiary-fixed-variant: rgb(61 69 101); | ||
| 45 | --color-surface-dim: rgb(14 20 22); | ||
| 46 | --color-surface-bright: rgb(52 58 60); | ||
| 47 | --color-surface-container-lowest: rgb(9 15 17); | ||
| 48 | --color-surface-container-low: rgb(23 29 30); | ||
| 49 | --color-surface-container: rgb(27 33 34); | ||
| 50 | --color-surface-container-high: rgb(37 43 44); | ||
| 51 | --color-surface-container-highest: rgb(48 54 55); | ||
| 52 | |||
| 53 | color-scheme: dark; | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | @media (prefers-color-scheme: light) { | ||
| 58 | :root { | ||
| 59 | --color-primary: rgb(0 104 119); | ||
| 60 | --color-surface-tint: rgb(0 104 119); | ||
| 61 | --color-on-primary: rgb(255 255 255); | ||
| 62 | --color-primary-container: rgb(164 238 255); | ||
| 63 | --color-on-primary-container: rgb(0 78 90); | ||
| 64 | --color-secondary: rgb(75 98 104); | ||
| 65 | --color-on-secondary: rgb(255 255 255); | ||
| 66 | --color-secondary-container: rgb(205 231 237); | ||
| 67 | --color-on-secondary-container: rgb(51 74 80); | ||
| 68 | --color-tertiary: rgb(84 93 126); | ||
| 69 | --color-on-tertiary: rgb(255 255 255); | ||
| 70 | --color-tertiary-container: rgb(220 225 255); | ||
| 71 | --color-on-tertiary-container: rgb(61 69 101); | ||
| 72 | --color-error: rgb(186 26 26); | ||
| 73 | --color-on-error: rgb(255 255 255); | ||
| 74 | --color-error-container: rgb(255 218 214); | ||
| 75 | --color-on-error-container: rgb(147 0 10); | ||
| 76 | --color-background: rgb(245 250 252); | ||
| 77 | --color-on-background: rgb(23 29 30); | ||
| 78 | --color-surface: rgb(245 250 252); | ||
| 79 | --color-on-surface: rgb(23 29 30); | ||
| 80 | --color-surface-variant: rgb(219 228 231); | ||
| 81 | --color-on-surface-variant: rgb(63 72 75); | ||
| 82 | --color-outline: rgb(111 121 123); | ||
| 83 | --color-outline-variant: rgb(191 200 203); | ||
| 84 | --color-shadow: rgb(0 0 0); | ||
| 85 | --color-scrim: rgb(0 0 0); | ||
| 86 | --color-inverse-surface: rgb(43 49 51); | ||
| 87 | --color-inverse-on-surface: rgb(236 242 243); | ||
| 88 | --color-inverse-primary: rgb(131 210 228); | ||
| 89 | --color-primary-fixed: rgb(164 238 255); | ||
| 90 | --color-on-primary-fixed: rgb(0 31 37); | ||
| 91 | --color-primary-fixed-dim: rgb(131 210 228); | ||
| 92 | --color-on-primary-fixed-variant: rgb(0 78 90); | ||
| 93 | --color-secondary-fixed: rgb(205 231 237); | ||
| 94 | --color-on-secondary-fixed: rgb(5 31 36); | ||
| 95 | --color-secondary-fixed-dim: rgb(178 203 209); | ||
| 96 | --color-on-secondary-fixed-variant: rgb(51 74 80); | ||
| 97 | --color-tertiary-fixed: rgb(220 225 255); | ||
| 98 | --color-on-tertiary-fixed: rgb(17 26 55); | ||
| 99 | --color-tertiary-fixed-dim: rgb(189 197 235); | ||
| 100 | --color-on-tertiary-fixed-variant: rgb(61 69 101); | ||
| 101 | --color-surface-dim: rgb(213 219 221); | ||
| 102 | --color-surface-bright: rgb(245 250 252); | ||
| 103 | --color-surface-container-lowest: rgb(255 255 255); | ||
| 104 | --color-surface-container-low: rgb(239 244 246); | ||
| 105 | --color-surface-container: rgb(233 239 240); | ||
| 106 | --color-surface-container-high: rgb(227 233 235); | ||
| 107 | --color-surface-container-highest: rgb(222 227 229); | ||
| 108 | |||
| 109 | color-scheme: light; | ||
| 110 | } | ||
| 111 | } | ||
| 112 | |||
| 113 | /* Custom logic for diffs */ | ||
| 114 | :root { | ||
| 115 | --diff-add-bg: var(--color-tertiary-container); | ||
| 116 | --diff-add-fg: var(--color-on-tertiary-container); | ||
| 117 | --diff-del-bg: var(--color-error-container); | ||
| 118 | --diff-del-fg: var(--color-on-error-container); | ||
| 119 | --diff-changed-bg: var(--color-primary-container); | ||
| 120 | --diff-changed-fg: var(--color-on-primary-container); | ||
| 121 | } | ||
diff --git a/examples/git.igorek.dev/compose.yaml b/examples/git.igorek.dev/compose.yaml new file mode 100644 index 0000000..5bd5fba --- /dev/null +++ b/examples/git.igorek.dev/compose.yaml | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | services: | ||
| 2 | cgit: | ||
| 3 | image: igorechek06/cgit-material | ||
| 4 | restart: on-failure | ||
| 5 | |||
| 6 | ports: | ||
| 7 | - 8888:80 | ||
| 8 | |||
| 9 | volumes: | ||
| 10 | - ./repos/:/app/repos/ | ||
| 11 | - ./static/:/app/www/static/ | ||
| 12 | - ./about/:/app/about/ | ||
| 13 | - ./etc/:/app/etc/ | ||
| 14 | |||
| 15 | # bind custom colors | ||
| 16 | - ./colors.css:/app/www/css/colors.css | ||
diff --git a/examples/git.igorek.dev/etc/cgitrc b/examples/git.igorek.dev/etc/cgitrc new file mode 100644 index 0000000..545a346 --- /dev/null +++ b/examples/git.igorek.dev/etc/cgitrc | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | root-title=git.igorek.dev | ||
| 2 | root-desc=Git repositories hosted at igorek.dev | ||
| 3 | root-readme=/app/about/root.html | ||
| 4 | |||
| 5 | favicon=/static/favicon.ico | ||
| 6 | logo=/static/image.svg | ||
| 7 | |||
| 8 | clone-url=https://git.igorek.dev/$CGIT_REPO_URL | ||
| 9 | |||
| 10 | summary-branches=3 | ||
| 11 | summary-log=3 | ||
| 12 | summary-tags=3 | ||
| 13 | enable-log-filecount=1 | ||
| 14 | enable-log-linecount=1 | ||
| 15 | enable-commit-graph=1 | ||
| 16 | enable-http-clone=1 | ||
| 17 | side-by-side-diffs=1 | ||
| 18 | snapshots=tar.gz zip | ||
| 19 | |||
| 20 | include=/app/etc/repos | ||
diff --git a/examples/git.igorek.dev/etc/repos b/examples/git.igorek.dev/etc/repos new file mode 100644 index 0000000..66a5ac2 --- /dev/null +++ b/examples/git.igorek.dev/etc/repos | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | repo.url=test | ||
| 2 | repo.path=/app/repos/test | ||
| 3 | repo.desc=The test repository | ||
| 4 | repo.readme=:README.md | ||
diff --git a/examples/git.igorek.dev/static/favicon.ico b/examples/git.igorek.dev/static/favicon.ico new file mode 100644 index 0000000..a69271a --- /dev/null +++ b/examples/git.igorek.dev/static/favicon.ico | |||
| Binary files differ | |||
diff --git a/examples/git.igorek.dev/static/image.svg b/examples/git.igorek.dev/static/image.svg new file mode 100644 index 0000000..70001b0 --- /dev/null +++ b/examples/git.igorek.dev/static/image.svg | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
| 3 | |||
| 4 | <svg | ||
| 5 | width="512" | ||
| 6 | height="512" | ||
| 7 | viewBox="0 0 512 512" | ||
| 8 | version="1.1" | ||
| 9 | id="svg1" | ||
| 10 | inkscape:version="1.4.3 (0d15f75042, 2025-12-25)" | ||
| 11 | sodipodi:docname="image.svg" | ||
| 12 | inkscape:export-filename="Sizes/Circle/64x64.png" | ||
| 13 | inkscape:export-xdpi="12" | ||
| 14 | inkscape:export-ydpi="12" | ||
| 15 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
| 16 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
| 17 | xmlns="http://www.w3.org/2000/svg" | ||
| 18 | xmlns:svg="http://www.w3.org/2000/svg"> | ||
| 19 | <sodipodi:namedview | ||
| 20 | id="namedview1" | ||
| 21 | pagecolor="#ffffff" | ||
| 22 | bordercolor="#000000" | ||
| 23 | borderopacity="1" | ||
| 24 | inkscape:showpageshadow="2" | ||
| 25 | inkscape:pageopacity="0.0" | ||
| 26 | inkscape:pagecheckerboard="0" | ||
| 27 | inkscape:deskcolor="#d1d1d1" | ||
| 28 | inkscape:document-units="px" | ||
| 29 | inkscape:zoom="0.92255338" | ||
| 30 | inkscape:cx="331.14615" | ||
| 31 | inkscape:cy="221.66739" | ||
| 32 | inkscape:window-width="1440" | ||
| 33 | inkscape:window-height="872" | ||
| 34 | inkscape:window-x="0" | ||
| 35 | inkscape:window-y="0" | ||
| 36 | inkscape:window-maximized="1" | ||
| 37 | inkscape:current-layer="layer1" /> | ||
| 38 | <defs | ||
| 39 | id="defs1"> | ||
| 40 | <rect | ||
| 41 | x="163.09281" | ||
| 42 | y="96.553892" | ||
| 43 | width="171.47006" | ||
| 44 | height="175.17964" | ||
| 45 | id="rect2" /> | ||
| 46 | </defs> | ||
| 47 | <g | ||
| 48 | inkscape:label="bg" | ||
| 49 | inkscape:groupmode="layer" | ||
| 50 | id="layer1" | ||
| 51 | style="display:inline" | ||
| 52 | sodipodi:insensitive="true"> | ||
| 53 | <rect | ||
| 54 | style="display:none;fill:#cde7ed;fill-opacity:1;stroke-width:1.88489" | ||
| 55 | id="rect3" | ||
| 56 | width="512" | ||
| 57 | height="512" | ||
| 58 | x="0" | ||
| 59 | y="0" | ||
| 60 | inkscape:label="square" /> | ||
| 61 | <circle | ||
| 62 | style="display:inline;fill:#cde7ed;fill-opacity:1;stroke-width:1.3177" | ||
| 63 | id="path4" | ||
| 64 | cx="256" | ||
| 65 | cy="256" | ||
| 66 | r="256" | ||
| 67 | inkscape:label="circle" /> | ||
| 68 | </g> | ||
| 69 | <g | ||
| 70 | inkscape:groupmode="layer" | ||
| 71 | id="layer2" | ||
| 72 | inkscape:label="text"> | ||
| 73 | <text | ||
| 74 | xml:space="preserve" | ||
| 75 | style="font-size:210.084px;font-family:'Noto Sans Mono';-inkscape-font-specification:'Noto Sans Mono';fill:#051f24;fill-opacity:1;stroke-width:17.5068" | ||
| 76 | x="65.453728" | ||
| 77 | y="335.83191" | ||
| 78 | id="text5" | ||
| 79 | inkscape:label="text"><tspan | ||
| 80 | sodipodi:role="line" | ||
| 81 | x="65.453728" | ||
| 82 | y="335.83191" | ||
| 83 | style="stroke-width:17.5068" | ||
| 84 | id="tspan2">~/i</tspan></text> | ||
| 85 | </g> | ||
| 86 | </svg> | ||
