Skip to content

Commit 68d6a2c

Browse files
Refactor cookie consent theme.
1 parent d880bb1 commit 68d6a2c

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

workshops/lab-cookie-consent/workshop/content/00-workshop-overview.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ command: curl -L -o cookieconsent.css https://cdn.jsdelivr.net/gh/orestbida/cook
1414
command: curl -L -o cookieconsent.umd.js https://cdn.jsdelivr.net/gh/orestbida/[email protected]/dist/cookieconsent.umd.js
1515
```
1616

17-
Create `.css` and `.js` files for the training portal.
17+
Create `.html` file to be embedded in head section of HTML files.
1818

1919
```terminal:execute
20-
command: cat cookieconsent.css > training-portal.css
20+
command: |
21+
cat << EOF > training-portal.html
22+
<link rel="stylesheet" href="/static/workshops/theme/cookieconsent.css">
23+
<script type="text/javascript" src="/static/workshops/theme/cookieconsent.umd.js"></script>
24+
EOF
2125
```
2226

23-
```terminal:execute
24-
command: cat cookieconsent.umd.js > training-portal.js
25-
```
27+
Create `.js` file defining configuration for CookieConsent package.
2628

2729
```terminal:execute
2830
command: |
29-
cat << EOF >> training-portal.js
31+
cat << EOF > training-portal.js
3032
/**
3133
* All config. options available here:
3234
* https://cookieconsent.orestbida.com/reference/configuration-reference.html
@@ -95,9 +97,11 @@ command: kubectl create ns educates-themes
9597
```
9698

9799
```terminal:execute
98-
command: kubectl create secret generic cookieconsent-theme -n educates-themes --from-file=training-portal.css --from-file=training-portal.js
100+
command: kubectl create secret generic cookieconsent-theme -n educates-themes --from-file=cookieconsent.css --from-file=cookieconsent.umd.js --from-file=training-portal.html --from-file=training-portal.js
99101
```
100102

103+
Create the Educates configuration including the website styling section to set the theme.
104+
101105
```editor:append-lines-to-file
102106
file: ~/config.yaml
103107
text: |
@@ -132,14 +136,20 @@ text: |
132136
namespace: educates-themes
133137
```
134138

139+
Install Educates.
140+
135141
```terminal:execute
136142
command: educates admin cluster install --config config.yaml
137143
```
138144

145+
Deploy a workshop.
146+
139147
```terminal:execute
140148
command: educates deploy-workshop -f https://github.com/vmware-tanzu-labs/lab-k8s-fundamentals/releases/latest/download/workshop.yaml
141149
```
142150

151+
Access the training portal. Run a second time if the browser blocks popup the first time.
152+
143153
```terminal:execute
144154
command: educates browse-workshops
145155
```

0 commit comments

Comments
 (0)