Add setup notice, please see #92

Signed-off-by: Odyssium <hi@odyssey346.dev>
このコミットが含まれているのは:
Odyssium 2023-04-02 19:28:20 +02:00
コミット 739c53aa92
3個のファイルの変更27行の追加0行の削除

ファイルの表示

@ -1,6 +1,7 @@
package pages
import (
"os"
"runtime"
"codeberg.org/gothub/gothub/utils"
@ -13,5 +14,6 @@ func HandleIndex(c *fiber.Ctx) error {
"version": utils.Version(),
"fiberversion": fiber.Version,
"goversion": runtime.Version(),
"setupstatus": os.Getenv("GOTHUB_SETUP_COMPLETE"),
})
}

ファイルの表示

@ -6,6 +6,7 @@
--secondary-background: #353535;
--background-darker: #151515;
--accent: #00b7c3;
--yellow: #8B8000;
color-scheme: dark;
}
@ -90,6 +91,24 @@ a:hover {
color: var(--accent);
}
.setup-notice {
background-color: var(--yellow);
padding: 8px;
border-radius: 4px;
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
color: var(--text);
}
.setup-notice > a {
text-decoration: underline;
text-underline-offset: 5px;
}
.setup-notice > a:hover {
color: var(--text);
opacity: 1;
}
/* URI: /explore */
.explore-card, .user-repo-card {
@ -254,6 +273,7 @@ a:hover {
--secondary-background: #f5f5f5;
--background-darker: #dddddd;
--accent: #005ec3;
--yellow: #f5f5a5;
color-scheme: light;
}
a {

ファイルの表示

@ -2,6 +2,11 @@
<main>
<h2>GotHub is an alternative front-end for GitHub.</h2>
{{ if not .setupstatus }}
<div class="setup-notice">
<b>GotHub is not set up!</b> Please look at <a href="https://codeberg.org/gothub/gothub/issues/92">this issue</a> to see how to set up GotHub, or set the GOTHUB_SETUP_COMPLETE environment variable to true to suppress this message. If you are a user of this instance, please contact the instance maintainer.
</div>
{{ end}}
<h3>Features</h3>
<ul>
<li>Lightweight - for both you and the instance host</li>