@anyblades/blades 2.4.4 → 2.4.5
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.
- package/_includes/blades/html.liquid +13 -7
- package/_includes/blades/html.njk +10 -9
- package/_includes/blades/html.twig +10 -9
- package/blades.gemspec +1 -1
- package/package.json +1 -1
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{{- site.title -}}
|
|
10
|
-
</title>
|
|
7
|
+
{% # prettier-ignore %}
|
|
8
|
+
<title>{{ title | strip_html }}{% if title and site.title %} | {% endif %}{{ site.title }}</title>
|
|
11
9
|
<meta name="description" content="{{ description | strip_html }}">
|
|
12
10
|
|
|
13
11
|
<link rel="icon" href="{{ site.favicon | default: '/favicon.ico' }}">
|
|
@@ -18,11 +16,19 @@
|
|
|
18
16
|
<script src="{{ src }}" defer></script>
|
|
19
17
|
{%- endfor %}
|
|
20
18
|
|
|
21
|
-
{{
|
|
19
|
+
{{ content_for_header }}
|
|
20
|
+
{{ site.head_extras | default: '' | join: '\n' }}
|
|
22
21
|
</head>
|
|
23
22
|
|
|
24
|
-
<body>
|
|
25
|
-
{
|
|
23
|
+
<body {{ site.body_attrs }}>
|
|
24
|
+
{% if body %}
|
|
25
|
+
{{ body }}
|
|
26
|
+
{% else %}
|
|
27
|
+
<main>
|
|
28
|
+
<h1>{{ title }}</h1>
|
|
29
|
+
{{ content }}
|
|
30
|
+
</main>
|
|
31
|
+
{% endif %}
|
|
26
32
|
|
|
27
33
|
{{ site.body_extras | default: '' | join: '\n' }}
|
|
28
34
|
</body>
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover" />
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{{- site.title -}}
|
|
10
|
-
</title>
|
|
7
|
+
|
|
8
|
+
<title>{{ title | striptags }}{% if title and site.title %}|{% endif %}{{ site.title }}</title>
|
|
11
9
|
<meta name="description" content="{{ description | striptags }}" />
|
|
12
10
|
|
|
13
11
|
<link rel="icon" href="{{ site.favicon | d('/favicon.ico') }}" />
|
|
@@ -18,19 +16,22 @@
|
|
|
18
16
|
<script src="{{ src }}" defer></script>
|
|
19
17
|
{%- endfor %}
|
|
20
18
|
|
|
21
|
-
{{
|
|
19
|
+
{{ content_for_header | safe }}
|
|
20
|
+
{{ site.head_extras | d([]) | join('\n') | safe }}
|
|
22
21
|
</head>
|
|
23
22
|
|
|
24
|
-
<body>
|
|
23
|
+
<body {{ site.body_attrs | safe }}>
|
|
25
24
|
{% block body %}
|
|
25
|
+
<main>
|
|
26
|
+
<h1>{{ title }}</h1>
|
|
27
|
+
{{ content | safe }}
|
|
28
|
+
</main>
|
|
26
29
|
{% endblock %}
|
|
27
30
|
|
|
28
|
-
{{
|
|
31
|
+
{{ site.body_extras | d([]) | join('\n') | safe }}
|
|
29
32
|
</body>
|
|
30
33
|
</html>
|
|
31
34
|
{#```
|
|
32
|
-
- `title | string` to avoid error with `| striptags` when you pass a pure number.
|
|
33
|
-
|
|
34
35
|
<!--section:docs-->
|
|
35
36
|
|
|
36
37
|
Usage in Nunjucks layout:
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover" />
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{{- site.title -}}
|
|
10
|
-
</title>
|
|
7
|
+
|
|
8
|
+
<title>{{ title|striptags }}{% if title and site.title %} | {% endif %}{{ site.title }}</title>
|
|
11
9
|
<meta name="description" content="{{ description|striptags }}" />
|
|
12
10
|
|
|
13
11
|
<link rel="icon" href="{{ site.favicon|default('/favicon.ico') }}" />
|
|
@@ -18,19 +16,22 @@
|
|
|
18
16
|
<script src="{{ src }}" defer></script>
|
|
19
17
|
{%- endfor %}
|
|
20
18
|
|
|
21
|
-
{{
|
|
19
|
+
{{ content_for_header|raw }}
|
|
20
|
+
{{ site.head_extras|default([])|join('\n')|raw }}
|
|
22
21
|
</head>
|
|
23
22
|
|
|
24
|
-
<body>
|
|
23
|
+
<body {{ site.body_attrs|raw }}>
|
|
25
24
|
{% block body %}
|
|
25
|
+
<main>
|
|
26
|
+
<h1>{{ title }}</h1>
|
|
27
|
+
{{ content|raw }}
|
|
28
|
+
</main>
|
|
26
29
|
{% endblock %}
|
|
27
30
|
|
|
28
|
-
{{
|
|
31
|
+
{{ site.body_extras|default([])|join('\n')|raw }}
|
|
29
32
|
</body>
|
|
30
33
|
</html>
|
|
31
34
|
{#```
|
|
32
|
-
- `title ? …` renders the prefix only when a title is set, mirroring the Nunjucks `if title` guard.
|
|
33
|
-
|
|
34
35
|
<!--section:docs-->
|
|
35
36
|
|
|
36
37
|
Usage in Twig layout:
|
package/blades.gemspec
CHANGED