diff --git a/app/http/endpoints/root/index.go b/app/http/endpoints/root/index.go index 4214cd7..3d6d746 100644 --- a/app/http/endpoints/root/index.go +++ b/app/http/endpoints/root/index.go @@ -18,8 +18,10 @@ func IndexHandler(ctx *gin.Context) { } ctx.HTML(200, "main/index", gin.H{ - "name": store.Get("name").(string), - "baseurl": config.Conf.Server.BaseUrl, - "avatar": store.Get("avatar").(string), + "name": store.Get("name").(string), + "baseurl": config.Conf.Server.BaseUrl, + "avatar": store.Get("avatar").(string), + "referralShow": config.Conf.Referral.Show, + "referralLink": config.Conf.Referral.Link, }) } diff --git a/app/http/endpoints/root/whitelabel.go b/app/http/endpoints/root/whitelabel.go index c0be63c..e6b8974 100644 --- a/app/http/endpoints/root/whitelabel.go +++ b/app/http/endpoints/root/whitelabel.go @@ -38,5 +38,7 @@ func WhitelabelHandler(ctx *gin.Context) { "name": store.Get("name").(string), "baseurl": config.Conf.Server.BaseUrl, "avatar": store.Get("avatar").(string), + "referralShow": config.Conf.Referral.Show, + "referralLink": config.Conf.Referral.Link, }) } diff --git a/config/config.go b/config/config.go index dcd5da8..faf3554 100644 --- a/config/config.go +++ b/config/config.go @@ -18,6 +18,7 @@ type ( Bot Bot Redis Redis Cache Cache + Referral Referral } Server struct { @@ -68,6 +69,11 @@ type ( Cache struct { Uri string } + + Referral struct { + Show bool + Link string + } ) var ( @@ -113,6 +119,7 @@ func fromEnvvar() { oauthId, _ := strconv.ParseUint(os.Getenv("OAUTH_ID"), 10, 64) redisPort, _ := strconv.Atoi(os.Getenv("REDIS_PORT")) redisThreads, _ := strconv.Atoi(os.Getenv("REDIS_THREADS")) + showReferral, _ := strconv.ParseBool(os.Getenv("REFERRAL_SHOW")) Conf = Config{ Admins: admins, @@ -156,5 +163,9 @@ func fromEnvvar() { Cache: Cache{ Uri: os.Getenv("CACHE_URI"), }, + Referral: Referral{ + Show: showReferral, + Link: os.Getenv("REFERRAL_LINK"), + }, } } diff --git a/envvars.md b/envvars.md index 215d8e0..d77a239 100644 --- a/envvars.md +++ b/envvars.md @@ -21,4 +21,6 @@ - REDIS_PORT - REDIS_PASSWORD - REDIS_THREADS -- CACHE_URI \ No newline at end of file +- CACHE_URI +- REFERRAL_SHOW +- REFERRAL_LINK \ No newline at end of file diff --git a/public/static/css/style.css b/public/static/css/style.css index c61c35d..d405756 100644 --- a/public/static/css/style.css +++ b/public/static/css/style.css @@ -26,16 +26,55 @@ html > ::-webkit-scrollbar { display: none; } -.sidebar { - display: inline-flex; +.csidebar { + display: flex; + flex-direction: column; height: 100%; width: 16.6%; - background-color: #4C566A; + background-color: #272727; float: left; background-size: cover; overflow-x: hidden !important; } +.sidebar-element { + display: flex; + align-items: center; + flex-basis: 100%; + width: 100%; + cursor: pointer; + padding: 5px 0 5px 0; +} + +.sidebar-element:hover { + background-color: #121212; + transition: background-color 0.5s ease; +} + +#referral-image { + max-height: 70px; + max-width: 90%; +} + +.sidebar-element > a { + display: flex; + align-items: center; + width: 100%; + color: white !important; + font-size: 18px; + margin-left: 2%; +} + +.sidebar-text { + margin-left: 4%; + display: flex; + align-items: center; +} + +#sidebar-nav { + flex: 1; +} + .sidebar-bottom { position: absolute !important; width: 100%; @@ -45,6 +84,20 @@ html > ::-webkit-scrollbar { color: white !important; } +.super-container { + display: flex; +} + +.content { + width: 100%; +} + +.content-container { + display: flex; + width: 100%; + margin: 4%; +} + .filterCard { cursor: pointer; } diff --git a/public/static/img/referral.png b/public/static/img/referral.png new file mode 100644 index 0000000..a3cf197 Binary files /dev/null and b/public/static/img/referral.png differ diff --git a/public/static/img/sidebar-2.jpg b/public/static/img/sidebar-2.jpg deleted file mode 100644 index 146abe8..0000000 Binary files a/public/static/img/sidebar-2.jpg and /dev/null differ diff --git a/public/templates/includes/sidebar.tmpl b/public/templates/includes/sidebar.tmpl index 1c53a35..144c712 100644 --- a/public/templates/includes/sidebar.tmpl +++ b/public/templates/includes/sidebar.tmpl @@ -1,33 +1,40 @@ {{define "sidebar"}} - + {{end}} \ No newline at end of file diff --git a/public/templates/layouts/main.tmpl b/public/templates/layouts/main.tmpl index d4306b9..733d08a 100644 --- a/public/templates/layouts/main.tmpl +++ b/public/templates/layouts/main.tmpl @@ -6,12 +6,13 @@
{{template "sidebar" .}} - {{template "sidebar" .}} -
+
{{template "loadingscreen" .}} {{template "notifymodal" .}} - {{template "content" .}} +
+ {{template "content" .}} +
diff --git a/public/templates/views/index.tmpl b/public/templates/views/index.tmpl index 8a5259b..979717d 100644 --- a/public/templates/views/index.tmpl +++ b/public/templates/views/index.tmpl @@ -1,28 +1,22 @@ {{define "content"}}
-
-
-
-
-
-

Servers

+
+
+

Servers

+
+
+
+
+
+ + Invite to your server
-
-
-
-
- - Invite to your server -
-
+
-
- -
-
-
+
+
@@ -30,97 +24,97 @@
{{end}} \ No newline at end of file