Skip to content

Commit 10e23ac

Browse files
committed
Add back banner
1 parent a49fa40 commit 10e23ac

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
{{ banner:text }}
1717
{{ /partial:typography/prose }}
1818

19-
<button class="outline-white" @click="visible = false">
20-
{{ svg:close class="w-4 h-4 fill-white" }}
19+
<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" }}
2121
</button>
2222
</div>
2323
</section>

src/Commands/InstallPresetPresets.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,41 @@ trait InstallPresetPresets {
66

77
public function getPresets() {
88
$this->presets = collect([
9+
[
10+
'handle' => 'banner',
11+
'name' => 'Banner',
12+
'description' => 'A banner on top of your site users can click to hide.',
13+
'operations' => [
14+
[
15+
'type' => 'copy',
16+
'input' => 'banner_blueprint.yaml.stub',
17+
'output' => 'resources/blueprints/globals/banner.yaml'
18+
],
19+
[
20+
'type' => 'copy',
21+
'input' => 'banner_global.yaml.stub',
22+
'output' => 'content/globals/banner.yaml'
23+
],
24+
[
25+
'type' => 'copy',
26+
'input' => 'banner.antlers.html.stub',
27+
'output' => 'resources/views/layout/_banner.antlers.html'
28+
],
29+
[
30+
'type' => 'copy',
31+
'input' => 'close.svg.stub',
32+
'output' => 'resources/svg/close.svg'
33+
],
34+
[
35+
'type' => 'notify',
36+
'content' => "Add this to your `lang/locale/strings.php` file:\n\n// Banner\n'banner_close' => 'Close banner',"
37+
],
38+
[
39+
'type' => 'notify',
40+
'content' => "Make sure to add `{{ partial:layout/banner }}` to your layout file after opening the `<body>`."
41+
]
42+
]
43+
],
944
[
1045
'handle' => 'breadcrumbs',
1146
'name' => 'Breadcrumbs',

0 commit comments

Comments
 (0)