Skip to content

Commit aced896

Browse files
authored
Merge pull request #105 from ocsigen/style
Style
2 parents b602a9c + 8d977e9 commit aced896

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

css/ot_icons.css

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
@keyframes ot-icon-animation-spinning {
22
0% { transform: rotate(0deg) ; }
3-
100% { transform: rotate(359deg) ; }
4-
}
5-
6-
.ot-icon-animation-spinning {
7-
animation: ot-icon-animation-spinning 1.5s linear infinite ;
3+
100% { transform: rotate(360deg) ; }
84
}
95

106
@keyframes ot-icon-animation-shake {
@@ -75,16 +71,6 @@
7571
text-align: center ;
7672
}
7773

78-
.ot-icon-spinner::before {
79-
display: block ;
80-
width: 1em ;
81-
height: 1em ;
82-
border: .1em solid #000 ;
83-
border-left: .1em solid #777 ;
84-
border-bottom: .1em solid #777 ;
85-
border-radius: 50% ;
86-
}
87-
8874
.ot-icon-plus::before {
8975
position: absolute ;
9076
left: .15em ;

css/ot_spinner.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,21 @@
44
justify-content: center ;
55
align-items: center ;
66
}
7+
8+
.ot-icon-animation-spinning {
9+
display: flex !important;
10+
align-items: center;
11+
justify-content: center;
12+
}
13+
14+
.ot-icon-animation-spinning::before {
15+
content: "";
16+
margin: 1rem;
17+
padding: 10px ;
18+
background-position: center ;
19+
background-repeat: no-repeat ;
20+
background-size:contain;
21+
background-image: url("data:image/svg+xml,%3Csvg xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg' viewBox='-256 -256 512 512'%3E%3Cg fill='%23ccc'%3E%3Crect id='r' ry='19' height='143' width='52' transform='translate(-26,108)'/%3E%3Cuse xlink:href='%23r' transform='rotate(30)'/%3E%3Cuse xlink:href='%23r' transform='rotate(-30)'/%3E%3Cuse xlink:href='%23r' transform='rotate(60)'/%3E%3Cuse xlink:href='%23r' transform='rotate(-60)'/%3E%3Cuse xlink:href='%23r' transform='rotate(-90)'/%3E%3Cuse xlink:href='%23r' transform='rotate(-120)'/%3E%3Cuse xlink:href='%23r' transform='rotate(-150)'/%3E%3C/g%3E%3Cuse xlink:href='%23r' transform='rotate(90)' fill='%23c5c5c5'/%3E%3Cuse xlink:href='%23r' transform='rotate(120)' fill='%23999'/%3E%3Cuse xlink:href='%23r' transform='rotate(150)' fill='%23878787'/%3E%3Cuse xlink:href='%23r' transform='rotate(180)' fill='%23626262'/%3E%3C/svg%3E");
22+
animation: ot-icon-animation-spinning 1s steps(12) infinite;
23+
}
24+
.ot-icon-animation-spinning::after { content: normal !important; }

src/widgets/ot_spinner.eliomi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
It has class "spinning" while the spinner is present.
3030
3131
On server side, it will wait for [th] to be finished before
32-
returning its result (and never display a spinner). *)
32+
returning its result (and never display a spinner).
33+
34+
If you want the spinner on both sides, you can use [with_spinner_no_lwt]
35+
and [Eliom_content.Html.C.node].
36+
*)
3337
val with_spinner :
3438
?a:[< Html_types.div_attrib ] Eliom_content.Html.attrib list ->
3539
?fail:(exn ->

0 commit comments

Comments
 (0)