From 5522ec8e99d7e73da3ba23ea27bfd1d989e9ab9e Mon Sep 17 00:00:00 2001 From: video-prize-ranch Date: Tue, 22 Mar 2022 16:56:27 -0400 Subject: [PATCH] Readd Redirector config --- pages/frontpage.go | 1 + static/css/frontpage.css | 5 +++++ views/frontpage.hbs | 29 +++++++++++++++++++++++------ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/pages/frontpage.go b/pages/frontpage.go index c964a03..b2d97a4 100644 --- a/pages/frontpage.go +++ b/pages/frontpage.go @@ -11,6 +11,7 @@ func HandleFrontpage(c *fiber.Ctx) error { c.Set("Content-Security-Policy", "default-src 'none'; style-src 'self'; img-src 'self'; font-src 'self'; block-all-mixed-content") return c.Render("frontpage", fiber.Map{ + "proto": c.Protocol(), "domain": c.Hostname(), }) } \ No newline at end of file diff --git a/static/css/frontpage.css b/static/css/frontpage.css index a592cd5..eb775ba 100644 --- a/static/css/frontpage.css +++ b/static/css/frontpage.css @@ -3,4 +3,9 @@ code { padding: 2px; border-radius: 4px; font-size: 0.9em; +} + +summary { + cursor: pointer; + user-select: none; } \ No newline at end of file diff --git a/views/frontpage.hbs b/views/frontpage.hbs index 3430550..fb17db5 100644 --- a/views/frontpage.hbs +++ b/views/frontpage.hbs @@ -3,9 +3,9 @@ rimgo - + {{> partials/head }} - + @@ -14,9 +14,11 @@ {{> partials/header }}
-

An alternative frontend for Imgur. Based on rimgu and rewritten in Go.

+

An alternative frontend for Imgur. Based on rimgu and rewritten in + Go.

-

It's read-only and works without JavaScript. Images and albums can be viewed without wasting resources from downloading and running tracking scripts. No sign-up nags.

+

It's read-only and works without JavaScript. Images and albums can be viewed without wasting resources from + downloading and running tracking scripts. No sign-up nags.

Try it!

@@ -38,8 +40,23 @@

Usage

- -

Just replace imgur.com or i.imgur.com with {{domain}}! You can setup automatic redirects using LibRedirect.

+ +

Just replace imgur.com or i.imgur.com with {{domain}}! You can setup automatic redirects using LibRedirect (recommended) or Redirector.

+ +
+
+ + Redirector configuration + +
    +
  • Description: Imgur -> rimgo
  • +
  • Example URL: https://imgur.com/a/H8M4rcp
  • +
  • Include pattern: ^https?://i?.?imgur.com(/.*)?$
  • +
  • Redirect to: {{proto}}://{{domain}}$2
  • +
  • Pattern type: Regular Expression
  • +
+
{{> partials/footer }}