TheBird

shop.ts

3.4 kB · typescript · 100 lines

1import { FEED_ROUTE } from "../lib/feed.ts";23export const API = "2026-07";45export const COUNTRY = "US";67export const LIVE_DAYS = 29.53;89export const CDN = "/cdn/printful";1011export const SHOPIFY_CDN = "https://cdn.shopify.com";1213export const PRINTFUL = "https://www.printful.com/custom/products/all/";1415export const TILES = [1, 3, 5, 7, 9];1617export const CART_KEY = "cm-cart";1819export const MODE_KEY = "cm-mode";2021export const THEME_COLORS = { light: "#f8f8f9", dark: "#0b0b0c" };2223export const CATEGORIES: [string, string][] = [24  ["accessories", "Accessories"],25  ["bags", "Bags"],26  ["kids", "Kids"],27  ["men", "Men"],28  ["unisex", "Unisex"],29  ["women", "Women"],30  ["youth", "Youth"],31];3233/* ROUTES */3435export const SHOP = "/shop/";3637export const GIFT = `${SHOP}gift-card/`;3839export const SHOP_DOCS = ["shipping", "faq", "terms"];4041export const docUrl = (name: string) => (SHOP_DOCS.includes(name) ? `${SHOP}${name}/` : `/${name}/`);4243const NAMED: [string, string][] = [44  ["About", "about"],45  ["Contact", "contact"],46  ["FAQ", "faq"],47  ["Shipping", "shipping"],48  ["Terms", "terms"],49  ["Privacy", "privacy"],50];5152export const DOCS = NAMED.map(([name, slug]) => ({ name, href: docUrl(slug) }));5354export const SITE = [55  { name: "Home", href: "/", note: "The newest design and the newest variations." },56  { name: "Shop", href: SHOP, note: "Every live variation." },57  { name: "Feed", href: FEED_ROUTE, note: "Every post, newest first." },58  { name: "Gift Card", href: GIFT, note: "Mini, medi and maxi. Angel numbers." },59  { name: "Automator", href: "/automator/", note: "The automator's last tick, its batch and its log." },60  { name: "Stats", href: "/stats/", note: "The CDN, the Lambdas and the bucket." },61  { name: "Blog", href: "/blog/", note: "Long-form posts, newest first." },62  { name: "Code", href: "/git/", note: "This site's repo, browsable, with the raw bytes under /raw/." },63  { name: "Bag", href: "/cart/", note: "Your bag." },64  { name: "Pages", href: "/pages/", note: "This list." },65];6667export const PAGES = [...SITE, ...DOCS.map((one) => ({ ...one, note: "" }))];6869export const FILES = [70  { name: "robots.txt", href: "/robots.txt", note: "Who may crawl, and where the sitemap is." },71  { name: "llms.txt", href: "/llms.txt", note: "The site on one page, for machines." },72  { name: "sitemap.xml", href: "/sitemap.xml", note: "Every indexable route with its date." },73  { name: "manifest.webmanifest", href: "/manifest.webmanifest", note: "The web app manifest." },74  { name: "search.json", href: "/search.json", note: "The search index the header reads." },75  { name: "404", href: "/404.html", note: "Not found, or its moon has passed." },76];7778export type Catalog = { id: number; category: string; title: string; technique: string; link: string; handle: string };7980export const MORE_TILE = 3;8182export const ALIKE = 4;8384export const MATCH = 4;8586export const HELP = {87  delivery: "https://help.printful.com/hc/articles/360017631360",88  shipping: "https://www.printful.com/shipping",89  countries: "https://help.printful.com/hc/articles/360014066779",90  customs: "https://help.printful.com/hc/articles/360014066159",91  updates: "https://www.printful.com/recent-updates",92  status: "https://www.printfulstatus.com/",93  disclaimers: "https://help.printful.com/hc/articles/21140050579740",94  aop: "https://help.printful.com/hc/articles/21045992765468",95  aopMore: "https://help.printful.com/hc/articles/360014007460",96};9798export const HOME_ROW = 8;99100export const FOOT_COLUMNS = 5;