Skip to content

Commit f44e7d0

Browse files
clearning up styling
1 parent 04eb6fe commit f44e7d0

8 files changed

Lines changed: 238 additions & 160 deletions

File tree

css/style.css

Lines changed: 131 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,37 @@ display:inline;
2020
display:none;
2121
}
2222

23-
#map_wrapper{
24-
float:left;
25-
position: relative;
26-
height: 100%;
23+
#map_wrapper {
24+
flex-grow: 1; /* Fill remaining space */
25+
position: relative; /* Important for Leaflet/OpenLayers maps */
26+
27+
/*use flex to have #map fill the remaining spaece when image_map is visiable */
28+
29+
display: flex;
30+
flex-direction: row;
31+
align-items: stretch;
32+
33+
}
34+
#image_map {
35+
width: 0%;
36+
border-right: 1px solid grey;
37+
display:none;
38+
flex-shrink: 0;
2739
}
2840
.map{
29-
float:left;
30-
width: 50%;
3141
height: 100%;
3242
}
3343
#map {
3444
width: 100%;
35-
}
36-
#image_map {
37-
width: 0%;
38-
border-right: 1px solid grey;
39-
display:none;
45+
flex-grow: 1;
4046
}
4147

4248

4349
#content{
4450
width:100%;
4551
/* background-color: #999; */
4652
display:none;
53+
overflow: hidden;
4754
}
4855

4956

@@ -98,20 +105,30 @@ a {
98105
border-color:#105456;
99106
}
100107

101-
/*
102-
warning: #ff1b28
103-
*/
104-
108+
#app_container {
109+
display: flex;
110+
height: 100%;
111+
width: 100%;
112+
flex-direction: row;
113+
align-items: stretch;
114+
}
105115

106116
#side_bar{
107-
background-color: #0000FF;
108117
background-color: #FFFFFF;
109-
110118
height:100%;
111-
float:left;
112119
width:100%;
120+
flex-shrink: 0;
121+
position: relative;
122+
/* Base sidebar animation */
123+
/* transition: transform 0.3s ease; */
124+
113125
}
114126

127+
/* DESKTOP (default) */
128+
#side_bar.collapsed {
129+
/* transform: translateX(-100%); */
130+
width: 0;
131+
}
115132

116133
#nav_wrapper{
117134
height:30px;
@@ -141,46 +158,45 @@ warning: #ff1b28
141158
}
142159

143160
#search_but{
144-
145161
height:38px;
146162
margin:0px;
147163
}
148164
.search_wrapper{
149165
margin-bottom:5px;
150166
}
151167

152-
153168
#panels{
154169
width:360px;
155170
overflow-x: hidden;
156171
overflow-y: hidden;
157-
158-
background-color: #ff0000;
159-
background-color: #fff;
160-
padding:0px;
161-
display:none;
162-
172+
background-color: #fff;
173+
padding:0px;
174+
display:none;
163175
}
164176
.border_top{
165177
border-top: 1px solid #999;
166178
}
167179
#panel_scroll{
168-
width:5000px;
169-
/*height:100%;*/
180+
width:5000px;/* A really wide div containing many panels */
181+
182+
overflow-x: auto;
170183

171184
}
172185
.scroll_wrapper{
173186
overflow-y: auto;
174187
}
175188
.panel{
176189
width:360px;
177-
178190
float: left;
191+
background-color: #fff;
192+
height:100%;
193+
display: flex;
194+
flex-direction: column;
195+
flex: 1 1 auto;
196+
/* overflow: hidden; */
197+
min-height: 0;
198+
}
179199

180-
background-color: #00ffff;
181-
background-color: #fff;
182-
height:100%;
183-
}
184200

185201
.card-body {
186202
padding: 0px;
@@ -194,7 +210,6 @@ warning: #ff1b28
194210
font-size: 1rem;
195211
weight:bold;
196212
border: 0;
197-
198213
}
199214
.small{
200215
font-size: .65rem;
@@ -203,10 +218,8 @@ warning: #ff1b28
203218
}
204219
#tab_panels{
205220
display:none;
206-
207221
z-index:10;
208222
height:100%;
209-
210223
}
211224

212225

@@ -216,9 +229,15 @@ warning: #ff1b28
216229

217230
}
218231
#results_scroll{
219-
border: 1px solid rgba(0,0,0,.15);
220-
max-height:800px;
221-
width:100%;
232+
border: 1px solid rgba(0,0,0,.15);
233+
234+
width:100%;
235+
flex: 1 1 auto;
236+
overflow-y: auto;
237+
min-height: 0;
238+
flex-grow: 1;
239+
240+
-webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
222241
}
223242

224243
#results_scroll .content_right{
@@ -314,9 +333,9 @@ a.disabled {
314333
background-color: #e4e4e4;
315334
}
316335

317-
#layers_wrapper{
336+
/* #layers_wrapper{
318337
height:300px;
319-
}
338+
} */
320339
#details_panel{
321340
font-size: .75rem !important;
322341
}
@@ -525,6 +544,11 @@ a.disabled {
525544
.popup tr:nth-child(even) {background: rgba(51, 181, 229, 0.4);}
526545
.popup tr:nth-child(odd) {background: #fff}
527546

547+
/* Moves the zoom controls 100px down from the top */
548+
.leaflet-top.leaflet-left {
549+
margin-top: 20px;
550+
}
551+
528552
.td_top{
529553
vertical-align:top
530554
}
@@ -1121,6 +1145,7 @@ a[aria-disabled="true"] {
11211145
overflow-y: auto;
11221146
border: 1px solid rgba(0,0,0,.15);
11231147
border-radius: 0.25rem;
1148+
max-height: 150px;
11241149
}
11251150

11261151
.overlay {
@@ -1405,6 +1430,10 @@ a[aria-disabled="true"] {
14051430
.leaflet-popup-content{
14061431
width: 345px;
14071432
}
1433+
.leaflet-popup-content:has(.compressed) {
1434+
width: 105px !important;
1435+
}
1436+
14081437
.dropdown-item{
14091438
margin-bottom: 3px;
14101439
}
@@ -1592,25 +1621,26 @@ a[aria-disabled="true"] {
15921621
/* ------\-------- */
15931622

15941623

1595-
1596-
1597-
/* .left-div-map-buttons {
1598-
margin-top: 10px;
1599-
display: flex;
1600-
flex-wrap: wrap;
1624+
/* Toggle button */
1625+
.sidebar-toggle {
1626+
position: absolute;
1627+
top: 45px;
1628+
left: 340px; /* same as sidebar width */
1629+
transform: translateX(-50%);
1630+
z-index: 1000;
1631+
cursor: pointer;
1632+
background: white;
1633+
border: 1px solid #ccc;
1634+
border-radius: 4px;
1635+
display: block;
1636+
}
1637+
/* When sidebar is collapsed, pull button to edge */
1638+
.sidebar-toggle:has(.collapsed) {
1639+
left: 27px;
16011640
}
1602-
1603-
.left-div-map {
1604-
display: flex;
1605-
flex-direction: column;
1606-
} */
1607-
1608-
1609-
1610-
16111641

16121642

1613-
/* Responsive adjustments for smaller screens */
1643+
/* For smaller screens */
16141644
@media (max-width: 768px) {
16151645
#footer {
16161646
align-items: center; /* Centers the text */
@@ -1626,26 +1656,56 @@ a[aria-disabled="true"] {
16261656
height: 100%;
16271657
}
16281658

1629-
#side_bar {
1630-
height: 80%;
1631-
}
1659+
#app_container {
1660+
display: flex !important;
1661+
flex-direction: column !important;
1662+
height: calc(100vh - 30px) !important;
1663+
overflow: hidden;
1664+
}
1665+
1666+
#side_bar {
1667+
flex: 0 0 60%; /* Sidebar takes top 40% of screen */
1668+
width: 100%;
1669+
border-bottom: 2px solid #ccc;
1670+
1671+
overflow: hidden;
1672+
display: flex;
1673+
flex-direction: column;
1674+
pointer-events: auto !important;
1675+
}
1676+
1677+
#side_bar.collapsed {
1678+
/* transform: translateX(-100%); */
1679+
flex: 0 0 0%;
1680+
width: 0;
1681+
}
1682+
1683+
#map_wrapper {
1684+
flex: 1 1 60%; /* Map takes the remaining 60% */
1685+
width: 100% !important;
1686+
position: relative !important;
1687+
display: block !important;
1688+
visibility: visible !important;
1689+
margin-bottom: 8px;
1690+
margin-top: ;
1691+
}
1692+
#map_panel_wrapper {
1693+
margin-top: 40px;
1694+
}
1695+
1696+
.sidebar-toggle {
1697+
left: 27px;
1698+
}
16321699

1633-
#map_wrapper {
1634-
height: 50%;
1635-
}
16361700

1637-
#map_panel_wrapper {
1638-
height: 40%;
1639-
width: 100%;
1640-
}
16411701

16421702
/* Container Widths */
16431703
#map_panel {
16441704
width: 100%;
16451705
}
16461706

16471707
}
1648-
/* media query for larger screens */
1708+
/* For larger screens */
16491709
@media (min-width: 768px) {
16501710
#side_bar{
16511711
width:360px;
@@ -1655,13 +1715,15 @@ a[aria-disabled="true"] {
16551715
#side_bar,
16561716
#map_wrapper,
16571717
#map_panel_wrapper {
1658-
height: 100%;
1718+
height: calc(100vh - 58px);
1719+
margin-bottom: 0px;
16591720
}
16601721

16611722
#map_panel,
16621723
#map_panel_wrapper {
16631724
width: 100%;
16641725
position: relative;
1726+
16651727
}
16661728
html, body {
16671729
height: 100%;

i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@
202202
"MARKER_TOGGLE": "Map Points in View",
203203
"LAYERS_OUTLINE_TOGGLE": "Map Outline in View",
204204
"BASEMAP_TEXT": "Base Map Options",
205-
"ADDITIONAL_INFO": "See Additional information"
205+
"ADDITIONAL_INFO": "See Additional information",
206+
"MAP_SEARCH": "Search Here"
206207
},
207208
"BASEMAP": {
208209
"TITLE": "Basemap",

index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,18 @@
9999

100100

101101
</div>
102-
102+
<button id="sidebar_toggle" aria-label="Toggle sidebar menu" aria-expanded="true" aria-controls="side_bar" class="sidebar-toggle" onClick="document.getElementById('side_bar').classList.toggle('collapsed');update_side_bar_icon();">
103+
<i class="bi bi-caret-left-fill"></i>
104+
</button>
105+
<div id="app_container">
103106
<div id="side_bar" >
104107
<div id="tabs">
105108
<button id="search_tab" class="btn btn-primary rounded-0 tab_but active"></button>
106109
<button id="map_tab" class="btn rounded-0 tab_but btn-primary" ><span class="label"></span> (<span class="value">1</span>)</button>
107110
<!-- <button id="download_tab" class="btn btn-primary rounded-0 tab_but"></button>-->
111+
108112
</div>
113+
109114
<div class="tabs_line"></div>
110115

111116
<div id="map_panel_wrapper" class="tab_panel" >
@@ -241,6 +246,7 @@
241246
</div>
242247
<div id="map" class="map"></div>
243248
</div>
249+
</div>
244250
<div id="data_table_wrapper">
245251
<div id="data_table_total" class="float-left">
246252
<table>

0 commit comments

Comments
 (0)