Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: #68 desktop layout for reports page #177

Merged
merged 1 commit into from
Nov 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 26 additions & 23 deletions templates/web/popravitodev/reports/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,32 @@ <h1>[% loc('Dashboard') %]
<h2>[% loc('Show reports in your area') %]</h2>
[% IF body %]
<!-- <label for="ward">[% loc('Pick your ward') %]</label> -->
<div class="dashboard-search__input">
<select id="ward" name="ward" class="js-autocomplete">
<option value="Upiši naziv ulice ili mjesto">[% loc('Pick your ward') %]</option>
[% FOR child IN children.values.sort('name') %]
<option>[% child.name | html ~%]</option>
[% END %]
</select>
</div>
[% ELSE %]
<!-- <label for="body">[% loc('Pick your council') %]</label> -->
<div class="dashboard-search__input">
<select id="body" name="body" class="js-autocomplete">
<option value="Upiši naziv ulice ili mjesto">[% loc('Pick your council') %]</option>
[% FOR b IN bodies # Not body as 'body' may be on stash %]
<option value="[% b.id %]">[% b.name | html ~%]
[% IF NOT b.area_count %] [% loc('(no longer exists)') %][% END ~%]
</option>
[% END %]
</select>
</div>
[% END %]
<div class="dashboard-search__submit">
<input type="submit" value="">
<div class="dashboard-search-wrapper">
<div class="dashboard-search__input">
<select id="ward" name="ward" class="js-autocomplete">
<option value="Upiši naziv ulice ili mjesto">[% loc('Pick your ward') %]</option>
[% FOR child IN children.values.sort('name') %]
<option>[% child.name | html ~%]</option>
[% END %]
</select>
</div>
<a class="location-link" href="[% c.uri_for('/around', link_params) | html %]" id="geolocate_link" tabindex="0" aria-label="use my location"><span class="location-icon"></span>[% loc('Use my current location') %]</a>
[% ELSE %]
<!-- <label for="body">[% loc('Pick your council') %]</label> -->
<div class="dashboard-search__input">
<select id="body" name="body" class="js-autocomplete">
<option value="Upiši naziv ulice ili mjesto">[% loc('Pick your council') %]</option>
[% FOR b IN bodies # Not body as 'body' may be on stash %]
<option value="[% b.id %]">[% b.name | html ~%]
[% IF NOT b.area_count %] [% loc('(no longer exists)') %][% END ~%]
</option>
[% END %]
</select>
</div>
[% END %]
<div class="dashboard-search__submit">
<input type="submit" value="">
</div>
</div>
</form>
</div>
Expand Down
8 changes: 8 additions & 0 deletions web/cobrands/popravitodev/base.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//MOBILE STYLE
@import "./_colours";

$body-font: 'Open Sans';
Expand Down Expand Up @@ -2485,3 +2486,10 @@ label[for="form_may_show_name"] {
fieldset {
border: none;
}

// /reports page

.main-reports {
padding: 2.5rem;
}

18 changes: 12 additions & 6 deletions web/cobrands/popravitodev/layout.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//DESKTOP STYLE
@import "./_colours";

$body-font: 'Open Sans';
Expand Down Expand Up @@ -1099,7 +1100,7 @@ fieldset {
// REPORTS

.main-reports {
padding: 2.5rem;
padding: 2.5rem 7.5rem;
}

.dashboard-row-grid {
Expand All @@ -1126,6 +1127,10 @@ fieldset {
border-top: 2px solid black;
max-width: 30%;
border-bottom: 0;

h2 {
text-align: center;
}
}

.dashboard-reports-smaller {
Expand All @@ -1143,6 +1148,7 @@ fieldset {
position: absolute;
max-width: 723px;
max-height: 361px;
bottom: 8rem;
}

.dashboard-sparklines {
Expand Down Expand Up @@ -1178,7 +1184,7 @@ fieldset {

.dashboard-search {
display: flex;
align-items: center;
align-items: baseline;
justify-content: space-between;
background-color: #E5E1FE;
padding: 1rem 10rem;
Expand All @@ -1188,9 +1194,8 @@ fieldset {
font-size: 2.2rem;
}

.dashboard-search__input {
flex: 1;
text-align: center;
.dashboard-search-wrapper {
display: flex;
}
}

Expand Down Expand Up @@ -1242,12 +1247,13 @@ fieldset {

.label-container {
display: flex;
flex-direction: column;
//flex-direction: column;
text-align: right;
justify-content: end;

.label:first-child {
margin-bottom: 2rem;
margin-right: 2rem;
}

.label {
Expand Down