diff --git a/public/css/global.css b/public/css/global.css index 9803eca..c6627a9 100644 --- a/public/css/global.css +++ b/public/css/global.css @@ -11,8 +11,8 @@ body { font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; - color: #fff; - background-color: #151515; + color: var(--text); + background-color: var(--background-darker); transition: ease-in-out 0.25s; margin: 0; } @@ -24,7 +24,7 @@ body { ::-webkit-scrollbar-thumb { border-radius: 8px; - background: #252525; + background: var(--background); } main { @@ -43,9 +43,9 @@ main { background-color: var(--background); } -.indexGitHub { - background: #252525; - color: #fff; +.index-gh { + background: var(--background); + color: var(--text); padding: 4px; border-radius: 8px; } @@ -58,7 +58,7 @@ main { color: var(--text); } -.navbarSlogan:hover { +.navbar-slogan:hover { text-decoration: underline; text-underline-offset: 5px; } @@ -69,11 +69,11 @@ main { } .error { - background-color: #252525; + background-color: var(--background); padding: 8px; border-radius: 4px; - font-family: "Lato", sans-serif; - color: #fff; + font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; + color: var(--text); } .center { @@ -81,19 +81,19 @@ main { } a { - color: white; + color: var(--text); text-decoration: underline; text-underline-offset: 5px; } a:hover { - color: #00b7c3; + color: var(--accent); } /* URI: /explore */ -.exploreIDontKnowWhatToNameThisDiv { - background-color: #252525; +.explore-card, .user-repo-card { + background-color: var(--background); padding: 8px; border-radius: 4px; margin: 8px 0 8px 0; @@ -106,14 +106,14 @@ a:hover { transition: ease-in-out 0.25s; } -.exploreIDontKnowWhatToNameThisDiv:hover { +.explore-card:hover, .user-repo-card:hover { background-color: var(--secondary-background); color: var(--text); } /* URI: /:user */ -.userProfile { +.user-profile { background-color: var(--background); padding: 8px; border-radius: 4px; @@ -123,57 +123,75 @@ a:hover { align-items: center; } -.userProfile h1 { +.user-profile h1 { color: var(--accent); margin: 4px; word-wrap: nowrap; text-overflow: ellipsis; } -.userProfile h2 { +.user-profile h2 { margin: 4px; } -.userProfile p { +.user-profile p { margin: 4px; } -.userProfile img { +.user-profile img { border: 4px solid var(--accent); border-radius: 50%; } -.userBio, -.userReadme, -.mainRepos { +.user-bio, +.user-readme { background-color: var(--background); padding: 8px; border-radius: 4px; margin: 8px; } -.userBioText, -.userReadmeText, -.mainReposText { +.user-bio-text, +.user-readme-text { background-color: var(--background-darker); padding: 8px; border-radius: 4px; margin-bottom: 0; } -.mainReposTextDim { - color: #8c8c8c; -} - -.userReadmeText { +.user-readme-text { margin-top: 0; } -.sociallinks { +.social-links { display: flex; flex-direction: column; } +.user-repo-card { + background-color: var(--background-darker); + padding: 4px; + border-radius: 4px; + margin: 8px 0 8px 0; + + text-overflow: ellipsis; + white-space: wrap; + text-decoration: none; + display: flex; + flex-direction: column; + + transition: ease-in-out 0.25s; +} + +.user-repo-card > p { + margin: 8px; +} + +.user-repo-card:hover { + background-color: var(--secondary-background); + color: var(--text); +} + /* URI: /:user/:repo */ .button { background-color: var(--background); @@ -191,34 +209,34 @@ a:hover { color: var(--text); } -.buttonParent { +.button-parent { display: flex; justify-content: center; align-items: center; flex-direction: row; } -.filesList { +.file-list { list-style-type: none; padding: 0; margin: 0; } -.filesUList { +.file-u-list { padding: 0; margin: 0; list-style-type: none; } /* URI: /file/:user/:repo/:file */ -.userReadme pre { +.user-readme pre { padding: 8px; border-radius: 4px; /*white-space: pre-wrap;*/ overflow-x: auto; } -.userContainer { +.user-container { display: flex; flex-direction: row; justify-content: space-between; @@ -238,17 +256,13 @@ a:hover { --accent: #005ec3; color-scheme: light; } - body { - background-color: var(--background-darker); - color: #000; - } a { color: black; } a:hover { color: #005ec3; } - .exploreIDontKnowWhatToNameThisDiv { + .explore-card { background-color: var(--background); color: #000; } @@ -259,7 +273,7 @@ a:hover { margin: 8px; } - .navbarSlogan { + .navbar-slogan { display: none; } @@ -267,13 +281,13 @@ a:hover { height: 40px; } - .exploreIDontKnowWhatToNameThisDiv { + .explore-card { margin-left: 0; margin-bottom: 8px; margin-right: 0; } - .sociallinks { + .social-links { flex-direction: column; } } diff --git a/views/dir.html b/views/dir.html index 1e1c3b6..61e23ce 100644 --- a/views/dir.html +++ b/views/dir.html @@ -2,7 +2,7 @@
{{ if .dir }} {{ range $key, $value := .dir}} -
+
View on GitHub @@ -11,25 +11,25 @@ >
-
+ {{end}} {{ if .files}} -
+

Files

-
-
    +
    +
      {{ range $key, $value := .files}} {{ if eq .Type "dir" }} -
    • +
    • 📁 {{.Path}}
    • {{ else }} -
    • +
    • 🗒️ {{.Path}}
    {{ end }} {{ if .readme}} -
    +
    {{ if .dir }} {{ range $key, $value := .dir }}

    {{.Readme}}

    {{end}} {{end}} -
    {{ unescape .readme}}
    +
    {{ unescape .readme}}
    {{ end }} {{ else }}

    Directory not found

    diff --git a/views/error.html b/views/error.html index d1fc4df..3a5f3a4 100644 --- a/views/error.html +++ b/views/error.html @@ -12,7 +12,6 @@ Create an issue on Codeberg. - Or view this page on GitHub
diff --git a/views/explore.html b/views/explore.html index 7e72b7c..a38114d 100644 --- a/views/explore.html +++ b/views/explore.html @@ -4,7 +4,7 @@

Trending repositories

25 repositories shown, sorted by most stars.

{{ if .repos}} {{ range $key, $value := .repos}} - +

{{.Fullname}}

{{.Description}}

diff --git a/views/file.html b/views/file.html index 2a283b1..7f178a4 100644 --- a/views/file.html +++ b/views/file.html @@ -10,14 +10,14 @@ word-wrap: break-word; } -
+ -
-
+
+

{{.name}}

Features
  • Lightweight - for both you and the instance host
  • -
  • No JavaScript - pure HTML and CSS goodness
  • +
  • No JavaScript - pure HTML and CSS awesomeness
  • - No requests made to Micro$oft - they won't even know you made a request! + No requests made to GitHub from the client side - they won't even know you made a request!
  • Open source - for peer review & trustworthiness
  • -
  • Save bandwidth - no JavaScript/tracking bloat loaded!
  • +
  • Save bandwidth - no JavaScript, tracking bloat or extra fonts loaded.

Privacy

@@ -49,7 +49,9 @@ yourself private from them instead.

Credits

-
Midou36O - desigining the GotHub logo + Midou36O - desigining the GotHub logo
+ Odyssey346 - majority of the code, maintainer
+ Arya - code contributions and second maintainer

Info

{{ if eq .version "unknown, please build with Go 1.13+ or use Git"}} GotHub version: unknown {{ else }} GotHub version: diff --git a/views/repo.html b/views/repo.html index e617a19..b735162 100644 --- a/views/repo.html +++ b/views/repo.html @@ -2,14 +2,14 @@
{{ if .repo }} {{ range $key, $value := .repo}} -
+ -
+ {{end}} {{ if .files}} -
+

Files

-
-
    +
    +
    {{ end }} {{ if .readme}} -
    +
    {{ if .repo }} {{ range $key, $value := .repo}}

    {{.Readme}}

    {{end}} {{end}} -
    {{ unescape .readme}}
    +
    {{ unescape .readme}}
    {{ end }} {{ else }}

    Repository not found

    diff --git a/views/user.html b/views/user.html index d084fee..2f59bfe 100644 --- a/views/user.html +++ b/views/user.html @@ -2,10 +2,10 @@
    {{ if .user }} {{ range $key, $value := .user}} -
    + -
    +