Skip to content

Commit 2b4c602

Browse files
committed
AV-2487: Use divs instead of headers for stats and use suomifi tokens to style them
1 parent f01a814 commit 2b4c602

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

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
}

opendata-assets/src/scss/drupal/style.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ p:last-child,
170170
text-decoration: none;
171171
}
172172

173+
.hero-count {
174+
@include tokens.fi-text-heading2
175+
}
176+
177+
.hero-text {
178+
@include tokens.fi-text-heading4;
179+
}
180+
173181
.avoindata-hero-search-container {
174182
max-width: $opendata-container-max-width;
175183
float: none;

0 commit comments

Comments
 (0)