diff --git a/views/.prettierignore b/views/.prettierignore new file mode 100644 index 0000000..d4333f7 --- /dev/null +++ b/views/.prettierignore @@ -0,0 +1,2 @@ +header.html +footer.html diff --git a/views/error.html b/views/error.html index be680fe..3a5f3a4 100644 --- a/views/error.html +++ b/views/error.html @@ -1,11 +1,18 @@ {{ template "header" .}}
-
-

Error

-

Someone pushed to production. Just kidding, that's probably not what happened. Here's the error:

+
+

Error

+

+ Someone pushed to production. Just kidding, that's probably not what + happened. Here's the error: +

{{.error}}
-

Think this is a bug? Create an issue on Codeberg.

-
+

+ Think this is a bug? + Create an issue on Codeberg. +

+
- - +{{ template "footer" .}} diff --git a/views/explore.html b/views/explore.html index 6b3731a..7e72b7c 100644 --- a/views/explore.html +++ b/views/explore.html @@ -1,33 +1,32 @@ {{template "header" .}}
-

Trending repositories

-

25 repositories shown, sorted by most stars.

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

{{.Fullname}}

-

{{.Description}}

- {{ if .Language }} - {{ if .License }} -

⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🗒️ {{.Language}}

- {{ else }} -

⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🗒️ {{.Language}}

- {{ end }} - {{ else }} - {{ if .License }} -

⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}}

- {{ else }} -

⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license

- {{ end }} - {{ end }} -
-
- {{ end }} - {{ else }} -

There are no trending repositories at the moment.

- {{ end }} +

Trending repositories

+

25 repositories shown, sorted by most stars.

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

{{.Fullname}}

+

{{.Description}}

+ {{ if .Language }} {{ if .License }} +

+ ⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🗒️ + {{.Language}} +

+ {{ else }} +

+ ⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🗒️ + {{.Language}} +

+ {{ end }} {{ else }} {{ if .License }} +

⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}}

+ {{ else }} +

⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license

+ {{ end }} {{ end }} +
+
+ {{ end }} {{ else }} +

There are no trending repositories at the moment.

+ {{ end }}
- - +{{template "footer" .}} diff --git a/views/file.html b/views/file.html index 1c7665b..9f58fb8 100644 --- a/views/file.html +++ b/views/file.html @@ -1,20 +1,29 @@ {{ template "header" .}}
- {{ if .file }} - -
- Back to {{.fullname}} -
+ {{ if .file }} + +
+ Back to {{.fullname}} +
-
-
-

{{.name}}

- Raw -
- {{ .file}} -
- {{end}} +
+
+

{{.name}}

+ Raw +
+ {{ .file}} +
+ {{end}}
- - +{{ template "footer" .}} diff --git a/views/footer.html b/views/footer.html new file mode 100644 index 0000000..308b1d0 --- /dev/null +++ b/views/footer.html @@ -0,0 +1,2 @@ + + diff --git a/views/header.html b/views/header.html index c5e1ff6..e3483c6 100644 --- a/views/header.html +++ b/views/header.html @@ -1,23 +1,31 @@ - + {{ if .title }} {{ .title }} - GotHub {{ else }} GotHub {{ end }} - - - - - + + + + + diff --git a/views/index.html b/views/index.html index 9c0b1b8..fda5419 100644 --- a/views/index.html +++ b/views/index.html @@ -1,33 +1,63 @@ {{template "header" .}}
-

GotHub is an alternative front-end for GitHub.

-

Features

- +

Privacy

+

+ GitHub is owned by Microsoft, a big tech company known to track it's users. + If you care, you can read GitHub's privacy policy here + or + if you don't care enough to read all that and want it condensed. GotHub solves this by proxying all GitHub requests for you! +

+

Usage

+

+ Just replace github.com with + {{.host}}! +

+

DMCA/Copyright Notice

+

+ All content shown on this site are from GitHub. Any issues with content + shown on this site needs to be reported to GitHub, not the instance host's + internet or domain provider. GitHub is a registered trademark of GitHub, + Inc. GotHub is not affiliated with GitHub, Inc. +

+

+ This project was made as a "spiritual successor" to + Riverside Rocks' + 1337git which is, + unfortunately, hosted on GitHub. Kinda ironic. +

+ This project does not let you clone GitHub repositories. I would recommend + using a VPN if you have to clone a GitHub repository and want to keep + yourself private from them instead. +

Credits

+ Midou36O - desigining the GotHub logo +

Info

+ {{ if eq .version "unknown, please build with Go 1.13+ or use Git"}} GotHub + version: unknown {{ else }} GotHub version: + {{ .version}} + {{ end }} +
+ Fiber version: {{ .fiberversion}}, running on {{ .goversion}}
- - +{{ template "footer" .}} diff --git a/views/privacy.html b/views/privacy.html index 57ce98c..619d097 100644 --- a/views/privacy.html +++ b/views/privacy.html @@ -1,26 +1,33 @@ {{template "header" .}} -
-

Instance Privacy

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

The goal of this page is to bring transparency to the data collected by the instances and to encourage privacy friendly practices.

-

If this page isn't filled, please contact your instance's maintainer.

-

IP Address logged: {{.IPAddr}}

-

Request URL logged: {{.ReqURL}}

-

User Agent logged: {{.UserAgent}}

-

Diagnostic Information logged: {{.Diagnostics}}

-{{ if .PrivacyPolicy }} -

You can see the maintainer's Privacy Policy for more information.

-{{end}} -

Additional Information

-

GotHub version: {{.Version}}

-

Fiber version: {{ .FiberVersion}}, running on {{ .GoVersion}}

-

Country: {{.Country}}

-

Cloudflare: {{.Cloudflare}}

-

ISP: {{.Provider}}

-{{end}} -{{end}} +
+

Instance Privacy

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

+ The goal of this page is to bring transparency to the data collected by the + instances and to encourage privacy friendly practices. +

+

If this page isn't filled, please contact your instance's maintainer.

+

IP Address logged: {{.IPAddr}}

+

Request URL logged: {{.ReqURL}}

+

User Agent logged: {{.UserAgent}}

+

Diagnostic Information logged: {{.Diagnostics}}

+ {{ if .PrivacyPolicy }} +

+ You can see the maintainer's + Privacy Policy for more information. +

+ {{end}} +

Additional Information

+

+ GotHub version: + {{.Version}} +

+

Fiber version: {{ .FiberVersion}}, running on {{ .GoVersion}}

+

Country: {{.Country}}

+

Cloudflare: {{.Cloudflare}}

+

ISP: {{.Provider}}

+ {{end}} {{end}}
- - diff --git a/views/ratelimit.html b/views/ratelimit.html index e29adcf..b0bd3d6 100644 --- a/views/ratelimit.html +++ b/views/ratelimit.html @@ -1,16 +1,15 @@ {{ template "header" .}}
-

{{.Title}}

-

Try another instance or wait.

+

{{.Title}}

+

Try another instance or wait.

-

Info

- {{ range $key, $value := .ratelimit}} -

Limit: {{.Limit}}

-

Remaining: {{.Remaining}}

- {{ end }} +

Info

+ {{ range $key, $value := .ratelimit}} +

Limit: {{.Limit}}

+

Remaining: {{.Remaining}}

+ {{ end }} - Todo: implement GitHub API keys + Todo: implement GitHub API keys
- - +{{ template "footer" .}} diff --git a/views/ratelimit_gt.html b/views/ratelimit_gt.html index 500c159..6f0fcd8 100644 --- a/views/ratelimit_gt.html +++ b/views/ratelimit_gt.html @@ -1,11 +1,13 @@ {{ template "header" .}}
-

{{.Title}}

-

Wait 5 minutes before trying again.

+

{{.Title}}

+

Wait 5 minutes before trying again.

-

Info

-

GotHub has implemented ratelimits in order to prevent rate-limits by GitHub. You've been hit by the rate limiter.

+

Info

+

+ GotHub has implemented ratelimits in order to prevent rate-limits by GitHub. + You've been hit by the rate limiter. +

- - +{{ template "footer" .}} diff --git a/views/repo.html b/views/repo.html index fe2cdb0..3c7c20b 100644 --- a/views/repo.html +++ b/views/repo.html @@ -1,67 +1,63 @@ {{ template "header" .}}
- {{ if .repo }} - {{ range $key, $value := .repo}} - + {{ if .repo }} {{ range $key, $value := .repo}} + -
-

{{.Fullname}}

- {{ if .Parent }} -

This repository is a fork of {{.Parent}}.

- {{ end }} - {{ if .Description }} -

{{.Description}}

- {{ end }} - {{ if .License }} -

⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🌿 {{.DefaultBranch}}

- {{ else }} -

⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🌿 {{.DefaultBranch}}

- {{ end }} - {{ if .Language }} -

🗒️ - {{range .Language}} - {{.}} - {{end}} -

- {{end}} -
- {{end}} - {{ if .files}} -
-

Files

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

{{.Readme}}

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

{{.Fullname}}

+ {{ if .Parent }} +

This repository is a fork of {{.Parent}}.

+ {{ end }} {{ if .Description }} +

{{.Description}}

+ {{ end }} {{ if .License }} +

+ ⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🌿 + {{.DefaultBranch}} +

{{ else }} -

Repository not found

-

That repository doesn't exist.

- {{ end }} +

+ ⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🌿 + {{.DefaultBranch}} +

+ {{ end }} {{ if .Language }} +

🗒️ {{range .Language}} {{.}} {{end}}

+ {{end}} +
+ {{end}} {{ if .files}} +
+

Files

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

{{.Readme}}

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

Repository not found

+

That repository doesn't exist.

+ {{ end }}
- - +{{ template "footer" .}} diff --git a/views/user.html b/views/user.html index dc1994a..9ba2acd 100644 --- a/views/user.html +++ b/views/user.html @@ -74,15 +74,19 @@

{{.PinOrPopular}}:

{{range .MainRepos}}
-

{{.Name}}

+

{{.Name}}

{{if .ForkOf}} -

Forked from: {{.ForkOf}}

- {{else}} {{end}} - {{if .Desc}} +

+ Forked from: {{.ForkOf}} +

+ {{else}} {{end}} {{if .Desc}}

{{.Desc}}

{{else}} {{end}} -

{{if .Stars}}⭐ {{.Stars}}{{else}}{{end}} {{if .Forks}} 🍴 {{.Forks}} {{else}}{{end}} {{if .Lang}} 🗒️ {{.Lang}} {{else}}{{end}}

-
+

+ {{if .Stars}}⭐ {{.Stars}}{{else}}{{end}} {{if .Forks}} 🍴 {{.Forks}} + {{else}}{{end}} {{if .Lang}} 🗒️ {{.Lang}} {{else}}{{end}} +

+ {{ end }} {{ end }} {{ end }} {{ else }} @@ -90,5 +94,4 @@

That user doesn't exist.

{{ end }}
- - +{{ template "footer" .}}