このコミットが含まれているのは:
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" .}}
<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" .}}

ファイルの表示

@ -3,31 +3,30 @@
<main>
<h2>Trending repositories</h2>
<p><b>25</b> repositories shown, sorted by most stars.</p>
{{ if .repos}}
{{ range $key, $value := .repos}}
{{ 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>
{{ 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}} ⚖️ No license 🗒️
{{.Language}}
</p>
{{ end }} {{ else }} {{ if .License }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}}</p>
{{ else }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license</p>
{{ end }}
{{ end }}
{{ end }} {{ end }}
</div>
</a>
{{ end }}
{{ else }}
{{ end }} {{ else }}
<p>There are no trending repositories at the moment.</p>
{{ end }}
</main>
</body>
</html>
{{template "footer" .}}

ファイルの表示

@ -2,7 +2,13 @@
<main>
{{ if .file }}
<style>{{ .css }}</style>
<style>
{
{
.css;
}
}
</style>
<div class="downloadParent">
<a href="/{{.fullname}}" class="button">Back to {{.fullname}}</a>
</div>
@ -10,11 +16,14 @@
<div class="userReadme">
<div class="userContainer">
<h3>{{.name}}</h3>
<a href="/raw/{{.fullname}}/{{.branch}}/{{.name}}" class="button secondary">Raw</a>
<a
href="/raw/{{.fullname}}/{{.branch}}/{{.name}}"
class="button secondary"
>Raw</a
>
</div>
{{ .file}}
</div>
{{end}}
</main>
</body>
</html>
{{ template "footer" .}}

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

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

ファイルの表示

@ -1,19 +1,27 @@
<!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>
<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>

ファイルの表示

@ -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" .}}

ファイルの表示

@ -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>

ファイルの表示

@ -12,5 +12,4 @@
<i>Todo: implement GitHub API keys</i>
</main>
</body>
</html>
{{ template "footer" .}}

ファイルの表示

@ -5,7 +5,9 @@
<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>
<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" .}}

ファイルの表示

@ -1,10 +1,11 @@
{{ template "header" .}}
<main>
{{ if .repo }}
{{ range $key, $value := .repo}}
{{ if .repo }} {{ range $key, $value := .repo}}
<div class="buttonParent">
<a href="/download/{{.Fullname}}/{{.DefaultBranch}}" class="button">Download (zip)</a>
<a href="/download/{{.Fullname}}/{{.DefaultBranch}}" class="button"
>Download (zip)</a
>
<a href="https://github.com/{{.Fullname}}" class="button">View on GitHub</a>
</div>
@ -12,56 +13,51 @@
<h1>{{.Fullname}}</h1>
{{ if .Parent }}
<p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p>
{{ end }}
{{ if .Description }}
{{ 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}}
{{ 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}}
{{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>
{{ 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 }}
<li class="filesList">
<a href="/{{.Fullname}}/tree/{{.DefaultBranch}}/{{.Path}}"
>{{.Path}}</a
>
</li>
{{ end }} {{ end }}
</ul>
</div>
</div>
{{ end }}
{{ if .readme}}
{{ end }} {{ if .readme}}
<div class="userReadme">
{{ if .repo }}
{{ range $key, $value := .repo}}
{{ if .repo }} {{ range $key, $value := .repo}}
<h3>{{.Readme}}</h3>
{{end}}
{{end}}
<div class="userReadmeText">
{{ unescape .readme}}
{{end}} {{end}}
<div class="userReadmeText">{{ unescape .readme}}</div>
</div>
</div>
{{ end }}
{{ else }}
{{ end }} {{ else }}
<h2>Repository not found</h2>
<p>That repository doesn't exist.</p>
{{ end }}
</main>
</body>
</html>
{{ template "footer" .}}

ファイルの表示

@ -74,14 +74,18 @@
<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>
<p class="">
{{if .Stars}}⭐ {{.Stars}}{{else}}{{end}} {{if .Forks}} 🍴 {{.Forks}}
{{else}}{{end}} {{if .Lang}} 🗒️ {{.Lang}} {{else}}{{end}}
</p>
</div>
{{ end }}
</div>
@ -90,5 +94,4 @@
<p>That user doesn't exist.</p>
{{ end }}
</main>
</body>
</html>
{{ template "footer" .}}