Skip to content

Commit 3fdce65

Browse files
authored
Merge pull request #3181 from vrk-kpa/AV-2487_implement_suomifi_design_to_hero
AV-2487: Implement suomifi design to hero
2 parents 6b4e0e2 + b53f88d commit 3fdce65

32 files changed

Lines changed: 127 additions & 146 deletions

drupal/modules/avoindata-hero/avoindata_hero.module

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,11 @@ class AvoindataHeroHandler implements TrustedCallbackInterface
9090

9191
foreach ($statistics as $statistic) {
9292
$statistics_markup .= <<<EOT
93-
<div class="text-center">
94-
<h2>{$statistic['count']}</h2>
95-
<h4>
96-
<a href="/data/{$language}/{$statistic['url']}">
97-
<strong>{$statistic['text']}</strong>
98-
</a>
99-
</h4>
93+
<div class="text-center hero-stats">
94+
<a href="/data/{$language}/{$statistic['url']}">
95+
<div class="hero-count">{$statistic['count']}</div>
96+
<div class="hero-text">{$statistic['text']}</div>
97+
</a>
10098
</div>
10199
EOT;
102100
}

drupal/modules/avoindata-hero/templates/avoindata_hero_form.html.twig

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,52 +11,48 @@
1111
{{ form.form_build_id }}
1212
{{ form.form_token }}
1313
{{ form.form_id }}
14-
<div class="avoindata-hero-search-container">
15-
<div>
16-
<div class="d-inline-block avoindata-frontpage-header-text-container">
17-
<h1>
18-
{% trans %}
19-
All Finnish open data from one place
20-
{% endtrans %}
21-
</h1>
22-
</div>
14+
<div class="avoindata-hero-search-container container">
15+
<div class="d-inline-block avoindata-frontpage-header-text-container">
16+
<h1>
17+
{% trans %}
18+
All Finnish open data from one place
19+
{% endtrans %}
20+
</h1>
2321
</div>
2422
<!-- TODO: Change justify "evenly" to "between" -->
2523
<div class="d-flex flex-wrap justify-content-evenly mt-2">
2624
{{ form.statistics }}
2725
</div>
28-
<div class="ytp-bg-highlight-base d-flex p-3 mt-4">
29-
<div class="flex-1">
26+
<div class="hero-search-form">
27+
<div class="ytp-bg-highlight-base d-flex p-1 mt-4">
28+
<div class="flex-1">
3029
<div class="ytp-input-with-icon-frontpage">
31-
{% set placeholder %}
32-
{%- trans -%}
33-
Type what are you searching for
34-
{%- endtrans -%}
35-
{% endset %}
36-
<input
37-
id="edit-search"
38-
name="search"
39-
type="text"
40-
class="ytp-input-element-frontpage color-depth-dark27"
41-
placeholder="{{ placeholder }}"
42-
>
30+
{% set placeholder %}
31+
{%- trans -%}
32+
Type what are you searching for
33+
{%- endtrans -%}
34+
{% endset %}
35+
<input
36+
id="edit-search"
37+
name="search"
38+
type="text"
39+
class="ytp-input-element-frontpage color-depth-dark27"
40+
placeholder="{{ placeholder }}"
41+
>
42+
<button type="submit" class="hero-button-submit" aria-label="{% trans %}Search{% endtrans %}">
43+
<i class="fa fa-search" aria-hidden="true"></i>
44+
</button>
4345
</div>
44-
</div>
45-
<div class="position-relative">
46-
<button type="submit" class="hero-button-submit">
47-
{% trans %}
48-
Search
49-
{% endtrans %}
50-
</button>
51-
</div>
52-
</div>
53-
{{ form.searchfilter }}
54-
<div class="d-flex mt-3 justify-content-end">
55-
<a href="/data/{{ form['#language'] }}/advanced_search">
56-
{% trans %}
57-
Use advanced search
58-
{% endtrans %}
59-
</a>
46+
</div>
47+
</div>
48+
{{ form.searchfilter }}
49+
<div class="d-flex mt-3 justify-content-end">
50+
<a href="/data/{{ form['#language'] }}/advanced_search">
51+
{% trans %}
52+
Use advanced search
53+
{% endtrans %}
54+
</a>
55+
</div>
6056
</div>
6157
</div>
6258
</div>
279 KB
Binary file not shown.
83 KB
Binary file not shown.
203 KB
Binary file not shown.
68.1 KB
Binary file not shown.
282 KB
Binary file not shown.
87 KB
Binary file not shown.
203 KB
Binary file not shown.
70.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)