Skip to content

Commit f12c0ac

Browse files
committed
extract css to less file, use color variables
1 parent 17628c8 commit f12c0ac

File tree

3 files changed

+56
-19
lines changed

3 files changed

+56
-19
lines changed

netatmo-module/elements.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<div class="netatmo">
2-
<span class="small loading">
3-
<svg width="2em" height="2em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-ring-alt">
4-
<rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect>
5-
<circle cx="50" cy="50" r="40" stroke="#aaa" fill="none" stroke-width="10" stroke-linecap="round"></circle>
6-
<circle cx="50" cy="50" r="40" stroke="#fff" fill="none" stroke-width="6" stroke-linecap="round">
2+
<span class="loading">
3+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
4+
<circle class="outer"></circle>
5+
<circle class="inner">
76
<animate attributeName="stroke-dashoffset" dur="5s" repeatCount="indefinite" from="0" to="502"></animate>
87
<animate attributeName="stroke-dasharray" dur="5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate>
98
</circle>
109
</svg>
1110
</span>
1211
</div>
12+
<svg class="loadTimer" viewbox="0 0 250 250">
13+
<path class="border" transform="translate(125, 125)"/>
14+
<path class="loader" transform="translate(125, 125) scale(.84)"/>
15+
</svg>

netatmo-module/less/style.less

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,64 @@
1+
@light: #fff;
2+
@dark: #000;
3+
@dimmed: darken(@light, 33.5%);
4+
@borderColor: @light;
5+
16
#netatmo-module{
7+
position: absolute;
8+
bottom: 0;
9+
210
.netatmo{
3-
position:absolute;
4-
bottom: 0;
11+
display: inline-block;
512

613
.module{
714
display: inline-block;
8-
border: 1px solid white;
15+
border: 1px solid @borderColor;
916
border-radius: .25em;
10-
margin: .25em;
17+
margin: .125em .25em;
1118
overflow: hidden;
1219

1320
.name{
1421
text-align: center;
15-
background: white;
16-
color: black;
17-
padding: .125em .25em
22+
color: @dark;
23+
background: @borderColor;
24+
padding: .125em .25em;
1825
}
1926

2027
.data{
21-
padding: .25em .125em;
28+
padding: .125em .25em;
2229
}
2330
}
24-
25-
.loading{
26-
margin: 1.5em 2em;
27-
display: inline-block;
31+
}
32+
33+
.loading{
34+
display: inline-block;
35+
svg{
36+
width: .6em;
37+
height: .6em;
38+
39+
circle{
40+
fill: none;
41+
stroke-linecap: round;
42+
cx: 50;
43+
cy: 50;
44+
r: 40;
45+
}
46+
circle.inner{
47+
stroke: @light;
48+
stroke-width: 6;
49+
}
50+
circle.outer{
51+
stroke: @dimmed;
52+
stroke-width: 10;
53+
}
2854
}
2955
}
30-
}
56+
svg.loadTimer {
57+
width: .5em;
58+
height: .5em;
59+
display: inline-block;
60+
61+
.loader{ fill: @dark;}
62+
.border{ fill: @dimmed}
63+
}
64+
}

netatmo-module/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)