@anyblades/blades 2.4.2 → 2.4.4
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 +10 -15
- package/_includes/blades/html.njk +12 -16
- package/_includes/blades/html.twig +8 -14
- package/blades.gemspec +1 -1
- package/css/blades.css +1 -1
- package/css/blades.standalone.core.css +1 -1
- package/css/blades.standalone.css +1 -1
- package/css/link-icon.css +1 -1
- package/package.json +2 -1
- package/src/link-icon.css +1 -1
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
{% comment %}<!--section:code-->```liquid{% endcomment %}
|
|
1
|
+
{% comment %}<!--section:code-->```liquid {% endcomment %}
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html lang="{{ site.lang | default: 'en' }}">
|
|
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
|
-
<link rel="icon" href="{{ site.favicon | default: '/favicon.svg' }}">
|
|
8
|
-
{% if site.favicon_alt %}
|
|
9
|
-
<link rel="alternate icon" href="{{ site.favicon_alt }}" type="image/png">
|
|
10
|
-
{% endif %}
|
|
11
7
|
<title>
|
|
12
8
|
{%- if title %}{{ title | strip_html | append: ' | ' }}{% endif -%}
|
|
13
9
|
{{- site.title -}}
|
|
14
10
|
</title>
|
|
15
11
|
<meta name="description" content="{{ description | strip_html }}">
|
|
16
12
|
|
|
13
|
+
<link rel="icon" href="{{ site.favicon | default: '/favicon.ico' }}">
|
|
17
14
|
{%- for href in site.styles %}
|
|
18
15
|
<link rel="stylesheet" href="{{ href | relative_url }}">
|
|
19
16
|
{%- endfor %}
|
|
20
|
-
<style>
|
|
21
|
-
{{ site.inline_styles | join: '\n' }}
|
|
22
|
-
</style>
|
|
23
|
-
|
|
24
17
|
{%- for src in site.scripts %}
|
|
25
18
|
<script src="{{ src }}" defer></script>
|
|
26
19
|
{%- endfor %}
|
|
27
|
-
<script type="module">
|
|
28
|
-
{{ site.inline_scripts | join: '\n' }}
|
|
29
|
-
</script>
|
|
30
20
|
|
|
31
|
-
{{ content_for_header }}
|
|
21
|
+
{{ site.head_extras | default: '' | join: '\n' | append: content_for_header }}
|
|
32
22
|
</head>
|
|
33
23
|
|
|
34
24
|
<body>
|
|
35
25
|
{{ body }}
|
|
26
|
+
|
|
27
|
+
{{ site.body_extras | default: '' | join: '\n' }}
|
|
36
28
|
</body>
|
|
37
29
|
</html>
|
|
30
|
+
{% # prettier-ignore %}
|
|
38
31
|
{% comment %}```
|
|
39
32
|
<!--section:docs-->
|
|
33
|
+
|
|
40
34
|
Usage in Liquid layout:
|
|
41
35
|
|
|
42
36
|
```liquid
|
|
@@ -45,5 +39,6 @@ Usage in Liquid layout:
|
|
|
45
39
|
{% include blades/html.liquid %}
|
|
46
40
|
```
|
|
47
41
|
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
Live example: https://github.com/anyblades/buildawesome-starters/blob/main/site-liquid/_includes/default.liquid
|
|
43
|
+
|
|
44
|
+
{% endcomment %}
|
|
@@ -1,45 +1,38 @@
|
|
|
1
|
-
{
|
|
1
|
+
{#<!--section:code-->```jinja2 #}
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html lang="{{ site.lang | d('en') }}">
|
|
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
|
-
<link rel="icon" href="{{ site.favicon | d('/favicon.svg') }}" />
|
|
8
|
-
{% if site.favicon_alt %}
|
|
9
|
-
<link rel="alternate icon" href="{{ site.favicon_alt }}" type="image/png" />
|
|
10
|
-
{% endif %}
|
|
11
7
|
<title>
|
|
12
8
|
{{- title | string | striptags ~ ' | ' if title -}}
|
|
13
9
|
{{- site.title -}}
|
|
14
10
|
</title>
|
|
15
11
|
<meta name="description" content="{{ description | striptags }}" />
|
|
16
12
|
|
|
13
|
+
<link rel="icon" href="{{ site.favicon | d('/favicon.ico') }}" />
|
|
17
14
|
{%- for href in site.styles %}
|
|
18
15
|
<link rel="stylesheet" href="{{ href }}" />
|
|
19
16
|
{%- endfor %}
|
|
20
|
-
{# prettier-ignore-start #}<style>
|
|
21
|
-
{{ site.inline_styles | d([]) | join('\n') | safe }}
|
|
22
|
-
</style>{# prettier-ignore-end #}
|
|
23
|
-
|
|
24
17
|
{%- for src in site.scripts %}
|
|
25
18
|
<script src="{{ src }}" defer></script>
|
|
26
19
|
{%- endfor %}
|
|
27
|
-
{# prettier-ignore-start #}<script type="module">
|
|
28
|
-
{{ site.inline_scripts | d([]) | join('\n') | safe }}
|
|
29
|
-
</script>{# prettier-ignore-end #}
|
|
30
20
|
|
|
31
|
-
{{ content_for_header | safe }}
|
|
21
|
+
{{ (site.head_extras | d([]) | join('\n') ~ content_for_header) | safe }}
|
|
32
22
|
</head>
|
|
33
23
|
|
|
34
24
|
<body>
|
|
35
25
|
{% block body %}
|
|
36
26
|
{% endblock %}
|
|
27
|
+
|
|
28
|
+
{{ (site.body_extras | d([]) | join('\n')) | safe }}
|
|
37
29
|
</body>
|
|
38
30
|
</html>
|
|
39
31
|
{#```
|
|
40
|
-
- `title | string`
|
|
32
|
+
- `title | string` to avoid error with `| striptags` when you pass a pure number.
|
|
41
33
|
|
|
42
34
|
<!--section:docs-->
|
|
35
|
+
|
|
43
36
|
Usage in Nunjucks layout:
|
|
44
37
|
|
|
45
38
|
```jinja2
|
|
@@ -48,5 +41,8 @@ Usage in Nunjucks layout:
|
|
|
48
41
|
{% block body %}...{% endblock %}
|
|
49
42
|
```
|
|
50
43
|
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
Live examples:
|
|
45
|
+
- https://github.com/anyblades/buildawesome-starters/blob/main/_includes/default.njk
|
|
46
|
+
- https://github.com/anyblades/subtle/blob/main/.11ty/_includes/default.njk
|
|
47
|
+
|
|
48
|
+
#}
|
|
@@ -1,45 +1,38 @@
|
|
|
1
|
-
{
|
|
1
|
+
{#<!--section:code-->```twig #}
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html lang="{{ site.lang|default('en') }}">
|
|
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
|
-
<link rel="icon" href="{{ site.favicon|default('/favicon.svg') }}" />
|
|
8
|
-
{% if site.favicon_alt %}
|
|
9
|
-
<link rel="alternate icon" href="{{ site.favicon_alt }}" type="image/png" />
|
|
10
|
-
{% endif %}
|
|
11
7
|
<title>
|
|
12
8
|
{{- title ? title|striptags ~ ' | ' -}}
|
|
13
9
|
{{- site.title -}}
|
|
14
10
|
</title>
|
|
15
11
|
<meta name="description" content="{{ description|striptags }}" />
|
|
16
12
|
|
|
13
|
+
<link rel="icon" href="{{ site.favicon|default('/favicon.ico') }}" />
|
|
17
14
|
{%- for href in site.styles %}
|
|
18
15
|
<link rel="stylesheet" href="{{ href }}" />
|
|
19
16
|
{%- endfor %}
|
|
20
|
-
<style>
|
|
21
|
-
{{ site.inline_styles|default([])|join('\n')|raw }}
|
|
22
|
-
</style>
|
|
23
|
-
|
|
24
17
|
{%- for src in site.scripts %}
|
|
25
18
|
<script src="{{ src }}" defer></script>
|
|
26
19
|
{%- endfor %}
|
|
27
|
-
<script type="module">
|
|
28
|
-
{{ site.inline_scripts|default([])|join('\n')|raw }}
|
|
29
|
-
</script>
|
|
30
20
|
|
|
31
|
-
{{
|
|
21
|
+
{{ (site.head_extras|default([])|join('\n') ~ content_for_header)|raw }}
|
|
32
22
|
</head>
|
|
33
23
|
|
|
34
24
|
<body>
|
|
35
25
|
{% block body %}
|
|
36
26
|
{% endblock %}
|
|
27
|
+
|
|
28
|
+
{{ (site.body_extras|default([])|join('\n'))|raw }}
|
|
37
29
|
</body>
|
|
38
30
|
</html>
|
|
39
31
|
{#```
|
|
40
32
|
- `title ? …` renders the prefix only when a title is set, mirroring the Nunjucks `if title` guard.
|
|
41
33
|
|
|
42
34
|
<!--section:docs-->
|
|
35
|
+
|
|
43
36
|
Usage in Twig layout:
|
|
44
37
|
|
|
45
38
|
```twig
|
|
@@ -49,4 +42,5 @@ Usage in Twig layout:
|
|
|
49
42
|
```
|
|
50
43
|
|
|
51
44
|
Pass `site`, `title` and `description` via the render context.
|
|
52
|
-
|
|
45
|
+
|
|
46
|
+
#}
|
package/blades.gemspec
CHANGED
package/css/blades.css
CHANGED
|
@@ -3327,7 +3327,7 @@ a > i {
|
|
|
3327
3327
|
text-underline-offset: -2em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
|
|
3328
3328
|
}
|
|
3329
3329
|
/* Favicons */
|
|
3330
|
-
a > i > img {
|
|
3330
|
+
a > i > img:not(.does-not-exist) /* soft win specificity over img:not([height]) */ {
|
|
3331
3331
|
display: inline-block; /* for Tailwind CSS Typography */
|
|
3332
3332
|
max-width: none; /* to keep ratio safe */
|
|
3333
3333
|
height: 1.25em;
|
|
@@ -364,7 +364,7 @@ a > i {
|
|
|
364
364
|
|
|
365
365
|
/* Favicons */
|
|
366
366
|
|
|
367
|
-
a > i > img {
|
|
367
|
+
a > i > img:not(.does-not-exist) /* soft win specificity over img:not([height]) */ {
|
|
368
368
|
display: inline-block; /* for Tailwind CSS Typography */
|
|
369
369
|
max-width: none; /* to keep ratio safe */
|
|
370
370
|
height: 1.25em;
|
|
@@ -364,7 +364,7 @@ a > i {
|
|
|
364
364
|
|
|
365
365
|
/* Favicons */
|
|
366
366
|
|
|
367
|
-
a > i > img {
|
|
367
|
+
a > i > img:not(.does-not-exist) /* soft win specificity over img:not([height]) */ {
|
|
368
368
|
display: inline-block; /* for Tailwind CSS Typography */
|
|
369
369
|
max-width: none; /* to keep ratio safe */
|
|
370
370
|
height: 1.25em;
|
package/css/link-icon.css
CHANGED
|
@@ -14,7 +14,7 @@ a > i {
|
|
|
14
14
|
text-underline-offset: -2em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
|
|
15
15
|
}
|
|
16
16
|
/* Favicons */
|
|
17
|
-
a > i > img {
|
|
17
|
+
a > i > img:not(.does-not-exist) /* soft win specificity over img:not([height]) */ {
|
|
18
18
|
display: inline-block; /* for Tailwind CSS Typography */
|
|
19
19
|
max-width: none; /* to keep ratio safe */
|
|
20
20
|
height: 1.25em;
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anyblades/blades",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": "./src/blades.css",
|
|
6
6
|
"./standalone": "./src/blades.standalone.css",
|
|
7
7
|
"./standalone/core": "./src/blades.standalone.core.css",
|
|
8
8
|
"./standalone/theme": "./src/blades.standalone.theme.css",
|
|
9
|
+
"./ninja": "./src/blades.ninja.css",
|
|
9
10
|
"./float-label": "./src/float-label.css"
|
|
10
11
|
},
|
|
11
12
|
"=== DEV ONLY": "===",
|
package/src/link-icon.css
CHANGED
|
@@ -15,7 +15,7 @@ a {
|
|
|
15
15
|
text-underline-offset: -2em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
|
|
16
16
|
|
|
17
17
|
/* Favicons */
|
|
18
|
-
> img {
|
|
18
|
+
> img:not(.does-not-exist) /* soft win specificity over img:not([height]) */ {
|
|
19
19
|
height: 1.25em;
|
|
20
20
|
margin-block-start: calc(-0.25em / 2);
|
|
21
21
|
max-width: none; /* to keep ratio safe */
|