-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1138 from City-of-Helsinki/UHF-8689
UHF-8689: Captions for illustrations on special pages
- Loading branch information
Showing
11 changed files
with
104 additions
and
69 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.special-page__illustration-container { | ||
--illustration-large-width: 379px; | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: flex-start; | ||
|
||
@include breakpoint($breakpoint-m) { | ||
max-width: 100%; | ||
padding-left: $spacing-sextuple; | ||
width: 50%; | ||
} | ||
} | ||
|
||
.special-page__illustration { | ||
display: block; | ||
height: auto; | ||
margin-bottom: $spacing; | ||
margin-top: $spacing-triple; | ||
max-width: var(--illustration-large-width); | ||
width: 100%; | ||
|
||
@include breakpoint($breakpoint-m) { | ||
margin-left: 0; | ||
margin-top: 0; | ||
} | ||
} | ||
|
||
.special-page__illustration__caption { | ||
max-width: var(--illustration-large-width); | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{# | ||
{% embed '@hdbt/misc/special-page-illustration.twig' with { | ||
illustration_modifier_class: 'special-page__illustration-container--modifier-class', | ||
illustration_url: '/url/to/illustration.svg', | ||
illustration_width: '200', | ||
illustration_height: '500', | ||
illustration_caption: 'Photo: @photographer'|t({'@photographer': 'Petra Photographer'}, {'context': 'Image photographer'}), | ||
} %} | ||
{% endembed %} | ||
#} | ||
|
||
<figure class="special-page__illustration-container {{ illustration_modifier_class }}"> | ||
<img | ||
src="{{ illustration_url }}" | ||
class="special-page__illustration" | ||
alt | ||
{% if illustration_width %}width="{{ illustration_width }}"{% endif %} | ||
{% if illustration_height %}height="{{ illustration_height }}"{% endif %} | ||
/> | ||
<figcaption class="special-page__illustration__caption"> | ||
{{ illustration_caption }} | ||
</figcaption> | ||
</figure> |