Skip to content
Draft
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
11 changes: 11 additions & 0 deletions _data/body-classes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = (function () {
const path = require("path");
const fs = require("fs");
const themePath = path.join(process.cwd(), "src/css/theme.scss");
if (!fs.existsSync(themePath)) return [];
return fs
.readFileSync(themePath, "utf8")
.match(/\/\* body_classes: (.+) \*\//)?.[1]
?.split(",")
?.map((s) => s.trim());
})();
18 changes: 18 additions & 0 deletions _data/dietaryIndicators.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
vegan: {
symbol: "VE",
label: "Vegan",
field: "is_vegan",
},
glutenFree: {
symbol: "GF",
label: "Gluten Free",
field: "is_gluten_free",
},
// Easy to add more indicators in the future:
// nutFree: {
// symbol: "NF",
// label: "Nut Free",
// field: "is_nut_free"
// }
};
4 changes: 4 additions & 0 deletions _data/eleventyComputed.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
header_text: (data) => data.header_text || data.title,
meta_title: (data) => data.meta_title || data.title,
};
54 changes: 54 additions & 0 deletions _data/fonts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[
{
"label": "System",
"value": "system-ui, sans-serif"
},
{
"label": "Old Style",
"value": "\"Iowan Old Style\", \"Palatino Linotype\", \"URW Palladio L\", P052, serif"
},
{
"label": "Humanist",
"value": "Seravek, \"Gill Sans Nova\", Ubuntu, Calibri, \"DejaVu Sans\", source-sans-pro, sans-serif"
},
{
"label": "Geometic Humanist",
"value": "Avenir, Montserrat, Corbel, \"URW Gothic\", source-sans-pro, sans-serif"
},
{
"label": "Classical Humanist",
"value": "Optima, Candara, \"Noto Sans\", source-sans-pro, sans-serif"
},
{
"label": "Neo-Grotesque",
"value": "Inter, Roboto, \"Helvetica Neue\", \"Arial Nova\", \"Nimbus Sans\", Arial, sans-serif"
},
{
"label": "Monospace Slab Serif",
"value": "\"Nimbus Mono PS\", \"Courier New\", monospace"
},
{
"label": "Monospace Code",
"value": "ui-monospace, \"Cascadia Code\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace"
},
{
"label": "Industrial",
"value": "Bahnschrift, \"DIN Alternate\", \"Franklin Gothic Medium\", \"Nimbus Sans Narrow\", sans-serif-condensed, sans-serif"
},
{
"label": "Rounded Sans",
"value": "ui-rounded, \"Hiragino Maru Gothic ProN\", Quicksand, Comfortaa, Manjari, \"Arial Rounded MT\", \"Arial Rounded MT Bold\", Calibri, source-sans-pro, sans-serif"
},
{
"label": "Slab Serif",
"value": "Rockwell, \"Rockwell Nova\", \"Roboto Slab\", \"DejaVu Serif\", \"Sitka Small\", serif"
},
{
"label": "Antique",
"value": "Superclarendon, \"Bookman Old Style\", \"URW Bookman\", \"URW Bookman L\", \"Georgia Pro\", Georgia, serif"
},
{
"label": "Didone",
"value": "Didot, \"Bodoni MT\", \"Noto Serif Display\", \"URW Palladio L\", P052, Sylfaen, serif"
}
]
14 changes: 14 additions & 0 deletions _data/header-decorations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"label": "None",
"value": ""
},
{
"label": "Centered",
"value": "header-centered"
},
{
"label": "Centered With Dark Tint & Border",
"value": "header-centered-dark"
}
]
10 changes: 10 additions & 0 deletions _data/heading-decorations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"label": "None",
"value": ""
},
{
"label": "Centered",
"value": "headings-centered"
}
]
58 changes: 58 additions & 0 deletions _data/image_thumbnails.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"placeholder-banner.jpg": {
"base64": "data:image/webp;base64,UklGRngAAABXRUJQVlA4IGwAAAAwBACdASogAAkAPzmIulQvKSWjMAgB4CcJYwCsACBX5UbANWj94H0U+4AA+xGEjoSFUVHMDl8d3DRW6WW9x1sigWoNkG5EWz8qTJol3do9VKdWD79fQnOKpWvNO/6d6m8scvQanTP5oPUROAA=",
"aspect_ratio": "1920/540"
},
"placeholder.jpg": {
"base64": "data:image/webp;base64,UklGRp4AAABXRUJQVlA4IJIAAAAwBQCdASogABIAPzmGu1avKCWjsBgIAeAnCWIAnQA0z5vzSv2V7z/mY1entf48Wq3YAAD+3Lses0rPXMPZ2eEv9xF7kfemXU6C1/zT535HwF+QL257y/H2r/mjaaGyHs+cMgqv00Uds4V3yllmtt5hS8SDskGACo5YS/IjFlOAS74pwZdNMCOAk3ifyosnLFMAAA==",
"aspect_ratio": "1920/1080"
},
"placeholder-square-1.jpg": {
"base64": "data:image/webp;base64,UklGRroAAABXRUJQVlA4IK4AAABQBQCdASogACAAPzmGvVavKCajsBgIAeAnCWUAAR7Rn+CcjarQy43pLvfFvi5RkEc0wAAA/u6SLab6+RHNQQ+AjL98exiwX2nq9nud8hegiV2z5FacHs7+Cg4Wzuso2GpV2/sfTgtma8xZ5Kz1zunOFgHY/wgdh6JwaR9+Efx6ZyoFIPvUEnwWULyrL9TCgBpVbd1OVyKIbHnRF+uDt2tZC76gok2bcKOLTzAAAAA=",
"aspect_ratio": "1600/1600"
},
"placeholder-square-2.jpg": {
"base64": "data:image/webp;base64,UklGRnwAAABXRUJQVlA4IHAAAAAwBACdASogACAAPyl2tFOuJyUit/qoAcAlCUAXYArsyli+3OvcNnEPAAAA/lHekxqH5sPt5AyI92+28ovV/IyPz4aNYM0+4MxqQBAGl5buJQMiLZWpCwDoADgCqQXwT8eCQzlJ1fv0I9LA2TulVAAA",
"aspect_ratio": "1600/1600"
},
"placeholder-square-3.jpg": {
"base64": "data:image/webp;base64,UklGRp4AAABXRUJQVlA4IJIAAADwBACdASogACAAPy2AuFOuqCWisAwB0CWJQBOgCv3olTrQy1rlk35KjgV/lSr23IAA/tMcsffJgbLD0EDIF8dtBtD4RIL1sOtWWeUyLG1SQdlnp8yOrhSLtU+MCxtnNPVzxnb6RItBZXb74AAFyFnC2tnsUZm9U0dNJ4PdqFjPZPLFPgfrlP3eS4OoE+5vCpYAAA==",
"aspect_ratio": "1600/1600"
},
"placeholder-square-4.jpg": {
"base64": "data:image/webp;base64,UklGRlgAAABXRUJQVlA4IEwAAABQAwCdASogACAAPyWAs1OuKKSit/qoAcAkiWMAyywt2aEkgAD+2a8CqZfuzsq9XmVVpEHFXmvyHzVBYDPbv6HNjlpR4KDLhNJ4MwAA",
"aspect_ratio": "1600/1600"
},
"placeholder-square-5.jpg": {
"base64": "data:image/webp;base64,UklGRpYAAABXRUJQVlA4IIoAAABwBQCdASogACAAPy2Ct1OuqSWisAwB0CWJZQAA83/x9scU/ecGrSe76/SzWQ1JrQ6YuFoAAP6QQnGVFqGXcgMjBgIcAF13PbI1m5TEEOwAKSvSMpMC2z5JOpb13b6xhaojxTq7LI71osMFiO+SYSfEm+5RUvTvfi/YGMEehR45ysc7s7EUAAigAAA=",
"aspect_ratio": "1600/1600"
},
"placeholder-square-6.jpg": {
"base64": "data:image/webp;base64,UklGRggBAABXRUJQVlA4IPwAAACQBgCdASogACAAPzmKu1UvKSYjKA1R4CcJbACw8bXlK1wDr/jwWEjFq3oN7Zs54Q7pVVtbFcGxnfYvHfh4AP7ZTxOMjOWCimiID7XlFDHJqOffoRlES0aXGd1xP8pgBcXJArwoA6C2eeAjVBEMxCkk8dx6/Nxx0LjP1DXMmRyKbjPsiCFIA7GOBvTHouTihrytGFSeuXIBhUsv5dTQTJKIS0OOyLjW5B6ffbdFgOHheAg2uz6FveonM6CmOF09xBOMpkEhJBhy08rZZTQ3lKsIOd6UHWxWDz/M1iOEu1ZKDnf4o60HitKPtMt7cPj+OI4zkeK2zC6R9mQAAAA=",
"aspect_ratio": "1600/1600"
},
"placeholder-square-7.jpg": {
"base64": "data:image/webp;base64,UklGRogAAABXRUJQVlA4IHwAAABQBACdASogACAAPzmItFQvKSSjMBgMAeAnCWRkM0yufCNc74ZaNllHjKNgAP5t9XXcn0LeGByqRvI7DBgZfxv9bmLGATljApz8mrV0/NB75ymWicPtMuk9vcRMNRrYQJlRNzWh5HrJ5aUnCb2xeOR+ZjH54FH2eq3ugAAA",
"aspect_ratio": "1600/1600"
},
"placeholder-wide-1.jpg": {
"base64": "data:image/webp;base64,UklGRl4AAABXRUJQVlA4IFIAAADQAwCdASogABAAPzmYvlYvLCajsAgB4CcJQBOgDSW9qkfUKFwY7oAA/q6g8hstAt1Lw+2/nQUxKWGv/OIJZAuoGdaKTes1CyLVT1IEKC6oEAAA",
"aspect_ratio": "1600/800"
},
"placeholder-wide-2.jpg": {
"base64": "data:image/webp;base64,UklGRmYAAABXRUJQVlA4IFoAAACQAwCdASogABAAPzmGuVOvKSWisAgB4CcJYwCdABeKAppqF04AALGwawWBBnjspo/GN53x6FZJTl9sShiFN41N9gUa6bAvNxZsZfoo7Z00aT2Dlq5xyUggAAA=",
"aspect_ratio": "1600/800"
},
"placeholder-wide-3.jpg": {
"base64": "data:image/webp;base64,UklGRm4AAABXRUJQVlA4IGIAAACwAwCdASogABAAPzmEulOvKKWisAgB4CcJZQC7AGlw5gx6xBHwAAD+9Jhyy+00Jx4KXgo5mVIWmnVjKe7Y0UVnzQ/2OYgXpYmvI3o1Vg8dyfe9zT69j5GM5SbsrcPIguQAAA==",
"aspect_ratio": "1600/800"
},
"placeholder-wide-4.jpg": {
"base64": "data:image/webp;base64,UklGRqQAAABXRUJQVlA4IJgAAABQBACdASogABAAPzmGuVQvKSWjMAgB4CcJaAC07agFASsJaVYO7iJBXDwAAP7zf7J8m6XCjMs31PZGuhPo8pbqV839ux7RxplDgAQTZZQzZeKZrsN8SbzE8Bsh+CtZtO5gOLt1kq1CpnOZA52nIjrew/ZQDtUXRE3azJQMLOoYlkgRmJ80Nztyyz2JirV+evDmzKIPErQAAA==",
"aspect_ratio": "1600/800"
},
"placeholder-wide-5.jpg": {
"base64": "data:image/webp;base64,UklGRowAAABXRUJQVlA4IIAAAAAQBACdASogABAAPzmGulQvKSWjMAgB4CcJbACdMoABE435dHjyLlmYAAD9zw2826FlxbONzfTwJQhvj2Yh0NhsYEK83nBfRlU+Q4Jjt2qhf/BQKgny8BpmJybmAbMBU4KixEs3TthU2KUIQhxmOHIoIqgYaawoS6sJ3TPK0QAAAA==",
"aspect_ratio": "1600/800"
}
}
6 changes: 6 additions & 0 deletions _data/line-styles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{ "label": "Solid", "value": "solid" },
{ "label": "Dashed", "value": "dashed" },
{ "label": "Dotted", "value": "dotted" },
{ "label": "Wavy", "value": "wavy" }
]
3 changes: 3 additions & 0 deletions _data/production.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = (function () {
return process.env.ELEVENTY_RUN_MODE === "build";
})();
21 changes: 21 additions & 0 deletions _data/site.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Example Site",
"formspark_id": null,
"botpoison_public_key": null,
"url": "https://example.chobble.com",
"webhost": "bunny",
"socials": {
"Github": "https://github.com/chobble-mirror/chobble-template",
"Forgejo": "https://git.chobble.com/chobble/chobble-template",
"Facebook": "https://www.facebook.com/profile.php?id=61571286130366",
"Instagram": "https://example.chobble.com",
"TikTok": "https://example.chobble.com",
"Google": "https://maps.app.goo.gl/kNqgHRNaMgPDp7Mo8",
"WhatsApp": "https://example.chobble.com",
"RSS": "/feed.xml"
},
"template_repo_url": "https://git.chobble.com/chobble/chobble-template",
"stripe_publishable_key": null,
"map_embed_src": "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d9498.055583067766!2d-2.2730144540268484!3d53.47714715252345!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x487bb1e7815c44db%3A0x417132a42bd93ef6!2sScience%20and%20Industry%20Museum!5e0!3m2!1sen!2suk!4v1752151609498!5m2!1sen!2suk",
"products": {}
}
35 changes: 35 additions & 0 deletions _data/site.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { createRequire } from "module";
const require = createRequire(import.meta.url);

const DEFAULTS = {
sticky_mobile_nav: true,
horizontal_nav: true,
homepage_news: true, // if there is any
homepage_products: true, // if there are any
};

const DEFAULT_PRODUCT_DATA = {
product_thumb_widths: "224,336,448",
product_thumb_sizes: "224px",
category_thumb_widths: "224,336,448",
category_thumb_sizes: "224px",
};

function getProducts(siteData) {
const nonNulls = {};
const products = siteData["products"] || {};
Object.keys(products).forEach((key) => {
if (products[key]) {
nonNulls[key] = products[key];
}
});
return nonNulls;
}

export default function () {
const siteData = require("./site.json");
const products = Object.assign(DEFAULT_PRODUCT_DATA, getProducts(siteData));
return Object.assign(DEFAULTS, siteData, {
products: products,
});
}
4 changes: 4 additions & 0 deletions _data/strings-base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"product_name": "Products",
"product_permalink_dir": "products"
}
17 changes: 17 additions & 0 deletions _data/strings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Merges the base strings with any user-provided strings
*
* Usage in templates: {{ strings.product_name }}
*/

const baseStrings = require("./strings-base.json");

let userStrings = {};
try {
userStrings = require("./strings.json");
} catch (e) {}

module.exports = {
...baseStrings,
...userStrings,
};
5 changes: 5 additions & 0 deletions _data/strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"product_name": "Products",
"product_permalink_dir": "products",
"menus_name": "Menus"
}
4 changes: 4 additions & 0 deletions _data/text-decoration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
{ "label": "None", "value": "none" },
{ "label": "Underline", "value": "underline" }
]
8 changes: 0 additions & 8 deletions _includes/contact-links.md

This file was deleted.

72 changes: 0 additions & 72 deletions _includes/fontello.css

This file was deleted.

19 changes: 0 additions & 19 deletions _includes/footer.html

This file was deleted.

Loading