From 151f060913e5e432e52f7da82ea6673be236877c Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Sat, 4 Feb 2023 10:07:44 -0700 Subject: [PATCH] nilix config --- config.yaml | 15 ++- main.go | 2 +- static/legit.png | Bin 1321 -> 1997 bytes static/style.css | 240 ++++++++++++++++++++++++++++------------------- 4 files changed, 150 insertions(+), 107 deletions(-) diff --git a/config.yaml b/config.yaml index 963f263..b0bc656 100644 --- a/config.yaml +++ b/config.yaml @@ -1,22 +1,21 @@ repo: - scanPath: /var/www/git + scanPath: /home/nilix/src/public/ readme: - readme - README - readme.md - README.md mainBranch: - - master - main dirs: templates: ./templates static: ./static meta: - title: git good - description: i think it's a skill issue - footer: served with legit vVERSION; email patches to MAINTAINER - maintainerEmail: x@icyphox.sh + title: nilFM hack lab + description: are you hacking? + footer: served by legit vVERSION; some of this code might suck — email patches to MAINTAINER + maintainerEmail: nilix@nilfm.cc server: - name: git.icyphox.sh - host: 127.0.0.1 + name: hacklab.nilfm.cc + host: 0.0.0.0 port: 5555 diff --git a/main.go b/main.go index 22404d8..d961f2c 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,7 @@ import ( ) func main() { - const version string = "0.2.x" + const version string = "0.2.99-nilix" var cfg string flag.StringVar(&cfg, "config", "./config.yaml", "path to config file") flag.Parse() diff --git a/static/legit.png b/static/legit.png index be2368ac2e6704b39be360d1b970b04e7e6e2250..6fc3b5f93d19ab567c3a6bd0f511de890cc2170b 100644 GIT binary patch delta 1993 zcmV;)2R8Vr3e688iBL{Q4GJ0x0000DNk~Le0000X0000X2nGNE09WL~Z;>G!e^3;K zPt%r)R2=LeqL86FSr8R*)G8FALZ}s5bufA9A2cx}DK3tJYr(;v#j1mgv#t)Vf*|+< z;^^e0=prTFmlRsW_~7zB&U@!@-+h44s4~q8jRBf&o0(Kn%;i_a$SXn^q6#A-Gs~Ej zq%?fj*F6G!zf15e|9gL~9<^XGe;^kdWtI4xc+{i@i66PH zc>Kn>WFn8f*2*Ul=Xu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#Xm8>5KN*`M5`#;2^Nwel^|kcp%x;de>So3ft{fE7Yqtw zVWBo6SO^M&g-wDI#K9CkMuJMjDkvy~5MO!CBomTsWnh1>8#NnU*uCXt?%cyU_uj)- z7YGD${9u&v!|^|WJb+v-$Mf?uu~_V90BD-V@bEBudwc&a34Rs&;Njtco0}VAu^3HF zP1x;r^m_gGFyQm~e;6GdMV4ja@i_DI^DHkflg(yJ&pguAUrKPk0LZJ|$PzbZxjMwW0KvmVeEF}k!N~HjZMxz9S!F+yve4Og)>e5T_ z-o$RV)7jYxKqiwR8jWJHSV}*HwY9Yj3=FWozRtzP1$TFMe{64WGdMU%AQ1STHFP?i zR8&+TiXy72($LU=D2g;UH~(V*bRV(fOeRAznZ#r=q0{L;^kc8rOMQJkjg5`PUqZcJ zkJ)VgaC1dbSXfv>t0D#BiVR3Pht*tHU>gtO3 z0>9tS?(QxJe+LIBih|qi=J@y+fOI;IBuQLdT>)@?ea-p#IRN|n`^d6f8~~5U!}Rnt zk|g2x`&nCCV{>zpv$Hb*ve_)FtE=4J-U1Mh$9a2u10Wm@|H<-yeYSZbkzi$I1wjxH zMG>RXh%C#v-R{4vX=`gEkw|cPd5P2MEKY)_rzccZf2E_N1EbLhP}Ev}8bCUo2Ec4K z=W`Z|h4S+9?*Z_BqJ2JJJ{JrI^F~!Dez)>Z&p=I04MRgi?Ck7NRaJ$}X5;kqw4gs! zR#pOVbaX^}dpkCp?dw}GGBU#K>@4AMnAg`=CMPEgI%I2WE8X4QY;0`ca=D5-M4G0d zsw!5ibu~X1eSLlO_xCe4Hukr*sZG4i67`d3iw)1bTXU5Cow#ZdizskD63T-UY=p|5rRr{s7}O VNfp1ND`Nlv002ovPDHLkV1i*4O#T1> diff --git a/static/style.css b/static/style.css index fd4756a..31dc5c1 100644 --- a/static/style.css +++ b/static/style.css @@ -1,29 +1,18 @@ -:root { - --light: #f4f4f4; - --cyan: #509c93; - --light-gray: #eee; - --medium-gray: #ddd; - --gray: #6a6a6a; - --dark: #444; - --darker: #222; - - --sans-font: "InterVar", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif; - --display-font: "InterDisplay", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif; - --mono-font: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', 'Roboto Mono', Menlo, Consolas, monospace; -} - html { - background: var(--light); + background: #000; -webkit-text-size-adjust: none; - font-family: var(--sans-font); + font-family: serif; + color: #c9c9c9; + font-size: 14px; } pre { - font-family: var(--mono-font); + font-family: monospace; } ::selection { - background: var(--medium-gray); + background: #1f9b92; + color: #000; opacity: 0.3; } @@ -34,15 +23,15 @@ pre { } body { - max-width: 750px; padding: 0 13px; margin: 40px auto; } -main, footer { +main { font-size: 1rem; padding: 0; line-height: 160%; + overflow-x: auto; } footer { @@ -52,8 +41,8 @@ footer { } main h1, h2, h3, strong { - font-family: var(--display-font); font-weight: 500; + width:fit-content; } strong { @@ -73,6 +62,14 @@ main h2, h3 { padding: 20px 0 15px 0; } +main h3 { + width: 80vw; + max-width: 500px; + margin-left: auto; + margin-right: auto; + text-transform: capitalize; +} + nav { padding: 0.4rem 0 1.5rem 0; } @@ -98,19 +95,22 @@ a { } a { - color: var(--darker); - border-bottom: 1.5px solid var(--medium-gray); + color: #1f9b92; + text-decoration: none; + font-weight:bold; } a:hover { - border-bottom: 1.5px solid var(--gray); + color: #fff; } .index { + margin: 0px auto; + width: 80vw; padding-top: 2em; display: grid; - grid-template-columns: 6em 1fr minmax(0, 7em); - grid-row-gap: 0.5em; + grid-template-columns: auto 1fr auto; + grid-gap: 0.5em; min-width: 0; } @@ -119,58 +119,83 @@ a:hover { } .clone-url pre { - color: var(--dark); + color: #1f9b92; white-space: pre-wrap; } .desc { - font-weight: normal; - color: var(--gray); - font-style: italic; + +} + +.tree { + margin: 0px 10vw; + max-width: 80vw; } .tree td { padding: 0.5em 0.5ch; + font-size: 14px; box-sizing: content-box; } .mode, .size { - font-family: var(--mono-font); + font-family: monospace; width: 10ch; - white-space: nowrap; + white-space:nowrap; } + .size { text-align: right; width: fit-content; } + .log { + width:fit-content; + max-width: 80vw; + margin: 0 auto; display: grid; - grid-template-columns: 20rem minmax(0, 1fr); + grid-template-columns: 1fr auto; grid-row-gap: 0.8em; grid-column-gap: 8rem; margin-bottom: 2em; - padding-bottom: 1em; - border-bottom: 1.5px solid var(--medium-gray); + padding-left: 1ch; + border-left: solid 2px #797979; } -.log pre { +.commit-hash, .commit-email { + font-family: monospace; +} + +.log pre, .commit pre { white-space: pre-wrap; + font-family: serif; } - +.mode { + font-family: monospace; +} .readme pre { white-space: pre-wrap; } -.readme { - background: var(--light-gray); - padding: 0.5rem; +.readme * { + margin: 0 auto; + width: 80vw; + max-width: 500px; +} +.readme h1, .readme h2, .readme h3, .readme h4, .readme h5, .readme h6 { + text-transform: capitalize; } - .readme ul { padding: revert; } +.readme table, .readme pre { width:fit-content;max-width:100vw;margin-left:max(10vw, max(0px, calc(50vw - 250px)));transform:translateX(max(min(0px, calc(min(40vw, 250px) - 50%)), min(-10vw, calc(250px - 50%)))); } +.readme p, .readme ul, .readme ol { line-height:150%;margin-top:1em;margin-bottom:1em; } +.readme li { margin-top:0.5em;margin-bottom:0.5em;width:100%; } +.readme code, .readme pre { background:#00263b;color:#93a1a1;padding:0.25em; } +.readme pre { white-space:pre;overflow-x:auto; } +.readme blockquote {padding-left:1ch;line-height:150%;border-left:solid 2px #797979; } .readme img { max-width: 100%; @@ -179,10 +204,11 @@ a:hover { .diff { margin: 1rem 0 1rem 0; padding: 1rem 0 1rem 0; - border-bottom: 1.5px solid var(--medium-gray); } .diff pre { + background: #002b36; + color: #93a1a1; overflow: scroll; } @@ -190,16 +216,16 @@ a:hover { padding: 1rem 0 1rem 0; } -.commit-hash, .commit-email { - font-family: var(--mono-font); -} - .commit-email:before { content: '<'; + color: #c9c9c9 !important; + font-weight: normal; } .commit-email:after { content: '>'; + color: #c9c9c9 !important; + font-weight: normal; } .commit { @@ -217,32 +243,20 @@ a:hover { } .diff-add { - color: green; + color: #1f9b92; } .diff-del { - color: red; + color: #dc322f; } .diff-noop { - color: var(--gray); } -.ref { - font-family: var(--display-font); - font-size: 14px; - color: var(--gray); - display: inline-block; - padding-top: 0.7em; -} - -.refs pre { - white-space: pre-wrap; - padding-bottom: 0.5rem; -} - -.refs h4 { - display: inline; +.refs { + width: 80vw; + max-width: 500px; + margin: 0 auto; } .refs ul { @@ -251,27 +265,57 @@ a:hover { } .refs ul li { + display: inline; + margin: 0; margin-left: 1ch; +} + +.branches { + padding-left: 2ch; + border-left: 2px solid #797979; +} + +.refs h4 { display: inline; } +.tags time { + float: right; + font-size: 85%; +} + +.commit-info time { + display: block; +} + +time { + font-style: italic; +} + .tag-entry { - padding-bottom: 1em; + padding-left: 2ch; + border-left: 2px solid #797979; margin-bottom: 2em; } -.tag-entry:not(:last-child) { - border-bottom: 1px solid var(--medium-gray); +.refs pre { + font-family: serif; + white-space: pre-wrap; + padding-bottom: 0.5rem; } -.tag-entry time { - color: var(--gray); - float: right; - font-size: 0.85rem; +.tag-entry details pre, .commit-info details pre { + font-family: monospace; + font-size: 1.0rem; } -.commit time, .log time { - display: block; +.ref { + font-family: monospace; + font-size: 75%; +} + +.refs strong { + padding-right: 1em; } .line-numbers { @@ -281,53 +325,53 @@ a:hover { -webkit-user-select: none; -o-user-select: none; user-select: none; - display: inline-block; - text-align: right; - float: left; - flex-direction: column; + display:inline-block; + flex-direction:column; margin-right: 1ch; + font-size: 14px; + font-family:monospace; + text-align:right; } .file-wrapper { - background: var(--light-gray); display: table; - padding: 0.5rem - margin-top: 0.5rem; - overflow-x: auto; + margin-top: 0.5em; } .file-content { - background: var(--light-gray); + color: #93a1a1; + background: #002b36; overflow-y: hidden; overflow-x: auto; + font-size: 14px; } @supports (display: flex) { - .file-wrapper { - width: 100%; - max-width: 750px; - } - .file-wrapper tr { - display:flex; - flex-direction: row; - width: 80vw; - max-width: 750px; - } .line-numbers { display: flex; } .file-content { - display: iniline-block; + display: inline-block; width: 100%; } + .file-wrapper { + width: 100%; + + } + .file-wrapper tr { + display: flex; + flex-direction: row; + width: 100%; + } } .diff-type { - color: var(--gray); + color: #000; + background: #c9c9c9; + padding: 2px 4px; } .commit-info { - color: var(--gray); padding-bottom: 1.5rem; font-size: 0.85rem; } @@ -355,12 +399,12 @@ a:hover { padding-bottom: 1.5rem; } - pre { - font-size: 0.8rem; - } } @media (max-width: 420px) { + .tree { + grid-template-columns: 8em 1fr; + } .tree .size { display: none; }