Skip to content

Commit 6ce2170

Browse files
committed
feat: work more on theme support.
1 parent 961b11b commit 6ce2170

File tree

10 files changed

+145
-403
lines changed

10 files changed

+145
-403
lines changed

blueprint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,15 @@ depend() {
163163

164164
# Assign variables for extension flags.
165165
assignflags() {
166+
F_experimentalThemecolors=false
166167
F_ignorePlaceholders=false
167168
F_forceLegacyPlaceholders=false
168169
F_developerIgnoreInstallScript=false
169170
F_developerIgnoreRebuild=false
170171
F_developerKeepApplicationCache=false
171172
F_developerEscalateInstallScript=false
172173
F_developerEscalateExportScript=false
174+
if [[ ( $flags == *"experimentalThemecolors,"* ) || ( $flags == *"experimentalThemecolors" ) ]]; then F_experimentalThemecolors=true ;fi
173175
if [[ ( $flags == *"ignorePlaceholders,"* ) || ( $flags == *"ignorePlaceholders" ) ]]; then F_ignorePlaceholders=true ;fi
174176
if [[ ( $flags == *"forceLegacyPlaceholders,"* ) || ( $flags == *"forceLegacyPlaceholders" ) ]]; then F_forceLegacyPlaceholders=true ;fi
175177
if [[ ( $flags == *"developerIgnoreInstallScript,"* ) || ( $flags == *"developerIgnoreInstallScript" ) ]]; then F_developerIgnoreInstallScript=true ;fi

resources/scripts/assets/css/GlobalStylesheet.ts

Lines changed: 0 additions & 304 deletions
Original file line numberDiff line numberDiff line change
@@ -2,310 +2,6 @@ import tw from 'twin.macro';
22
import { createGlobalStyle } from 'styled-components/macro';
33

44
export default createGlobalStyle`
5-
:root {
6-
--blueprint-white: 255 255 255;
7-
--blueprint-black: 19 26 32;
8-
9-
--blueprint-primary: var(--blueprint-primary-500);
10-
--blueprint-primary-50: var(--blueprint-blue-50);
11-
--blueprint-primary-100: var(--blueprint-blue-100);
12-
--blueprint-primary-200: var(--blueprint-blue-200);
13-
--blueprint-primary-300: var(--blueprint-blue-300);
14-
--blueprint-primary-400: var(--blueprint-blue-400);
15-
--blueprint-primary-500: var(--blueprint-blue-500);
16-
--blueprint-primary-600: var(--blueprint-blue-600);
17-
--blueprint-primary-700: var(--blueprint-blue-700);
18-
--blueprint-primary-800: var(--blueprint-blue-800);
19-
--blueprint-primary-900: var(--blueprint-blue-900);
20-
--blueprint-primary-950: var(--blueprint-blue-950);
21-
22-
--blueprint-neutral: var(--blueprint-neutral-500);
23-
--blueprint-neutral-50: var(--blueprint-gray-50);
24-
--blueprint-neutral-100: var(--blueprint-gray-100);
25-
--blueprint-neutral-200: var(--blueprint-gray-200);
26-
--blueprint-neutral-300: var(--blueprint-gray-300);
27-
--blueprint-neutral-400: var(--blueprint-gray-400);
28-
--blueprint-neutral-500: var(--blueprint-gray-500);
29-
--blueprint-neutral-600: var(--blueprint-gray-600);
30-
--blueprint-neutral-700: var(--blueprint-gray-700);
31-
--blueprint-neutral-800: var(--blueprint-gray-800);
32-
--blueprint-neutral-900: var(--blueprint-gray-900);
33-
--blueprint-neutral-950: var(--blueprint-gray-950);
34-
35-
--blueprint-slate: var(--blueprint-slate-500);
36-
--blueprint-slate-50: 248 250 252;
37-
--blueprint-slate-100: 241 245 249;
38-
--blueprint-slate-200: 226 232 240;
39-
--blueprint-slate-300: 203 213 225;
40-
--blueprint-slate-400: 148 163 184;
41-
--blueprint-slate-500: 100 116 139;
42-
--blueprint-slate-600: 71 85 105;
43-
--blueprint-slate-700: 51 65 85;
44-
--blueprint-slate-800: 30 41 59;
45-
--blueprint-slate-900: 15 23 42;
46-
--blueprint-slate-950: 2 6 23;
47-
48-
--blueprint-gray: var(--blueprint-gray-500);
49-
--blueprint-gray-50: 245 247 250;
50-
--blueprint-gray-100: 229 232 235;
51-
--blueprint-gray-200: 202 209 216;
52-
--blueprint-gray-300: 154 165 177;
53-
--blueprint-gray-400: 123 135 147;
54-
--blueprint-gray-500: 96 109 123;
55-
--blueprint-gray-600: 81 95 108;
56-
--blueprint-gray-700: 63 77 90;
57-
--blueprint-gray-800: 51 64 77;
58-
--blueprint-gray-900: 31 41 51;
59-
--blueprint-gray-950: 3 7 18;
60-
61-
--blueprint-zinc: var(--blueprint-zinc-500);
62-
--blueprint-zinc-50: 250 250 250;
63-
--blueprint-zinc-100: 244 244 245;
64-
--blueprint-zinc-200: 228 228 231;
65-
--blueprint-zinc-300: 212 212 216;
66-
--blueprint-zinc-400: 161 161 170;
67-
--blueprint-zinc-500: 113 113 122;
68-
--blueprint-zinc-600: 82 82 91;
69-
--blueprint-zinc-700: 63 63 70;
70-
--blueprint-zinc-800: 39 39 42;
71-
--blueprint-zinc-900: 24 24 27;
72-
--blueprint-zinc-950: 9 9 11;
73-
74-
--blueprint-stone: var(--blueprint-stone-500);
75-
--blueprint-stone-50: 250 250 249;
76-
--blueprint-stone-100: 245 245 244;
77-
--blueprint-stone-200: 231 229 228;
78-
--blueprint-stone-300: 214 211 209;
79-
--blueprint-stone-400: 168 162 158;
80-
--blueprint-stone-500: 120 113 108;
81-
--blueprint-stone-600: 87 83 78;
82-
--blueprint-stone-700: 68 64 60;
83-
--blueprint-stone-800: 41 37 36;
84-
--blueprint-stone-900: 28 25 23;
85-
--blueprint-stone-950: 12 10 9;
86-
87-
--blueprint-red: var(--blueprint-red-500);
88-
--blueprint-red-50: 254 242 242;
89-
--blueprint-red-100: 254 226 226;
90-
--blueprint-red-200: 254 202 202;
91-
--blueprint-red-300: 252 165 165;
92-
--blueprint-red-400: 248 113 113;
93-
--blueprint-red-500: 239 68 68;
94-
--blueprint-red-600: 220 38 38;
95-
--blueprint-red-700: 185 28 28;
96-
--blueprint-red-800: 153 27 27;
97-
--blueprint-red-900: 127 29 29;
98-
--blueprint-red-950: 69 10 10;
99-
100-
--blueprint-orange: var(--blueprint-orange-500);
101-
--blueprint-orange-50: 255 247 237;
102-
--blueprint-orange-100: 255 237 213;
103-
--blueprint-orange-200: 254 215 170;
104-
--blueprint-orange-300: 253 186 116;
105-
--blueprint-orange-400: 251 146 60;
106-
--blueprint-orange-500: 249 115 22;
107-
--blueprint-orange-600: 234 88 12;
108-
--blueprint-orange-700: 194 65 12;
109-
--blueprint-orange-800: 154 52 18;
110-
--blueprint-orange-900: 124 45 18;
111-
--blueprint-orange-950: 67 20 7;
112-
113-
--blueprint-amber: var(--blueprint-amber-500);
114-
--blueprint-amber-50: 255 251 235;
115-
--blueprint-amber-100: 254 243 199;
116-
--blueprint-amber-200: 253 230 138;
117-
--blueprint-amber-300: 252 211 77;
118-
--blueprint-amber-400: 251 191 36;
119-
--blueprint-amber-500: 245 158 11;
120-
--blueprint-amber-600: 217 119 6;
121-
--blueprint-amber-700: 180 83 9;
122-
--blueprint-amber-800: 146 64 14;
123-
--blueprint-amber-900: 120 53 15;
124-
--blueprint-amber-950: 69 26 3;
125-
126-
--blueprint-yellow: var(--blueprint-yellow-400);
127-
--blueprint-yellow-50: 254 252 232;
128-
--blueprint-yellow-100: 254 249 195;
129-
--blueprint-yellow-200: 254 240 138;
130-
--blueprint-yellow-300: 253 224 71;
131-
--blueprint-yellow-400: 250 204 21;
132-
--blueprint-yellow-500: 234 179 8;
133-
--blueprint-yellow-600: 202 138 4;
134-
--blueprint-yellow-700: 161 98 7;
135-
--blueprint-yellow-800: 133 77 14;
136-
--blueprint-yellow-900: 113 63 18;
137-
--blueprint-yellow-950: 66 32 6;
138-
139-
--blueprint-lime: var(--blueprint-lime-400);
140-
--blueprint-lime-50: 247 254 231;
141-
--blueprint-lime-100: 236 252 203;
142-
--blueprint-lime-200: 217 249 157;
143-
--blueprint-lime-300: 190 242 100;
144-
--blueprint-lime-400: 163 230 53;
145-
--blueprint-lime-500: 132 204 22;
146-
--blueprint-lime-600: 101 163 13;
147-
--blueprint-lime-700: 77 124 15;
148-
--blueprint-lime-800: 63 98 18;
149-
--blueprint-lime-900: 54 83 20;
150-
--blueprint-lime-950: 26 46 5;
151-
152-
--blueprint-green: var(--blueprint-green-500);
153-
--blueprint-green-50: 240 253 244;
154-
--blueprint-green-100: 220 252 231;
155-
--blueprint-green-200: 187 247 208;
156-
--blueprint-green-300: 134 239 172;
157-
--blueprint-green-400: 74 222 128;
158-
--blueprint-green-500: 34 197 94;
159-
--blueprint-green-600: 22 163 74;
160-
--blueprint-green-700: 21 128 61;
161-
--blueprint-green-800: 22 101 52;
162-
--blueprint-green-900: 20 83 45;
163-
--blueprint-green-950: 5 46 22;
164-
165-
--blueprint-emerald: var(--blueprint-emerald-500);
166-
--blueprint-emerald-50: 236 253 245;
167-
--blueprint-emerald-100: 209 250 229;
168-
--blueprint-emerald-200: 167 243 208;
169-
--blueprint-emerald-300: 110 231 183;
170-
--blueprint-emerald-400: 52 211 153;
171-
--blueprint-emerald-500: 16 185 129;
172-
--blueprint-emerald-600: 5 150 105;
173-
--blueprint-emerald-700: 4 120 87;
174-
--blueprint-emerald-800: 6 95 70;
175-
--blueprint-emerald-900: 6 78 59;
176-
--blueprint-emerald-950: 2 44 34;
177-
178-
--blueprint-teal: var(--blueprint-teal-500);
179-
--blueprint-teal-50: 240 253 250;
180-
--blueprint-teal-100: 204 251 241;
181-
--blueprint-teal-200: 153 246 228;
182-
--blueprint-teal-300: 94 234 212;
183-
--blueprint-teal-400: 45 212 191;
184-
--blueprint-teal-500: 20 184 166;
185-
--blueprint-teal-600: 13 148 136;
186-
--blueprint-teal-700: 15 118 110;
187-
--blueprint-teal-800: 17 94 89;
188-
--blueprint-teal-900: 19 78 74;
189-
--blueprint-teal-950: 4 47 46;
190-
191-
--blueprint-cyan: var(--blueprint-cyan-400);
192-
--blueprint-cyan-50: 236 254 255;
193-
--blueprint-cyan-100: 207 250 254;
194-
--blueprint-cyan-200: 165 243 252;
195-
--blueprint-cyan-300: 103 232 249;
196-
--blueprint-cyan-400: 34 211 238;
197-
--blueprint-cyan-500: 6 182 212;
198-
--blueprint-cyan-600: 8 145 178;
199-
--blueprint-cyan-700: 14 116 144;
200-
--blueprint-cyan-800: 21 94 117;
201-
--blueprint-cyan-900: 22 78 99;
202-
--blueprint-cyan-950: 8 51 68;
203-
204-
--blueprint-sky: var(--blueprint-sky-400);
205-
--blueprint-sky-50: 240 249 255;
206-
--blueprint-sky-100: 224 242 254;
207-
--blueprint-sky-200: 186 230 253;
208-
--blueprint-sky-300: 125 211 252;
209-
--blueprint-sky-400: 56 189 248;
210-
--blueprint-sky-500: 14 165 233;
211-
--blueprint-sky-600: 2 132 199;
212-
--blueprint-sky-700: 3 105 161;
213-
--blueprint-sky-800: 7 89 133;
214-
--blueprint-sky-900: 12 74 110;
215-
--blueprint-sky-950: 8 47 73;
216-
217-
--blueprint-blue: var(--blueprint-blue-500);
218-
--blueprint-blue-50: 239 246 255;
219-
--blueprint-blue-100: 219 234 254;
220-
--blueprint-blue-200: 191 219 254;
221-
--blueprint-blue-300: 147 197 253;
222-
--blueprint-blue-400: 96 165 250;
223-
--blueprint-blue-500: 59 130 246;
224-
--blueprint-blue-600: 37 99 235;
225-
--blueprint-blue-700: 29 78 216;
226-
--blueprint-blue-800: 30 64 175;
227-
--blueprint-blue-900: 30 58 138;
228-
--blueprint-blue-950: 23 37 84;
229-
230-
--blueprint-indigo: var(--blueprint-indigo-400);
231-
--blueprint-indigo-50: 238 242 255;
232-
--blueprint-indigo-100: 224 231 255;
233-
--blueprint-indigo-200: 199 210 254;
234-
--blueprint-indigo-300: 165 180 252;
235-
--blueprint-indigo-400: 129 140 248;
236-
--blueprint-indigo-500: 99 102 241;
237-
--blueprint-indigo-600: 79 70 229;
238-
--blueprint-indigo-700: 67 56 202;
239-
--blueprint-indigo-800: 55 48 163;
240-
--blueprint-indigo-900: 49 46 129;
241-
--blueprint-indigo-950: 30 27 75;
242-
243-
--blueprint-violet: var(--blueprint-violet-500);
244-
--blueprint-violet-50: 245 243 255;
245-
--blueprint-violet-100: 237 233 254;
246-
--blueprint-violet-200: 221 214 254;
247-
--blueprint-violet-300: 196 181 253;
248-
--blueprint-violet-400: 167 139 250;
249-
--blueprint-violet-500: 139 92 246;
250-
--blueprint-violet-600: 124 58 237;
251-
--blueprint-violet-700: 109 40 217;
252-
--blueprint-violet-800: 91 33 182;
253-
--blueprint-violet-900: 76 29 149;
254-
--blueprint-violet-950: 46 16 101;
255-
256-
--blueprint-purple: var(--blueprint-purple-600);
257-
--blueprint-purple-50: 245 243 255;
258-
--blueprint-purple-100: 243 232 255;
259-
--blueprint-purple-200: 233 213 255;
260-
--blueprint-purple-300: 216 180 254;
261-
--blueprint-purple-400: 192 132 252;
262-
--blueprint-purple-500: 168 85 247;
263-
--blueprint-purple-600: 147 51 234;
264-
--blueprint-purple-700: 126 34 206;
265-
--blueprint-purple-800: 107 33 168;
266-
--blueprint-purple-900: 88 28 135;
267-
--blueprint-purple-950: 59 7 100;
268-
269-
--blueprint-fuchsia: var(--blueprint-fuchsia-500);
270-
--blueprint-fuchsia-50: 253 244 255;
271-
--blueprint-fuchsia-100: 250 232 255;
272-
--blueprint-fuchsia-200: 245 208 254;
273-
--blueprint-fuchsia-300: 240 171 252;
274-
--blueprint-fuchsia-400: 232 121 249;
275-
--blueprint-fuchsia-500: 217 70 239;
276-
--blueprint-fuchsia-600: 192 38 211;
277-
--blueprint-fuchsia-700: 162 28 175;
278-
--blueprint-fuchsia-800: 134 25 143;
279-
--blueprint-fuchsia-900: 112 26 117;
280-
--blueprint-fuchsia-950: 74 4 78;
281-
282-
--blueprint-pink: var(--blueprint-pink-500);
283-
--blueprint-pink-50: 253 242 248;
284-
--blueprint-pink-100: 252 231 243;
285-
--blueprint-pink-200: 251 207 232;
286-
--blueprint-pink-300: 249 168 212;
287-
--blueprint-pink-400: 244 114 182;
288-
--blueprint-pink-500: 236 72 153;
289-
--blueprint-pink-600: 219 39 119;
290-
--blueprint-pink-700: 190 24 93;
291-
--blueprint-pink-800: 157 23 77;
292-
--blueprint-pink-900: 131 24 67;
293-
--blueprint-pink-950: 80 7 36;
294-
295-
--blueprint-rose: var(--blueprint-rose-500);
296-
--blueprint-rose-50: 255 241 242;
297-
--blueprint-rose-100: 255 228 230;
298-
--blueprint-rose-200: 254 205 211;
299-
--blueprint-rose-300: 253 164 175;
300-
--blueprint-rose-400: 251 113 133;
301-
--blueprint-rose-500: 244 63 94;
302-
--blueprint-rose-600: 225 29 72;
303-
--blueprint-rose-700: 190 18 60;
304-
--blueprint-rose-800: 159 18 57;
305-
--blueprint-rose-900: 136 19 55;
306-
--blueprint-rose-950: 76 5 25;
307-
}
308-
3095
body {
3106
${tw`font-sans bg-neutral-800 text-neutral-200`};
3117
letter-spacing: 0.015em;

resources/scripts/blueprint/css/BlueprintStylesheet.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import url('./extensions.css');
1+
@import url('./extensions_colors_experiment.css');
22

33
:root {
44
--blueprint-white: 255 255 255;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
1+
/*
22
This file stores dashboard stylesheets for
33
Blueprint extensions.
44
55
Learn more at https://blueprint.zip
6-
*/
6+
*/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
This file stores dashboard stylesheets for
3+
Blueprint extensions.
4+
5+
Learn more at https://blueprint.zip
6+
*/

resources/scripts/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import App from '@/components/App';
44
import { setConfig } from 'react-hot-loader';
55

66
import './blueprint/css/extensions.css';
7+
import './blueprint/css/BlueprintStylesheet.css';
78

89
// Enable language support.
910
import './i18n';

scripts/commands/extensions/install.sh

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,14 +1144,33 @@ InstallExtension() {
11441144
PRINT INFO "Cloning and linking admin css.."
11451145
sed -i "s~@import url(/assets/extensions/$identifier/admin.style.css);~~g" ".blueprint/extensions/blueprint/assets/admin.extensions.css"
11461146
echo -e "@import url(/assets/extensions/$identifier/admin.style.css);" >> ".blueprint/extensions/blueprint/assets/admin.extensions.css"
1147+
11471148
cp ".blueprint/tmp/$n/$admin_css" ".blueprint/extensions/$identifier/assets/admin.style.css"
11481149
fi
1150+
11491151
if [[ $dashboard_css != "" ]]; then
11501152
PRINT INFO "Cloning and linking dashboard css.."
11511153
YARN="y"
1154+
1155+
# Handle experimental theme colors flag
1156+
# Throw extension dashboard.css to extensions_colors_experiment.css
1157+
local DASHBOARDCSS_FILE
1158+
DASHBOARDCSS_FILE="resources/scripts/blueprint/css/extensions.css"
1159+
if [[ $F_experimentalThemecolors == true ]]; then
1160+
PRINT WARNING "Experimental theme colors flag enabled, linking to extensions_colors_experiment.css"
1161+
DASHBOARDCSS_FILE="resources/scripts/blueprint/css/extensions_colors_experiment.css"
1162+
fi
1163+
11521164
sed -i "s~@import url(./imported/$identifier.css);~~g" "resources/scripts/blueprint/css/extensions.css"
1153-
echo -e "@import url(./imported/$identifier.css);" >> "resources/scripts/blueprint/css/extensions.css"
1154-
cp ".blueprint/tmp/$n/$dashboard_css" "resources/scripts/blueprint/css/imported/$identifier.css"
1165+
sed -i "s~@import url(./imported/$identifier.css);~~g" "resources/scripts/blueprint/css/extensions_colors_experiment.css"
1166+
echo -e -n "@import url(./imported/$identifier.css);" >> "$DASHBOARDCSS_FILE"
1167+
1168+
cp ".blueprint/tmp/$n/$dashboard_css" ".blueprint/extensions/$identifier/dashboard.css"
1169+
if [[ $DUPLICATE != "y" ]]; then
1170+
ln -s -r -T ".blueprint/extensions/$identifier/dashboard.css" "$FOLDER/resources/scripts/blueprint/css/imported/$identifier.css"
1171+
fi
1172+
1173+
unset DASHBOARDCSS_FILE
11551174
fi
11561175

11571176
((PROGRESS_NOW++))

0 commit comments

Comments
 (0)