hr-design-system-handlebars 1.26.0 → 1.26.2
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 +24 -0
- package/dist/assets/index.css +29 -3
- package/dist/views/components/teaser/podcast/podcast_title.hbs +1 -1
- package/dist/views/components/teaser/ticker/teaser_ticker_timeline.hbs +29 -0
- package/package.json +1 -1
- package/src/assets/fixtures/teaser/teaser_ticker_timeline.json +31 -0
- package/src/stories/views/components/teaser/fixtures/teaser_ticker_timeline.json +1 -0
- package/src/stories/views/components/teaser/podcast/podcast_title.hbs +1 -1
- package/src/stories/views/components/teaser/ticker/teaser_ticker_timeline.hbs +29 -0
- package/src/stories/views/components/teaser/ticker/teaser_ticker_timeline.mdx +30 -0
- package/src/stories/views/components/teaser/ticker/teaser_ticker_timeline.stories.js +44 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# v1.26.2 (Mon Jun 12 2023)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- add ticker-timeline [#648](https://github.com/mumprod/hr-design-system-handlebars/pull/648) ([@hanswurstsalat](https://github.com/hanswurstsalat))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v1.26.1 (Mon Jun 05 2023)
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug Fix
|
|
16
|
+
|
|
17
|
+
- add adjust_context to title [#647](https://github.com/mumprod/hr-design-system-handlebars/pull/647) ([@hanswurstsalat](https://github.com/hanswurstsalat))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
1
25
|
# v1.26.0 (Wed May 24 2023)
|
|
2
26
|
|
|
3
27
|
#### 🚀 Enhancement
|
package/dist/assets/index.css
CHANGED
|
@@ -1027,6 +1027,12 @@ video {
|
|
|
1027
1027
|
bottom: 0px;
|
|
1028
1028
|
left: 0px;
|
|
1029
1029
|
}
|
|
1030
|
+
.-left-4 {
|
|
1031
|
+
left: -1rem;
|
|
1032
|
+
}
|
|
1033
|
+
.-left-5 {
|
|
1034
|
+
left: -1.25rem;
|
|
1035
|
+
}
|
|
1030
1036
|
.bottom-0 {
|
|
1031
1037
|
bottom: 0px;
|
|
1032
1038
|
}
|
|
@@ -1063,6 +1069,9 @@ video {
|
|
|
1063
1069
|
.top-0 {
|
|
1064
1070
|
top: 0px;
|
|
1065
1071
|
}
|
|
1072
|
+
.top-0\.5 {
|
|
1073
|
+
top: 0.125rem;
|
|
1074
|
+
}
|
|
1066
1075
|
.top-1\/2 {
|
|
1067
1076
|
top: 50%;
|
|
1068
1077
|
}
|
|
@@ -1368,6 +1377,9 @@ video {
|
|
|
1368
1377
|
.h-8 {
|
|
1369
1378
|
height: 2rem;
|
|
1370
1379
|
}
|
|
1380
|
+
.h-\[9px\] {
|
|
1381
|
+
height: 9px;
|
|
1382
|
+
}
|
|
1371
1383
|
.h-auto {
|
|
1372
1384
|
height: auto;
|
|
1373
1385
|
}
|
|
@@ -1392,6 +1404,9 @@ video {
|
|
|
1392
1404
|
.max-h-stage {
|
|
1393
1405
|
max-height: 34.3125rem;
|
|
1394
1406
|
}
|
|
1407
|
+
.w-0 {
|
|
1408
|
+
width: 0px;
|
|
1409
|
+
}
|
|
1395
1410
|
.w-10 {
|
|
1396
1411
|
width: 2.5rem;
|
|
1397
1412
|
}
|
|
@@ -1455,6 +1470,9 @@ video {
|
|
|
1455
1470
|
.w-\[1600px\] {
|
|
1456
1471
|
width: 1600px;
|
|
1457
1472
|
}
|
|
1473
|
+
.w-\[9px\] {
|
|
1474
|
+
width: 9px;
|
|
1475
|
+
}
|
|
1458
1476
|
.w-auto {
|
|
1459
1477
|
width: auto;
|
|
1460
1478
|
}
|
|
@@ -2002,6 +2020,10 @@ video {
|
|
|
2002
2020
|
--tw-bg-opacity: 1;
|
|
2003
2021
|
background-color: rgba(252, 242, 237, var(--tw-bg-opacity));
|
|
2004
2022
|
}
|
|
2023
|
+
.bg-orange-spicyCarrot {
|
|
2024
|
+
--tw-bg-opacity: 1;
|
|
2025
|
+
background-color: rgba(211, 70, 0, var(--tw-bg-opacity));
|
|
2026
|
+
}
|
|
2005
2027
|
.bg-podcast {
|
|
2006
2028
|
background-color: #006dc1;
|
|
2007
2029
|
background-color: var(--color-podcast);
|
|
@@ -2132,6 +2154,10 @@ video {
|
|
|
2132
2154
|
padding-left: 0.375rem;
|
|
2133
2155
|
padding-right: 0.375rem;
|
|
2134
2156
|
}
|
|
2157
|
+
.px-10 {
|
|
2158
|
+
padding-left: 2.5rem;
|
|
2159
|
+
padding-right: 2.5rem;
|
|
2160
|
+
}
|
|
2135
2161
|
.px-2 {
|
|
2136
2162
|
padding-left: 0.5rem;
|
|
2137
2163
|
padding-right: 0.5rem;
|
|
@@ -2732,7 +2758,7 @@ video {
|
|
|
2732
2758
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
2733
2759
|
}
|
|
2734
2760
|
.counter-reset {
|
|
2735
|
-
counter-reset:
|
|
2761
|
+
counter-reset: cnt1686604269121;
|
|
2736
2762
|
}
|
|
2737
2763
|
.hyphens-auto {
|
|
2738
2764
|
-webkit-hyphens: auto;
|
|
@@ -2968,7 +2994,7 @@ video {
|
|
|
2968
2994
|
--tw-ring-color: rgba(255, 255, 255, 0.5);
|
|
2969
2995
|
}
|
|
2970
2996
|
.-ordered {
|
|
2971
|
-
counter-increment:
|
|
2997
|
+
counter-increment: cnt1686604269121 1;
|
|
2972
2998
|
}
|
|
2973
2999
|
.-ordered::before {
|
|
2974
3000
|
position: absolute;
|
|
@@ -2984,7 +3010,7 @@ video {
|
|
|
2984
3010
|
letter-spacing: .0125em;
|
|
2985
3011
|
--tw-text-opacity: 1;
|
|
2986
3012
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
2987
|
-
content: counter(
|
|
3013
|
+
content: counter(cnt1686604269121);
|
|
2988
3014
|
}
|
|
2989
3015
|
/*! ****************************/
|
|
2990
3016
|
/*! text-shadow */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{#if this.isSingleChannel}}
|
|
2
2
|
{{#>components/base/link _link=this.link _css="group ds-link font-title text-base mt-2.5 text-podcast-text"}}
|
|
3
3
|
<span class="mt-0.5 group-hover:underline {{#if ../../_ordered-adjust_context}} pl-8 {{/if}}line-clamp-4 {{inline-switch ../../_teaserSize-adjust_context '["hero","100","50"]''["text-base md:text-2xl lg:line-clamp-2","text-base md:text-2xl lg:line-clamp-2","text-base md:text-lg"]' ~}}">
|
|
4
|
-
{{
|
|
4
|
+
{{~../../_title-adjust_context~}}
|
|
5
5
|
</span>
|
|
6
6
|
{{/components/base/link}}
|
|
7
7
|
{{else}}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{{~#with this.tickerItemResults ~}}
|
|
2
|
+
<ul class="px-10">
|
|
3
|
+
{{~#each this~}}
|
|
4
|
+
{{#if this.isTopnews}}
|
|
5
|
+
<li class="relative h-auto pb-5">
|
|
6
|
+
<div class="absolute h-full">
|
|
7
|
+
<div class="relative w-[9px] h-[9px] rounded-full top-0.5 bg-orange-spicyCarrot -left-5"></div>
|
|
8
|
+
{{#unless @last}}
|
|
9
|
+
<div class="relative flex flex-col w-0 h-full -left-4">
|
|
10
|
+
<div class="h-full my-2 border-l{{#if ../../_color}} border-{{../../_color}}{{else}} border-gray-400{{/if}}"></div>
|
|
11
|
+
<div class="h-2"></div>
|
|
12
|
+
</div>
|
|
13
|
+
{{/unless}}
|
|
14
|
+
</div>
|
|
15
|
+
{{#with this.tickerItemDateTime~}}
|
|
16
|
+
<div class="text-xs{{#if ../../../_color}} text-{{../../../_color}}{{/if}}">
|
|
17
|
+
{{#if ../../../this.isMultiDay}}
|
|
18
|
+
{{this.broadcastDate }}
|
|
19
|
+
{{else}}
|
|
20
|
+
{{this.time }}
|
|
21
|
+
{{/if}}
|
|
22
|
+
</div>
|
|
23
|
+
{{~/with}}
|
|
24
|
+
<a class="text-base{{#if ../../_color}} text-{{../../_color}}{{else}} text-toplineColor{{/if}} underline decoration-1 ds-link" href="{{this.tickerItemUrl}}">{{this.relevantTitle}}</a>
|
|
25
|
+
</li>
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{~/each~}}
|
|
28
|
+
</ul>
|
|
29
|
+
{{~/with~}}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"repository": "https://github.com/szuelch/hr-design-system-handlebars",
|
|
9
|
-
"version": "1.26.
|
|
9
|
+
"version": "1.26.2",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"storybook": "storybook dev -p 6006 public",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tickerItemResults": [
|
|
3
|
+
{
|
|
4
|
+
"isTopnews": true,
|
|
5
|
+
"tickerItemDateTime": {
|
|
6
|
+
"broadcastDate": "12. Juni, 10:15",
|
|
7
|
+
"time": "10:15"
|
|
8
|
+
},
|
|
9
|
+
"tickerItemUrl": "Topnews1",
|
|
10
|
+
"relevantTitle": "Kritik an Privatisierung von Wasser"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"isTopnews": true,
|
|
14
|
+
"tickerItemDateTime": {
|
|
15
|
+
"broadcastDate": "12. Juni, 9:55",
|
|
16
|
+
"time": "9:55"
|
|
17
|
+
},
|
|
18
|
+
"tickerItemUrl": "Topnews2",
|
|
19
|
+
"relevantTitle": "Suche nach neuem Vorsitz für Hanau-Ausschuss Hanau-Ausschuss Hanau-Ausschuss Hanau-Ausschuss"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"isTopnews": true,
|
|
23
|
+
"tickerItemDateTime": {
|
|
24
|
+
"broadcastDate": "12. Juni, 9:25",
|
|
25
|
+
"time": "9:25"
|
|
26
|
+
},
|
|
27
|
+
"tickerItemUrl": "Topnews3",
|
|
28
|
+
"relevantTitle": "Pedelec-Fahrer auf B276 lebensgefährlich verletzt"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"tickerItemResults":[{"isTopnews":true,"tickerItemDateTime":{"broadcastDate":"12. Juni, 10:15","time":"10:15"},"tickerItemUrl":"Topnews1","relevantTitle":"Kritik an Privatisierung von Wasser"},{"isTopnews":true,"tickerItemDateTime":{"broadcastDate":"12. Juni, 9:55","time":"9:55"},"tickerItemUrl":"Topnews2","relevantTitle":"Suche nach neuem Vorsitz für Hanau-Ausschuss Hanau-Ausschuss Hanau-Ausschuss Hanau-Ausschuss"},{"isTopnews":true,"tickerItemDateTime":{"broadcastDate":"12. Juni, 9:25","time":"9:25"},"tickerItemUrl":"Topnews3","relevantTitle":"Pedelec-Fahrer auf B276 lebensgefährlich verletzt"}]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{#if this.isSingleChannel}}
|
|
2
2
|
{{#>components/base/link _link=this.link _css="group ds-link font-title text-base mt-2.5 text-podcast-text"}}
|
|
3
3
|
<span class="mt-0.5 group-hover:underline {{#if _ordered-adjust_context}} pl-8 {{/if}}line-clamp-4 {{inline-switch _teaserSize-adjust_context '["hero","100","50"]''["text-base md:text-2xl lg:line-clamp-2","text-base md:text-2xl lg:line-clamp-2","text-base md:text-lg"]' ~}}">
|
|
4
|
-
{{~_title~}}
|
|
4
|
+
{{~_title-adjust_context~}}
|
|
5
5
|
</span>
|
|
6
6
|
{{/components/base/link}}
|
|
7
7
|
{{else}}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{{~#with this.tickerItemResults ~}}
|
|
2
|
+
<ul class="px-10">
|
|
3
|
+
{{~#each this~}}
|
|
4
|
+
{{#if this.isTopnews}}
|
|
5
|
+
<li class="relative h-auto pb-5">
|
|
6
|
+
<div class="absolute h-full">
|
|
7
|
+
<div class="relative w-[9px] h-[9px] rounded-full top-0.5 bg-orange-spicyCarrot -left-5"></div>
|
|
8
|
+
{{#unless @last}}
|
|
9
|
+
<div class="relative flex flex-col w-0 h-full -left-4">
|
|
10
|
+
<div class="h-full my-2 border-l{{#if ../../_color}} border-{{../../_color}}{{else}} border-gray-400{{/if}}"></div>
|
|
11
|
+
<div class="h-2"></div>
|
|
12
|
+
</div>
|
|
13
|
+
{{/unless}}
|
|
14
|
+
</div>
|
|
15
|
+
{{#with this.tickerItemDateTime~}}
|
|
16
|
+
<div class="text-xs{{#if ../../../_color}} text-{{../../../_color}}{{/if}}">
|
|
17
|
+
{{#if ../../../this.isMultiDay}}
|
|
18
|
+
{{this.broadcastDate }}
|
|
19
|
+
{{else}}
|
|
20
|
+
{{this.time }}
|
|
21
|
+
{{/if}}
|
|
22
|
+
</div>
|
|
23
|
+
{{~/with}}
|
|
24
|
+
<a class="text-base{{#if ../../_color}} text-{{../../_color}}{{else}} text-toplineColor{{/if}} underline decoration-1 ds-link" href="{{this.tickerItemUrl}}">{{this.relevantTitle}}</a>
|
|
25
|
+
</li>
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{~/each~}}
|
|
28
|
+
</ul>
|
|
29
|
+
{{~/with~}}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ArgsTable, Meta, Story, Canvas } from '@storybook/blocks'
|
|
2
|
+
import * as TimelineStories from './teaser_ticker_timeline.stories'
|
|
3
|
+
|
|
4
|
+
<Meta of={TimelineStories} />
|
|
5
|
+
|
|
6
|
+
# Ticker-Zeitstrahl
|
|
7
|
+
|
|
8
|
+
Im Ticker-Zeitstrahl werden die neuesten Topnews chronologisch absteigend angezeigt.
|
|
9
|
+
Dargestellt werden Veröffentlichungszeit und Titel. Der Titel ist verlinkt auf den entsprechenden Ticker-Eintrag.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Varianten
|
|
13
|
+
|
|
14
|
+
Aktuell sind 2 Varianten vorgesehen. Eine zur Darstellung im Teaser (weiße Schrift auf blauem Hintergrund) und eine weitere
|
|
15
|
+
für die Darstellung im Ticker selbst (schwarz/Linkfarbe auf weiß)
|
|
16
|
+
|
|
17
|
+
<Canvas>
|
|
18
|
+
<Story of={TimelineStories.TimelineWhite} />
|
|
19
|
+
<Story of={TimelineStories.TimelineBlack} />
|
|
20
|
+
</Canvas>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Verwendung
|
|
24
|
+
|
|
25
|
+
Die Komponente wird wie folgt eingebunden:
|
|
26
|
+
|
|
27
|
+
```handlebars
|
|
28
|
+
{{> components/teaser/ticker/teaser_ticker_timeline _color="white"}}
|
|
29
|
+
```
|
|
30
|
+
Der _color-Parameter ist optional. Ohne _color-Parameter wird der Zeitstrahl in schwarz/Linkfarbe dargestellt.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import timelineJson from '../fixtures/teaser_ticker_timeline.json'
|
|
2
|
+
|
|
3
|
+
const handlebars = require('hrHandlebars')
|
|
4
|
+
|
|
5
|
+
const timelineOnBlue = (args) => {
|
|
6
|
+
let hbsTemplate = handlebars.compile(`
|
|
7
|
+
<div class="bg-blue-congress pt-5">
|
|
8
|
+
{{> components/teaser/ticker/teaser_ticker_timeline _color="white"}}
|
|
9
|
+
</div>
|
|
10
|
+
`)
|
|
11
|
+
return hbsTemplate({ ...args })
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const timelineOnWhite = (args) => {
|
|
15
|
+
let hbsTemplate = handlebars.compile(`
|
|
16
|
+
<div class="pt-5">
|
|
17
|
+
{{> components/teaser/ticker/teaser_ticker_timeline }}
|
|
18
|
+
</div>
|
|
19
|
+
`)
|
|
20
|
+
return hbsTemplate({ ...args })
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
title: 'Komponenten/Teaser/Ticker/Komponenten',
|
|
25
|
+
|
|
26
|
+
argTypes: {
|
|
27
|
+
'_color': {
|
|
28
|
+
description: 'Text- und Linienfarbe',
|
|
29
|
+
control: false,
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const TimelineWhite = {
|
|
35
|
+
render: timelineOnBlue.bind({}),
|
|
36
|
+
name: 'Zeitstrahl auf blau',
|
|
37
|
+
args: timelineJson,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const TimelineBlack = {
|
|
41
|
+
render: timelineOnWhite.bind({}),
|
|
42
|
+
name: 'Zeitstrahl auf weiß',
|
|
43
|
+
args: timelineJson,
|
|
44
|
+
}
|