Skip to content

Commit a905506

Browse files
committed
[design] add more presets
1 parent 2869f1a commit a905506

File tree

5 files changed

+71
-0
lines changed

5 files changed

+71
-0
lines changed

‎src/css/theme.css‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,26 @@
208208
background-color:rgb(var(--theme-preset-accent-chocorum))
209209
}
210210

211+
.theme-preset-background-sunbloom-01{
212+
background-color:rgb(var(--theme-preset-background-sunbloom-01))
213+
}
214+
215+
.theme-preset-background-sunbloom-02{
216+
background-color:rgb(var(--theme-preset-background-sunbloom-02))
217+
}
218+
219+
.theme-preset-background-sunbloom-03{
220+
background-color:rgb(var(--theme-preset-background-sunbloom-03))
221+
}
222+
223+
.theme-preset-background-sunbloom-04{
224+
background-color:rgb(var(--theme-preset-background-sunbloom-04))
225+
}
226+
227+
.theme-preset-accent-sunbloom{
228+
background-color:rgb(var(--theme-preset-accent-sunbloom))
229+
}
230+
211231
.theme-preset-background-coralgreen-01{
212232
background-color:rgb(var(--theme-preset-background-coralgreen-01))
213233
}

‎src/css/variables.css‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@
5656
--theme-preset-background-chocorum-03:25,25,25;
5757
--theme-preset-background-chocorum-04:25,25,25;
5858
--theme-preset-accent-chocorum:25,25,25;
59+
--theme-preset-background-sunbloom-01:25,25,25;
60+
--theme-preset-background-sunbloom-02:25,25,25;
61+
--theme-preset-background-sunbloom-03:25,25,25;
62+
--theme-preset-background-sunbloom-04:25,25,25;
63+
--theme-preset-accent-sunbloom:25,25,25;
5964
--theme-preset-background-coralgreen-01:25,25,25;
6065
--theme-preset-background-coralgreen-02:25,25,25;
6166
--theme-preset-background-coralgreen-03:25,25,25;

‎src/index.html‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,18 @@ <h1 class="menu-item-header-text">Presets</h1>
13811381
<spanclass="button-text small">Choco Rum</span>
13821382
</button>
13831383
</div>
1384+
<divclass="button-wrap form-inline">
1385+
<buttonclass="control-theme-preset-sunbloom theme-preset-button button mb-0" tabindex="-1">
1386+
<divclass="theme-preset-preview">
1387+
<spanclass="theme-preset-background-01 theme-preset-background-sunbloom-01"></span>
1388+
<spanclass="theme-preset-background-02 theme-preset-background-sunbloom-02"></span>
1389+
<spanclass="theme-preset-background-03 theme-preset-background-sunbloom-03"></span>
1390+
<spanclass="theme-preset-background-04 theme-preset-background-sunbloom-04"></span>
1391+
<spanclass="theme-preset-accent theme-preset-accent-sunbloom"></span>
1392+
</div>
1393+
<spanclass="button-text small">Sun Bloom</span>
1394+
</button>
1395+
</div>
13841396
<divclass="button-wrap form-inline">
13851397
<buttonclass="control-theme-preset-coralgreen theme-preset-button button mb-0" tabindex="-1">
13861398
<divclass="theme-preset-preview">

‎src/js/control.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,6 +2608,19 @@ var control = (function(){
26082608
render.update();
26092609
render.class();
26102610
}
2611+
},{
2612+
element: helper.e(".control-theme-preset-sunbloom"),
2613+
type: "button",
2614+
func: function(){
2615+
theme.preset("sunbloom");
2616+
theme.style.check();
2617+
theme.render.color.shade();
2618+
theme.render.accent.color();
2619+
theme.render.radius();
2620+
link.groupAndItems();
2621+
render.update();
2622+
render.class();
2623+
}
26112624
},{
26122625
element: helper.e(".control-theme-preset-coralgreen"),
26132626
type: "button",

‎src/js/state.js‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,27 @@ var state = (function(){
494494
radius: 0.75,
495495
style: "dark"
496496
},
497+
sunbloom: {
498+
color: {
499+
hsl: {
500+
h: 54,
501+
s: 78,
502+
l: 47
503+
},
504+
rgb: {
505+
r: 213,
506+
g: 194,
507+
b: 26
508+
}
509+
},
510+
accent: {
511+
r: 255,
512+
g: 220,
513+
b: 22
514+
},
515+
radius: 0.5,
516+
style: "light"
517+
},
497518
coralgreen: {
498519
color: {
499520
hsl: {

0 commit comments

Comments
(0)