Commit eecddaf 1 parent 93979d4 commit eecddaf Copy full SHA for eecddaf
File tree 6 files changed +42
-5
lines changed
6 files changed +42
-5
lines changed Original file line number Diff line number Diff line change @@ -24,5 +24,15 @@ A progress bar shows how far a process has progressed.
24
24
<!-- prettier-ignore-start -->
25
25
<!-- spellchecker-disable -->
26
26
{{< progress title=Eating value=65 icon=gdoc_heart >}}
27
+
28
+ {{< progress title="Type: note" value=10 icon=gdoc_heart type=note >}}
29
+
30
+ {{< progress title="Type: tip" value=70 icon=gdoc_heart type=tip >}}
31
+
32
+ {{< progress title="Type: important" value=30 icon=gdoc_heart type=important >}}
33
+
34
+ {{< progress title="Type: caution" value=90 icon=gdoc_heart type=caution >}}
35
+
36
+ {{< progress title="Type: warning" value=80 icon=gdoc_heart type=warning >}}
27
37
<!-- spellchecker-enable -->
28
38
<!-- prettier-ignore-end -->
Original file line number Diff line number Diff line change 1
1
---
2
2
properties :
3
+ - name : type
4
+ type : string
5
+ description : Color type of the progress bar. Supported values are `main|note|tip|important|caution|warning`.
6
+ required : false
7
+ defaultValue : main
3
8
- name : value
4
9
type : integer
5
10
description : Progress value.
Original file line number Diff line number Diff line change 1
- {{ $type := default "note" (.Get "type") }}
2
- {{ $icon := .Get "icon" }}
3
- {{ $title := default ($type | title) (.Get "title") }}
1
+ {{- $type := default "note" (.Get "type") }}
2
+ {{- $icon := .Get "icon" }}
3
+ {{- $title := default ($type | title) (.Get "title") }}
4
4
5
5
6
6
< blockquote class ="gdoc-hint {{ $type | lower }} ">
Original file line number Diff line number Diff line change 1
1
{{- $value := default 0 (.Get "value") -}}
2
+ {{- $type := default "main" (.Get "type") }}
2
3
{{- $title := .Get "title" -}}
3
4
{{- $icon := .Get "icon" -}}
4
5
15
16
</ div >
16
17
< div class ="gdoc-progress__wrap ">
17
18
< div
18
- class ="gdoc-progress__bar "
19
+ class ="gdoc-progress__bar {{ $type | lower }} "
19
20
data-percent ="{{ $value }} "
20
21
style ="width: {{ $value }}%; "
21
22
> </ div >
Original file line number Diff line number Diff line change 95
95
filter : saturate (2.5 ) brightness (0.85 );
96
96
}
97
97
98
+ .gdoc-progress__bar {
99
+ filter : saturate (0.85 ) brightness (0.85 );
100
+ }
101
+
98
102
.gdoc-hint ,
99
103
.admonitionblock {
100
104
a {
Original file line number Diff line number Diff line change 281
281
transparent
282
282
);
283
283
background-size : 2.5em 2.5em ;
284
- background-color : defaults .$main-color !important ;
284
+ background-color : defaults .$main-color ;
285
+
286
+ @each $name , $color in defaults .$hint-colors {
287
+ & .#{$name } {
288
+ background-image : linear-gradient (
289
+ -45deg ,
290
+ #{color .scale ($color , $lightness : -20% )} 25% ,
291
+ transparent 25% ,
292
+ transparent 50% ,
293
+ #{color .scale ($color , $lightness : -20% )} 50% ,
294
+ #{color .scale ($color , $lightness : -20% )} 75% ,
295
+ transparent 75% ,
296
+ transparent
297
+ );
298
+
299
+ background-color : $color ;
300
+ }
301
+ }
285
302
}
286
303
}
You can’t perform that action at this time.
0 commit comments