Skip to content

Commit f452ebc

Browse files
authored
v5 support (#23)
* Prefix SVG tag attributes * Update composer.json * Support v4 and v5
1 parent 9720dde commit f452ebc

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
},
1919
"require": {
2020
"laravel/prompts": "^0.1",
21-
"statamic/cms": "^4.0"
21+
"statamic/cms": "^4.0 || ^5.0"
2222
}
2323
}

resources/stubs/presets/banner/banner.antlers.html.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{{ /partial:typography/prose }}
1818

1919
<button class="outline-white" aria-label="{{ trans:strings.banner_close }}" @click="visible = false">
20-
{{ svg:close class="w-4 h-4 fill-white" aria-hidden="true" }}
20+
{{ svg:close attr:class="w-4 h-4 fill-white" attr:aria-hidden="true" }}
2121
</button>
2222
</div>
2323
</section>

resources/stubs/presets/business_hours/call_now.antlers.html.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
x-cloak
2323
>
2424
<span class="text-neutral-500">{{ business_hours:label }}</span>
25-
{{ svg:phone class="w-4 h-4 fill-current" aria-hidden="true" }}
25+
{{ svg:phone attr:class="w-4 h-4 fill-current" attr:aria-hidden="true" }}
2626
<span class="">{{ business_hours:phone_number }}</span>
2727
<span x-show="open" class="w-3 h-3 rounded-full bg-green-600"></span>
2828
<span x-show="closed" class="w-3 h-3 rounded-full bg-red-600"></span>

resources/stubs/presets/pricing/resources/views/page_builder/_features.antlers.html.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@
7777
<p class="sr-only">{{ trans:strings.pricing_included_sr :tier="title" }}</p>
7878

7979
<div class="w-6 h-6 flex justify-center items-center rounded-full bg-green-200" aria-hidden="true">
80-
{{ svg:check class="w-3 h-3 fill-green-900" }}
80+
{{ svg:check attr:class="w-3 h-3 fill-green-900" }}
8181
</div>
8282
{{ /if }}
8383
{{ else }}
8484
<p class="sr-only">{{ trans:strings.pricing_excluded_sr :tier="title" }}</p>
8585

8686
<div class="w-6 h-6 flex justify-center items-center rounded-full bg-gray-200" aria-hidden="true">
87-
{{ svg:cross class="w-2 h-2 fill-gray-900" }}
87+
{{ svg:cross attr:class="w-2 h-2 fill-gray-900" }}
8888
</div>
8989
{{ /if }}
9090
</div>

resources/stubs/presets/search/search.antlers.html.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<input class="w-full pr-10 rounded border-neutral caret-primary focus-visible:ring-primary" placeholder="{{ trans:strings.search }}" type="search" value="{{ get:q }}" name="q"/>
2020

2121
<button class="absolute inset-y-0 right-0 flex mr-1 items-center text-neutral hover:text-primary rounded" aria-label="{{ trans:strings.search }}">
22-
{{ svg:search class="w-5 h-5 fill-current motion-safe:transition-colors" alt="" aria-hidden="true" }}
22+
{{ svg:search attr:class="w-5 h-5 fill-current motion-safe:transition-colors" attr:alt="" attr:aria-hidden="true" }}
2323
</button>
2424
</form>
2525

resources/stubs/presets/search/search_form.antlers.html.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
: '{{ trans:strings.search_open }}'"
2727
:aria-expanded="open"
2828
>
29-
{{ svg:search class="w-5 h-5 fill-current motion-safe:transition-colors" alt="" aria-hidden="true" }}
29+
{{ svg:search attr:class="w-5 h-5 fill-current motion-safe:transition-colors" attr:alt="" attr:aria-hidden="true" }}
3030
</button>
3131

3232
<form
@@ -51,7 +51,7 @@
5151
:disabled="value.length === 0"
5252
:class="{ 'opacity-25 cursor-default': value.length === 0, 'opacity-100': value.length > 0 }"
5353
>
54-
{{ svg:search class="w-5 h-5 fill-current motion-safe:transition-colors" alt="" aria-hidden="true" }}
54+
{{ svg:search attr:class="w-5 h-5 fill-current motion-safe:transition-colors" attr:alt="" attr:aria-hidden="true" }}
5555
</button>
5656
</form>
5757
</li>

resources/stubs/presets/theme_toggle/theme_toggle.antlers.html.stub

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
>
1414
{{ icon_classes = 'w-4 h-4 stroke-current overflow-visible' }}
1515
<div x-show="$store.theme.get() === 'light'">
16-
{{ svg:sun class="{icon_classes}" alt="" aria-hidden="true" }}
16+
{{ svg:sun attr:class="{icon_classes}" attr:alt="" attr:aria-hidden="true" }}
1717
</div>
1818
<div x-show="$store.theme.get() === 'dark'">
19-
{{ svg:moon class="{icon_classes}" alt="" aria-hidden="true" }}
19+
{{ svg:moon attr:class="{icon_classes}" attr:alt="" attr:aria-hidden="true" }}
2020
</div>
2121
<div x-show="$store.theme.get() === 'system'">
22-
{{ svg:sun x-show="preferredColorScheme === 'light'" class="{icon_classes} opacity-50" alt="" aria-hidden="true" }}
23-
{{ svg:moon x-show="preferredColorScheme === 'dark'" class="{icon_classes} opacity-50" alt="" aria-hidden="true" }}
22+
{{ svg:sun attr:x-show="preferredColorScheme === 'light'" attr:class="{icon_classes} opacity-50" attr:alt="" attr:aria-hidden="true" }}
23+
{{ svg:moon attr:x-show="preferredColorScheme === 'dark'" attr:class="{icon_classes} opacity-50" attr:alt="" attr:aria-hidden="true" }}
2424
</div>
2525
</button>
2626
<div
@@ -38,7 +38,7 @@
3838
title="{{ trans:strings.theme_toggle_light }}"
3939
class="{{ button_classes }}"
4040
>
41-
{{ svg:sun class="{icon_classes}" alt="" aria-hidden="true" }}
41+
{{ svg:sun attr:class="{icon_classes}" attr:alt="" attr:aria-hidden="true" }}
4242
<span class="{{ label_classes }}">{{ trans:strings.theme_toggle_light_short }}</span>
4343
</button>
4444
<button
@@ -48,7 +48,7 @@
4848
title="{{ trans:strings.theme_toggle_dark }}"
4949
class="{{ button_classes }}"
5050
>
51-
{{ svg:moon class="{icon_classes}" alt="" aria-hidden="true" }}
51+
{{ svg:moon attr:class="{icon_classes}" attr:alt="" attr:aria-hidden="true" }}
5252
<span class="{{ label_classes }}">{{ trans:strings.theme_toggle_dark_short }}</span>
5353
</button>
5454
<button
@@ -58,7 +58,7 @@
5858
title="{{ trans:strings.theme_toggle_system }}"
5959
class="{{ button_classes }}"
6060
>
61-
{{ svg:cog class="{icon_classes}" alt="" aria-hidden="true" }}
61+
{{ svg:cog attr:class="{icon_classes}" attr:alt="" attr:aria-hidden="true" }}
6262
<span class="{{ label_classes }}">{{ trans:strings.theme_toggle_system_short }}</span>
6363
</button>
6464
</div>

0 commit comments

Comments
 (0)