Skip to content

Commit

Permalink
remove p-tag from macros
Browse files Browse the repository at this point in the history
  • Loading branch information
mcilurzo committed Jun 28, 2024
1 parent aac9ca4 commit 1d55921
Showing 1 changed file with 9 additions and 27 deletions.
36 changes: 9 additions & 27 deletions src/_includes/macros/macros.njk
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" %}
Expand Down Expand Up @@ -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}}
Expand Down Expand Up @@ -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 %}
Expand Down

0 comments on commit 1d55921

Please sign in to comment.