Skip to content

Commit 02516bb

Browse files
committed
Add calendar icon and fix menu colours
1 parent 31166ed commit 02516bb

File tree

7 files changed

+24
-5
lines changed

7 files changed

+24
-5
lines changed

bin/generate_colours.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ var namespaces = [
2828
"shape",
2929
"geolocation",
3030
"size",
31-
"text"
31+
"text",
32+
"date"
3233
];
3334

3435
var typeToNamespace = {
@@ -50,7 +51,8 @@ var typeToNamespace = {
5051
"string": "string",
5152
"geolocation": "geolocation",
5253
"size": "size",
53-
"motion": "motion"
54+
"motion": "motion",
55+
"date": "date"
5456
}
5557

5658
/* For 23 namespaces we want to scatter them across the hsl wheel

css/app.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ wb-accordion.geolocation > header:after{ background-color: hsl(300, 50%, 75%); }
226226
wb-accordion.size > header:after{ background-color: hsl(45, 50%, 50%); }
227227
wb-accordion.text > header:after{ background-color: hsl(150, 50%, 50%); }
228228
wb-accordion.vector > header:after{ background-color: hsl(75, 50%, 50%); }
229-
229+
wb-accordion.date > header:after{ background-color: hsl(55, 76%, 70%); }
230230

231231
/* Prevent selecting text while dragging */
232232
.dragging *{

css/block.css

+2
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ wb-value[type*=rect] > input{background-image: url(../images/icon/rect.svg);}
233233
wb-value[type*=string] > input{background-image: url(../images/icon/string.svg);}
234234
wb-value[type*=geolocation] > input{ background-image: url(../images/icon/geolocation.svg);}
235235
wb-value[type*=size] > input{ background-image: url(../images/icon/size.svg);}
236+
wb-value[type*=date] > input{ background-image: url(../images/icon/calendar.svg);}
236237

237238
wb-value[type*=array][type*=string] > input{
238239
background-image: url(../images/icon/array.svg), url(../images/icon/string.svg);
@@ -287,6 +288,7 @@ wb-expression[type=rect]:before{ background-image: url(../images/icon/rect.svg);
287288
wb-expression[type=string]:before{ background-image: url(../images/icon/string.svg); }
288289
wb-expression[type=geolocation]:before{ background-image: url(../images/icon/geolocation.svg); }
289290
wb-expression[type=size]:before{ background-image: url(../images/icon/size.svg);}
291+
wb-expression[type=date]:before{ background-image: url(../images/icon/calendar.svg); }
290292

291293
/* Used for input resizing */
292294
.sekrit-svg{

css/block_colors.css

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/widget.css

+5
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ wb-accordion[open=true] > header{
219219
fill: #666;
220220
}
221221

222+
.cat-icon.big-icon{
223+
height:26px;
224+
left:6px;
225+
}
226+
222227
wb-accordion > header:after{
223228
content: '';
224229
position: absolute;

images/icon/calendar.svg

+7
Loading

playground.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ <h1>Waterbear with Custom Elements</h1>
393393

394394
<wb-accordion class="date">
395395
<header>
396-
<img class="cat-icon" src="">
396+
<img class="cat-icon big-icon" src="images/icon/calendar.svg">
397397
Date
398398
</header>
399399
<p>Dates are used to represent a date and to do basic calculations.</p>
@@ -643,7 +643,7 @@ <h1>Waterbear with Custom Elements</h1>
643643
</wb-accordion>
644644
<wb-accordion class="random">
645645
<header>
646-
<img class="cat-icon" src="images/icon/random.svg">
646+
<img class="cat-icon big-icon" src="images/icon/random.svg">
647647
Random
648648
</header>
649649
<p>There are many types of randomness in Waterbear.</p>

0 commit comments

Comments
 (0)