src/components/template-components/side-nav
// src/components/template-components/side-nav/schema.yaml
$schema: http://json-schema.org/draft-07/schema
$id: /template-components/side-nav
additionalProperties: false
type: object
required:
- menu
properties:
language_switcher:
type: string
format: html
description: template-components/side-nav/language
footer_link:
type: string
format: html
description: elements/link
menu:
type: string
format: html
description: template-components/side-nav/menu
// src/components/template-components/side-nav/mocks.yaml
language_switcher:
$ref: template-components/side-nav/language
$tpl: template-components/side-nav/language
footer_link:
$ref: elements/link#with-icon
$tpl: elements/link
label: Finstral.com
url: https://www.finstral.com
menu:
$ref: template-components/side-nav/menu
$tpl: template-components/side-nav/menu
// src/components/template-components/side-nav/side-nav.twig
<nav class="SideNav js-SideNav" id="side-nav" aria-labelledby="header-menu-toggle">
<div class="SideNav-menu">{{ menu }}</div>
<div class="SideNav-footer">
{{ footer_link }}
{{ language_switcher }}
</div>
</nav>
<aside class="SideNav-overlay js-SideNav-overlay" aria-hidden="true"></aside>
default mock data
language_switcher:
$ref: template-components/side-nav/language
$tpl: template-components/side-nav/language
footer_link:
$ref: elements/link#with-icon
$tpl: elements/link
label: Finstral.com
url: https://www.finstral.com
menu:
$ref: template-components/side-nav/menu
$tpl: template-components/side-nav/menu