Skip to content

Commit f6d3f85

Browse files
TOberpaulmichaelmkrausleapemfranzke
authored
Initial Marketing Pages Setup (#4)
* Initial Marketing Pages Setup --------- Co-authored-by: michaelmkraus <michael.m.kraus@deutschebahn.com> Co-authored-by: Lea Perchermeier <lea.perchermeier@deutschebahn.com> Co-authored-by: Maximilian Franzke <787658+mfranzke@users.noreply.github.com>
1 parent 7624ea1 commit f6d3f85

File tree

193 files changed

+3398
-491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+3398
-491
lines changed

.amazonq/rules/db-ux.md

Whitespace-only changes.

.env.template

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/copilot-instructions.md

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
2+
--- START: DB UX Copilot Instructions – do not edit below ---
3+
4+
> **NOTE**: Always use "DB UX" components and variables as project's conventions
5+
# @db-ux/core-components
6+
## Best Practise / Common AI mistakes
7+
8+
- always read this file if you use Components: `node_modules/@db-ux/core-components/agent/Best-Practise_Common-AI-Mistakes.md`
9+
10+
11+
# @db-ux/core-foundations
12+
## CSS
13+
14+
- If you use CSS, follow these rules:
15+
- Always reference the file `node_modules/@db-ux/core-foundations/agent/css/Variables.md` for variables like sizing, spacing, elevation, border, or container-size. This file contains the authoritative list of available variables.
16+
- Use the examples provided in `Variables.md` to ensure correct usage like:
17+
- `padding: var(--db-spacing-fixed-md);`
18+
- `height: var(--db-sizing-md);`
19+
- `width: var(--db-container-xs);`
20+
- `color: var(--db-adaptive-on-bg-basic-emphasis-90-default);`
21+
- `background-color: var(--db-adaptive-bg-basic-level-2-default);`
22+
- `font: var(--db-type-body-sm);`
23+
24+
## SCSS
25+
26+
- If you use SCSS, follow these rules:
27+
- Always reference the file `node_modules/@db-ux/core-foundations/agent/scss/Variables.md` for variables like sizing, spacing, elevation, border, or container-size. This file contains the authoritative list of available variables.
28+
- Use the examples provided in `Variables.md` to ensure correct usage.
29+
- Always use `@use` for imports:
30+
- Variables: `@use "@db-ux/core-foundations/build/styles/variables";`
31+
- Colors: `@use "@db-ux/core-foundations/build/styles/colors";`
32+
- Fonts: `@use "@db-ux/core-foundations/build/styles/fonts";`
33+
- Never use `as *` for the `@use`, use it like this:
34+
- `padding: variables.$db-spacing-fixed-md;`
35+
- `height: variables.$db-sizing-md;`
36+
- `width: variables.$db-container-xs;`
37+
- `color: colors.$db-adaptive-on-bg-basic-emphasis-90-default;`
38+
- `background-color: colors.$db-adaptive-bg-basic-level-2-default;`
39+
- `font: fonts.$db-type-body-sm;`
40+
41+
## Tailwind
42+
43+
- If you use Tailwind, follow these rules:
44+
- Always reference the file `node_modules/@db-ux/core-foundations/agent/tailwind/Variables.md` for variables like sizing, spacing, elevation, border, or container-size. This file contains the authoritative list of available variables.
45+
- Use the examples provided in `Variables.md` to ensure correct usage like:
46+
- padding: `p-fix-md`
47+
- height: `h-siz-md`
48+
- width: `w-container-xs`
49+
- color: `text-adaptive-on-bg-basic-emphasis-90-default`
50+
- background-color: `bg-adaptive-bg-basic-level-2-default`
51+
- font: `text-body-sm`
52+
- Always stick to the variables. Don't use values like `p-4` or `m-[16px]`; use `p-fix-xs` or `m-fix-md` instead.
53+
54+
## Figma MCP
55+
56+
- If you use Figma MCP always generate code with project's conventions, such as using @db-ux/core-components and @db-ux/core-foundations.
57+
- If a code snippet from Figma MCP has a font-family with "DB Neo Screen Head" use HTML headlines (`<h1>`, `<h2>`, `<h3>`, `<h4>`, `<h5>`, `<h6>` HTML tags).
58+
- If the headline has a `font-weight: 300;` use `data-variant="light"` additionally.
59+
- If a code snippet has a Figma `Mode`, add it as `data-xxx`, where `xxx` is the mode in lower-case.
60+
61+
### Tailwind
62+
63+
If you use tailwind follow those rules as well:
64+
65+
- Don't use values like `p-4` or `m-[16px]`; use `p-fix-xs` or `m-fix-md` instead.
66+
- Never use something like `font-['DB_Neo_Screen_Head']` and `leading-[48px]` instead use `text-head-xx` class, where `-xx` can be a t-shirt size from `3xs` to `3xl`; If it has a `font-wight:300;` use `text-head-light-xx` instead.
67+
68+
69+
# @db-ux/react-core-components
70+
- Use "@db-ux/react-core-components" as import for components:
71+
- use for `DBDrawer` or `Drawer` the file node_modules/@db-ux/react-core-components/agent/Drawer.md
72+
- use for `DBTooltip` or `Tooltip` the file node_modules/@db-ux/react-core-components/agent/Tooltip.md
73+
- use for `DBTextarea` or `Textarea` the file node_modules/@db-ux/react-core-components/agent/Textarea.md
74+
- use for `DBTag` or `Tag` the file node_modules/@db-ux/react-core-components/agent/Tag.md
75+
- use for `DBTabs` or `Tabs` the file node_modules/@db-ux/react-core-components/agent/Tabs.md
76+
- use for `DBTabItem` or `TabItem` the file node_modules/@db-ux/react-core-components/agent/TabItem.md
77+
- use for `DBSwitch` or `Switch` the file node_modules/@db-ux/react-core-components/agent/Switch.md
78+
- use for `DBStack` or `Stack` the file node_modules/@db-ux/react-core-components/agent/Stack.md
79+
- use for `DBSelect` or `Select` the file node_modules/@db-ux/react-core-components/agent/Select.md
80+
- use for `DBSection` or `Section` the file node_modules/@db-ux/react-core-components/agent/Section.md
81+
- use for `DBRadio` or `Radio` the file node_modules/@db-ux/react-core-components/agent/Radio.md
82+
- use for `DBPopover` or `Popover` the file node_modules/@db-ux/react-core-components/agent/Popover.md
83+
- use for `DBPage` or `Page` the file node_modules/@db-ux/react-core-components/agent/Page.md
84+
- use for `DBNotification` or `Notification` the file node_modules/@db-ux/react-core-components/agent/Notification.md
85+
- use for `DBNavigationItem` or `NavigationItem` the file node_modules/@db-ux/react-core-components/agent/NavigationItem.md
86+
- use for `DBNavigation` or `Navigation` the file node_modules/@db-ux/react-core-components/agent/Navigation.md
87+
- use for `DBLink` or `Link` the file node_modules/@db-ux/react-core-components/agent/Link.md
88+
- use for `DBInput` or `Input` the file node_modules/@db-ux/react-core-components/agent/Input.md
89+
- use for `DBInfotext` or `Infotext` the file node_modules/@db-ux/react-core-components/agent/Infotext.md
90+
- use for `DBIcon` or `Icon` the file node_modules/@db-ux/react-core-components/agent/Icon.md
91+
- use for `DBHeader` or `Header` the file node_modules/@db-ux/react-core-components/agent/Header.md
92+
- use for `DBDivider` or `Divider` the file node_modules/@db-ux/react-core-components/agent/Divider.md
93+
- use for `DBCustomSelect` or `CustomSelect` the file node_modules/@db-ux/react-core-components/agent/CustomSelect.md
94+
- use for `DBCheckbox` or `Checkbox` the file node_modules/@db-ux/react-core-components/agent/Checkbox.md
95+
- use for `DBCard` or `Card` the file node_modules/@db-ux/react-core-components/agent/Card.md
96+
- use for `DBButton` or `Button` the file node_modules/@db-ux/react-core-components/agent/Button.md
97+
- use for `DBBrand` or `Brand` the file node_modules/@db-ux/react-core-components/agent/Brand.md
98+
- use for `DBBadge` or `Badge` the file node_modules/@db-ux/react-core-components/agent/Badge.md
99+
- use for `DBAccordionItem` or `AccordionItem` the file node_modules/@db-ux/react-core-components/agent/AccordionItem.md
100+
- use for `DBAccordion` or `Accordion` the file node_modules/@db-ux/react-core-components/agent/Accordion.md
101+
102+
--- END: DB UX Copilot Instructions – do not edit above ---
103+
104+
105+
# onePlatform Guidelines
106+
107+
These instructions tell GitHub Copilot how to write, structure and propose content inside this repository.
108+
They ensure code & content generation is consistent with our architecture and expectations.
109+
110+
---
111+
112+
## 📁 Project Structure Rules
113+
114+
| Location | Purpose |
115+
|---|---|
116+
| content/pages/... | Real page content (MD/MDX only) |
117+
| content/pages/**/_components | Page-local components — only used on that page |
118+
| template/components/... | Global reusable Astro/React UI components |
119+
| template/utils/... | Shared logic, navigation, helpers, transforms |
120+
| public/static/... | Assets served directly without processing |
121+
| styles/... | Global CSS, tokens, utilities |
122+
123+
Copilot must ask before creating files outside this structure.
124+
125+
---
126+
127+
## 🏗 Content Creation Rules
128+
129+
### Markdown / MDX Pages
130+
- Always place pages under `content/pages/<section>/index.mdx`
131+
- The folder name becomes the navigation label unless overridden
132+
- Avoid deeply nested pages — prefer `_components` for reuse
133+
134+
Example:
135+
136+
`content/pages/resources/documentation/index.mdx`
137+
138+
`content/pages/resources/documentation/getting-started/index.mdx`
139+
140+
---
141+
142+
### Frontmatter Standards
143+
144+
| Field | Type | Default | Meaning |
145+
|---|---|---|---|
146+
| title | string | required | Visible page heading |
147+
| order | number | 999 | Sorting (lower = earlier) |
148+
| hidePage | boolean | false | Page exists but should redirect to child |
149+
| isSubNavigation | boolean | false | Children render sidebar |
150+
| nav | boolean | true | Exclude page from main nav if false |
151+
152+
Example:
153+
154+
```bash
155+
---
156+
title: "Foundations"
157+
order: 1
158+
isSubNavigation: true
159+
---
160+
```
161+
162+
---
163+
164+
## 🧭 Navigation Behavior
165+
166+
Navigation is generated automatically from folder structure — not from config files.
167+
168+
Page is visible when:
169+
170+
`index.mdx` exists AND `hidePage:false` AND `nav:true`
171+
172+
Subnavigation appears when:
173+
174+
`parent.isSubNavigation == true`
175+
176+
If `hidePage: true` → page URL forwards to its first child.
177+
178+
---
179+
180+
## 🧩 Component Rules
181+
182+
| Type | Location | Notes |
183+
|---|---|---|
184+
| Reusable components | template/components/** | Should have .astro + optional .css/.tsx |
185+
| Page-local components | content/pages/**/_components | Only used within single page |
186+
| Interactive logic | use .astro wrapper + .tsx island | No logic directly in MDX |
187+
| No inline CSS | Always extract to .css |
188+
189+
Component architecture:
190+
191+
📁 Component.astro — markup only
192+
📁 Component.css — styling
193+
📁 Component.tsx — (optional) interaction
194+
195+
---
196+
197+
## 🌗 Theme / ColorMode Rules
198+
199+
`data-mode="light|dark"` lives on `.db-shell`
200+
201+
Copilot MUST:
202+
- use existing provider
203+
- not create new theme toggles
204+
- prefer tokens & CSS vars over raw colors
205+
206+
---
207+
208+
## 🧪 Code Quality Requirements
209+
210+
| Rule | Reason |
211+
|---|---|
212+
| prettier + eslint must autoformat | readability |
213+
| no unused imports | hygiene |
214+
| avoid console.log in final merges | cleanliness |
215+
| do not place CSS in Astro markup | separation of concerns |
216+
| always type props | maintainability |
217+
218+
---
219+
220+
## 🚨 If unsure — ask BEFORE generating
221+
222+
Good Copilot messages:
223+
224+
"Should this be global or page-local?"
225+
226+
"Do you want this config in frontmatter or TS?"
227+
228+
Bad Copilot behavior:
229+
230+
❌ modify navigation manually
231+
❌ inline CSS
232+
❌ write logic inside MDX directly
233+
234+
---
235+
236+
## Final Rule
237+
238+
If Copilot is unsure, it must ask.
239+
Otherwise, it may generate confidently.

.prettierrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"semi": true,
8+
"plugins": ["prettier-plugin-astro"],
9+
"overrides": [
10+
{
11+
"files": "*.astro",
12+
"options": {
13+
"parser": "astro"
14+
}
15+
},
16+
{
17+
"files": "*.mdx",
18+
"options": {
19+
"parser": "mdx"
20+
}
21+
}
22+
]
23+
}

0 commit comments

Comments
 (0)