diff --git a/cmd/gitlin/env.go b/cmd/gitlin/env.go new file mode 100644 index 0000000..5774c36 --- /dev/null +++ b/cmd/gitlin/env.go @@ -0,0 +1,44 @@ +package gitlin + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" + + _ "github.com/joho/godotenv/autoload" +) + +var envCmd = &cobra.Command{ + Use: "env", + Short: "Get environment variable status", + Long: `This command will show you the status of all environment variables that are used by Gitlin.`, + Run: func(cmd *cobra.Command, args []string) { + env() + }, +} + +func init() { + rootCmd.AddCommand(envCmd) +} + +func env() { + // Proxying + fmt.Println("Proxying: " + os.Getenv("GITLIN_PROXYING_ENABLED")) + // IP logging + fmt.Println("IP logging: " + os.Getenv("GITLIN_IP_LOGGED")) + // URL request logging + fmt.Println("URL request logging: " + os.Getenv("GITLIN_REQUEST_URL_LOGGED")) + // User-Agent logging + fmt.Println("User-Agent logging: " + os.Getenv("GITLIN_USER_AGENT_LOGGED")) + // Diagnostic information logging + fmt.Println("Diagnostic information logging: " + os.Getenv("GITLIN_DIAGNOSTIC_INFO_LOGGED")) + // Privacy Policy URL + fmt.Println("Privacy Policy URL: " + os.Getenv("GITLIN_INSTANCE_PRIVACY_POLICY")) + // Instance country + fmt.Println("Instance country: " + os.Getenv("GITLIN_INSTANCE_COUNTRY")) + // ISP + fmt.Println("ISP/Hosting provider: " + os.Getenv("GITLIN_INSTANCE_PROVIDER")) + // Cloudflare status + fmt.Println("Cloudflare status: " + os.Getenv("GITLIN_INSTANCE_CLOUDFLARE")) +} diff --git a/cmd/gothub/root.go b/cmd/gitlin/root.go similarity index 59% rename from cmd/gothub/root.go rename to cmd/gitlin/root.go index 496a4ab..0b1d13f 100644 --- a/cmd/gothub/root.go +++ b/cmd/gitlin/root.go @@ -1,4 +1,4 @@ -package gothub +package gitlin import ( "fmt" @@ -8,9 +8,9 @@ import ( ) var rootCmd = &cobra.Command{ - Use: "gothub", + Use: "gitlin", Short: "An alternative front-end for GitHub.", - Long: `An alternative front-end for GitHub, maintained by Odyssey346, Midou36O and Arya.`, + Long: `An alternative front-end for GitHub.`, Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, @@ -18,7 +18,7 @@ var rootCmd = &cobra.Command{ func Execute() { if err := rootCmd.Execute(); err != nil { - fmt.Fprintf(os.Stderr, "Error running GotHub's CLI: %v", err) + fmt.Fprintf(os.Stderr, "Error running Gitlin's CLI: %v", err) os.Exit(1) } } diff --git a/cmd/gothub/serve.go b/cmd/gitlin/serve.go similarity index 77% rename from cmd/gothub/serve.go rename to cmd/gitlin/serve.go index 18e5d43..6f22cc3 100644 --- a/cmd/gothub/serve.go +++ b/cmd/gitlin/serve.go @@ -1,12 +1,12 @@ -package gothub +package gitlin import ( "github.com/spf13/cobra" - "codeberg.org/gothub/gothub/serve" + "gitler.moe/suwako/gitlin/serve" ) -var port string = "3000" +var port string = "9715" var serveCmd = &cobra.Command{ Use: "serve", @@ -20,7 +20,7 @@ var serveCmd = &cobra.Command{ func init() { rootCmd.AddCommand(serveCmd) - serveCmd.Flags().StringVarP(&port, "port", "p", "", "The port GotHub will listen to. Defaults to 3000, and overrides the GOTHUB_PORT environment variable.") + serveCmd.Flags().StringVarP(&port, "port", "p", "", "The port Gitlin will listen to. Defaults to 9715, and overrides the GITLIN_PORT environment variable.") // set port variable to the value of the port flag port = serveCmd.Flag("port").Value.String() diff --git a/cmd/gothub/setup.go b/cmd/gitlin/setup.go similarity index 76% rename from cmd/gothub/setup.go rename to cmd/gitlin/setup.go index b755de9..d91165a 100644 --- a/cmd/gothub/setup.go +++ b/cmd/gitlin/setup.go @@ -1,4 +1,4 @@ -package gothub +package gitlin import ( "fmt" @@ -9,8 +9,8 @@ import ( var setupCmd = &cobra.Command{ Use: "setup", - Short: "Interactive GotHub instance setup wizard", - Long: `This command allows you to setup your GotHub instance in an interactive way. It will ask you a few questions and then set environment variables for you.`, + Short: "Interactive Gitlin instance setup wizard", + Long: `This command allows you to setup your Gitlin instance in an interactive way. It will ask you a few questions and then set environment variables for you.`, Run: func(cmd *cobra.Command, args []string) { setup() }, @@ -33,12 +33,12 @@ type Vars struct { } func setup() { - fmt.Println("GotHub setup wizard") - fmt.Println("This wizard will help you setup your GotHub instance.") + fmt.Println("Gitlin setup wizard") + fmt.Println("This wizard will help you setup your Gitlin instance.") // Docker check if os.Getenv("DOCKER") == "true" { - fmt.Println("You are running GotHub in Docker. This wizard will not work in Docker. Please set the environment variables manually.") + fmt.Println("You are running Gitlin in Docker. This wizard will not work in Docker. Please set the environment variables manually.") os.Exit(1) } @@ -151,19 +151,19 @@ func setup() { defer f.Close() // write to file. make it look nice - f.WriteString("# GotHub environment variables\n") + f.WriteString("# Gitlin environment variables\n") f.WriteString("# This file was generated by the setup wizard. You can edit it manually if you want.\n") - f.WriteString("GOTHUB_SETUP_COMPLETE=true\n") - f.WriteString("GOTHUB_IP_LOGGED=" + fmt.Sprint(vars.IPLogging) + "\n") - f.WriteString("GOTHUB_REQUEST_URL_LOGGED=" + fmt.Sprint(vars.URLLogging) + "\n") - f.WriteString("GOTHUB_USER_AGENT_LOGGED=" + fmt.Sprint(vars.UserAgentLogging) + "\n") - f.WriteString("GOTHUB_DIAGNOSTIC_INFO_LOGGED=" + fmt.Sprint(vars.DiagnosticLogging) + "\n") - f.WriteString("GOTHUB_INSTANCE_PRIVACY_POLICY=" + vars.PrivacyPolicy + "\n") - f.WriteString("GOTHUB_INSTANCE_COUNTRY=" + vars.InstanceCountry + "\n") - f.WriteString("GOTHUB_INSTANCE_PROVIDER=" + vars.InstanceProvider + "\n") - f.WriteString("GOTHUB_INSTANCE_CLOUDFLARE=" + vars.CloudflareStatus) - f.WriteString("GOTHUB_PROXYING_ENABLED=" + vars.Proxying) + f.WriteString("GITLIN_SETUP_COMPLETE=true\n") + f.WriteString("GITLIN_IP_LOGGED=" + fmt.Sprint(vars.IPLogging) + "\n") + f.WriteString("GITLIN_REQUEST_URL_LOGGED=" + fmt.Sprint(vars.URLLogging) + "\n") + f.WriteString("GITLIN_USER_AGENT_LOGGED=" + fmt.Sprint(vars.UserAgentLogging) + "\n") + f.WriteString("GITLIN_DIAGNOSTIC_INFO_LOGGED=" + fmt.Sprint(vars.DiagnosticLogging) + "\n") + f.WriteString("GITLIN_INSTANCE_PRIVACY_POLICY=" + vars.PrivacyPolicy + "\n") + f.WriteString("GITLIN_INSTANCE_COUNTRY=" + vars.InstanceCountry + "\n") + f.WriteString("GITLIN_INSTANCE_PROVIDER=" + vars.InstanceProvider + "\n") + f.WriteString("GITLIN_INSTANCE_CLOUDFLARE=" + vars.CloudflareStatus + "\n") + f.WriteString("GITLIN_PROXYING_ENABLED=" + vars.Proxying) - println("All done! You can now start your GotHub instance with 'gothub serve'.") - println("You can review the environment variables with 'gothub env'.") + println("All done! You can now start your Gitlin instance with 'gitlin serve'.") + println("You can review the environment variables with 'gitlin env'.") } diff --git a/cmd/gothub/update.go b/cmd/gitlin/update.go similarity index 64% rename from cmd/gothub/update.go rename to cmd/gitlin/update.go index 82bb938..36188a5 100644 --- a/cmd/gothub/update.go +++ b/cmd/gitlin/update.go @@ -1,4 +1,4 @@ -package gothub +package gitlin import ( "bytes" @@ -14,8 +14,8 @@ import ( var updateCmd = &cobra.Command{ Use: "update", - Short: "Update GotHub.", - Long: `This command checks for updates and re-builds GotHub. Does not work on Docker`, + Short: "Update Gitlin.", + Long: `This command checks for updates and re-builds Gitlin. Does not work on Docker`, Run: func(cmd *cobra.Command, args []string) { update() }, @@ -27,18 +27,18 @@ func init() { func update() { if os.Getenv("DOCKER") == "true" { - fmt.Println("The GotHub update command does not work on Docker. Please re-create the container with a new image instead.") + fmt.Println("The Gitlin update command does not work on Docker. Please re-create the container with a new image instead.") os.Exit(1) } gitPull := exec.Command("git", "pull") curBranch := exec.Command("git", "rev-parse", "--abbrev-ref", "HEAD") curBranchOut, _ := curBranch.CombinedOutput() - ldFlags := "-X codeberg.org/gothub/gothub/utils.Branch=" + strings.Replace(string(curBranchOut), "\n", "", -1) + ldFlags := "-X gitler.moe/suwako/gitlin/utils.Branch=" + strings.Replace(string(curBranchOut), "\n", "", -1) var out bytes.Buffer gitPull.Stdout = &out err := gitPull.Run() if out.String() == "Already up to date.\r" { - fmt.Println("GotHub is already up to date.") + fmt.Println("Gitlin is already up to date.") os.Exit(0) } if err != nil { @@ -46,21 +46,21 @@ func update() { os.Exit(1) } if runtime.GOOS == "windows" { - err := exec.Command("go", "build", "-o", "gothub.exe", ldFlags).Run() + err := exec.Command("go", "build", "-o", "gitlin.exe", ldFlags).Run() if err != nil { - fmt.Println("Couldn't build GotHub.", err) + fmt.Println("Couldn't build Gitlin.", err) os.Exit(1) } else { - fmt.Println("GotHub updated successfully.") + fmt.Println("Gitlin updated successfully.") os.Exit(0) } } else { err := exec.Command("go", "build", "-ldflags", ldFlags).Run() if err != nil { - fmt.Println("Couldn't build GotHub.", err) + fmt.Println("Couldn't build Gitlin.", err) os.Exit(1) } else { - fmt.Println("GotHub updated successfully.") + fmt.Println("Gitlin updated successfully.") os.Exit(0) } } diff --git a/cmd/gothub/env.go b/cmd/gothub/env.go deleted file mode 100644 index 8c37e6b..0000000 --- a/cmd/gothub/env.go +++ /dev/null @@ -1,50 +0,0 @@ -package gothub - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" - - _ "github.com/joho/godotenv/autoload" -) - -var envCmd = &cobra.Command{ - Use: "env", - Short: "Get environment variable status", - Long: `This command will show you the status of all environment variables that are used by GotHub.`, - Run: func(cmd *cobra.Command, args []string) { - env() - }, -} - -func init() { - rootCmd.AddCommand(envCmd) -} - -func env() { - // Docker check - if os.Getenv("DOCKER") == "true" { - fmt.Println("Docker: true") - } else { - fmt.Println("Docker: false") - } - // Proxying - fmt.Println("Proxying: " + os.Getenv("GOTHUB_PROXYING_ENABLED")) - // IP logging - fmt.Println("IP logging: " + os.Getenv("GOTHUB_IP_LOGGED")) - // URL request logging - fmt.Println("URL request logging: " + os.Getenv("GOTHUB_REQUEST_URL_LOGGED")) - // User-Agent logging - fmt.Println("User-Agent logging: " + os.Getenv("GOTHUB_USER_AGENT_LOGGED")) - // Diagnostic information logging - fmt.Println("Diagnostic information logging: " + os.Getenv("GOTHUB_DIAGNOSTIC_INFO_LOGGED")) - // Privacy Policy URL - fmt.Println("Privacy Policy URL: " + os.Getenv("GOTHUB_INSTANCE_PRIVACY_POLICY")) - // Instance country - fmt.Println("Instance country: " + os.Getenv("GOTHUB_INSTANCE_COUNTRY")) - // ISP - fmt.Println("ISP/Hosting provider: " + os.Getenv("GOTHUB_INSTANCE_PROVIDER")) - // Cloudflare status - fmt.Println("Cloudflare status: " + os.Getenv("GOTHUB_INSTANCE_CLOUDFLARE")) -} diff --git a/go.mod b/go.mod index 9dc1a79..0f09fe9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module codeberg.org/gothub/gothub +module gitler.moe/suwako/gitlin go 1.20 diff --git a/main.go b/main.go index 083dd6c..4c346cf 100644 --- a/main.go +++ b/main.go @@ -1,8 +1,8 @@ package main -import "codeberg.org/gothub/gothub/cmd/gothub" +import "gitler.moe/suwako/gitlin/cmd/gitlin" func main() { - gothub.Execute() + gitlin.Execute() // Looking for the Fiber server? It's in serve/serve.go. } diff --git a/pages/about.go b/pages/about.go index fde51c4..13cb852 100644 --- a/pages/about.go +++ b/pages/about.go @@ -1,7 +1,7 @@ package pages import ( - "codeberg.org/gothub/gothub/utils" + "gitler.moe/suwako/gitlin/utils" "github.com/gofiber/fiber/v2" "os" "runtime" @@ -25,15 +25,15 @@ type PrivacyInfo struct { func HandleAbout(c *fiber.Ctx) error { var privacyInfoArray []PrivacyInfo privacyInfoArray = append(privacyInfoArray, PrivacyInfo{ - ProxyEnabled: os.Getenv("GOTHUB_PROXYING_ENABLED"), - IPAddr: os.Getenv("GOTHUB_IP_LOGGED"), - ReqURL: os.Getenv("GOTHUB_REQUEST_URL_LOGGED"), - UserAgent: os.Getenv("GOTHUB_USER_AGENT_LOGGED"), - Diagnostics: os.Getenv("GOTHUB_DIAGNOSTIC_INFO_LOGGED"), - Country: os.Getenv("GOTHUB_INSTANCE_COUNTRY"), - Provider: os.Getenv("GOTHUB_INSTANCE_PROVIDER"), - Cloudflare: os.Getenv("GOTHUB_INSTANCE_CLOUDFLARE"), - PrivacyPolicy: os.Getenv("GOTHUB_INSTANCE_PRIVACY_POLICY"), + ProxyEnabled: os.Getenv("GITLIN_PROXYING_ENABLED"), + IPAddr: os.Getenv("GITLIN_IP_LOGGED"), + ReqURL: os.Getenv("GITLIN_REQUEST_URL_LOGGED"), + UserAgent: os.Getenv("GITLIN_USER_AGENT_LOGGED"), + Diagnostics: os.Getenv("GITLIN_DIAGNOSTIC_INFO_LOGGED"), + Country: os.Getenv("GITLIN_INSTANCE_COUNTRY"), + Provider: os.Getenv("GITLIN_INSTANCE_PROVIDER"), + Cloudflare: os.Getenv("GITLIN_INSTANCE_CLOUDFLARE"), + PrivacyPolicy: os.Getenv("GITLIN_INSTANCE_PRIVACY_POLICY"), Version: utils.Version(), FiberVersion: fiber.Version, GoVersion: runtime.Version(), diff --git a/pages/dirview.go b/pages/dirview.go index baf4c7f..c5a5ff8 100644 --- a/pages/dirview.go +++ b/pages/dirview.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "codeberg.org/gothub/gothub/utils" + "gitler.moe/suwako/gitlin/utils" "github.com/gocolly/colly" "github.com/gofiber/fiber/v2" ) @@ -50,7 +50,7 @@ func DirView(c *fiber.Ctx) error { Scrape.DirName = c.Params("+") Scrape.Branch = c.Params("branch") - UserAgent, ok := os.LookupEnv("GOTHUB_USER_AGENT") + UserAgent, ok := os.LookupEnv("GITLIN_USER_AGENT") if !ok { UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" } diff --git a/pages/explore.go b/pages/explore.go index 0606011..834bcfd 100644 --- a/pages/explore.go +++ b/pages/explore.go @@ -3,7 +3,7 @@ package pages import ( "github.com/gofiber/fiber/v2" - "codeberg.org/gothub/gothub/utils" + "gitler.moe/suwako/gitlin/utils" ) type Items struct { diff --git a/pages/fileview.go b/pages/fileview.go index 320babb..64f437e 100644 --- a/pages/fileview.go +++ b/pages/fileview.go @@ -3,7 +3,7 @@ package pages import ( "bufio" "bytes" - "codeberg.org/gothub/gothub/utils" + "gitler.moe/suwako/gitlin/utils" "context" "encoding/base64" htmlfmt "github.com/alecthomas/chroma/v2/formatters/html" diff --git a/pages/gist.go b/pages/gist.go index 350800c..72cec49 100644 --- a/pages/gist.go +++ b/pages/gist.go @@ -3,7 +3,7 @@ package pages import ( "bufio" "bytes" - "codeberg.org/gothub/gothub/utils" + "codeberg.org/gitlin/gitlin/utils" "context" htmlfmt "github.com/alecthomas/chroma/v2/formatters/html" "github.com/alecthomas/chroma/v2/lexers" @@ -54,7 +54,7 @@ func HandleGist(c *fiber.Ctx) error { // Scraping Scrape := Gist{} - UserAgent, ok := os.LookupEnv("GOTHUB_USER_AGENT") + UserAgent, ok := os.LookupEnv("GITLIN_USER_AGENT") if !ok { UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" } diff --git a/pages/index.go b/pages/index.go index 6796c61..35f5464 100644 --- a/pages/index.go +++ b/pages/index.go @@ -4,7 +4,7 @@ import ( "os" "runtime" - "codeberg.org/gothub/gothub/utils" + "gitler.moe/suwako/gitlin/utils" "github.com/gofiber/fiber/v2" ) @@ -15,6 +15,6 @@ func HandleIndex(c *fiber.Ctx) error { "version": utils.Version(), "fiberversion": fiber.Version, "goversion": runtime.Version(), - "setupstatus": os.Getenv("GOTHUB_SETUP_COMPLETE"), + "setupstatus": os.Getenv("GITLIN_SETUP_COMPLETE"), }) } diff --git a/pages/repo.go b/pages/repo.go index c7dc8d6..d645b92 100644 --- a/pages/repo.go +++ b/pages/repo.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "codeberg.org/gothub/gothub/utils" + "gitler.moe/suwako/gitlin/utils" "github.com/gocolly/colly" "github.com/gofiber/fiber/v2" ) @@ -60,7 +60,7 @@ func HandleRepo(c *fiber.Ctx) error { // Scraping Scrape := Repo{} - UserAgent, ok := os.LookupEnv("GOTHUB_USER_AGENT") + UserAgent, ok := os.LookupEnv("GITLIN_USER_AGENT") if !ok { UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" } diff --git a/pages/user.go b/pages/user.go index a96b2ce..83c2e56 100644 --- a/pages/user.go +++ b/pages/user.go @@ -4,7 +4,7 @@ import ( "os" "strings" - "codeberg.org/gothub/gothub/utils" + "gitler.moe/suwako/gitlin/utils" "github.com/enescakir/emoji" "github.com/gocolly/colly" "github.com/gofiber/fiber/v2" @@ -53,7 +53,7 @@ func HandleUser(c *fiber.Ctx) error { // Scraping Scrape := User{} - UserAgent, ok := os.LookupEnv("GOTHUB_USER_AGENT") + UserAgent, ok := os.LookupEnv("GITLIN_USER_AGENT") if !ok { UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" } diff --git a/public/assets/logo.png b/public/assets/logo.png new file mode 100644 index 0000000..5da05fe Binary files /dev/null and b/public/assets/logo.png differ diff --git a/public/assets/logo.svg b/public/assets/logo.svg deleted file mode 100644 index 9d07b03..0000000 --- a/public/assets/logo.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/css/global.css b/public/css/global.css index b01effb..5ce076b 100644 --- a/public/css/global.css +++ b/public/css/global.css @@ -1,10 +1,8 @@ -/* god bless you */ - :root { - --text: #fff; - --background: #252525; - --secondary-background: #353535; - --background-darker: #151515; + --text: #fcfcfc; + --background: #4b1a4f; + --secondary-background: #31363b; + --background-darker: #2f1b2e; --accent: #00b7c3; --yellow: #8B8000; color-scheme: dark; @@ -266,28 +264,6 @@ a:hover { background-color: var(--secondary-background); } -@media screen and (prefers-color-scheme: light) { - :root { - --text: #000; - --background: #ececec; - --secondary-background: #f5f5f5; - --background-darker: #dddddd; - --accent: #005ec3; - --yellow: #f5f5a5; - color-scheme: light; - } - a { - color: black; - } - a:hover { - color: #005ec3; - } - .explore-card { - background-color: var(--background); - color: #000; - } -} - @media screen and (max-width: 900px) { main { margin: 8px; diff --git a/serve/serve.go b/serve/serve.go index f71d6f0..ff27506 100644 --- a/serve/serve.go +++ b/serve/serve.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "codeberg.org/gothub/gothub/pages" - "codeberg.org/gothub/gothub/utils" + "gitler.moe/suwako/gitlin/pages" + "gitler.moe/suwako/gitlin/utils" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/cache" @@ -36,7 +36,7 @@ func Serve(port string) { app := fiber.New(fiber.Config{ Views: engine, Prefork: false, - AppName: "GotHub", + AppName: "Gitlin", // kind of screwed up way to fix rate limits EnableTrustedProxyCheck: true, TrustedProxies: []string{"0.0.0.0/0"}, @@ -92,7 +92,7 @@ func Serve(port string) { MaxAge: 31536000, } - proxying, ok := os.LookupEnv("GOTHUB_PROXYING_ENABLED") + proxying, ok := os.LookupEnv("GITLIN_PROXYING_ENABLED") if !ok { proxying = "true" } @@ -116,7 +116,7 @@ func Serve(port string) { app.Static("/css", "./public/css", staticConfig) app.Static("/robots.txt", "./public/robots.txt", staticConfig) app.Static("/favicon.ico", "./public/assets/favicon.ico", staticConfig) - app.Static("/logo.svg", "./public/assets/logo.svg", staticConfig) + app.Static("/logo.png", "./public/assets/logo.png", staticConfig) app.Get("/about", pages.HandleAbout) app.Get("/explore", ratelimiter, pages.HandleExplore) app.Get("/:user", pages.HandleUser) @@ -201,7 +201,7 @@ func Serve(port string) { }) }) - val, ok := os.LookupEnv("GOTHUB_PORT") + val, ok := os.LookupEnv("GITLIN_PORT") if !ok { val = "3000" } diff --git a/utils/getrequest.go b/utils/getrequest.go index b3ed646..788e3e9 100644 --- a/utils/getrequest.go +++ b/utils/getrequest.go @@ -13,7 +13,7 @@ func GetRequest(url string) gjson.Result { panic(err) } - UserAgent, ok := os.LookupEnv("GOTHUB_USER_AGENT") + UserAgent, ok := os.LookupEnv("GITLIN_USER_AGENT") if !ok { UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" } diff --git a/views/about.html b/views/about.html index fe30323..04aeb43 100644 --- a/views/about.html +++ b/views/about.html @@ -1,7 +1,7 @@ {{template "header" .}}
-

About this GotHub instance

+

About this Gitlin instance

{{ if .privacyInformation}} {{ range $key, $value := .privacyInformation}}

Instance Privacy

@@ -24,8 +24,8 @@ {{end}}

Additional Information

- GotHub version: - {{.Version}}

diff --git a/views/error.html b/views/error.html index f7b72e7..ee158f4 100644 --- a/views/error.html +++ b/views/error.html @@ -9,7 +9,7 @@
{{.error}}

Think this is a bug? - Create an issue on Codeberg. {{ if .link }} Or view this page on diff --git a/views/header.html b/views/header.html index 8d28837..876b5af 100644 --- a/views/header.html +++ b/views/header.html @@ -2,9 +2,9 @@ {{ if .title }} - {{ .title }} - GotHub + {{ .title }} - Gitlin {{ else }} - GotHub + Gitlin {{ end }} @@ -15,17 +15,17 @@ diff --git a/views/index.html b/views/index.html index 9d84f1a..285cf22 100644 --- a/views/index.html +++ b/views/index.html @@ -1,12 +1,15 @@ {{template "header" .}}
-

GotHub is an alternative front-end for GitHub.

+
+ Gitlin +

Gitlin

+
{{ if not .setupstatus }}
- GotHub is not set up! Please look at - this issue to see - how to set up GotHub, or set the GOTHUB_SETUP_COMPLETE environment variable + Gitlin is not set up! Please look at + this issue to see + how to set up Gitlin, or set the GITLIN_SETUP_COMPLETE environment variable to true to suppress this message. If you are a user of this instance, please contact the instance maintainer.
@@ -33,7 +36,7 @@ >If you care, you can read GitHub's privacy policy here (TOS;DR). - GotHub solves this by proxying all GitHub requests for you! + Gitlin solves this by proxying all GitHub requests for you!

Usage

@@ -47,7 +50,7 @@ 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. + Inc. Gitlin is not affiliated with GitHub, Inc.

This project was made as a "spiritual successor" to @@ -62,16 +65,16 @@ >

Credits

- Midou36O - desigining the GotHub logo + Midou36O - desigining the Gitlin logo

Arya - code contributions and maintainer

Info

- {{ if eq .version "unknown, please build with Go 1.13+ or use Git"}} GotHub - version: unknown {{ else }} GotHub version: - unknown {{ else }} Gitlin version: + {{ .version}} {{ end }} diff --git a/views/ratelimit_gt.html b/views/ratelimit_gt.html index 6f0fcd8..97299c0 100644 --- a/views/ratelimit_gt.html +++ b/views/ratelimit_gt.html @@ -6,7 +6,7 @@

Info

- GotHub has implemented ratelimits in order to prevent rate-limits by GitHub. + Gitlin has implemented ratelimits in order to prevent rate-limits by GitHub. You've been hit by the rate limiter.