@lemonadecms/create 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +26 -2
- package/bin/create-lemonade.mjs +122 -0
- package/dist/catalog.json +604 -0
- package/dist/templates/angular/angular.json +54 -0
- package/dist/templates/angular/locks/npm-lock.json.template +7079 -0
- package/dist/templates/angular/locks/pnpm-lock.yaml.template +4234 -0
- package/dist/templates/angular/package.json +61 -0
- package/dist/templates/angular/src/app/app.config.server.ts +23 -0
- package/dist/templates/angular/src/app/app.config.ts +34 -0
- package/dist/templates/angular/src/app/app.ts +9 -0
- package/dist/templates/angular/src/app/blog.service.ts +74 -0
- package/dist/templates/angular/src/app/journal.html +71 -0
- package/dist/templates/angular/src/app/journal.ts +47 -0
- package/dist/templates/angular/src/index.html +14 -0
- package/dist/templates/angular/src/main.server.ts +5 -0
- package/dist/templates/angular/src/main.ts +6 -0
- package/dist/templates/angular/src/server.ts +79 -0
- package/dist/templates/angular/tsconfig.app.json +8 -0
- package/dist/templates/angular/tsconfig.json +21 -0
- package/dist/templates/astro/astro.config.mjs +7 -0
- package/dist/templates/astro/locks/npm-lock.json.template +5478 -0
- package/dist/templates/astro/locks/pnpm-lock.yaml.template +3530 -0
- package/dist/templates/astro/package.json +42 -0
- package/dist/templates/astro/src/components/BlogView.astro +92 -0
- package/dist/templates/astro/src/layouts/Site.astro +23 -0
- package/dist/templates/astro/src/pages/articles/[id].astro +13 -0
- package/dist/templates/astro/src/pages/index.astro +13 -0
- package/dist/templates/astro/src/pages/lemonade/preview/[...path].ts +4 -0
- package/dist/templates/astro/src/pages/lemonade/preview.ts +4 -0
- package/dist/templates/astro/tsconfig.json +9 -0
- package/dist/templates/next/app/articles/[id]/page.tsx +29 -0
- package/dist/templates/next/app/data.ts +12 -0
- package/dist/templates/next/app/error.tsx +15 -0
- package/dist/templates/next/app/layout.tsx +13 -0
- package/dist/templates/next/app/lemonade/preview/[[...path]]/route.ts +7 -0
- package/dist/templates/next/app/loading.tsx +7 -0
- package/dist/templates/next/app/not-found.tsx +8 -0
- package/dist/templates/next/app/page.tsx +17 -0
- package/dist/templates/next/app/view.tsx +111 -0
- package/dist/templates/next/locks/npm-lock.json.template +1158 -0
- package/dist/templates/next/locks/pnpm-lock.yaml.template +715 -0
- package/dist/templates/next/next-env.d.ts +2 -0
- package/dist/templates/next/next.config.mjs +8 -0
- package/dist/templates/next/package.json +44 -0
- package/dist/templates/next/proxy.ts +19 -0
- package/dist/templates/next/tsconfig.json +25 -0
- package/dist/templates/nuxt/app/app.vue +1 -0
- package/dist/templates/nuxt/app/components/JournalView.vue +75 -0
- package/dist/templates/nuxt/app/pages/articles/[id].vue +8 -0
- package/dist/templates/nuxt/app/pages/index.vue +8 -0
- package/dist/templates/nuxt/locks/npm-lock.json.template +9113 -0
- package/dist/templates/nuxt/locks/pnpm-lock.yaml.template +6466 -0
- package/dist/templates/nuxt/nuxt.config.ts +27 -0
- package/dist/templates/nuxt/package.json +54 -0
- package/dist/templates/nuxt/server/api/blog/[id].get.ts +10 -0
- package/dist/templates/nuxt/server/api/blog.get.ts +9 -0
- package/dist/templates/nuxt/server/middleware/preview.ts +9 -0
- package/dist/templates/nuxt/server/utils/cms-environment.ts +15 -0
- package/dist/templates/nuxt/tsconfig.json +7 -0
- package/dist/templates/shared/GETTING_STARTED.md +29 -0
- package/dist/templates/shared/README.md +8 -0
- package/dist/templates/shared/env.example.template +11 -0
- package/dist/templates/shared/gitignore.template +13 -0
- package/dist/templates/shared/model-template.json +75 -0
- package/dist/templates/shared/public/blog.css +255 -0
- package/dist/templates/shared/public/lemonade.svg +5 -0
- package/dist/templates/shared/schema-contract.json +37 -0
- package/dist/templates/shared/scripts/cms-tools.mjs +171 -0
- package/dist/templates/shared/scripts/environment.mjs +68 -0
- package/dist/templates/shared/scripts/run.mjs +122 -0
- package/dist/templates/shared/server/blog.d.mts +35 -0
- package/dist/templates/shared/server/blog.mjs +159 -0
- package/dist/templates/shared/server/config.d.mts +11 -0
- package/dist/templates/shared/server/config.mjs +42 -0
- package/dist/templates/shared/server/preview.d.mts +4 -0
- package/dist/templates/shared/server/preview.mjs +276 -0
- package/dist/templates/shared/src/types/cms-models.ts +37 -0
- package/package.json +24 -4
- package/src/arguments.mjs +55 -0
- package/src/catalog.mjs +134 -0
- package/src/errors.mjs +10 -0
- package/src/generation.mjs +103 -0
- package/src/paths.mjs +90 -0
- package/src/prompts.mjs +65 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default defineNuxtConfig({
|
|
2
|
+
compatibilityDate: '2026-11-16',
|
|
3
|
+
devtools: { enabled: false },
|
|
4
|
+
ssr: true,
|
|
5
|
+
nitro: { preset: 'node-server' },
|
|
6
|
+
runtimeConfig: {
|
|
7
|
+
cmsProjectId: '',
|
|
8
|
+
cmsPublicKey: '',
|
|
9
|
+
cmsEnvironment: '',
|
|
10
|
+
cmsLocale: '',
|
|
11
|
+
siteUrl: '',
|
|
12
|
+
cmsPreviewEnabled: '',
|
|
13
|
+
cmsSecretKey: '',
|
|
14
|
+
cmsPreviewUrl: '',
|
|
15
|
+
cmsStudioOrigin: 'https://app.lemonadecms.com',
|
|
16
|
+
},
|
|
17
|
+
routeRules: { '/**': { headers: { 'Cache-Control': 'private, no-store' } } },
|
|
18
|
+
app: {
|
|
19
|
+
head: {
|
|
20
|
+
htmlAttrs: { lang: 'en' },
|
|
21
|
+
link: [
|
|
22
|
+
{ rel: 'stylesheet', href: '/blog.css' },
|
|
23
|
+
{ rel: 'icon', href: '/lemonade.svg', type: 'image/svg+xml' },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lemonade-blog",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "^22.23.5 || ^24.22.3"
|
|
8
|
+
},
|
|
9
|
+
"packageManager": "npm@11.6.2",
|
|
10
|
+
"lemonade": {
|
|
11
|
+
"framework": "nuxt",
|
|
12
|
+
"contract": 1
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "node scripts/run.mjs dev",
|
|
16
|
+
"check": "node scripts/run.mjs check",
|
|
17
|
+
"build": "node scripts/run.mjs build",
|
|
18
|
+
"start": "node scripts/run.mjs start",
|
|
19
|
+
"cms:setup": "node scripts/cms-tools.mjs setup",
|
|
20
|
+
"cms:check": "node scripts/cms-tools.mjs check",
|
|
21
|
+
"cms:types": "node scripts/cms-tools.mjs types"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@lemonadecms/client": "0.2.3",
|
|
25
|
+
"markdown-it": "15.0.3",
|
|
26
|
+
"nuxt": "4.6.4",
|
|
27
|
+
"vue": "3.5.44",
|
|
28
|
+
"vue-router": "5.4.0",
|
|
29
|
+
"rolldown": "1.2.16",
|
|
30
|
+
"h3": "1.15.11"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "24.10.1",
|
|
34
|
+
"@types/markdown-it": "14.1.2",
|
|
35
|
+
"typescript": "5.9.3",
|
|
36
|
+
"vue-tsc": "3.3.14",
|
|
37
|
+
"@nuxt/cli": "4.0.3"
|
|
38
|
+
},
|
|
39
|
+
"pnpm": {
|
|
40
|
+
"onlyBuiltDependencies": [
|
|
41
|
+
"@parcel/watcher",
|
|
42
|
+
"esbuild",
|
|
43
|
+
"sharp"
|
|
44
|
+
],
|
|
45
|
+
"overrides": {
|
|
46
|
+
"readdir-glob>minimatch": "11.0.5"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"overrides": {
|
|
50
|
+
"readdir-glob": {
|
|
51
|
+
"minimatch": "11.0.5"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { readBlog, headers } from '../../blog.mjs';
|
|
2
|
+
import { cmsEnvironment } from '../../utils/cms-environment';
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
const view = await readBlog(getRequestURL(event).href, {
|
|
5
|
+
id: getRouterParam(event, 'id'),
|
|
6
|
+
env: cmsEnvironment(event),
|
|
7
|
+
});
|
|
8
|
+
setResponseHeaders(event, headers);
|
|
9
|
+
return view;
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { readBlog, headers } from '../blog.mjs';
|
|
2
|
+
import { cmsEnvironment } from '../utils/cms-environment';
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
const view = await readBlog(getRequestURL(event).href, {
|
|
5
|
+
env: cmsEnvironment(event),
|
|
6
|
+
});
|
|
7
|
+
setResponseHeaders(event, headers);
|
|
8
|
+
return view;
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { handlePreview } from '../preview.mjs';
|
|
2
|
+
import { cmsEnvironment } from '../utils/cms-environment';
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
if (!event.path.startsWith('/lemonade/preview')) return;
|
|
5
|
+
return (
|
|
6
|
+
(await handlePreview(toWebRequest(event), { env: cmsEnvironment(event) })) ||
|
|
7
|
+
undefined
|
|
8
|
+
);
|
|
9
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { H3Event } from 'h3';
|
|
2
|
+
export function cmsEnvironment(event: H3Event) {
|
|
3
|
+
const c = useRuntimeConfig(event);
|
|
4
|
+
return {
|
|
5
|
+
CMS_PROJECT_ID: String(c.cmsProjectId),
|
|
6
|
+
CMS_PUBLIC_KEY: String(c.cmsPublicKey),
|
|
7
|
+
CMS_ENVIRONMENT: String(c.cmsEnvironment),
|
|
8
|
+
CMS_LOCALE: String(c.cmsLocale),
|
|
9
|
+
SITE_URL: String(c.siteUrl),
|
|
10
|
+
CMS_PREVIEW_ENABLED: String(c.cmsPreviewEnabled),
|
|
11
|
+
CMS_SECRET_KEY: String(c.cmsSecretKey),
|
|
12
|
+
CMS_PREVIEW_URL: String(c.cmsPreviewUrl),
|
|
13
|
+
CMS_STUDIO_ORIGIN: String(c.cmsStudioOrigin),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Your Lemonade journal
|
|
2
|
+
|
|
3
|
+
This is your standalone application. The initializer ran no installation, Git or CMS operations.
|
|
4
|
+
|
|
5
|
+
1. Install dependencies before adding private configuration: `npm ci --ignore-scripts` or `pnpm install --frozen-lockfile`. pnpm only approves the explicitly listed esbuild/sharp/watcher build scripts.
|
|
6
|
+
2. Sign in at https://app.lemonadecms.com and choose the intended workspace and environment.
|
|
7
|
+
3. Under Content types, choose Start with a template → Articles and authors, or review/import model-template.json. Imports create new types only; conflicting keys require a different workspace or a compatible existing model. Nothing is overwritten.
|
|
8
|
+
4. In that environment's API access, issue a published read application token scoped to article and author, your language and media. Configure only that model scope: the currently pinned SDK schema CLI cannot negotiate unrelated JSON-field models.
|
|
9
|
+
5. Create your ignored .env from .env.example and set the workspace UUID, exact environment key/UUID, locale, public token and SITE_URL (the local website origin). Never paste secrets into command arguments.
|
|
10
|
+
6. Run `npm run cms:check` (or pnpm run cms:check), then `npm run cms:types`. A verified empty collection is valid; create an author and article in Studio and publish the author before the article. Publication is always explicit.
|
|
11
|
+
7. Run `npm run dev`. Articles use UUID URLs; the preset's slug is plain text, not a uniqueness guarantee.
|
|
12
|
+
|
|
13
|
+
The SDK calls the hosted API. It has no custom URL/environment option; the credential selects the environment. Check again after changing credentials. SSR pages are uncached so the next request can show a new publication. Do not turn on static generation/CDN caching for expiring media links without designing an invalidation strategy.
|
|
14
|
+
|
|
15
|
+
## Saved draft preview
|
|
16
|
+
|
|
17
|
+
Optional preview requires a separate server-only preview application token, CMS_PREVIEW_ENABLED=true, exact CMS_PREVIEW_URL ending /lemonade/preview, and CMS_STUDIO_ORIGIN=https://app.lemonadecms.com. An authorized manager must configure that model/language destination in Workspace settings → Website preview. Hosted Studio requires HTTPS: use your own HTTPS site/tunnel; none is created automatically. The scoped session is stored in a path-restricted HttpOnly cookie and read by server routes; unsaved Studio changes are excluded. Open a new preview after expiry or permission changes. Private routes never fall back to broad draft reads.
|
|
18
|
+
|
|
19
|
+
Ordinary pages receive published content. The optional private preview renders the authorized saved draft in a separate view. Keep all keys out of public runtime configuration, client environment files and Git. Canonical CMS variables come from process environment before this project's .env (64 KiB maximum). Other dotenv files must not select a different CMS namespace. Production deployment supplies the same variables at runtime; framework builds do not need credentials or a running CMS.
|
|
20
|
+
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
- `dev`: native framework development server, loopback by default.
|
|
24
|
+
- `check`, `build`, `start`: type/check, production SSR build, Node server.
|
|
25
|
+
- `cms:setup`: local configuration checklist, no network or writes.
|
|
26
|
+
- `cms:check`: scoped schema/connection check and bounded published read.
|
|
27
|
+
- `cms:types`: verified schema → the documented generated types file, no CMS writes.
|
|
28
|
+
|
|
29
|
+
Setup failures, upstream errors and an empty collection are different states. No demonstration data is substituted for failed CMS reads. CMS checks can update ordinary usage/last-used metadata, never content or schema.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Lemonade blog
|
|
2
|
+
|
|
3
|
+
See [GETTING_STARTED.md](GETTING_STARTED.md) to connect your workspace. This app contains ordinary framework source that you own and can adapt.
|
|
4
|
+
|
|
5
|
+
This Lemonade starter is qualified locally on macOS and Linux. **Windows is
|
|
6
|
+
unverified** for this release; portable-path tests do not establish native Windows
|
|
7
|
+
compatibility. The application still requires your explicit dependency installation
|
|
8
|
+
and Studio configuration.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Configure privately after installing dependencies. Never commit .env.
|
|
2
|
+
CMS_PROJECT_ID=
|
|
3
|
+
CMS_ENVIRONMENT=
|
|
4
|
+
CMS_LOCALE=
|
|
5
|
+
CMS_PUBLIC_KEY=
|
|
6
|
+
SITE_URL=
|
|
7
|
+
# Optional saved-draft preview; requires a separate Studio-approved HTTPS destination.
|
|
8
|
+
CMS_PREVIEW_ENABLED=false
|
|
9
|
+
CMS_SECRET_KEY=
|
|
10
|
+
CMS_PREVIEW_URL=
|
|
11
|
+
CMS_STUDIO_ORIGIN=https://app.lemonadecms.com
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "lemonade-model-template",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"name": "Lemonade blog",
|
|
5
|
+
"description": "Articles and authors for the official blog starters. Contains no entries or media.",
|
|
6
|
+
"models": [
|
|
7
|
+
{
|
|
8
|
+
"key": "author",
|
|
9
|
+
"name": "Authors",
|
|
10
|
+
"fields": [
|
|
11
|
+
{
|
|
12
|
+
"key": "name",
|
|
13
|
+
"label": "Name",
|
|
14
|
+
"type": "text",
|
|
15
|
+
"required": true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"key": "bio",
|
|
19
|
+
"label": "Biography",
|
|
20
|
+
"type": "markdown",
|
|
21
|
+
"required": false
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "portrait",
|
|
25
|
+
"label": "Portrait",
|
|
26
|
+
"type": "image",
|
|
27
|
+
"required": false
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"key": "article",
|
|
33
|
+
"name": "Articles",
|
|
34
|
+
"fields": [
|
|
35
|
+
{
|
|
36
|
+
"key": "title",
|
|
37
|
+
"label": "Title",
|
|
38
|
+
"type": "text",
|
|
39
|
+
"required": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"key": "slug",
|
|
43
|
+
"label": "Slug",
|
|
44
|
+
"type": "text",
|
|
45
|
+
"required": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"key": "body",
|
|
49
|
+
"label": "Body",
|
|
50
|
+
"type": "markdown",
|
|
51
|
+
"required": true
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"key": "author",
|
|
55
|
+
"label": "Author",
|
|
56
|
+
"type": "reference",
|
|
57
|
+
"required": true,
|
|
58
|
+
"target": "author"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"key": "cover",
|
|
62
|
+
"label": "Cover",
|
|
63
|
+
"type": "image",
|
|
64
|
+
"required": false
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"key": "date",
|
|
68
|
+
"label": "Publication date",
|
|
69
|
+
"type": "date",
|
|
70
|
+
"required": false
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light dark;
|
|
3
|
+
--paper: #fbfcf8;
|
|
4
|
+
--card: #fff;
|
|
5
|
+
--ink: #18342b;
|
|
6
|
+
--forest: #23583f;
|
|
7
|
+
--lime: #aff33e;
|
|
8
|
+
--muted: #63726b;
|
|
9
|
+
--line: #dbe4d7;
|
|
10
|
+
font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
|
|
11
|
+
color: var(--ink);
|
|
12
|
+
background: var(--paper);
|
|
13
|
+
}
|
|
14
|
+
* {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
html {
|
|
18
|
+
overflow-wrap: anywhere;
|
|
19
|
+
}
|
|
20
|
+
body {
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
a {
|
|
24
|
+
color: inherit;
|
|
25
|
+
text-decoration-thickness: 1px;
|
|
26
|
+
text-underline-offset: 4px;
|
|
27
|
+
}
|
|
28
|
+
a:hover {
|
|
29
|
+
color: var(--forest);
|
|
30
|
+
}
|
|
31
|
+
a:focus-visible,
|
|
32
|
+
button:focus-visible {
|
|
33
|
+
outline: 3px solid var(--forest);
|
|
34
|
+
outline-offset: 5px;
|
|
35
|
+
}
|
|
36
|
+
.skip {
|
|
37
|
+
position: absolute;
|
|
38
|
+
left: 12px;
|
|
39
|
+
top: -80px;
|
|
40
|
+
padding: 12px;
|
|
41
|
+
background: var(--lime);
|
|
42
|
+
}
|
|
43
|
+
.skip:focus {
|
|
44
|
+
top: 12px;
|
|
45
|
+
}
|
|
46
|
+
header,
|
|
47
|
+
main,
|
|
48
|
+
footer {
|
|
49
|
+
max-width: 1160px;
|
|
50
|
+
margin: auto;
|
|
51
|
+
padding: 28px 32px;
|
|
52
|
+
}
|
|
53
|
+
header {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
border-bottom: 1px solid var(--line);
|
|
59
|
+
gap: 20px;
|
|
60
|
+
}
|
|
61
|
+
.brand {
|
|
62
|
+
font-size: 22px;
|
|
63
|
+
font-weight: 750;
|
|
64
|
+
letter-spacing: -1px;
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
}
|
|
67
|
+
.mark {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
width: 16px;
|
|
70
|
+
height: 16px;
|
|
71
|
+
border: 5px solid var(--forest);
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
margin-right: 10px;
|
|
74
|
+
vertical-align: baseline;
|
|
75
|
+
}
|
|
76
|
+
.hero {
|
|
77
|
+
padding: 56px 0 46px;
|
|
78
|
+
max-width: 850px;
|
|
79
|
+
}
|
|
80
|
+
.hero h1 {
|
|
81
|
+
font-size: clamp(40px, 7vw, 80px);
|
|
82
|
+
font-weight: 600;
|
|
83
|
+
letter-spacing: -0.055em;
|
|
84
|
+
line-height: 1.08;
|
|
85
|
+
margin: 0 0 24px;
|
|
86
|
+
}
|
|
87
|
+
.hero p {
|
|
88
|
+
font-size: 20px;
|
|
89
|
+
line-height: 1.6;
|
|
90
|
+
max-width: 48ch;
|
|
91
|
+
color: var(--muted);
|
|
92
|
+
}
|
|
93
|
+
.posts {
|
|
94
|
+
display: grid;
|
|
95
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
96
|
+
gap: 36px;
|
|
97
|
+
}
|
|
98
|
+
.post {
|
|
99
|
+
min-width: 0;
|
|
100
|
+
padding: 0 0 28px;
|
|
101
|
+
border-bottom: 1px solid var(--line);
|
|
102
|
+
}
|
|
103
|
+
.post h2 {
|
|
104
|
+
font-size: 28px;
|
|
105
|
+
line-height: 1.2;
|
|
106
|
+
letter-spacing: -0.035em;
|
|
107
|
+
margin: 18px 0 12px;
|
|
108
|
+
}
|
|
109
|
+
.post p {
|
|
110
|
+
color: var(--muted);
|
|
111
|
+
line-height: 1.7;
|
|
112
|
+
max-width: 60ch;
|
|
113
|
+
}
|
|
114
|
+
.post-image {
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 260px;
|
|
117
|
+
object-fit: cover;
|
|
118
|
+
border-radius: 12px;
|
|
119
|
+
background: var(--line);
|
|
120
|
+
}
|
|
121
|
+
.byline {
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
color: var(--muted);
|
|
124
|
+
display: flex;
|
|
125
|
+
gap: 14px;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
}
|
|
128
|
+
.pagination {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-wrap: wrap;
|
|
131
|
+
justify-content: space-between;
|
|
132
|
+
align-items: center;
|
|
133
|
+
gap: 16px;
|
|
134
|
+
margin: 32px 0;
|
|
135
|
+
padding: 20px 0;
|
|
136
|
+
border-top: 1px solid var(--line);
|
|
137
|
+
}
|
|
138
|
+
.article {
|
|
139
|
+
max-width: 760px;
|
|
140
|
+
margin: auto;
|
|
141
|
+
}
|
|
142
|
+
.article h1 {
|
|
143
|
+
font-size: clamp(36px, 6vw, 64px);
|
|
144
|
+
letter-spacing: -0.05em;
|
|
145
|
+
line-height: 1.12;
|
|
146
|
+
overflow-wrap: anywhere;
|
|
147
|
+
}
|
|
148
|
+
.article .body {
|
|
149
|
+
font-size: 19px;
|
|
150
|
+
line-height: 1.85;
|
|
151
|
+
margin: 36px 0;
|
|
152
|
+
}
|
|
153
|
+
.body img {
|
|
154
|
+
max-width: 100%;
|
|
155
|
+
height: auto;
|
|
156
|
+
}
|
|
157
|
+
.body pre {
|
|
158
|
+
overflow: auto;
|
|
159
|
+
padding: 20px;
|
|
160
|
+
background: var(--card);
|
|
161
|
+
border: 1px solid var(--line);
|
|
162
|
+
border-radius: 8px;
|
|
163
|
+
}
|
|
164
|
+
.body a {
|
|
165
|
+
overflow-wrap: anywhere;
|
|
166
|
+
}
|
|
167
|
+
.notice {
|
|
168
|
+
margin: 44px 0;
|
|
169
|
+
padding: 28px;
|
|
170
|
+
border: 1px solid var(--line);
|
|
171
|
+
border-radius: 12px;
|
|
172
|
+
background: var(--card);
|
|
173
|
+
max-width: 760px;
|
|
174
|
+
}
|
|
175
|
+
.notice h1,
|
|
176
|
+
.notice h2 {
|
|
177
|
+
letter-spacing: -0.035em;
|
|
178
|
+
line-height: 1.2;
|
|
179
|
+
}
|
|
180
|
+
.notice p {
|
|
181
|
+
max-width: 64ch;
|
|
182
|
+
line-height: 1.7;
|
|
183
|
+
color: var(--muted);
|
|
184
|
+
}
|
|
185
|
+
.button {
|
|
186
|
+
display: inline-block;
|
|
187
|
+
padding: 12px 18px;
|
|
188
|
+
border: 1px solid var(--line);
|
|
189
|
+
border-radius: 8px;
|
|
190
|
+
background: var(--card);
|
|
191
|
+
color: var(--ink);
|
|
192
|
+
font: inherit;
|
|
193
|
+
text-decoration: none;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
}
|
|
196
|
+
.button:hover {
|
|
197
|
+
border-color: var(--forest);
|
|
198
|
+
}
|
|
199
|
+
footer {
|
|
200
|
+
border-top: 1px solid var(--line);
|
|
201
|
+
color: var(--muted);
|
|
202
|
+
margin-top: 48px;
|
|
203
|
+
font-size: 14px;
|
|
204
|
+
}
|
|
205
|
+
.preview-banner {
|
|
206
|
+
padding: 16px;
|
|
207
|
+
background: var(--lime);
|
|
208
|
+
color: #18342b;
|
|
209
|
+
display: flex;
|
|
210
|
+
gap: 20px;
|
|
211
|
+
align-items: center;
|
|
212
|
+
justify-content: space-between;
|
|
213
|
+
flex-wrap: wrap;
|
|
214
|
+
}
|
|
215
|
+
.preview-banner p {
|
|
216
|
+
margin: 5px 0;
|
|
217
|
+
}
|
|
218
|
+
@media (max-width: 680px) {
|
|
219
|
+
header,
|
|
220
|
+
main,
|
|
221
|
+
footer {
|
|
222
|
+
padding: 22px;
|
|
223
|
+
}
|
|
224
|
+
.hero {
|
|
225
|
+
padding: 36px 0 28px;
|
|
226
|
+
}
|
|
227
|
+
.posts {
|
|
228
|
+
grid-template-columns: 1fr;
|
|
229
|
+
gap: 24px;
|
|
230
|
+
}
|
|
231
|
+
.post-image {
|
|
232
|
+
height: 210px;
|
|
233
|
+
}
|
|
234
|
+
.article .body {
|
|
235
|
+
font-size: 17px;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
@media (prefers-color-scheme: dark) {
|
|
239
|
+
:root {
|
|
240
|
+
--paper: #12251d;
|
|
241
|
+
--card: #1b3228;
|
|
242
|
+
--ink: #edf3e9;
|
|
243
|
+
--forest: #aff33e;
|
|
244
|
+
--muted: #b7c6b9;
|
|
245
|
+
--line: #365044;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
249
|
+
a,
|
|
250
|
+
button {
|
|
251
|
+
transition:
|
|
252
|
+
color 0.12s,
|
|
253
|
+
border-color 0.12s;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"models": {
|
|
4
|
+
"author": {
|
|
5
|
+
"name": {
|
|
6
|
+
"type": "text"
|
|
7
|
+
},
|
|
8
|
+
"bio": {
|
|
9
|
+
"type": "markdown"
|
|
10
|
+
},
|
|
11
|
+
"portrait": {
|
|
12
|
+
"type": "image"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"article": {
|
|
16
|
+
"title": {
|
|
17
|
+
"type": "text"
|
|
18
|
+
},
|
|
19
|
+
"slug": {
|
|
20
|
+
"type": "text"
|
|
21
|
+
},
|
|
22
|
+
"body": {
|
|
23
|
+
"type": "markdown"
|
|
24
|
+
},
|
|
25
|
+
"author": {
|
|
26
|
+
"type": "reference",
|
|
27
|
+
"target": "author"
|
|
28
|
+
},
|
|
29
|
+
"cover": {
|
|
30
|
+
"type": "image"
|
|
31
|
+
},
|
|
32
|
+
"date": {
|
|
33
|
+
"type": "date"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|