add buttons and more ui logic

This commit is contained in:
Laura Klünder 2017-10-26 13:58:34 +02:00
parent 8c5edb938c
commit 223a60ee98
2 changed files with 52 additions and 16 deletions

View file

@ -60,13 +60,21 @@ main.map {
background-color: #ffffff; background-color: #ffffff;
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
border-radius: 2px; border-radius: 2px;
overflow:hidden; overflow: hidden;
}
#sidebar section > * {
border: 0 #dddddd solid;
border-top-width: 1px;
transition: height 200ms;
overflow: hidden;
} }
#sidebar section > :first-child { #sidebar section > :first-child {
margin-top: -1px; margin-top: -1px;
} }
#sidebar > section:last-child { #sidebar section > *.hidden {
margin-bottom: 0; margin-top: 0;
height: 0;
margin-bottom: -1px;
} }
#search { #search {
margin-bottom: 10px; margin-bottom: 10px;
@ -77,9 +85,7 @@ main.map {
.location { .location {
padding: 6px 10px; padding: 6px 10px;
height: 54px; height: 55px;
border: 0 #dddddd solid;
border-top-width: 1px;
} }
.location > * { .location > * {
display: block; display: block;
@ -96,8 +102,8 @@ main.map {
.locationinput input { .locationinput input {
box-sizing: border-box; box-sizing: border-box;
border-width:0; border-width:0;
height: 100%; height: 54px;
transition: padding-bottom 100ms; transition: padding-bottom 150ms;
} }
.locationinput small { .locationinput small {
position: absolute; position: absolute;
@ -105,7 +111,7 @@ main.map {
top: 31px; top: 31px;
line-height: 1.1; line-height: 1.1;
opacity: 1; opacity: 1;
transition: opacity 100ms; transition: opacity 150ms;
} }
.locationinput:not(.selected) small { .locationinput:not(.selected) small {
opacity: 0; opacity: 0;
@ -119,6 +125,27 @@ main.map {
padding-bottom: 24px; padding-bottom: 24px;
} }
.buttons {
display: flex;
flex-direction: row;
margin-left: -1px;
height: 3.3rem;
}
.buttons > button.button-clear {
width: 1px;
flex-grow: 1;
margin: 0;
border: 0 #dddddd solid;
border-left-width: 1px;
border-radius: 0;
padding: 0;
font-size: 1.3rem;
line-height: 1.3;
height: 3.3rem;
}
.buttons > *:hover, .buttons > *:active {
background-color: #eeeeee;
}
/* leaftlet levels control */ /* leaftlet levels control */
.leaflet-control-levels a, .leaflet-control-levels a:hover { .leaflet-control-levels a, .leaflet-control-levels a:hover {

View file

@ -27,20 +27,29 @@
</section> </section>
<section id="sidebar"> <section id="sidebar">
<section id="search"> <section id="search">
<div class="location locationinput"> <div class="location locationinput" id="origin-input">
<input type="text" placeholder="{% trans 'Search any location…' %}" id="searchnameField"> <input type="text" placeholder="{% trans 'Search any location…' %}">
<small>Lecture Hall</small> <small>Lecture Hall</small>
</div> </div>
<div class="location locationinput"> <div class="location locationinput" id="destination-input">
<input type="text" placeholder="{% trans 'Search any location…' %}" id="searchnameField"> <input type="text" placeholder="{% trans 'Search any location…' %}">
<small>Lecture Hall</small> <small>Lecture Hall</small>
</div> </div>
<div class="buttons"> <div class="buttons" id="search-buttons">
<button class="button-clear">Scan QR Code</button>
<button class="button-clear">Locate</button>
</div>
<div class="buttons hidden" id="location-buttons">
<button class="button-clear">Share</button>
<button class="button-clear">Details</button>
</div>
<div class="buttons hidden" id="route-buttons">
<button class="button-clear">swap</button>
<button class="button-clear">Options</button>
</div> </div>
</section> </section>
<div id="resultswrapper"> <div id="resultswrapper">
<section id="results"> <section id="autocomplete">
<div class="location"> <div class="location">
<span>Hall 1</span> <span>Hall 1</span>
<small>Lecture Hall</small> <small>Lecture Hall</small>