@anydigital/bricks 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
- {% # if-true trick not to break auto-formatting %}
3
- {% if true %}<html lang="{{ site.lang | default: 'en' }}">{% endif %}
2
+ {% if true %}
3
+ <html lang="{{ site.lang | default: 'en' }}">
4
+ {% endif %}
4
5
 
5
6
  <head>
6
7
  <meta charset="utf-8">
@@ -11,29 +12,24 @@
11
12
  </title>
12
13
  <link rel="icon" href="/favicon.ico">
13
14
 
14
- {% # styles %}
15
15
  {%- for href in site.styles %}
16
16
  <link rel="stylesheet" href="{{ href }}">
17
17
  {%- endfor %}
18
- <style>
19
- {{ site.inline_styles | join: '\n' }}
20
- </style>
18
+ {% # prettier-ignore %}
19
+ <style>{{ site.inline_styles | join: '\n' }}</style>
20
+ {% # %}
21
21
 
22
- {% # scripts %}
23
22
  {%- for src in site.scripts %}
24
23
  <script src="{{ src }}" defer></script>
25
24
  {%- endfor %}
26
- <script type="module">
27
- {{ site.inline_scripts | join: '\n' }}
28
- </script>
25
+ {% # prettier-ignore %}
26
+ <script type="module">{{ site.inline_scripts | join: '\n' }}</script>
27
+ {% # %}
29
28
 
30
- {% # custom %}
31
29
  {{ content_for_header }}
32
-
33
30
  {% render './_gtm', site: site %}
34
31
  </head>
35
32
 
36
- {% # if-true trick not to break auto-formatting %}
37
33
  {% if true %}
38
34
  <body>
39
35
  {% render './_gtm', site: site, for_body: true %}
@@ -0,0 +1,40 @@
1
+ <!doctype html>
2
+ {# prettier-ignore-start #}
3
+ <html lang="{{ site.lang | d('en') }}">
4
+ {# prettier-ignore-end #}
5
+
6
+ <head>
7
+ <meta charset="utf-8" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover" />
9
+ <title>
10
+ {{- title | strip_html ~ ' | ' if title -}}
11
+ {{- site.title -}}
12
+ </title>
13
+ <link rel="icon" href="/favicon.ico" />
14
+
15
+ {%- for href in site.styles %}
16
+ <link rel="stylesheet" href="{{ href }}" />
17
+ {%- endfor %}
18
+ {# prettier-ignore-start #}
19
+ <style>{{ site.inline_styles | d([]) | join('\n') }}</style>
20
+ {# prettier-ignore-end #}
21
+
22
+ {%- for src in site.scripts %}
23
+ <script src="{{ src }}" defer></script>
24
+ {%- endfor %}
25
+ {# prettier-ignore-start #}
26
+ <script type="module">{{ site.inline_scripts | d([]) | join('\n') }}</script>
27
+ {# prettier-ignore-end #}
28
+
29
+ {{ content_for_header }}
30
+ {% include 'bricks/_gtm.njk' %}
31
+ </head>
32
+
33
+ {# prettier-ignore-start #}
34
+ <body>
35
+ {% set for_body = true %}{% include 'bricks/_gtm.njk' %}
36
+ {% block body %}{% endblock %}
37
+ </body>
38
+
39
+ </html>
40
+ {# prettier-ignore-end #}
@@ -0,0 +1,22 @@
1
+ {% if site.prod and site.gtm_id %}
2
+ {# prettier-ignore-start #}
3
+ {% if not for_body %}
4
+
5
+ <!-- Google Tag Manager -->
6
+ <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
7
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
8
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
9
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
10
+ })(window,document,'script','dataLayer','{{ site.gtm_id }}');</script>
11
+ <!-- End Google Tag Manager -->
12
+
13
+ {% else %}
14
+
15
+ <!-- Google Tag Manager (noscript) -->
16
+ <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ site.gtm_id }}"
17
+ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
18
+ <!-- End Google Tag Manager (noscript) -->
19
+
20
+ {% endif %}
21
+ {# prettier-ignore-end #}
22
+ {% endif %}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anydigital/bricks",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Framework-agnostic CSS utilities and single-file Liquid 'bricks' for modern web development.",
5
5
  "main": "dist/bricks.css",
6
6
  "style": "dist/bricks.css",