Skip to content

Commit 8161532

Browse files
kahoona77cesmarvin
authored andcommitted
Merge branch 'release/v1.26.1-3'
2 parents c6218a0 + 58a46e2 commit 8161532

6 files changed

Lines changed: 81 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [v1.26.1-3] - 2024-08-06
11+
### Added
12+
- Default CSS Styles and Whitelabeling CSS Styles are being loaded now (#96)
13+
- similarly to the already existing warp-menu script and styles
14+
1015
## [v1.26.1-2] - 2024-07-01
1116
### Changed
1217
- Update base image to Version 3.20.1-2 (#92)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN wget --progress=bar:force:noscroll -O /tmp/theme.zip https://github.com/clou
6161
FROM registry.cloudogu.com/official/base:3.20.1-2
6262
LABEL maintainer="hello@cloudogu.com" \
6363
NAME="official/nginx" \
64-
VERSION="1.26.1-2"
64+
VERSION="1.26.1-3"
6565

6666
ENV CES_MAINTENANCE_MODE=false
6767

dogu.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "official/nginx",
3-
"Version": "1.26.1-2",
3+
"Version": "1.26.1-3",
44
"DisplayName": "Nginx",
55
"Description": "Nginx WebServer.",
66
"Logo": "https://cloudogu.com/images/dogus/nginx.png",

resources/etc/nginx/include.d/subfilters.conf.tpl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# warp menu
2-
set $scripts '<script type="text/javascript" src="/warpmenu/add-warp-menu.js"></script></body>';
2+
set $scripts '<script type="text/javascript" src="/warpmenu/add-warp-menu.js"></script>';
33

44
# Include google analytics scripts if a tracking id is set
55
{{ if .Config.Exists "google_tracking_id" }}
66
set $analytics '<script> var disableStr = "ga-disable-{{ .Config.Get "google_tracking_id" }}"; if (document.cookie.indexOf(disableStr + "=true") > -1) { window[disableStr] = true; }; function gaOptout() { document.cookie = disableStr + "=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/"; window[disableStr] = true; }</script><!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id={{ .Config.Get "google_tracking_id" }}"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag("js", new Date()); gtag("config", "{{ .Config.Get "google_tracking_id" }}", { "anonymize_ip": true }); </script> <link rel="stylesheet" type="text/css" href="https://cloudogu.com/css/cookieconsent.min.css" /> <script src="https://cloudogu.com/javascripts/cookieconsent.min.js"></script> <script> window.addEventListener("load", function(){ window.cookieconsent.initialise({ "palette": { "popup": { "background": "#23a3dd", "text": "#ffffff" }, "button": { "background": "#878787", "text": "#ffffff" } }, "content": { "message": "This website uses cookies to ensure you get the best experience on our website. By continuing to use our websites, you consent to the use of cookies.", "href": "/info/privacyPolicy", "link": "Our Privacy Policy", "dismiss": "Got it!" } })}); </script> ';
77
set $scripts '$analytics $scripts';
88
{{ end }}
99

10+
# include whitelabeling
11+
set $whitelabeling '<script type="text/javascript" src="/styles/add-whitelabeling-styles.js"></script>';
12+
set $scripts '$scripts $whitelabeling';
13+
14+
# add closing body-tag
15+
set $scripts '$scripts </body>';
16+
1017
# apply scripts only on GET or POST requests
1118
set $allowed_method 0;
1219
if ($request_method = GET){
@@ -26,9 +33,15 @@ if ($http_x_requested_with ~ XMLHttpRequest) {
2633

2734
# replace </body> with $scripts for html pages
2835
sub_filter '</body>' $scripts;
36+
2937
sub_filter_once on;
3038

3139
# warp menu
3240
location /warp {
3341
root /var/www/html;
3442
}
43+
44+
# default styles
45+
location /styles {
46+
root /var/www/html;
47+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const addWhitelabelClassToRoot = function () {
2+
document.documentElement.classList.add("ces-whitelabel")
3+
}
4+
5+
const addDefaultStyles = function () {
6+
const link = document.createElement("link");
7+
link.rel = "stylesheet";
8+
link.type = "text/css";
9+
link.href = "/styles/default.css"
10+
document.head.appendChild(link);
11+
}
12+
13+
const addWhitelabelingStyles = function(){
14+
const link = document.createElement("link");
15+
link.rel = "stylesheet";
16+
link.type = "text/css";
17+
link.href = "/whitelabeling/main.css"
18+
document.head.appendChild(link);
19+
}
20+
21+
addWhitelabelClassToRoot();
22+
addDefaultStyles();
23+
addWhitelabelingStyles();
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
:root {
2+
--ces-brand-stronger: #003250;
3+
--ces-brand-strong: #00426B;
4+
--ces-brand: #00629E;
5+
--ces-brand-weak: #9EDAFF;
6+
--ces-brand-weaker: #D4EDFC;
7+
8+
--ces-success-stronger: #0A2913;
9+
--ces-success-strong: #145226;
10+
--ces-success: #1F7A38;
11+
--ces-success-weak: #85E09E;
12+
--ces-success-weaker: #EBFAEF;
13+
14+
--ces-danger-stronger: #521414;
15+
--ces-danger-strong: #7A1F1F;
16+
--ces-danger: #CC3333;
17+
--ces-danger-weak: #EBADAD;
18+
--ces-danger-weaker: #F8EDED;
19+
20+
--ces-warning-stronger: #3D3700;
21+
--ces-warning-strong: #574E00;
22+
--ces-warning: #707600;
23+
--ces-warning-weak: #FFE500;
24+
--ces-warning-weaker: #FFFACC;
25+
26+
--ces-neutral-stronger: #333333;
27+
--ces-neutral-strong: #4D4D4D;
28+
--ces-neutral: #666666;
29+
--ces-neutral-weak: #CCCCCC;
30+
--ces-neutral-weaker: #F5F5F5;
31+
32+
--ces-default-background: #FFFFFF;
33+
--ces-default-focus-inner: #FFFFFF;
34+
--ces-default-focus-outer: #CC14CC;
35+
--ces-default-text: #0D1C26;
36+
--ces-inverted-text: #FCFCFD;
37+
}

0 commit comments

Comments
 (0)