このコミットが含まれているのは:
Arya Kiran 2023-03-07 22:28:55 +05:30
コミット 889c8c399d
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 842D12BDA50DF120
12個のファイルの変更261行の追加197行の削除

2
views/.prettierignore ノーマルファイル
ファイルの表示

@ -0,0 +1,2 @@
header.html
footer.html

ファイルの表示

@ -1,11 +1,18 @@
{{ template "header" .}} {{ template "header" .}}
<main> <main>
<div class="center"> <div class="center">
<h1 style="color: red;">Error</h1> <h1 style="color: red">Error</h1>
<h2>Someone pushed to production. Just kidding, that's probably not what happened. Here's the error:</h2> <h2>
Someone pushed to production. Just kidding, that's probably not what
happened. Here's the error:
</h2>
<pre class="error">{{.error}}</pre> <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> <h3>
</div> Think this is a bug?
<a href="https://codeberg.org/gothub/gothub/issues" target="_blank"
>Create an issue on Codeberg.</a
>
</h3>
</div>
</main> </main>
</body> {{ template "footer" .}}
</html>

ファイルの表示

@ -1,33 +1,32 @@
{{template "header" .}} {{template "header" .}}
<main> <main>
<h2>Trending repositories</h2> <h2>Trending repositories</h2>
<p><b>25</b> repositories shown, sorted by most stars.</p> <p><b>25</b> repositories shown, sorted by most stars.</p>
{{ if .repos}} {{ if .repos}} {{ range $key, $value := .repos}}
{{ range $key, $value := .repos}} <a href="{{.Fullname}}" class="exploreIDontKnowWhatToNameThisDiv">
<a href="{{.Fullname}}" class="exploreIDontKnowWhatToNameThisDiv"> <div>
<div> <p>{{.Fullname}}</p>
<p>{{.Fullname}}</p> <p>{{.Description}}</p>
<p>{{.Description}}</p> {{ if .Language }} {{ if .License }}
{{ if .Language }} <p>
{{ if .License }} ⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🗒️
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🗒️ {{.Language}}</p> {{.Language}}
{{ else }} </p>
<p>{{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🗒️ {{.Language}}</p> {{ else }}
{{ end }} <p>
{{ else }} ⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🗒️
{{ if .License }} {{.Language}}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}}</p> </p>
{{ else }} {{ end }} {{ else }} {{ if .License }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license</p> <p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}}</p>
{{ end }} {{ else }}
{{ end }} <p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license</p>
</div> {{ end }} {{ end }}
</a> </div>
{{ end }} </a>
{{ else }} {{ end }} {{ else }}
<p>There are no trending repositories at the moment.</p> <p>There are no trending repositories at the moment.</p>
{{ end }} {{ end }}
</main> </main>
</body> {{template "footer" .}}
</html>

ファイルの表示

@ -1,20 +1,29 @@
{{ template "header" .}} {{ template "header" .}}
<main> <main>
{{ if .file }} {{ if .file }}
<style>{{ .css }}</style> <style>
<div class="downloadParent"> {
<a href="/{{.fullname}}" class="button">Back to {{.fullname}}</a> {
</div> .css;
}
}
</style>
<div class="downloadParent">
<a href="/{{.fullname}}" class="button">Back to {{.fullname}}</a>
</div>
<div class="userReadme"> <div class="userReadme">
<div class="userContainer"> <div class="userContainer">
<h3>{{.name}}</h3> <h3>{{.name}}</h3>
<a href="/raw/{{.fullname}}/{{.branch}}/{{.name}}" class="button secondary">Raw</a> <a
</div> href="/raw/{{.fullname}}/{{.branch}}/{{.name}}"
{{ .file}} class="button secondary"
</div> >Raw</a
{{end}} >
</div>
{{ .file}}
</div>
{{end}}
</main> </main>
</body> {{ template "footer" .}}
</html>

2
views/footer.html ノーマルファイル
ファイルの表示

@ -0,0 +1,2 @@
</body>
</html>

ファイルの表示

@ -1,23 +1,31 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
{{ if .title }} {{ if .title }}
<title>{{ .title }} - GotHub</title> <title>{{ .title }} - GotHub</title>
{{ else }} {{ else }}
<title>GotHub</title> <title>GotHub</title>
{{ end }} {{ end }}
<link rel="stylesheet" href="/css/global.css"> <link rel="stylesheet" href="/css/global.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/x-icon" href="/favicon.ico"> <link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head> </head>
<body> <body>
<nav> <nav>
<div class="navbar"> <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> <a href="/" style="text-decoration: none" class="brand"
<div class="navbarLinks"> ><img
<a href="/explore">Explore</a> src="/logo.svg"
<a href="/privacy">Privacy</a> class="navbarImg"
<a href="https://codeberg.org/gothub/gothub">Source code</a> height="30"
</div> 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>
</div>
</nav> </nav>

ファイルの表示

@ -1,33 +1,63 @@
{{template "header" .}} {{template "header" .}}
<main> <main>
<h2>GotHub is an alternative front-end for GitHub.</h2> <h2>GotHub is an alternative front-end for GitHub.</h2>
<h3>Features</h3> <h3>Features</h3>
<ul> <ul>
<li>Lightweight - for both you and the instance host</li> <li>Lightweight - for both you and the instance host</li>
<li>No JavaScript - pure HTML and CSS goodness</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>Open source - for peer review & trustworthiness</li>
<li>Save bandwidth - no JavaScript/tracking bloat loaded!</li> <li>Save bandwidth - no JavaScript/tracking bloat loaded!</li>
</ul> </ul>
<h3>Privacy</h3> <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> <p>
<h3>Usage</h3> GitHub is owned by Microsoft, a big tech company known to track it's users.
<p>Just replace <code class="indexGitHub">github.com</code> with <code class="indexGitHub">{{.host}}</code>!</p> <a
<h3>DMCA/Copyright Notice</h3> href="https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement"
<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> target="_blank"
<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> >If you care, you can read GitHub's privacy policy here</a
<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> or
<a href="https://midou36o.github.io">Midou36O</a> - desigining the GotHub logo <a href="https://tosdr.org/en/service/297" target="_blank"
<h3>Info</h3> >if you don't care enough to read all that and want it condensed</a
{{ if eq .version "unknown, please build with Go 1.13+ or use Git"}} >. GotHub solves this by proxying all GitHub requests for you!
GotHub version: <code>unknown</code> </p>
{{ else }} <h3>Usage</h3>
GotHub version: <a href="https://codeberg.org/gothub/gothub/commit/{{ .version}}"><code>{{ .version}}</code></a> <p>
{{ end }} Just replace <code class="indexGitHub">github.com</code> with
<br> <code class="indexGitHub">{{.host}}</code>!
Fiber version: {{ .fiberversion}}, running on {{ .goversion}} </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> </main>
</body> {{ template "footer" .}}
</html>

ファイルの表示

@ -1,26 +1,33 @@
{{template "header" .}} {{template "header" .}}
<main style="text-align:center; line-height:30px;"> <main style="text-align: center; line-height: 30px">
<h2>Instance Privacy</h2> <h2>Instance Privacy</h2>
{{ if .privacyInformation}} {{ if .privacyInformation}} {{ range $key, $value := .privacyInformation}}
{{ range $key, $value := .privacyInformation}} <p>
<p>The goal of this page is to bring transparency to the data collected by the instances and to encourage privacy friendly practices.</p> The goal of this page is to bring transparency to the data collected by the
<p>If this page isn't filled, please contact your instance's maintainer.</p> instances and to encourage privacy friendly practices.
<p><b>IP Address logged:</b> {{.IPAddr}}</p> </p>
<p><b>Request URL logged:</b> {{.ReqURL}}</p> <p>If this page isn't filled, please contact your instance's maintainer.</p>
<p><b>User Agent logged:</b> {{.UserAgent}}</p> <p><b>IP Address logged:</b> {{.IPAddr}}</p>
<p><b>Diagnostic Information logged:</b> {{.Diagnostics}}</p> <p><b>Request URL logged:</b> {{.ReqURL}}</p>
{{ if .PrivacyPolicy }} <p><b>User Agent logged:</b> {{.UserAgent}}</p>
<p>You can see the maintainer's <a href=//{{.PrivacyPolicy}}>Privacy Policy</a> for more information.</p> <p><b>Diagnostic Information logged:</b> {{.Diagnostics}}</p>
{{end}} {{ if .PrivacyPolicy }}
<h3>Additional Information</h3> <p>
<p>GotHub version: <a href="https://codeberg.org/gothub/gothub/commit/{{.Version}}"><code>{{.Version}}</code></a></p> You can see the maintainer's
<p>Fiber version: {{ .FiberVersion}}, running on {{ .GoVersion}}</p> <a href="//{{.PrivacyPolicy}}">Privacy Policy</a> for more information.
<p>Country: {{.Country}}</p> </p>
<p>Cloudflare: {{.Cloudflare}}</p> {{end}}
<p>ISP: {{.Provider}}</p> <h3>Additional Information</h3>
{{end}} <p>
{{end}} 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> </main>
</body>
</html>

ファイルの表示

@ -1,16 +1,15 @@
{{ template "header" .}} {{ template "header" .}}
<main> <main>
<h2>{{.Title}}</h2> <h2>{{.Title}}</h2>
<p>Try another instance or wait.</p> <p>Try another instance or wait.</p>
<h2>Info</h2> <h2>Info</h2>
{{ range $key, $value := .ratelimit}} {{ range $key, $value := .ratelimit}}
<p>Limit: <b>{{.Limit}}</b></p> <p>Limit: <b>{{.Limit}}</b></p>
<p>Remaining: <b>{{.Remaining}}</b></p> <p>Remaining: <b>{{.Remaining}}</b></p>
{{ end }} {{ end }}
<i>Todo: implement GitHub API keys</i> <i>Todo: implement GitHub API keys</i>
</main> </main>
</body> {{ template "footer" .}}
</html>

ファイルの表示

@ -1,11 +1,13 @@
{{ template "header" .}} {{ template "header" .}}
<main> <main>
<h2>{{.Title}}</h2> <h2>{{.Title}}</h2>
<p>Wait 5 minutes before trying again.</p> <p>Wait 5 minutes before trying again.</p>
<h2>Info</h2> <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> <p>
GotHub has implemented ratelimits in order to prevent rate-limits by GitHub.
You've been hit by the rate limiter.
</p>
</main> </main>
</body> {{ template "footer" .}}
</html>

ファイルの表示

@ -1,67 +1,63 @@
{{ template "header" .}} {{ template "header" .}}
<main> <main>
{{ if .repo }} {{ if .repo }} {{ range $key, $value := .repo}}
{{ range $key, $value := .repo}} <div class="buttonParent">
<div class="buttonParent"> <a href="/download/{{.Fullname}}/{{.DefaultBranch}}" class="button"
<a href="/download/{{.Fullname}}/{{.DefaultBranch}}" class="button">Download (zip)</a> >Download (zip)</a
<a href="https://github.com/{{.Fullname}}" class="button">View on GitHub</a> >
</div> <a href="https://github.com/{{.Fullname}}" class="button">View on GitHub</a>
</div>
<div class="userProfile"> <div class="userProfile">
<h1>{{.Fullname}}</h1> <h1>{{.Fullname}}</h1>
{{ if .Parent }} {{ if .Parent }}
<p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p> <p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p>
{{ end }} {{ end }} {{ if .Description }}
{{ if .Description }} <p>{{.Description}}</p>
<p>{{.Description}}</p> {{ end }} {{ if .License }}
{{ end }} <p>
{{ if .License }} ⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🌿
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🌿 {{.DefaultBranch}}</p> {{.DefaultBranch}}
{{ else }} </p>
<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 }} {{ else }}
<h2>Repository not found</h2> <p>
<p>That repository doesn't exist.</p> ⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🌿
{{ end }} {{.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> </main>
</body> {{ template "footer" .}}
</html>

ファイルの表示

@ -74,15 +74,19 @@
<h2>{{.PinOrPopular}}:</h2> <h2>{{.PinOrPopular}}:</h2>
{{range .MainRepos}} {{range .MainRepos}}
<div class="mainRepos"> <div class="mainRepos">
<h3 class="">{{.Name}}</h3> <h3 class=""><a href="/{{.Name}}">{{.Name}}</a></h3>
{{if .ForkOf}} {{if .ForkOf}}
<p class="mainReposTextDim">Forked from: {{.ForkOf}}</p> <p class="mainReposTextDim">
{{else}} {{end}} Forked from: <a href="/{{.ForkOff}}">{{.ForkOf}}</a>
{{if .Desc}} </p>
{{else}} {{end}} {{if .Desc}}
<p class="">{{.Desc}}</p> <p class="">{{.Desc}}</p>
{{else}} {{end}} {{else}} {{end}}
<p class="">{{if .Stars}}⭐ {{.Stars}}{{else}}{{end}} {{if .Forks}} 🍴 {{.Forks}} {{else}}{{end}} {{if .Lang}} 🗒️ {{.Lang}} {{else}}{{end}} </p> <p class="">
</div> {{if .Stars}}⭐ {{.Stars}}{{else}}{{end}} {{if .Forks}} 🍴 {{.Forks}}
{{else}}{{end}} {{if .Lang}} 🗒️ {{.Lang}} {{else}}{{end}}
</p>
</div>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }} {{ else }} {{ end }} {{ end }} {{ else }}
@ -90,5 +94,4 @@
<p>That user doesn't exist.</p> <p>That user doesn't exist.</p>
{{ end }} {{ end }}
</main> </main>
</body> {{ template "footer" .}}
</html>