pretty much everything so far
Signed-off-by: Odyssey <odyssey346@disroot.org>
This commit is contained in:
9
views/error.html
Normal file
9
views/error.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ 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>
|
||||
<pre class="error">{{.error}}</pre>
|
||||
<h3>Think this is a bug? <a href="https://codeberg.org/Odyssium/gothub/issues" target="_blank">Create an issue on Codeberg.</a></h3>
|
||||
</div>
|
||||
</main>
|
29
views/explore.html
Normal file
29
views/explore.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{template "header" .}}
|
||||
|
||||
<main>
|
||||
<h2>Trending repositories</h2>
|
||||
<p><b>25</b> repositories shown, sorted by most stars.</p>
|
||||
{{ if .repos}}
|
||||
{{ range $key, $value := .repos}}
|
||||
<div class="exploreIDontKnowWhatToNameThisDiv">
|
||||
<a href="{{ .HtmlUrl }}">{{ .Fullname }}</a>
|
||||
<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>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<p>There are no trending repositories at the moment.</p>
|
||||
{{ end }}
|
||||
</main>
|
19
views/header.html
Normal file
19
views/header.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>GotHub</title>
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<div class="navbar">
|
||||
<a href="/" style="text-decoration: none;"><b class="navbarSlogan">GotHub</b></a>
|
||||
<div class="navbarLinks">
|
||||
<a href="/explore">Explore</a>
|
||||
<a href="https://codeberg.org/Odyssium/gothub">Source code</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</body>
|
||||
</html>
|
21
views/index.html
Normal file
21
views/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{template "header" .}}
|
||||
|
||||
<main>
|
||||
<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>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!</a></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.</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>
|
||||
</main>
|
14
views/ratelimit.html
Normal file
14
views/ratelimit.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ template "header" .}}
|
||||
|
||||
<main>
|
||||
<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 }}
|
||||
|
||||
<i>Todo: implement GitHub API keys</i>
|
||||
</main>
|
42
views/user.html
Normal file
42
views/user.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{{ template "header" .}}
|
||||
|
||||
<main>
|
||||
{{ if .user }}
|
||||
{{ range $key, $value := .user}}
|
||||
<div class="userProfile">
|
||||
<img src="{{ .AvatarUrl }}" alt="{{.Login}}'s avatar" class="avatar" width="150" height="150">
|
||||
{{ if .Name }}
|
||||
<h1>{{.Name}}</h1>
|
||||
{{ end }}
|
||||
<h2>{{.Login}}</h2>
|
||||
{{ if eq .Type "User" }}
|
||||
<p><b>{{.Followers}}</b> followers - <b>{{.Following}}</b> following</p>
|
||||
{{ else }}
|
||||
<p><b>{{.Followers}}</b> followers</p>
|
||||
{{ end }}
|
||||
{{ if .Location }}
|
||||
<p>🌍 {{.Location}}</p>
|
||||
{{ end }}
|
||||
{{ if .Link }}
|
||||
<p>🔗 <a href="https://{{.Link}}" target="_blank">{{.Link}}</a></p>
|
||||
{{ end }}
|
||||
{{ if .Company }}
|
||||
<p>🏢 {{.Company}}</p>
|
||||
{{ end }}
|
||||
{{ if .EwTwitter }}
|
||||
<p>🐦 <a href="https://twitter.com/{{.EwTwitter}}" target="_blank">{{.EwTwitter}}</a></p>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Bio }}
|
||||
<div class="userBio">
|
||||
<h3>Bio</h3>
|
||||
<p class="userBioText">{{.Bio}}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<h2>User not found</h2>
|
||||
<p>That user doesn't exist.</p>
|
||||
{{ end }}
|
||||
</main>
|
Reference in New Issue
Block a user