Skip to content

Commit 48ecaa8

Browse files
authored
General fixes (#3)
* Header upgrade Logo is now centered. Icons no longer wrap on smaller devices * Homepage product adjustments Title changed. Product grid now checks if no results. * Added X-CSRF-TOKEN header to wretch config * Added Tailwind typography
1 parent c32fd43 commit 48ecaa8

8 files changed

Lines changed: 447 additions & 29 deletions

File tree

stubs/resources/css/prose.css

Lines changed: 408 additions & 0 deletions
Large diffs are not rendered by default.

stubs/resources/css/site.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@import './buttons';
88
@import './accessibility';
99
@import './typography';
10+
@import './prose';
1011

1112
@theme {
1213
--font-*: initial;

stubs/resources/js/wretch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ gaia.fetch = wretch()
88
.options({
99
headers: {
1010
"Content-Type": "application/json",
11-
'X-Requested-With': 'XMLHttpRequest'
11+
'X-Requested-With': 'XMLHttpRequest',
12+
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content')
1213
}
1314
})
1415
.errorType("json")

stubs/resources/views/components/header-button.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
<{{ $as }}
1010
type="button"
11-
class="flex-col h-full px-3 sm:px-4 py-2 btn btn-ghost {{ $class }}"
11+
class="flex-col h-full px-2 sm:px-4 py-2 btn btn-ghost {{ $class }}"
1212
{{ $attributes }}
1313
>
14-
<s:svg src="{{ $icon }}" class="fill-current !size-6" />
14+
<s:svg src="{{ $icon }}" class="fill-current size-6" />
1515
<span class="text-xs sr-only sm:not-sr-only">
1616
{{ $title }}
1717

stubs/resources/views/home.antlers.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ <h1 class="text-center h1 mb-7">You've successfully installed Gaia!</h1>
1111

1212
<section class="py-16 md:py-32">
1313
<div class="container">
14-
<x-heading level="2"class="mb-3">Some Random Products</x-heading>
14+
<x-heading level="2"class="mb-3">Some Products</x-heading>
1515
<p class="max-w-xl text-base text-gray-600 lg:text-lg">
1616
Once you have imported products successfully, some products will show here!
1717
</p>
1818

1919
<div class="grid grid-cols-2 gap-5 mt-10 md:grid-cols-4">
2020
{{ collection:products limit="8" }}
21-
{{ partial:partials/product }}
21+
{{ unless no_results}}
22+
{{ partial:partials/product }}
23+
{{ /unless }}
2224
{{ /collection:products }}
2325
</div>
2426
</div>
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<div class="flex justify-start">
2-
<a href="{{ homepage }}" class="mr-10 text-lg font-medium text-gray-900">
3-
{{ svg src="logo" class="w-20 h-12 sm:w-24 xl:w-28" aria-hidden="true" }}
4-
<span class="sr-only">Homepage</span>
5-
</a>
6-
</div>
1+
<a class="flex items-center justify-center" href="{{ homepage }}">
2+
{{ svg src="logo" class="h-12 w-22 sm:w-24 xl:w-28" aria-hidden="true" }}
3+
<span class="sr-only">Homepage</span>
4+
</a>

stubs/resources/views/layout/header/header.antlers.html

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
<header class="relative flex items-center h-[68px] sm:h-[96px] bg-white">
22
<div class="container">
3-
<div class="flex flex-wrap items-center gap-2 py-1 lg:py-4 md:gap-5 md:justify-start">
3+
<div class="flex flex-wrap items-center py-1 lg:py-4 md:justify-start">
44

5-
{{ partial:layout/header/logo }}
65

7-
{{ partial:layout/navigation/mobile/navigation }}
8-
{{ partial:layout/navigation/desktop/navigation }}
6+
<div class="w-5/12">
7+
{{ partial:layout/navigation/mobile/navigation }}
8+
{{ partial:layout/navigation/desktop/navigation }}
9+
</div>
10+
11+
<div class="flex-grow hidden mr-10 lg:block">
12+
{{ partial:layout/header/logo }}
13+
</div>
914

10-
<div class="flex ml-auto sm:gap-2">
15+
<div class="flex justify-end w-full lg:w-5/12 lg:ml-auto sm:gap-2">
16+
17+
<x-header-button
18+
title="Menu"
19+
icon="menu"
20+
\x-data="{}"
21+
class="lg:hidden"
22+
@click="$dispatch('drawer:open:navigation')"
23+
x-bind:aria-controls="$store.navigation.id"
24+
aria-label="Open Main Navigation"
25+
/>
1126

1227
<x-header-button
1328
title="{{ 'Search' | trans }}"
@@ -19,20 +34,13 @@
1934
aria-label="{{ 'Search' | trans }}"
2035
/>
2136

22-
{{ partial:layout/header/user_menu }}
37+
<div class="flex justify-center lg:hidden grow">
38+
{{ partial:layout/header/logo }}
39+
</div>
2340

24-
{{ partial:features/minicart/minicart_counter }}
41+
{{ partial:layout/header/user_menu }}
2542

26-
<x-header-button
27-
title="Menu"
28-
icon="menu"
29-
\x-data="{}"
30-
class="lg:hidden"
31-
@click="$dispatch('drawer:open:navigation')"
32-
x-bind:aria-controls="$store.navigation.id"
33-
aria-label="Open Main Navigation"
34-
/>
35-
43+
{{ partial:features/minicart/minicart_counter }}
3644
</div>
3745
</div>
3846
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<section class="my-8">
1+
<section class="my-8 prose">
22
{{ content }}
33
</section>

0 commit comments

Comments
 (0)