This commit is contained in:
Arya Kiran
2023-03-07 22:28:55 +05:30
parent 6c1e4fe9ea
commit 889c8c399d
12 changed files with 261 additions and 197 deletions
+2
View File
@@ -0,0 +1,2 @@
header.html
footer.html
+14 -7
View File
@@ -1,11 +1,18 @@
{{ template "header" .}}
<main>
<div class="center">
<h1 style="color: red;">Error</h1>
<h2>Someone pushed to production. Just kidding, that's probably not what happened. Here's the error:</h2>
<div class="center">
<h1 style="color: red">Error</h1>
<h2>
Someone pushed to production. Just kidding, that's probably not what
happened. Here's the error:
</h2>
<pre class="error">{{.error}}</pre>
<h3>Think this is a bug? <a href="https://codeberg.org/gothub/gothub/issues" target="_blank">Create an issue on Codeberg.</a></h3>
</div>
<h3>
Think this is a bug?
<a href="https://codeberg.org/gothub/gothub/issues" target="_blank"
>Create an issue on Codeberg.</a
>
</h3>
</div>
</main>
</body>
</html>
{{ template "footer" .}}
+28 -29
View File
@@ -1,33 +1,32 @@
{{template "header" .}}
<main>
<h2>Trending repositories</h2>
<p><b>25</b> repositories shown, sorted by most stars.</p>
{{ if .repos}}
{{ range $key, $value := .repos}}
<a href="{{.Fullname}}" class="exploreIDontKnowWhatToNameThisDiv">
<div>
<p>{{.Fullname}}</p>
<p>{{.Description}}</p>
{{ if .Language }}
{{ if .License }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🗒️ {{.Language}}</p>
{{ else }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🗒️ {{.Language}}</p>
{{ end }}
{{ else }}
{{ if .License }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}}</p>
{{ else }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license</p>
{{ end }}
{{ end }}
</div>
</a>
{{ end }}
{{ else }}
<p>There are no trending repositories at the moment.</p>
{{ end }}
<h2>Trending repositories</h2>
<p><b>25</b> repositories shown, sorted by most stars.</p>
{{ if .repos}} {{ range $key, $value := .repos}}
<a href="{{.Fullname}}" class="exploreIDontKnowWhatToNameThisDiv">
<div>
<p>{{.Fullname}}</p>
<p>{{.Description}}</p>
{{ if .Language }} {{ if .License }}
<p>
⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🗒️
{{.Language}}
</p>
{{ else }}
<p>
⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🗒️
{{.Language}}
</p>
{{ end }} {{ else }} {{ if .License }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}}</p>
{{ else }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license</p>
{{ end }} {{ end }}
</div>
</a>
{{ end }} {{ else }}
<p>There are no trending repositories at the moment.</p>
{{ end }}
</main>
</body>
</html>
{{template "footer" .}}
+24 -15
View File
@@ -1,20 +1,29 @@
{{ template "header" .}}
<main>
{{ if .file }}
<style>{{ .css }}</style>
<div class="downloadParent">
<a href="/{{.fullname}}" class="button">Back to {{.fullname}}</a>
</div>
{{ if .file }}
<style>
{
{
.css;
}
}
</style>
<div class="downloadParent">
<a href="/{{.fullname}}" class="button">Back to {{.fullname}}</a>
</div>
<div class="userReadme">
<div class="userContainer">
<h3>{{.name}}</h3>
<a href="/raw/{{.fullname}}/{{.branch}}/{{.name}}" class="button secondary">Raw</a>
</div>
{{ .file}}
</div>
{{end}}
<div class="userReadme">
<div class="userContainer">
<h3>{{.name}}</h3>
<a
href="/raw/{{.fullname}}/{{.branch}}/{{.name}}"
class="button secondary"
>Raw</a
>
</div>
{{ .file}}
</div>
{{end}}
</main>
</body>
</html>
{{ template "footer" .}}
+2
View File
@@ -0,0 +1,2 @@
</body>
</html>
+21 -13
View File
@@ -1,23 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
{{ if .title }}
<title>{{ .title }} - GotHub</title>
{{ else }}
<title>GotHub</title>
{{ end }}
<link rel="stylesheet" href="/css/global.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
</head>
<body>
<link rel="stylesheet" href="/css/global.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
<body>
<nav>
<div class="navbar">
<a href="/" style="text-decoration: none;" class="brand"><img src="/logo.svg" class="navbarImg" height="30" width="30" alt=""><b class="navbarSlogan">GotHub (alpha)</b></a>
<div class="navbarLinks">
<a href="/explore">Explore</a>
<a href="/privacy">Privacy</a>
<a href="https://codeberg.org/gothub/gothub">Source code</a>
</div>
<div class="navbar">
<a href="/" style="text-decoration: none" class="brand"
><img
src="/logo.svg"
class="navbarImg"
height="30"
width="30"
alt=""
/><b class="navbarSlogan">GotHub (alpha)</b></a
>
<div class="navbarLinks">
<a href="/explore">Explore</a>
<a href="/privacy">Privacy</a>
<a href="https://codeberg.org/gothub/gothub">Source code</a>
</div>
</div>
</nav>
+55 -25
View File
@@ -1,33 +1,63 @@
{{template "header" .}}
<main>
<h2>GotHub is an alternative front-end for GitHub.</h2>
<h3>Features</h3>
<ul>
<h2>GotHub is an alternative front-end for GitHub.</h2>
<h3>Features</h3>
<ul>
<li>Lightweight - for both you and the instance host</li>
<li>No JavaScript - pure HTML and CSS goodness</li>
<li>No requests made to Micro$oft - they won't even know you made a request!</li>
<li>
No requests made to Micro$oft - they won't even know you made a request!
</li>
<li>Open source - for peer review & trustworthiness</li>
<li>Save bandwidth - no JavaScript/tracking bloat loaded!</li>
</ul>
<h3>Privacy</h3>
<p>GitHub is owned by Microsoft, a big tech company known to track it's users. <a href="https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement" target="_blank">If you care, you can read GitHub's privacy policy here</a> or <a href="https://tosdr.org/en/service/297" target="_blank">if you don't care enough to read all that and want it condensed</a>. GotHub solves this by proxying all GitHub requests for you!</p>
<h3>Usage</h3>
<p>Just replace <code class="indexGitHub">github.com</code> with <code class="indexGitHub">{{.host}}</code>!</p>
<h3>DMCA/Copyright Notice</h3>
<p>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.</p>
<p>This project was made as a "spiritual successor" to <a href="https://riverside.rocks" target="_blank">Riverside Rocks</a>' <a href="/RiversideRocks/1337git" target="_blank">1337git</a> which is, unfortunately, hosted on GitHub. Kinda ironic.</p>
<i>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.</i>
<h3>Credits</h3>
<a href="https://midou36o.github.io">Midou36O</a> - desigining the GotHub logo
<h3>Info</h3>
{{ if eq .version "unknown, please build with Go 1.13+ or use Git"}}
GotHub version: <code>unknown</code>
{{ else }}
GotHub version: <a href="https://codeberg.org/gothub/gothub/commit/{{ .version}}"><code>{{ .version}}</code></a>
{{ end }}
<br>
Fiber version: {{ .fiberversion}}, running on {{ .goversion}}
</ul>
<h3>Privacy</h3>
<p>
GitHub is owned by Microsoft, a big tech company known to track it's users.
<a
href="https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement"
target="_blank"
>If you care, you can read GitHub's privacy policy here</a
>
or
<a href="https://tosdr.org/en/service/297" target="_blank"
>if you don't care enough to read all that and want it condensed</a
>. GotHub solves this by proxying all GitHub requests for you!
</p>
<h3>Usage</h3>
<p>
Just replace <code class="indexGitHub">github.com</code> with
<code class="indexGitHub">{{.host}}</code>!
</p>
<h3>DMCA/Copyright Notice</h3>
<p>
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.
</p>
<p>
This project was made as a "spiritual successor" to
<a href="https://riverside.rocks" target="_blank">Riverside Rocks</a>'
<a href="/RiversideRocks/1337git" target="_blank">1337git</a> which is,
unfortunately, hosted on GitHub. Kinda ironic.
</p>
<i
>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.</i
>
<h3>Credits</h3>
<a href="https://midou36o.github.io">Midou36O</a> - desigining the GotHub logo
<h3>Info</h3>
{{ if eq .version "unknown, please build with Go 1.13+ or use Git"}} GotHub
version: <code>unknown</code> {{ else }} GotHub version:
<a href="https://codeberg.org/gothub/gothub/commit/{{ .version}}"
><code>{{ .version}}</code></a
>
{{ end }}
<br />
Fiber version: {{ .fiberversion}}, running on {{ .goversion}}
</main>
</body>
</html>
{{ template "footer" .}}
+30 -23
View File
@@ -1,26 +1,33 @@
{{template "header" .}}
<main style="text-align:center; line-height:30px;">
<h2>Instance Privacy</h2>
{{ if .privacyInformation}}
{{ range $key, $value := .privacyInformation}}
<p>The goal of this page is to bring transparency to the data collected by the instances and to encourage privacy friendly practices.</p>
<p>If this page isn't filled, please contact your instance's maintainer.</p>
<p><b>IP Address logged:</b> {{.IPAddr}}</p>
<p><b>Request URL logged:</b> {{.ReqURL}}</p>
<p><b>User Agent logged:</b> {{.UserAgent}}</p>
<p><b>Diagnostic Information logged:</b> {{.Diagnostics}}</p>
{{ if .PrivacyPolicy }}
<p>You can see the maintainer's <a href=//{{.PrivacyPolicy}}>Privacy Policy</a> for more information.</p>
{{end}}
<h3>Additional Information</h3>
<p>GotHub version: <a href="https://codeberg.org/gothub/gothub/commit/{{.Version}}"><code>{{.Version}}</code></a></p>
<p>Fiber version: {{ .FiberVersion}}, running on {{ .GoVersion}}</p>
<p>Country: {{.Country}}</p>
<p>Cloudflare: {{.Cloudflare}}</p>
<p>ISP: {{.Provider}}</p>
{{end}}
{{end}}
<main style="text-align: center; line-height: 30px">
<h2>Instance Privacy</h2>
{{ if .privacyInformation}} {{ range $key, $value := .privacyInformation}}
<p>
The goal of this page is to bring transparency to the data collected by the
instances and to encourage privacy friendly practices.
</p>
<p>If this page isn't filled, please contact your instance's maintainer.</p>
<p><b>IP Address logged:</b> {{.IPAddr}}</p>
<p><b>Request URL logged:</b> {{.ReqURL}}</p>
<p><b>User Agent logged:</b> {{.UserAgent}}</p>
<p><b>Diagnostic Information logged:</b> {{.Diagnostics}}</p>
{{ if .PrivacyPolicy }}
<p>
You can see the maintainer's
<a href="//{{.PrivacyPolicy}}">Privacy Policy</a> for more information.
</p>
{{end}}
<h3>Additional Information</h3>
<p>
GotHub version:
<a href="https://codeberg.org/gothub/gothub/commit/{{.Version}}"
><code>{{.Version}}</code></a
>
</p>
<p>Fiber version: {{ .FiberVersion}}, running on {{ .GoVersion}}</p>
<p>Country: {{.Country}}</p>
<p>Cloudflare: {{.Cloudflare}}</p>
<p>ISP: {{.Provider}}</p>
{{end}} {{end}}
</main>
</body>
</html>
+9 -10
View File
@@ -1,16 +1,15 @@
{{ template "header" .}}
<main>
<h2>{{.Title}}</h2>
<p>Try another instance or wait.</p>
<h2>{{.Title}}</h2>
<p>Try another instance or wait.</p>
<h2>Info</h2>
{{ range $key, $value := .ratelimit}}
<p>Limit: <b>{{.Limit}}</b></p>
<p>Remaining: <b>{{.Remaining}}</b></p>
{{ end }}
<h2>Info</h2>
{{ range $key, $value := .ratelimit}}
<p>Limit: <b>{{.Limit}}</b></p>
<p>Remaining: <b>{{.Remaining}}</b></p>
{{ end }}
<i>Todo: implement GitHub API keys</i>
<i>Todo: implement GitHub API keys</i>
</main>
</body>
</html>
{{ template "footer" .}}
+8 -6
View File
@@ -1,11 +1,13 @@
{{ template "header" .}}
<main>
<h2>{{.Title}}</h2>
<p>Wait 5 minutes before trying again.</p>
<h2>{{.Title}}</h2>
<p>Wait 5 minutes before trying again.</p>
<h2>Info</h2>
<p>GotHub has implemented ratelimits in order to prevent rate-limits by GitHub. You've been hit by the rate limiter.</p>
<h2>Info</h2>
<p>
GotHub has implemented ratelimits in order to prevent rate-limits by GitHub.
You've been hit by the rate limiter.
</p>
</main>
</body>
</html>
{{ template "footer" .}}
+57 -61
View File
@@ -1,67 +1,63 @@
{{ template "header" .}}
<main>
{{ if .repo }}
{{ range $key, $value := .repo}}
<div class="buttonParent">
<a href="/download/{{.Fullname}}/{{.DefaultBranch}}" class="button">Download (zip)</a>
<a href="https://github.com/{{.Fullname}}" class="button">View on GitHub</a>
</div>
{{ if .repo }} {{ range $key, $value := .repo}}
<div class="buttonParent">
<a href="/download/{{.Fullname}}/{{.DefaultBranch}}" class="button"
>Download (zip)</a
>
<a href="https://github.com/{{.Fullname}}" class="button">View on GitHub</a>
</div>
<div class="userProfile">
<h1>{{.Fullname}}</h1>
{{ if .Parent }}
<p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p>
{{ end }}
{{ if .Description }}
<p>{{.Description}}</p>
{{ end }}
{{ if .License }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🌿 {{.DefaultBranch}}</p>
{{ else }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🌿 {{.DefaultBranch}}</p>
{{ end }}
{{ if .Language }}
<p>🗒️
{{range .Language}}
{{.}}
{{end}}
</p>
{{end}}
</div>
{{end}}
{{ if .files}}
<div class="userReadme">
<h3>Files</h3>
<div class="userReadmeText">
<ul class="filesUList">
{{ range $key, $value := .files}}
{{ if eq .Type "dir" }}
<li class="filesList"><a href="#" class="filesA">{{.Path}} (directory)</a></li>
{{ else }}
<li class="filesList"><a href="/{{.Fullname}}/tree/{{.DefaultBranch}}/{{.Path}}">{{.Path}}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
</div>
{{ end }}
{{ if .readme}}
<div class="userReadme">
{{ if .repo }}
{{ range $key, $value := .repo}}
<h3>{{.Readme}}</h3>
{{end}}
{{end}}
<div class="userReadmeText">
{{ unescape .readme}}
</div>
</div>
{{ end }}
<div class="userProfile">
<h1>{{.Fullname}}</h1>
{{ if .Parent }}
<p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p>
{{ end }} {{ if .Description }}
<p>{{.Description}}</p>
{{ end }} {{ if .License }}
<p>
⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🌿
{{.DefaultBranch}}
</p>
{{ else }}
<h2>Repository not found</h2>
<p>That repository doesn't exist.</p>
{{ end }}
<p>
⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🌿
{{.DefaultBranch}}
</p>
{{ end }} {{ if .Language }}
<p>🗒️ {{range .Language}} {{.}} {{end}}</p>
{{end}}
</div>
{{end}} {{ if .files}}
<div class="userReadme">
<h3>Files</h3>
<div class="userReadmeText">
<ul class="filesUList">
{{ range $key, $value := .files}} {{ if eq .Type "dir" }}
<li class="filesList">
<a href="#" class="filesA">{{.Path}} (directory)</a>
</li>
{{ else }}
<li class="filesList">
<a href="/{{.Fullname}}/tree/{{.DefaultBranch}}/{{.Path}}"
>{{.Path}}</a
>
</li>
{{ end }} {{ end }}
</ul>
</div>
</div>
{{ end }} {{ if .readme}}
<div class="userReadme">
{{ if .repo }} {{ range $key, $value := .repo}}
<h3>{{.Readme}}</h3>
{{end}} {{end}}
<div class="userReadmeText">{{ unescape .readme}}</div>
</div>
{{ end }} {{ else }}
<h2>Repository not found</h2>
<p>That repository doesn't exist.</p>
{{ end }}
</main>
</body>
</html>
{{ template "footer" .}}
+11 -8
View File
@@ -74,15 +74,19 @@
<h2>{{.PinOrPopular}}:</h2>
{{range .MainRepos}}
<div class="mainRepos">
<h3 class="">{{.Name}}</h3>
<h3 class=""><a href="/{{.Name}}">{{.Name}}</a></h3>
{{if .ForkOf}}
<p class="mainReposTextDim">Forked from: {{.ForkOf}}</p>
{{else}} {{end}}
{{if .Desc}}
<p class="mainReposTextDim">
Forked from: <a href="/{{.ForkOff}}">{{.ForkOf}}</a>
</p>
{{else}} {{end}} {{if .Desc}}
<p class="">{{.Desc}}</p>
{{else}} {{end}}
<p class="">{{if .Stars}}⭐ {{.Stars}}{{else}}{{end}} {{if .Forks}} 🍴 {{.Forks}} {{else}}{{end}} {{if .Lang}} 🗒️ {{.Lang}} {{else}}{{end}} </p>
</div>
<p class="">
{{if .Stars}}⭐ {{.Stars}}{{else}}{{end}} {{if .Forks}} 🍴 {{.Forks}}
{{else}}{{end}} {{if .Lang}} 🗒️ {{.Lang}} {{else}}{{end}}
</p>
</div>
{{ end }}
</div>
{{ end }} {{ end }} {{ else }}
@@ -90,5 +94,4 @@
<p>That user doesn't exist.</p>
{{ end }}
</main>
</body>
</html>
{{ template "footer" .}}