Skip to content

Commit

Permalink
Merge pull request #403 from id-sk/idsk2TomasThur
Browse files Browse the repository at this point in the history
Add languages in header web, add title in adress
  • Loading branch information
TenTibor authored Oct 24, 2022
2 parents e4792b5 + 88aa337 commit c28e5bb
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 29 deletions.
4 changes: 4 additions & 0 deletions app/views/header-web/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,22 @@
text: "Slovenčina",
selected: true,
link: "#"
language: "sk"
},
{
text: "Deutsch",
link: "#"
language: "de"
},
{
text: "English",
link: "#"
language: "en"
},
{
text: "Español",
link: "#"
language: "es"
}
]
},
Expand Down
3 changes: 3 additions & 0 deletions app/views/komponenty/adresa.njk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
{% set exampleComponentHtml %}
{{ idskAddress({
addressTitle: "Adresa podujatia",
title: 'Adresa podujatia',
addressDescription: [
{
text: "Štefánikova 15"
Expand Down Expand Up @@ -63,6 +64,7 @@
{% set exampleComponentHtml %}
{{ idskAddress({
heading: "Ministerstvo investícií, regionálneho rozvoja a informatizácie SR",
title: 'Adresa sídla',
fullWidth: true,
addressDescription: [
{
Expand All @@ -87,6 +89,7 @@
{{ idskAddress({
heading: "Ministerstvo investícií, regionálneho rozvoja a informatizácie SR",
addressTitle: "Oddelenie behaviorálnych inovácií",
title: "Adresa sídla",
fullWidth: true,
addressDescription: [
{
Expand Down
35 changes: 9 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/idsk/components/address/address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ params:
type: string
required: false
description: href link address

- name: title
type: string
required: true
description: text representing address
examples:
- name: ukážka 1
data:
addressTitle: Adresa podujatia
title: Adresa podujatia
addressDescription:
- text: Štefánikova 15
- text: 811 05 Bratislava
Expand All @@ -53,6 +57,7 @@ examples:
data:
heading: Ministerstvo investícií, regionálneho rozvoja a informatizácie SR
fullWidth: true
title: Adresa sídla
addressDescription:
- text: Štefánikova 15
- text: 811 05 Bratislava
Expand All @@ -65,6 +70,7 @@ examples:
data:
heading: Ministerstvo investícií, regionálneho rozvoja a informatizácie SR
addressTitle: Oddelenie behaviorálnych inovácií
title: Adresa sídla
fullWidth: true
addressDescription:
- text: Štefánikova 15
Expand Down
1 change: 1 addition & 0 deletions src/idsk/components/address/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</div>
<iframe
class="idsk-address__map"
title="{{params.title}}"
loading="lazy"
allowfullscreen
src="{{ params.googleMapsLink }}">
Expand Down
20 changes: 20 additions & 0 deletions src/idsk/components/header-web/header-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ params:
type: string
required: false
description: link to english mutation
- name: language
type: string
required: false
description: Set the language
- name: main
type: object
required: true
Expand Down Expand Up @@ -244,12 +248,16 @@ examples:
- text: "Slovenčina"
selected: true,
link: "#"
language: "sk"
- text: "Deutsch"
link: "#"
language: "de"
- text: "English"
link: "#"
language: "en"
- text: "Español"
link: "#"
language: "es"
main:
showLogo: true
logoSrc: "logo-mirri-farebne.svg"
Expand Down Expand Up @@ -299,12 +307,16 @@ examples:
- text: "Slovenčina"
selected: true,
link: "#"
language: "sk"
- text: "Deutsch"
link: "#"
language: "de"
- text: "English"
link: "#"
language: "en"
- text: "Español"
link: "#"
language: "es"
main:
showLogo: true
logoSrc: "logo-mirri-farebne.svg"
Expand Down Expand Up @@ -357,12 +369,16 @@ examples:
- text: "Slovenčina"
selected: true,
link: "#"
language: "sk"
- text: "Deutsch"
link: "#"
language: "de"
- text: "English"
link: "#"
language: "en"
- text: "Español"
link: "#"
language: "es"
main:
title: "Ministerstvo investícií"
loginButton: true
Expand All @@ -378,12 +394,16 @@ examples:
- text: "Slovenčina"
selected: true,
link: "#"
language: "sk"
- text: "Deutsch"
link: "#"
language: "de"
- text: "English"
link: "#"
language: "en"
- text: "Español"
link: "#"
language: "es"
main:
title: "Ministerstvo investícií"
loginButton: true
Expand Down
6 changes: 4 additions & 2 deletions src/idsk/components/header-web/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@
<li class="idsk-header-web__brand-language-list-item">
<a class="govuk-link idsk-header-web__brand-language-list-item-link {{ 'idsk-header-web__brand-language-list-item-link--selected' if language.selected }}"
title="{{ language.text }}"
href="{{ language.link }}">
href="{{ language.link }}"
lang="{{language.language}}"
>
{{ language.text }}
</a>
</li>
Expand Down Expand Up @@ -213,7 +215,7 @@
{% elif main.loginButton %}
<button class="idsk-button idsk-header-web__main-headline-menu-button idsk-header-web__main-headline-menu-button-service"
aria-label="Rozbaliť menu" aria-expanded="false" data-text-for-show="Rozbaliť menu" data-text-for-hide="Zavrieť menu">
<img src="{{ params.assetsPath | default('/assets/images/header-web/') }}/profile.svg" alt="Electronic service menu icon">
<img src="{{ params.assetsPath | default('/assets/images/header-web/') }}/profile.svg" alt="Ikona elektronického servisného menu">
<span class="idsk-header-web__menu-close"></span>
</button>
{% endif %}
Expand Down

0 comments on commit c28e5bb

Please sign in to comment.