From 9147fe33cbff58cecfc817c1e1d6ae9ba332ee60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=20one=20with=20the=20braid=20=28she/her=29=20=7C=20D?= =?UTF-8?q?=D1=84=D2=BF=20mit=20dem=20Zopf=20=28sie/ihr=29?= Date: Sun, 12 Sep 2021 10:17:13 +0200 Subject: [PATCH] Added some more customization options (#43) * Added some more customization options * Fixed inconsistent height of custom logos * Extended navbar style to login page --- README.md | 1 + assets/css/custom.css | 5 +++++ assets/css/signin.css | 5 +++++ assets/tpl/index.html | 2 +- assets/tpl/login.html | 4 ++-- internal/server/configuration.go | 2 ++ internal/server/server.go | 2 +- 7 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3007977..998c888 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ The following configuration options are available: | WEBSITE_TITLE | title | core | WireGuard VPN | The website title. | | COMPANY_NAME | company | core | WireGuard Portal | The company name (for branding). | | MAIL_FROM | mailFrom | core | WireGuard VPN | The email address from which emails are sent. | +| LOGO_URL | logoUrl | core | /img/header-logo.png | The logo displayed in the page's header. | | ADMIN_USER | adminUser | core | admin@wgportal.local | The administrator user. Must be a valid email address. | | ADMIN_PASS | adminPass | core | wgportal | The administrator password. If unchanged, a random password will be set on first startup. | | EDITABLE_KEYS | editableKeys | core | true | Allow to edit key-pairs in the UI. | diff --git a/assets/css/custom.css b/assets/css/custom.css index 5a7d603..5a6294c 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -64,6 +64,11 @@ pre{background:#f7f7f9}iframe{overflow:hidden;border:none}@media (min-width: 768 padding: 0.5rem 1rem; } +.navbar-brand > img { + height: 2rem; + width: auto; +} + .disabled-peer { color: #d03131; } diff --git a/assets/css/signin.css b/assets/css/signin.css index 8479bf2..cf8c8ea 100644 --- a/assets/css/signin.css +++ b/assets/css/signin.css @@ -1,3 +1,8 @@ .navbar { padding: 0.5rem 1rem; +} + +.navbar-brand > img { + height: 2rem; + width: auto; } \ No newline at end of file diff --git a/assets/tpl/index.html b/assets/tpl/index.html index c5ac342..10d93c5 100644 --- a/assets/tpl/index.html +++ b/assets/tpl/index.html @@ -15,7 +15,7 @@ {{template "prt_nav.html" .}}
{{template "prt_flashes.html" .}}

WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN.

diff --git a/assets/tpl/login.html b/assets/tpl/login.html index 15b3287..93a36ac 100644 --- a/assets/tpl/login.html +++ b/assets/tpl/login.html @@ -30,8 +30,8 @@