Skip to content

Commit 8e84101

Browse files
committed
Adjust scenario cards
1 parent bfd26ed commit 8e84101

File tree

5 files changed

+58
-20
lines changed

5 files changed

+58
-20
lines changed

app/assets/stylesheets/_root.sass

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ body#root
227227

228228
#new-scenario, #preset-scenario
229229
border: none
230+
margin-bottom: 80px
230231
.header-container
231232
display: flex
232233
margin: -15px -20px 0px
@@ -243,6 +244,12 @@ body#root
243244
line-height: 1
244245
margin: 0 auto 0 0
245246
padding: 0
247+
.header-container.loose
248+
h4
249+
font-size: 16px
250+
line-height: 1
251+
margin: 0 0 20px 20px
252+
padding: 0
246253

247254
#new-scenario
248255
border-top-color: $landing-blue
@@ -378,9 +385,12 @@ body#root
378385
.header-container .title
379386
color: #462c34
380387

388+
.hint
389+
margin-bottom: 1.5rem
390+
381391
.year-tabs
382392
display: flex
383-
margin-bottom: 1rem
393+
margin-bottom: 1.5rem
384394
.end-year-tab
385395
margin-left: 1rem
386396
margin-bottom: 3px
@@ -440,7 +450,6 @@ body#root
440450
transition: background 0.15s ease-in, border 0.15s ease-in
441451
&:hover
442452
border-color: #e5e7eb
443-
background: $soft-grey
444453
cursor: pointer
445454
background: $soft-grey
446455
text-decoration: none
@@ -450,11 +459,25 @@ body#root
450459
font-size: 14px
451460
line-height: 1.7
452461
margin-bottom: 2px
462+
.fa
463+
margin-right: 5px
464+
.labels
465+
font-size: 0.75rem
466+
margin-bottom: 1rem
467+
display: flex
468+
width: 100%
469+
.group
470+
border: 1px solid #e5e7eb
471+
border-radius: 5px
472+
padding: 5px 10px
473+
background: $soft-grey
474+
475+
.org
476+
margin-left: auto
477+
text-decoration: underline
478+
border-radius: 5px
479+
padding: 5px 10px
453480

454-
.org
455-
color: $landing-grey
456-
line-height: 1
457-
margin-bottom: 2px
458481

459482
span.last_updated
460483
margin-left: auto
@@ -464,16 +487,14 @@ body#root
464487
span.author
465488
color: darken($landing-background-color, 100%)
466489
font-size: 0.75rem
490+
margin-bottom: 0.75rem
467491

468492
span.version
469493
font-size: 0.75rem
470494
color: $landing-grey
471495
white-space: nowrap
472-
473-
.scenario .group
474-
font-size: 0.75rem
475-
text-decoration: underline
476-
margin-left: auto
496+
margin-bottom: 0
497+
margin-top: 1rem
477498

478499
#legal
479500
border-top: 1px solid $landing-border-color

app/views/pages/root.html.haml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
= render partial: 'pages/root_page/new_scenario'
1919
= render partial: 'pages/root_page/preset_scenario'
2020

21+
.header-container.loose
22+
%h4.title= t('intro.features.title')
2123
#other-features
2224
.feature.whats-new
2325
%h4= t('intro.whats_new.title')

app/views/pages/root_page/_scenario_group.haml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@
44
- if title.to_s.include?(' - ')
55
= link_to(my_etm_path("saved_scenarios/#{scenario.saved_scenario_id}"), class: 'scenario') do
66
- main_title, org = title.split(' - ', 2)
7-
%span.group= group.capitalize
7+
.labels
8+
.group= group.capitalize
9+
.org
10+
.fa.fa-folder
11+
= org.html_safe
12+
813

9-
%span.version= "##{scenario.version}"
1014
%h4.title= format_subscripts(main_title)
11-
%span.org= org.html_safe
12-
%span.author= t('intro.featured_by', author: scenario.author, area: t("areas.#{scenario.area_code}"))
15+
%span.author= t('intro.featured_by', author: scenario.author)
16+
.area
17+
.fa.fa-map-marker
18+
= t("areas.#{scenario.area_code}")
19+
%span.version= "##{scenario.version}"
1320
- else
1421
= link_to(my_etm_path("saved_scenarios/#{scenario.saved_scenario_id}"), class: 'scenario') do
15-
%span.group= group.capitalize
16-
%span.version= "##{scenario.version}"
22+
.labels
23+
.group= group.capitalize
1724
%h4.title= format_subscripts(title)
18-
%span.author= t('intro.featured_by', author: scenario.author, area: t("areas.#{scenario.area_code}"))
25+
%span.author= t('intro.featured_by', author: scenario.author)
26+
.area
27+
.fa.fa-map-marker
28+
= t("areas.#{scenario.area_code}")
29+
%span.version= "##{scenario.version}"

config/locales/en_intro.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ en:
1616
about_featured_scenarios: |
1717
Here you can find a list of featured scenarios published by other parties. Explore them
1818
or use them as a basis for your own scenario.
19-
featured_by: "Developed by %{author} for %{area}"
19+
featured_by: "Developed by %{author}"
20+
features:
21+
title: Features
2022
whats_new:
2123
title: What's new?
2224
description: |

config/locales/nl_intro.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ nl:
1717
about_featured_scenarios: |
1818
Hieronder vind je een lijst van uitgelichte scenario's gepubliceerd door verschillende
1919
partijen. Open ze en ga op onderzoek uit, of gebruik ze als basis voor je eigen sceanrio.
20-
featured_by: "Gemaakt door %{author} voor %{area}"
20+
featured_by: "Gemaakt door %{author}"
21+
features:
22+
title: Features
2123
whats_new:
2224
title: Laatste updates
2325
description: |

0 commit comments

Comments
 (0)