-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
27 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,26 +1,14 @@ | ||
{% macro imageWithMode(params) %} | ||
<div class="boxed-image light"><figure class="responsiveimage"><img src="{{ params.url }}-light.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}-light.webp 1x, {{ params.url }}[email protected] 2x, {{ params.url }}[email protected] 3x" /></figure><figure class="responsiveimage"><img src="{{ params.url }}-dark.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}-dark.webp 1x, {{ params.url }}[email protected] 2x, {{ params.url }}[email protected] 3x" /></figure></div>{% include "../documentation/mode-switch.njk" %} | ||
{% endmacro %} | ||
{% macro imageWithMode(params) %}<div class="boxed-image light"><figure class="responsiveimage"><img src="{{ params.url }}-light.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}-light.webp 1x, {{ params.url }}[email protected] 2x, {{ params.url }}[email protected] 3x" /></figure><figure class="responsiveimage"><img src="{{ params.url }}-dark.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}-dark.webp 1x, {{ params.url }}[email protected] 2x, {{ params.url }}[email protected] 3x" /></figure></div>{% include "../documentation/mode-switch.njk" %}{% endmacro %} | ||
|
||
{% macro imageOnGreyBackground(params) %} | ||
<div class="boxed-image"><figure class="responsiveimage"><img src="{{ params.url }}.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}.webp 1x, {{ params.url }}@2x.webp 2x, {{ params.url }}@3x.webp 3x" /></figure></div> | ||
{% endmacro %} | ||
{% macro imageOnGreyBackground(params) %}<div class="boxed-image"><figure class="responsiveimage"><img src="{{ params.url }}.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}.webp 1x, {{ params.url }}@2x.webp 2x, {{ params.url }}@3x.webp 3x" /></figure></div>{% endmacro %} | ||
|
||
{% macro imageSpec(params) %} | ||
<div class="boxed-image specification"><figure class="responsiveimage"><img src="{{ params.url }}.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}.webp 1x, {{ params.url }}@2x.webp 2x, {{ params.url }}@3x.webp 3x" /></figure></div> | ||
{% endmacro %} | ||
{% macro imageSpec(params) %}<div class="boxed-image specification"><figure class="responsiveimage"><img src="{{ params.url }}.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}.webp 1x, {{ params.url }}@2x.webp 2x, {{ params.url }}@3x.webp 3x" /></figure></div>{% endmacro %} | ||
|
||
{% macro principleImage(params) %} | ||
<figure class="principle-image"><img src="{{ params.url }}.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}.webp 1x, {{ params.url }}@2x.webp 2x, {{ params.url }}@3x.webp 3x" /></figure> | ||
{% endmacro %} | ||
{% macro principleImage(params) %}<figure class="principle-image"><img src="{{ params.url }}.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}.webp 1x, {{ params.url }}@2x.webp 2x, {{ params.url }}@3x.webp 3x" /></figure>{% endmacro %} | ||
|
||
{% macro webpImage(params) %} | ||
<figure class="default-image"><img src="{{ params.url }}.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}.webp 1x, {{ params.url }}@2x.webp 2x, {{ params.url }}@3x.webp 3x" /></figure> | ||
{% endmacro %} | ||
{% macro webpImage(params) %}<figure class="default-image"><img src="{{ params.url }}.webp" alt="{{ params.alt }}" title="{{ params.title }}" sizes="100vw" srcset="{{ params.url }}.webp 1x, {{ params.url }}@2x.webp 2x, {{ params.url }}@3x.webp 3x" /></figure>{% endmacro %} | ||
|
||
{% macro svgImage(params) %} | ||
<figure class="svg-image"><img src="{{ params.url }}.svg" alt="{{ params.alt }}" title="{{ params.title }}"></figure> | ||
{% endmacro %} | ||
{% macro svgImage(params) %}<figure class="svg-image"><img src="{{ params.url }}.svg" alt="{{ params.alt }}" title="{{ params.title }}"></figure>{% endmacro %} | ||
|
||
{% macro buttonGroup(params) %} | ||
{% if params.type == "link" %} | ||
|
@@ -54,19 +42,15 @@ | |
<h2>{{ params.translations["variant-components"] }}</h2> | ||
{% else %} | ||
|
||
{% endif %} | ||
<sbb-link-list orientation="vertical"> | ||
{% endif %}<sbb-link-list orientation="vertical"> | ||
{% for sibling in params.collection %}<sbb-block-link href="{{ sibling.url }}">{{ sibling.data.title}}</sbb-block-link>{% endfor %} | ||
</sbb-link-list> | ||
{% endmacro %} | ||
|
||
|
||
{% macro lynePlayground(params) %} | ||
{% set pattern = params.json %} | ||
|
||
|
||
{% if pattern.content !== '' %} | ||
<h2>{{ params.translations["playground"] }}</h2> | ||
{% if pattern.content !== '' %}<h2>{{ params.translations["playground"] }}</h2> | ||
<div class="demo {% if params.wide == true %}wide{% endif %}"> | ||
<div class="background" id="background"> | ||
{{pattern.content | safe}} | ||
|
@@ -104,13 +88,11 @@ | |
{% else %} | ||
{% endif %} | ||
<script src="/assets/js/lyne-playground.js"></script> | ||
|
||
{% endmacro %} | ||
|
||
|
||
|
||
{% macro lyneExamples(params) %} | ||
<h2>{{ params.translations["examples"] }}</h2> | ||
{% macro lyneExamples(params) %}<h2>{{ params.translations["examples"] }}</h2> | ||
{% set tag = params.tag %} | ||
{% set stories = params.stories %} | ||
{% for story, stor in stories %} | ||
|