Skip to content

Commit

Permalink
Merge pull request #40 from Woosmap/dev/indoor-samples
Browse files Browse the repository at this point in the history
fixed spinner style
  • Loading branch information
gaelsimon authored Mar 8, 2024
2 parents 95e522c + 65b5331 commit 566693b
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 39 deletions.
4 changes: 3 additions & 1 deletion samples/indoor-directions-service/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
{% block html %}
<!-- [START woosmap_{{ tag }}_div] -->
<div id="app">
<div class="progress"></div>
<div class="progress">
<div class="spinner"></div>
</div>
<!--The div element for the map -->
<div id="map"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion samples/indoor-directions-service/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.progress {
@include progress($top: 0);
@include progress();
}

/* [END woosmap_indoor_directions_service] */
4 changes: 3 additions & 1 deletion samples/indoor-map-advanced/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
{% block html %}
<!-- [START woosmap_{{ tag }}_div] -->
<div id="app">
<div class="progress"></div>
<div class="progress">
<div class="spinner"></div>
</div>
<!--The div element for the map -->
<div id="map"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion samples/indoor-map-advanced/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.progress {
@include progress($top: 0);
@include progress();
}

/* [END woosmap_indoor_map_advanced] */
4 changes: 3 additions & 1 deletion samples/indoor-map-simple/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
{% block html %}
<!-- [START woosmap_{{ tag }}_div] -->
<div id="app">
<div class="progress"></div>
<div class="progress">
<div class="spinner"></div>
</div>
<!--The div element for the map -->
<div id="map"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion samples/indoor-map-simple/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.progress {
@include progress($top: 0);
@include progress();
}

/* [END woosmap_indoor_map_simple] */
4 changes: 3 additions & 1 deletion samples/indoor-navigation-widget/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
{% block html %}
<!-- [START woosmap_{{ tag }}_div] -->
<div id="app">
<div class="progress"></div>
<div class="progress">
<div class="spinner"></div>
</div>
<!--The div element for the map -->
<div id="map"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion samples/indoor-navigation-widget/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.progress {
@include progress($top: 0);
@include progress();
}

/* [END woosmap_indoor_navigation_widget] */
4 changes: 3 additions & 1 deletion samples/indoor-widget-advanced/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
{% block html %}
<!-- [START woosmap_{{ tag }}_div] -->
<div id="app">
<div class="progress"></div>
<div class="progress">
<div class="spinner"></div>
</div>
<!--The div element for the map -->
<div id="map"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion samples/indoor-widget-advanced/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.progress {
@include progress($top: 0);
@include progress();
}

/* [END woosmap_indoor_widget_advanced] */
4 changes: 3 additions & 1 deletion samples/indoor-widget-simple/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
{% block html %}
<!-- [START woosmap_{{ tag }}_div] -->
<div id="app">
<div class="progress"></div>
<div class="progress">
<div class="spinner"></div>
</div>
<!--The div element for the map -->
<div id="map"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion samples/indoor-widget-simple/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.progress {
@include progress($top: 0);
@include progress();
}

/* [END woosmap_indoor_widget_simple] */
46 changes: 19 additions & 27 deletions shared/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,33 +65,25 @@
}
}

@mixin progress($height:3px, $top: null, $bottom: null) {
position: absolute;
top: $top;
bottom: $bottom;
height: $height;
z-index: 1;
background-color: #3D5AFE;
animation: progress 2s infinite;


@keyframes progress {
0% {
width: 0;
left: 0;
}
50% {
width: 100%;
left: 0;
}
75% {
width: 0;
left: 100%;
}
100% {
width: 0;
left: 100%;
}
@mixin progress($width: 70px, $height:70px, $borderColor: #f3f3f3, $borderTopColor: #444444) {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: white;
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;

.spinner {
border: 10px solid $borderColor;
border-top: 10px solid $borderTopColor;
border-radius: 50%;
width: $width;
height: $height;
animation: spin 1s linear infinite;
}
}

Expand Down

0 comments on commit 566693b

Please sign in to comment.