Skip to content

Commit 72061a0

Browse files
committed
reformatted website
1 parent 4340952 commit 72061a0

File tree

2 files changed

+70
-63
lines changed

2 files changed

+70
-63
lines changed

src/MapBox.svelte

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -995,19 +995,11 @@
995995
margin-right: auto;
996996
}
997997
998-
.search {
999-
position: absolute;
1000-
width: 50%;
1001-
left: 25%;
1002-
top: 60px;
1003-
z-index: 1001;
1004-
}
1005-
1006998
.map-container {
1007999
width: 100%;
10081000
height: 80vh;
10091001
position: relative;
1010-
top: 100px;
1002+
top: 50px;
10111003
min-height: 550px;
10121004
}
10131005
@@ -1060,25 +1052,33 @@
10601052
position: absolute;
10611053
top: 12px;
10621054
left: 10px;
1063-
max-width: 220px;
1055+
max-width: 500px;
10641056
z-index: 1001;
10651057
background-color: rgba(255, 255, 255, 0.9);
10661058
padding: 10px 10px;
10671059
box-sizing: border-box;
10681060
transition: all 0.1s ease-in;
10691061
}
10701062
1063+
.search {
1064+
position: absolute;
1065+
width: 450px;
1066+
right: 75px;
1067+
top: 12px;
1068+
z-index: 1001;
1069+
}
1070+
10711071
.legend-container {
10721072
position: absolute;
1073-
top: 220px;
1073+
top: 170px;
10741074
left: 10px;
10751075
z-index: 1000;
10761076
display: flex;
10771077
flex-direction: column;
10781078
align-items: center;
10791079
justify-content: center;
10801080
transition: all 0.1s ease-in;
1081-
height: 40%;
1081+
height: 45%;
10821082
}
10831083
10841084
.invalid_search-container {
@@ -1110,28 +1110,29 @@
11101110
<span class="banner-text">{currentSensorTooltip}</span>
11111111
</div>
11121112

1113-
{#if loaded && region_lst.length != 0}
1114-
<div class="search">
1115-
<AutoComplete
1116-
placeholder="Search for a location..."
1117-
items={region_lst}
1118-
bind:selectedItem={selectedRegion}
1119-
labelFieldName="display_name"
1120-
keywordsFunction={place => place.display_name}
1121-
maxItemsToShowInList="5"
1122-
minCharactersToSearch="2"
1123-
onChange={_ => {
1124-
if (typeof selectedRegion !== 'undefined') {
1125-
search_element(selectedRegion);
1126-
}
1127-
}} />
1128-
</div>
1129-
{/if}
11301113
<div bind:this={container} class="map-container">
11311114
<div class="options-container">
11321115
<Options {isIE} />
11331116
</div>
11341117

1118+
{#if loaded && region_lst.length != 0}
1119+
<div class="search">
1120+
<AutoComplete
1121+
placeholder="Search for a location..."
1122+
items={region_lst}
1123+
bind:selectedItem={selectedRegion}
1124+
labelFieldName="display_name"
1125+
keywordsFunction={place => place.display_name}
1126+
maxItemsToShowInList="5"
1127+
minCharactersToSearch="2"
1128+
onChange={_ => {
1129+
if (typeof selectedRegion !== 'undefined') {
1130+
search_element(selectedRegion);
1131+
}
1132+
}} />
1133+
</div>
1134+
{/if}
1135+
11351136
<div class="legend-container">
11361137
<Legend />
11371138
</div>

src/Options.svelte

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,16 @@
2525
2626
.option {
2727
width: 100%;
28+
display: inline-block;
29+
}
30+
.toggle {
31+
width: 200px;
2832
}
29-
3033
.option .option-title {
3134
margin-bottom: 0px !important;
3235
padding-bottom: 0px !important;
3336
}
3437
35-
.buttons-group {
36-
width: 100%;
37-
display: flex;
38-
flex-direction: column;
39-
}
40-
4138
.buttons-group button.button .disabled-tooltip {
4239
visibility: hidden;
4340
width: 80px;
@@ -162,8 +159,17 @@
162159
.buttons-group-side .button:active {
163160
outline: none;
164161
}
165-
p {
166-
margin-bottom: 5px;
162+
label {
163+
display: inline-block;
164+
}
165+
select.indicators {
166+
display: inline-block;
167+
width: 200px;
168+
margin-bottom: 10px;
169+
}
170+
select.geo-level {
171+
display: inline-block;
172+
width: 125px;
167173
}
168174
169175
@keyframes shake {
@@ -193,32 +199,12 @@
193199
<div class="options">
194200

195201
<div class="option">
196-
<p style="font-size: 15px;" class="option-title">
197-
<strong>Geo-level:</strong>
198-
</p>
199-
<select
200-
aria-label="geographic level"
201-
class="buttons-group"
202-
bind:value={level}
203-
on:change={() => {
204-
currentDataReadyOnMap.set(false);
205-
currentLevel.set(level);
206-
}}>
207-
{#each Object.keys($levels) as level}
208-
<option value={level} disabled={$sensorMap.get($currentSensor).levels.includes(level) === false}>
209-
{$levels[level]}
210-
</option>
211-
{/each}
212-
</select>
213-
</div>
214-
215-
<div class="option">
216-
<p style="font-size: 15px;" class="option-title">
217-
<strong>Indicator:</strong>
218-
</p>
202+
<label style="font-size: 15px;" class="option-title">
203+
<strong>Displaying</strong>
204+
</label>
219205
<select
220206
aria-label="indicator options"
221-
class="buttons-group"
207+
class="indicators"
222208
bind:value={sensor}
223209
on:change={() => {
224210
currentDataReadyOnMap.set(false);
@@ -236,11 +222,31 @@
236222
{/each}
237223
</optgroup>
238224
</select>
225+
226+
<label style="font-size: 15px;" class="option-title">
227+
<strong>&nbsp;for&nbsp;</strong>
228+
</label>
229+
230+
<select
231+
aria-label="geographic level"
232+
class="geo-level"
233+
bind:value={level}
234+
on:change={() => {
235+
currentDataReadyOnMap.set(false);
236+
currentLevel.set(level);
237+
}}>
238+
{#each Object.keys($levels) as level}
239+
<option value={level} disabled={$sensorMap.get($currentSensor).levels.includes(level) === false}>
240+
{$levels[level]}
241+
</option>
242+
{/each}
243+
</select>
244+
239245
</div>
240246

241247
<br />
242248

243-
<div class="option">
249+
<div class="toggle">
244250
<div aria-label="display type" class="buttons-group-side">
245251
<button
246252
aria-pressed={$signalType === 'value' ? 'true' : 'false'}

0 commit comments

Comments
 (0)