Skip to content

Commit a736336

Browse files
Merge pull request #57 from niteeshkanna-sh/claude/stoic-rubin-fnglq7
Footer map, a Footer section in the panel, and a check that says why an uploaded picture is missing
2 parents 22e1ebe + 0c594e3 commit a736336

28 files changed

Lines changed: 683 additions & 71 deletions

‎.site-manifest.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"assets",
77
"bikes",
88
"blog",
9+
"build.json",
910
"car-brezza.avif",
1011
"cars",
1112
"contact",

‎404.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"
3838
rel="stylesheet"
3939
/>
40-
<script type="module" crossorigin src="/assets/index-C-Jz5Kro.js"></script>
41-
<link rel="stylesheet" crossorigin href="/assets/index-DYlnpUbm.css">
40+
<script type="module" crossorigin src="/assets/index-DrVMGoK2.js"></script>
41+
<link rel="stylesheet" crossorigin href="/assets/index-B_yWddXD.css">
4242
</head>
4343
<body>
4444
<div id="root"></div>

‎about/index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"
3838
rel="stylesheet"
3939
/>
40-
<script type="module" crossorigin src="/assets/index-C-Jz5Kro.js"></script>
41-
<link rel="stylesheet" crossorigin href="/assets/index-DYlnpUbm.css">
40+
<script type="module" crossorigin src="/assets/index-DrVMGoK2.js"></script>
41+
<link rel="stylesheet" crossorigin href="/assets/index-B_yWddXD.css">
4242
</head>
4343
<body>
4444
<div id="root"></div>

‎admin/api/public-content.php‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,19 @@
7777
$brand[$slot] = site_image_url($file);
7878
}
7979

80+
// Said separately from the map itself, because an empty map has two causes
81+
// that look identical to a caller and need opposite fixes: nobody has
82+
// uploaded anything yet, or 005_site_images.sql has never run on this
83+
// database. site_images() answers [] to both. "No pictures yet" sends someone
84+
// to the upload form; "the table is missing" sends them to open the panel
85+
// once so the migration applies. Guessing between them is how an afternoon
86+
// goes.
87+
$imagesReady = table_has_column('site_images', 'file');
88+
8089
json_out([
81-
'ok' => true,
82-
'ready' => $ready,
83-
'overrides' => $overrides === [] ? (object) [] : $overrides,
84-
'brand' => $brand === [] ? (object) [] : $brand,
90+
'ok' => true,
91+
'ready' => $ready,
92+
'imagesReady' => $imagesReady,
93+
'overrides' => $overrides === [] ? (object) [] : $overrides,
94+
'brand' => $brand === [] ? (object) [] : $brand,
8595
]);

‎admin/content-defaults.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@
130130
"secondaryLabel": "See our cars",
131131
"secondaryHref": "/cars"
132132
},
133+
"footer": {
134+
"blurb": "Self drive cars, bike rental, wedding cars and tourist vehicles across Kanyakumari district.",
135+
"locationHeading": "Find us",
136+
"address": [
137+
"Nagercoil",
138+
"Kanyakumari district",
139+
"Tamil Nadu 629001"
140+
],
141+
"mapQuery": "Nagercoil, Kanyakumari district, Tamil Nadu",
142+
"directionsLabel": "Get directions"
143+
},
133144
"social": {
134145
"heading": "Follow us",
135146
"whatsapp": "https://wa.me/916374942976",

‎admin/content.php‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,27 @@ function field_input(string $name, array $spec, mixed $value): void
162162
<?php $brand = site_images(); ?>
163163
<details class="c-sec c-fold">
164164
<summary class="c-sum">
165-
<span class="c-sum-name">Logo, mark and page banners</span>
165+
<span class="c-sum-name">Pictures</span>
166166
<span class="c-flag"><?= count($brand) ?> of <?= count(SITE_IMAGE_SLOTS) ?> uploaded</span>
167167
<svg class="c-sum-chev" width="16" height="16" viewBox="0 0 24 24" fill="none"
168168
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
169169
aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg>
170170
</summary>
171171
<div class="c-fold-body">
172172
<p class="c-note">
173-
The badge in the header, and the mark beside it. Nothing is drawn in their
174-
place any more, so the header shows the name alone until one is uploaded.
175-
PNG with a transparent background looks best for the badge; the mark sits
176-
on the dark header, so light artwork reads better than dark. Up to
177-
6&nbsp;MB.
173+
Every picture on the website, in the order it appears: the two brand
174+
marks, the banner across the top of each page, the home page, the six
175+
cards under &ldquo;What we hire&rdquo; and the three steps. A slot with
176+
nothing in it keeps the drawing the site ships with, so an unfinished set
177+
still looks finished. PNG with a transparent background looks best for
178+
the badge; the mark sits on the dark header, so light artwork reads
179+
better than dark. Up to 6&nbsp;MB each.
180+
</p>
181+
<p class="c-note">
182+
An upload appears on the website within a minute. If one does not, open
183+
<code>/fleet-check.html</code> on the site: it says whether the picture
184+
reached the server and whether the website published there is new enough
185+
to ask for it, which are the only two things that can be wrong.
178186
</p>
179187

180188
<div class="brand-slots">

‎admin/src/content.php‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ function content_schema(): array
151151
'secondaryHref' => ['label' => 'Second button link', 'type' => 'text'],
152152
],
153153
],
154+
'footer' => [
155+
'label' => 'Footer',
156+
'note' => 'The band at the bottom of every page. The map is built from what you type in "Where the map should point" -- a place name or an address is enough, the same thing you would type into Google Maps.',
157+
'fields' => [
158+
'blurb' => ['label' => 'Line under the business name', 'type' => 'textarea'],
159+
'locationHeading' => ['label' => 'Heading above the map', 'type' => 'text'],
160+
'address' => ['label' => 'Address', 'type' => 'list'],
161+
'mapQuery' => ['label' => 'Where the map should point', 'type' => 'text'],
162+
'directionsLabel' => ['label' => 'Directions link text', 'type' => 'text'],
163+
],
164+
],
154165
'social' => [
155166
'label' => 'Social media',
156167
'note' => 'Paste the address of each page you have. Leave a box empty and that icon is simply not shown -- an icon linking nowhere is worse than no icon. A named box per network rather than a list you add to, so the icon always matches the link.',

‎assets/index-B_yWddXD.css‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎assets/index-DYlnpUbm.css‎

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)