@schneiderelli/cms-runtime 0.0.5 → 0.0.7

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.
@@ -9,17 +9,17 @@
9
9
  </script>
10
10
 
11
11
  {#if block.level === 1}
12
- <h1 class="csm-heading csm-h1">{block.text}</h1>
12
+ <h1 class="csm-heading csm-h1" style:color={block.color || undefined}>{block.text}</h1>
13
13
  {:else if block.level === 2}
14
- <h2 class="csm-heading csm-h2">{block.text}</h2>
14
+ <h2 class="csm-heading csm-h2" style:color={block.color || undefined}>{block.text}</h2>
15
15
  {:else if block.level === 3}
16
- <h3 class="csm-heading csm-h3">{block.text}</h3>
16
+ <h3 class="csm-heading csm-h3" style:color={block.color || undefined}>{block.text}</h3>
17
17
  {:else if block.level === 4}
18
- <h4 class="csm-heading csm-h4">{block.text}</h4>
18
+ <h4 class="csm-heading csm-h4" style:color={block.color || undefined}>{block.text}</h4>
19
19
  {:else if block.level === 5}
20
- <h5 class="csm-heading csm-h5">{block.text}</h5>
20
+ <h5 class="csm-heading csm-h5" style:color={block.color || undefined}>{block.text}</h5>
21
21
  {:else}
22
- <h6 class="csm-heading csm-h6">{block.text}</h6>
22
+ <h6 class="csm-heading csm-h6" style:color={block.color || undefined}>{block.text}</h6>
23
23
  {/if}
24
24
 
25
25
  <style>
@@ -7,7 +7,11 @@
7
7
  let { block }: Props = $props();
8
8
  </script>
9
9
 
10
- <header class="csm-hero">
10
+ <header
11
+ class="csm-hero"
12
+ style:background-color={block.backgroundColor || undefined}
13
+ style:color={block.textColor || undefined}
14
+ >
11
15
  <h1 class="csm-hero-title">{block.title}</h1>
12
16
  {#if block.subtitle}
13
17
  <p class="csm-hero-subtitle">{block.subtitle}</p>
@@ -11,7 +11,11 @@
11
11
  const html = $derived(marked.parseInline(block.content) as string);
12
12
  </script>
13
13
 
14
- <div class="csm-note csm-note-{block.variant}">
14
+ <div
15
+ class="csm-note csm-note-{block.variant}"
16
+ style:background-color={block.backgroundColor || undefined}
17
+ style:color={block.textColor || undefined}
18
+ >
15
19
  {@html html}
16
20
  </div>
17
21
 
package/dist/types.d.ts CHANGED
@@ -86,6 +86,8 @@ export interface HeadingBlock extends BaseBlock {
86
86
  text: string;
87
87
  /** Level: 1-6 */
88
88
  level: 1 | 2 | 3 | 4 | 5 | 6;
89
+ /** Textfarbe (optional) */
90
+ color?: string;
89
91
  }
90
92
  /** Image Block */
91
93
  export interface ImageBlock extends BaseBlock {
@@ -116,6 +118,10 @@ export interface NoteBlock extends BaseBlock {
116
118
  content: string;
117
119
  /** Variante */
118
120
  variant: 'info' | 'warning' | 'tip' | 'danger';
121
+ /** Hintergrundfarbe (optional, überschreibt variant) */
122
+ backgroundColor?: string;
123
+ /** Textfarbe (optional) */
124
+ textColor?: string;
119
125
  }
120
126
  /** FAQ Block */
121
127
  export interface FaqBlock extends BaseBlock {
@@ -152,6 +158,10 @@ export interface HeroBlock extends BaseBlock {
152
158
  title: string;
153
159
  /** Untertitel */
154
160
  subtitle?: string;
161
+ /** Hintergrundfarbe (optional) */
162
+ backgroundColor?: string;
163
+ /** Textfarbe (optional) */
164
+ textColor?: string;
155
165
  }
156
166
  /** Children Block - Zeigt Kind-Seiten */
157
167
  export interface ChildrenBlock extends BaseBlock {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schneiderelli/cms-runtime",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Content System Manager Runtime - Shared types and components for CMS editor and website framework",
5
5
  "scripts": {
6
6
  "dev": "vite dev",