@orangesk/cms-templates
v1.0.0-beta.48
Published
A package containing templates and components for CMS.
Readme
CMS Templates
A package containing templates and components for CMS.
Installation
npm install @orangesk/cms-templatesIncluded Assets
This package includes the following resources:
- Images - Graphics and visual assets for components
- shame.css - Additional stylesheet for component styling
Styling
Color Management
This package uses CSS custom properties (variables) for color management of colors, which are not in design system. So use it instead of hardcoded backgroundColor values. This provides better color consistency and maintainability.
Example:
// Instead of:
style={{ backgroundColor: "#D9DAC6" }}
// Use:
style={{ "--color-background-primary": "#D9DAC6" }}data-ods-id
Page templates use static data-ods-id attributes on root content sections.
Purpose:
- They allow an external supplier to compare rendered HTML over time.
- They provide a stable identifier for the same page section even when markup inside the section changes.
- They make it easier to detect whether a section was added, removed, reordered, or edited between template versions.
Rules:
data-ods-idmust be static, readable, and unique within the rendered page.- For shared templates, the final value is built from
odsPrefix, so B2C/B2B variants can reuse the same structure while keeping different IDs. - Add
data-ods-idto the root page section component only. - Do not duplicate the same logical section ID on nested visual wrappers if the parent section already has its own
data-ods-id. - If a section is rendered directly by a root component without an outer
Sectionwrapper, add thedata-ods-idto that root component.
Example:
<Section data-ods-id="homepage-b2c__section-03">
...
</Section>