Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ATTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Attribution

## Apex Auto Social Posts

The Apex Auto example set uses source-neutral Unsplash photos passed through template modification JSON files:

- `examples/use-cases/assets/automotive-showroom-unsplash.jpg` - Photo by Chelaxy Designs on Unsplash: https://unsplash.com/photos/9rdfLAZXW2E
- `examples/use-cases/assets/automotive-detailing-unsplash.jpg` - Photo by Matt Reiter on Unsplash: https://unsplash.com/photos/f0UG8TQS2SM
- `examples/use-cases/assets/automotive-trade-in-unsplash.jpg` - Photo by Rana Singh on Unsplash: https://unsplash.com/photos/InZmV1fb72k

Unsplash License: https://unsplash.com/license

## Food Truck Catering Social Posts

The Food Truck Catering example set uses source-neutral Unsplash photos passed through template modification JSON files:
Expand Down
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,100 @@ Results:

![Brand kit gradient preset result](./examples/presets/brand-kit-gradient.png)

### Render Apex Auto Social Posts

Use a reusable template for automotive sales and detailing social posts with a fictional
dealership/detailing studio, original conversion copy, photo-led service and inventory variants, and
intentional CSS geometry for badges, panels, and trade-in graphics. Source-neutral Unsplash photos
are passed through JSON image layers instead of being hardcoded into the template.

#### Certified Inventory Sales Post

CLI:

```bash
npm run dev -- template examples/use-cases/automotive-social.html \
--css examples/use-cases/automotive-social.css \
--modify-file examples/use-cases/automotive-social-inventory.json \
--out examples/use-cases/automotive-social-inventory.png \
--width 1080 \
--height 1080
```

Library:

```ts
await renderTemplate({
htmlPath: "examples/use-cases/automotive-social.html",
cssPath: "examples/use-cases/automotive-social.css",
modifications: JSON.parse(await readFile("examples/use-cases/automotive-social-inventory.json", "utf8")),
viewport: { width: 1080, height: 1080 },
output: { path: "examples/use-cases/automotive-social-inventory.png" },
});
```

Result:

![Apex Auto certified inventory sales post result](./examples/use-cases/automotive-social-inventory.png)

#### Detailing Appointment Promo Post

CLI:

```bash
npm run dev -- template examples/use-cases/automotive-social.html \
--css examples/use-cases/automotive-social.css \
--modify-file examples/use-cases/automotive-social-detailing.json \
--out examples/use-cases/automotive-social-detailing.png \
--width 1080 \
--height 1080
```

Library:

```ts
await renderTemplate({
htmlPath: "examples/use-cases/automotive-social.html",
cssPath: "examples/use-cases/automotive-social.css",
modifications: JSON.parse(await readFile("examples/use-cases/automotive-social-detailing.json", "utf8")),
viewport: { width: 1080, height: 1080 },
output: { path: "examples/use-cases/automotive-social-detailing.png" },
});
```

Result:

![Apex Auto detailing appointment promo post result](./examples/use-cases/automotive-social-detailing.png)

#### Trade-In Event Post

CLI:

```bash
npm run dev -- template examples/use-cases/automotive-social.html \
--css examples/use-cases/automotive-social.css \
--modify-file examples/use-cases/automotive-social-trade-in.json \
--out examples/use-cases/automotive-social-trade-in.png \
--width 1080 \
--height 1080
```

Library:

```ts
await renderTemplate({
htmlPath: "examples/use-cases/automotive-social.html",
cssPath: "examples/use-cases/automotive-social.css",
modifications: JSON.parse(await readFile("examples/use-cases/automotive-social-trade-in.json", "utf8")),
viewport: { width: 1080, height: 1080 },
output: { path: "examples/use-cases/automotive-social-trade-in.png" },
});
```

Result:

![Apex Auto trade-in event post result](./examples/use-cases/automotive-social-trade-in.png)

## Advanced Usage

The README keeps quick-start material and the complete built-in preset reference. Longer examples
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions examples/use-cases/automotive-social-detailing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{ "name": "post", "className": "post post-detailing" },
{ "name": "brand", "text": "Apex Auto Co." },
{ "name": "tagline", "text": "Paint-safe care plans" },
{ "name": "hero_image", "src": "./assets/automotive-detailing-unsplash.jpg", "fit": "cover", "anchor": "57% 50%" },
{ "name": "inset_image", "src": "./assets/automotive-showroom-unsplash.jpg", "fit": "cover", "anchor": "50% 62%" },
{ "name": "kicker", "text": "Detail bay openings" },
{ "name": "title", "text": "Gloss reset appointments all week" },
{ "name": "subtitle", "text": "Foam wash, iron removal, paint sealant, and interior refresh bundled for daily drivers." },
{ "name": "stat_one_label", "text": "Express slots" },
{ "name": "stat_one_value", "text": "6 left" },
{ "name": "stat_two_label", "text": "From" },
{ "name": "stat_two_value", "text": "$149" },
{ "name": "cta", "text": "Book the bay" },
{ "name": "url", "text": "apexauto.example/detail" }
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions examples/use-cases/automotive-social-inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{ "name": "post", "className": "post post-inventory" },
{ "name": "brand", "text": "Apex Auto Co." },
{ "name": "tagline", "text": "Sales + detailing studio" },
{ "name": "hero_image", "src": "./assets/automotive-showroom-unsplash.jpg", "fit": "cover", "anchor": "52% 58%" },
{ "name": "inset_image", "src": "./assets/automotive-trade-in-unsplash.jpg", "fit": "cover", "anchor": "50% 45%" },
{ "name": "kicker", "text": "Weekend inventory drop" },
{ "name": "title", "text": "Certified sedans detailed before delivery" },
{ "name": "subtitle", "text": "Book a walkaround, reserve online, and leave with a ceramic-safe maintenance plan." },
{ "name": "stat_one_label", "text": "Starting at" },
{ "name": "stat_one_value", "text": "$289/mo" },
{ "name": "stat_two_label", "text": "Detail credit" },
{ "name": "stat_two_value", "text": "$350" },
{ "name": "cta", "text": "Schedule a test drive" },
{ "name": "url", "text": "apexauto.example" }
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions examples/use-cases/automotive-social-trade-in.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{ "name": "post", "className": "post post-trade-in" },
{ "name": "brand", "text": "Apex Auto Co." },
{ "name": "tagline", "text": "Upgrade week" },
{ "name": "hero_image", "src": "./assets/automotive-trade-in-unsplash.jpg", "fit": "cover", "anchor": "50% 46%" },
{ "name": "inset_image", "src": "./assets/automotive-showroom-unsplash.jpg", "fit": "cover", "anchor": "56% 56%" },
{ "name": "kicker", "text": "Trade-in event" },
{ "name": "title", "text": "Get an appraisal before Saturday" },
{ "name": "subtitle", "text": "Bring your current car in clean or book a pre-appraisal wash, then roll the value into any certified model." },
{ "name": "stat_one_label", "text": "Bonus value" },
{ "name": "stat_one_value", "text": "+$750" },
{ "name": "stat_two_label", "text": "Appraisal" },
{ "name": "stat_two_value", "text": "20 min" },
{ "name": "cta", "text": "Start valuation" },
{ "name": "url", "text": "apexauto.example/value" }
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading