hr-design-system-handlebars 1.59.6 → 1.59.8

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/assets/index.css +7 -3
  3. package/dist/views/components/page/components/author.hbs +5 -4
  4. package/dist/views/components/page/components/commentlink.hbs +3 -3
  5. package/dist/views/components/page/components/metadatabox.hbs +1 -1
  6. package/dist/views/components/page/components/publicationdate.hbs +1 -1
  7. package/dist/views_static/components/page/components/author.hbs +5 -4
  8. package/dist/views_static/components/page/components/commentlink.hbs +3 -3
  9. package/dist/views_static/components/page/components/metadatabox.hbs +1 -1
  10. package/dist/views_static/components/page/components/publicationdate.hbs +1 -1
  11. package/package.json +1 -1
  12. package/src/assets/fixtures/page/metadatabox.json +18 -0
  13. package/src/assets/fixtures/page/metadatabox_more_authors.json +42 -0
  14. package/src/assets/fixtures/page/metadatabox_more_authors_comments.json +46 -0
  15. package/src/assets/fixtures/page/metadatabox_one_author.json +31 -0
  16. package/src/assets/fixtures/page/metadatabox_one_author_comments.json +35 -0
  17. package/src/assets/fixtures/page/metadatabox_one_author_without_picture.json +21 -0
  18. package/src/stories/views/components/page/components/author.hbs +5 -4
  19. package/src/stories/views/components/page/components/commentlink.hbs +3 -3
  20. package/src/stories/views/components/page/components/metadatabox.hbs +1 -1
  21. package/src/stories/views/components/page/components/metadatabox.mdx +29 -0
  22. package/src/stories/views/components/page/components/metadatabox.stories.js +67 -0
  23. package/src/stories/views/components/page/components/publicationdate.hbs +1 -1
  24. package/src/stories/views/components/page/fixtures/metadatabox.json +1 -0
  25. package/src/stories/views/components/page/fixtures/metadatabox_more_authors.json +1 -0
  26. package/src/stories/views/components/page/fixtures/metadatabox_more_authors_comments.json +1 -0
  27. package/src/stories/views/components/page/fixtures/metadatabox_one_author.json +1 -0
  28. package/src/stories/views/components/page/fixtures/metadatabox_one_author_comments.json +1 -0
  29. package/src/stories/views/components/page/fixtures/metadatabox_one_author_without_picture.json +1 -0
  30. package/src/stories/views/components/page/story/story_main.stories.js +3 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v1.59.8 (Fri Feb 23 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - add story for metadatabox [#861](https://github.com/mumprod/hr-design-system-handlebars/pull/861) ([@hanswurstsalat](https://github.com/hanswurstsalat))
6
+
7
+ #### Authors: 1
8
+
9
+ - Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
10
+
11
+ ---
12
+
13
+ # v1.59.7 (Fri Feb 23 2024)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Implemented 'layout: fullscreen' parameter in Storybook configuration… [#860](https://github.com/mumprod/hr-design-system-handlebars/pull/860) ([@vascoeduardo](https://github.com/vascoeduardo))
18
+
19
+ #### Authors: 1
20
+
21
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
22
+
23
+ ---
24
+
1
25
  # v1.59.6 (Fri Feb 23 2024)
2
26
 
3
27
  #### ⚠️ Pushed to `main`
@@ -3254,7 +3254,7 @@ article.indexText ul {
3254
3254
  border-bottom-color: var(--color-secondary-ds);
3255
3255
  }
3256
3256
  .counter-reset {
3257
- counter-reset: cnt1708700641206;
3257
+ counter-reset: cnt1708712754446;
3258
3258
  }
3259
3259
  .hyphens-auto {
3260
3260
  -webkit-hyphens: auto;
@@ -3577,7 +3577,7 @@ article.indexText ul {
3577
3577
  --tw-ring-color: rgba(255, 255, 255, 0.5);
3578
3578
  }
3579
3579
  .-ordered {
3580
- counter-increment: cnt1708700641206 1;
3580
+ counter-increment: cnt1708712754446 1;
3581
3581
  }
3582
3582
  .-ordered::before {
3583
3583
  position: absolute;
@@ -3593,7 +3593,7 @@ article.indexText ul {
3593
3593
  letter-spacing: .0125em;
3594
3594
  --tw-text-opacity: 1;
3595
3595
  color: rgba(0, 0, 0, var(--tw-text-opacity));
3596
- content: counter(cnt1708700641206);
3596
+ content: counter(cnt1708712754446);
3597
3597
  }
3598
3598
  /*! ****************************/
3599
3599
  /*! DataPolicy stuff */
@@ -5452,6 +5452,10 @@ article.indexText ul {
5452
5452
  margin-right: 1.25rem;
5453
5453
  }
5454
5454
 
5455
+ .sm480\:mt-1 {
5456
+ margin-top: 0.25rem;
5457
+ }
5458
+
5455
5459
  .sm480\:mt-4 {
5456
5460
  margin-top: 1rem;
5457
5461
  }
@@ -1,7 +1,7 @@
1
1
  {{#if this.hasMoreThanOneAuthor}}
2
2
 
3
3
  {{#with this.authorItems}}
4
- <p class="mb-1 text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
4
+ <p class="mb-1 text-xs sm480:text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
5
5
  {{#each this}}
6
6
  {{#if this.hasProfileLink}}
7
7
  {{this.from}}
@@ -21,17 +21,18 @@
21
21
  {{else}}
22
22
 
23
23
  {{#if this.authorTitle~}}
24
- <div class="flex items-center h-10">
24
+ <div class="flex items-center {{#if this.authorImage.isImage}}h-10{{else}}mb-1{{/if}}">
25
25
  {{#if this.authorImage.isImage}}
26
26
  <div class="w-10 h-10 mr-4 basis-10 grow-0">
27
27
  {{~> components/base/image/responsive_image this.authorImage
28
28
  _type="profile"
29
29
  _variant="ticker"
30
30
  _addClass=""
31
- _addClassImg="ar-1-1 rounded-full" ~}}
31
+ _addClassImg="ar-1-1 rounded-full"
32
+ _noDelay=true ~}}
32
33
  </div>
33
34
  {{/if}}
34
- <div class="self-start text-sm basis-0 grow font-headingSerif text-gray-scorpion dark:text-text-dark">
35
+ <div class="self-start text-xs sm480:text-sm basis-0 grow font-headingSerif text-gray-scorpion dark:text-text-dark">
35
36
  {{#unless _hideFrom }}Von{{/unless}}
36
37
  {{#if this.authorUrl~}}
37
38
  <a href="{{this.authorUrl}}" {{#with this.webviewAuthorUrl}}data-webviewurl="{{this}}"{{/with}} class="text-link hover:underline dark:text-link-dark ">{{this.authorTitle}}</a>
@@ -1,8 +1,8 @@
1
1
  {{#with this.userComments ~}}
2
- <div class="{{#unless ../this.hasMoreThanOneAuthor}}ml-14 {{/unless}}mt-2 -mb-1">
2
+ <div class="{{#unless ../this.hasMoreThanOneAuthor}}{{#if ../this.authorImage.isImage}}ml-14 {{/if}}{{/unless}}mt-0 sm480:mt-1 -mb-1">
3
3
  <span class="relative z-30 whitespace-nowrap">
4
- <a class="text-sm font-headingSerif text-link hover:underline" href="#commentList">
5
- {{> components/base/image/icon _icon="kommentar" _iconmap="icons" _addClass="mr-0.5 inline w-5 h-5 text-link fill-current"}}
4
+ <a class="text-xs sm480:text-sm font-headingSerif text-link hover:underline dark:text-link-dark" href="#commentList">
5
+ {{> components/base/image/icon _icon="kommentar" _iconmap="icons" _addClass="mr-0.5 inline w-5 h-5 text-link dark:text-link-dark fill-current"}}
6
6
  <span class="sr-only">{{loca "comment_anchor_1"}}</span>
7
7
  <span class="text-link">{{this.quantity}}</span>
8
8
  {{#if this.hasOneComment}}
@@ -1,6 +1,6 @@
1
1
  <div class="clear-both mt-3 border-y border-gray-scorpion">
2
2
  <div class="flex clear-both w-full my-2 sm:my-4">
3
- <div>
3
+ <div class="self-center">
4
4
  {{> components/page/components/author _hideFrom=false }}
5
5
 
6
6
  {{#if _showDate }}
@@ -1,4 +1,4 @@
1
- <div class="{{#unless this.hasMoreThanOneAuthor}}-mt-5 ml-14 {{/unless}}text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
1
+ <div class="{{#unless this.hasMoreThanOneAuthor}}{{#if this.authorImage.isImage}}-mt-5 ml-14 {{/if}}{{/unless}}text-xs sm480:text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
2
2
 
3
3
  {{#with this.documentModificationDate~}}
4
4
 
@@ -1,7 +1,7 @@
1
1
  {{#if this.hasMoreThanOneAuthor}}
2
2
 
3
3
  {{#with this.authorItems}}
4
- <p class="mb-1 text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
4
+ <p class="mb-1 text-xs sm480:text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
5
5
  {{#each this}}
6
6
  {{#if this.hasProfileLink}}
7
7
  {{this.from}}
@@ -21,17 +21,18 @@
21
21
  {{else}}
22
22
 
23
23
  {{#if this.authorTitle~}}
24
- <div class="flex items-center h-10">
24
+ <div class="flex items-center {{#if this.authorImage.isImage}}h-10{{else}}mb-1{{/if}}">
25
25
  {{#if this.authorImage.isImage}}
26
26
  <div class="w-10 h-10 mr-4 basis-10 grow-0">
27
27
  {{~> components/base/image/responsive_image this.authorImage
28
28
  _type="profile"
29
29
  _variant="ticker"
30
30
  _addClass=""
31
- _addClassImg="ar-1-1 rounded-full" ~}}
31
+ _addClassImg="ar-1-1 rounded-full"
32
+ _noDelay=true ~}}
32
33
  </div>
33
34
  {{/if}}
34
- <div class="self-start text-sm basis-0 grow font-headingSerif text-gray-scorpion dark:text-text-dark">
35
+ <div class="self-start text-xs sm480:text-sm basis-0 grow font-headingSerif text-gray-scorpion dark:text-text-dark">
35
36
  {{#unless _hideFrom }}Von{{/unless}}
36
37
  {{#if this.authorUrl~}}
37
38
  <a href="{{this.authorUrl}}" {{#with this.webviewAuthorUrl}}data-webviewurl="{{this}}"{{/with}} class="text-link hover:underline dark:text-link-dark ">{{this.authorTitle}}</a>
@@ -1,8 +1,8 @@
1
1
  {{#with this.userComments ~}}
2
- <div class="{{#unless ../this.hasMoreThanOneAuthor}}ml-14 {{/unless}}mt-2 -mb-1">
2
+ <div class="{{#unless ../this.hasMoreThanOneAuthor}}{{#if ../this.authorImage.isImage}}ml-14 {{/if}}{{/unless}}mt-0 sm480:mt-1 -mb-1">
3
3
  <span class="relative z-30 whitespace-nowrap">
4
- <a class="text-sm font-headingSerif text-link hover:underline" href="#commentList">
5
- {{> components/base/image/icon _icon="kommentar" _iconmap="icons" _addClass="mr-0.5 inline w-5 h-5 text-link fill-current"}}
4
+ <a class="text-xs sm480:text-sm font-headingSerif text-link hover:underline dark:text-link-dark" href="#commentList">
5
+ {{> components/base/image/icon _icon="kommentar" _iconmap="icons" _addClass="mr-0.5 inline w-5 h-5 text-link dark:text-link-dark fill-current"}}
6
6
  <span class="sr-only">{{loca "comment_anchor_1"}}</span>
7
7
  <span class="text-link">{{this.quantity}}</span>
8
8
  {{#if this.hasOneComment}}
@@ -1,6 +1,6 @@
1
1
  <div class="clear-both mt-3 border-y border-gray-scorpion">
2
2
  <div class="flex clear-both w-full my-2 sm:my-4">
3
- <div>
3
+ <div class="self-center">
4
4
  {{> components/page/components/author _hideFrom=false }}
5
5
 
6
6
  {{#if _showDate }}
@@ -1,4 +1,4 @@
1
- <div class="{{#unless this.hasMoreThanOneAuthor}}-mt-5 ml-14 {{/unless}}text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
1
+ <div class="{{#unless this.hasMoreThanOneAuthor}}{{#if this.authorImage.isImage}}-mt-5 ml-14 {{/if}}{{/unless}}text-xs sm480:text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
2
2
 
3
3
  {{#with this.documentModificationDate~}}
4
4
 
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.59.6",
9
+ "version": "1.59.8",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -0,0 +1,18 @@
1
+ {
2
+ "_showDate": true,
3
+ "hasMoreThanOneAuthor": false,
4
+ "hasDwellTime": true,
5
+ "documentModificationDate": {
6
+ "isModificationDate": false,
7
+ "isPublicationDate": true,
8
+ "htmlDateTime": "2024-02-15T19:30+0200",
9
+ "date": "15.02.24",
10
+ "time": "19:30"
11
+ },
12
+ "socialSharing": {
13
+ "twitterLink": "/twitterLink-url",
14
+ "facebookLink": "/facebookLink-url",
15
+ "whatsappLink": "/whatsappLink-url",
16
+ "mailtoLink": "/mailtoLink-url"
17
+ }
18
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "_showDate": true,
3
+ "hasMoreThanOneAuthor": true,
4
+ "hasDwellTime": true,
5
+ "documentModificationDate": {
6
+ "isModificationDate": false,
7
+ "isPublicationDate": true,
8
+ "htmlDateTime": "2024-02-15T19:30+0200",
9
+ "date": "15.02.24",
10
+ "time": "19:30"
11
+ },
12
+ "authorItems": [
13
+ {
14
+ "hasProfileLink": false,
15
+ "from": "Von",
16
+ "textAfterAuthor": "Horst Schlämmer",
17
+ "delimiter": ", "
18
+ },
19
+ {
20
+ "hasProfileLink": false,
21
+ "from": "",
22
+ "textAfterAuthor": "Karl Dall",
23
+ "delimiter": " und "
24
+ },
25
+ {
26
+ "hasProfileLink": true,
27
+ "from": "",
28
+ "authorName": "Peter Lustig",
29
+ "delimiter": "",
30
+ "link": {
31
+ "url": "/author-url",
32
+ "isTargetBlank": false
33
+ }
34
+ }
35
+ ],
36
+ "socialSharing": {
37
+ "twitterLink": "/twitterLink-url",
38
+ "facebookLink": "/facebookLink-url",
39
+ "whatsappLink": "/whatsappLink-url",
40
+ "mailtoLink": "/mailtoLink-url"
41
+ }
42
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "_showDate": true,
3
+ "hasMoreThanOneAuthor": true,
4
+ "hasDwellTime": true,
5
+ "documentModificationDate": {
6
+ "isModificationDate": false,
7
+ "isPublicationDate": true,
8
+ "htmlDateTime": "2024-02-15T19:30+0200",
9
+ "date": "15.02.24",
10
+ "time": "19:30"
11
+ },
12
+ "userComments": {
13
+ "HasOneComment": false,
14
+ "quantity": "117"
15
+ },
16
+ "authorItems": [
17
+ {
18
+ "hasProfileLink": false,
19
+ "from": "Von",
20
+ "textAfterAuthor": "Horst Schlämmer",
21
+ "delimiter": ", "
22
+ },
23
+ {
24
+ "hasProfileLink": false,
25
+ "from": "",
26
+ "textAfterAuthor": "Karl Dall",
27
+ "delimiter": " und "
28
+ },
29
+ {
30
+ "hasProfileLink": true,
31
+ "from": "",
32
+ "authorName": "Peter Lustig",
33
+ "delimiter": "",
34
+ "link": {
35
+ "url": "/author-url",
36
+ "isTargetBlank": false
37
+ }
38
+ }
39
+ ],
40
+ "socialSharing": {
41
+ "twitterLink": "/twitterLink-url",
42
+ "facebookLink": "/facebookLink-url",
43
+ "whatsappLink": "/whatsappLink-url",
44
+ "mailtoLink": "/mailtoLink-url"
45
+ }
46
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "_showDate": true,
3
+ "hasMoreThanOneAuthor": false,
4
+ "hasDwellTime": true,
5
+ "documentModificationDate": {
6
+ "isModificationDate": false,
7
+ "isPublicationDate": true,
8
+ "htmlDateTime": "2024-02-15T19:30+0200",
9
+ "date": "15.02.24",
10
+ "time": "19:30"
11
+ },
12
+ "authorTitle": "Steffen Rebhahn",
13
+ "authorImage": {
14
+ "@->jsoninclude": "page/story/story_images.inc.json",
15
+ "@->contentpath": "author",
16
+ "@->replaceToken": [
17
+ {
18
+ "@->token": "image",
19
+ "@->value": "mitarbeiter-portraet-steffen-rebhahn-106"
20
+ }
21
+ ]
22
+ },
23
+ "authorUrl": "/author-url",
24
+ "webviewAuthorUrl": "webview-author-url",
25
+ "socialSharing": {
26
+ "twitterLink": "/twitterLink-url",
27
+ "facebookLink": "/facebookLink-url",
28
+ "whatsappLink": "/whatsappLink-url",
29
+ "mailtoLink": "/mailtoLink-url"
30
+ }
31
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "_showDate": true,
3
+ "hasMoreThanOneAuthor": false,
4
+ "hasDwellTime": true,
5
+ "documentModificationDate": {
6
+ "isModificationDate": false,
7
+ "isPublicationDate": true,
8
+ "htmlDateTime": "2024-02-15T19:30+0200",
9
+ "date": "15.02.24",
10
+ "time": "19:30"
11
+ },
12
+ "userComments": {
13
+ "HasOneComment": false,
14
+ "quantity": "117"
15
+ },
16
+ "authorTitle": "Steffen Rebhahn",
17
+ "authorImage": {
18
+ "@->jsoninclude": "page/story/story_images.inc.json",
19
+ "@->contentpath": "author",
20
+ "@->replaceToken": [
21
+ {
22
+ "@->token": "image",
23
+ "@->value": "mitarbeiter-portraet-steffen-rebhahn-106"
24
+ }
25
+ ]
26
+ },
27
+ "authorUrl": "/author-url",
28
+ "webviewAuthorUrl": "webview-author-url",
29
+ "socialSharing": {
30
+ "twitterLink": "/twitterLink-url",
31
+ "facebookLink": "/facebookLink-url",
32
+ "whatsappLink": "/whatsappLink-url",
33
+ "mailtoLink": "/mailtoLink-url"
34
+ }
35
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "_showDate": true,
3
+ "hasMoreThanOneAuthor": false,
4
+ "hasDwellTime": true,
5
+ "documentModificationDate": {
6
+ "isModificationDate": false,
7
+ "isPublicationDate": true,
8
+ "htmlDateTime": "2024-02-15T19:30+0200",
9
+ "date": "15.02.24",
10
+ "time": "19:30"
11
+ },
12
+ "authorTitle": "Steffen Rebhahn",
13
+ "authorUrl": "/author-url",
14
+ "webviewAuthorUrl": "webview-author-url",
15
+ "socialSharing": {
16
+ "twitterLink": "/twitterLink-url",
17
+ "facebookLink": "/facebookLink-url",
18
+ "whatsappLink": "/whatsappLink-url",
19
+ "mailtoLink": "/mailtoLink-url"
20
+ }
21
+ }
@@ -1,7 +1,7 @@
1
1
  {{#if this.hasMoreThanOneAuthor}}
2
2
 
3
3
  {{#with this.authorItems}}
4
- <p class="mb-1 text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
4
+ <p class="mb-1 text-xs sm480:text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
5
5
  {{#each this}}
6
6
  {{#if this.hasProfileLink}}
7
7
  {{this.from}}
@@ -21,17 +21,18 @@
21
21
  {{else}}
22
22
 
23
23
  {{#if this.authorTitle~}}
24
- <div class="flex items-center h-10">
24
+ <div class="flex items-center {{#if this.authorImage.isImage}}h-10{{else}}mb-1{{/if}}">
25
25
  {{#if this.authorImage.isImage}}
26
26
  <div class="w-10 h-10 mr-4 basis-10 grow-0">
27
27
  {{~> components/base/image/responsive_image this.authorImage
28
28
  _type="profile"
29
29
  _variant="ticker"
30
30
  _addClass=""
31
- _addClassImg="ar-1-1 rounded-full" ~}}
31
+ _addClassImg="ar-1-1 rounded-full"
32
+ _noDelay=true ~}}
32
33
  </div>
33
34
  {{/if}}
34
- <div class="self-start text-sm basis-0 grow font-headingSerif text-gray-scorpion dark:text-text-dark">
35
+ <div class="self-start text-xs sm480:text-sm basis-0 grow font-headingSerif text-gray-scorpion dark:text-text-dark">
35
36
  {{#unless _hideFrom }}Von{{/unless}}
36
37
  {{#if this.authorUrl~}}
37
38
  <a href="{{this.authorUrl}}" {{#with this.webviewAuthorUrl}}data-webviewurl="{{this}}"{{/with}} class="text-link hover:underline dark:text-link-dark ">{{this.authorTitle}}</a>
@@ -1,8 +1,8 @@
1
1
  {{#with this.userComments ~}}
2
- <div class="{{#unless ../this.hasMoreThanOneAuthor}}ml-14 {{/unless}}mt-2 -mb-1">
2
+ <div class="{{#unless ../this.hasMoreThanOneAuthor}}{{#if ../this.authorImage.isImage}}ml-14 {{/if}}{{/unless}}mt-0 sm480:mt-1 -mb-1">
3
3
  <span class="relative z-30 whitespace-nowrap">
4
- <a class="text-sm font-headingSerif text-link hover:underline" href="#commentList">
5
- {{> components/base/image/icon _icon="kommentar" _iconmap="icons" _addClass="mr-0.5 inline w-5 h-5 text-link fill-current"}}
4
+ <a class="text-xs sm480:text-sm font-headingSerif text-link hover:underline dark:text-link-dark" href="#commentList">
5
+ {{> components/base/image/icon _icon="kommentar" _iconmap="icons" _addClass="mr-0.5 inline w-5 h-5 text-link dark:text-link-dark fill-current"}}
6
6
  <span class="sr-only">{{loca "comment_anchor_1"}}</span>
7
7
  <span class="text-link">{{this.quantity}}</span>
8
8
  {{#if this.hasOneComment}}
@@ -1,6 +1,6 @@
1
1
  <div class="clear-both mt-3 border-y border-gray-scorpion">
2
2
  <div class="flex clear-both w-full my-2 sm:my-4">
3
- <div>
3
+ <div class="self-center">
4
4
  {{> components/page/components/author _hideFrom=false }}
5
5
 
6
6
  {{#if _showDate }}
@@ -0,0 +1,29 @@
1
+ import { ArgsTable, Meta, Story, Canvas } from '@storybook/blocks'
2
+ import * as MetadataboxStories from './metadatabox.stories'
3
+
4
+ <Meta of={MetadataboxStories} />
5
+
6
+ # Metadaten-Box
7
+
8
+ ## Beschreibung
9
+
10
+ Die Metadaten-Box enthält folgende Elemente:
11
+ - Autor-Name(n)
12
+ - Autor-Bild (wenn nur ein Autor)
13
+ - Aktualisierungs- oder Veröffentlichungsdatum
14
+ - Anker-Link zu den Kommentaren
15
+ - social-sharing-buttons
16
+
17
+ ## Verwendung
18
+
19
+ Die Metadatenbox-Komponente wird in handlebars wie folgt eingebaut:
20
+
21
+ ```html
22
+ {{> components/page/components/metadatabox _showDate=true|false }}
23
+ ```
24
+
25
+ <Canvas withToolbar>
26
+ <Story of={MetadataboxStories.Default} />
27
+ </Canvas>
28
+
29
+ <ArgsTable story="default" />
@@ -0,0 +1,67 @@
1
+ import metadatabox_template from './metadatabox.hbs'
2
+ import metadatabox_json from '../fixtures/metadatabox.json'
3
+ import metadatabox_one_author_json from '../fixtures/metadatabox_one_author.json'
4
+ import metadatabox_one_author_without_picture_json from '../fixtures/metadatabox_one_author_without_picture.json'
5
+ import metadatabox_one_author_comments_json from '../fixtures/metadatabox_one_author_comments.json'
6
+ import metadatabox_more_authors_json from '../fixtures/metadatabox_more_authors.json'
7
+ import metadatabox_more_authors_comments_json from '../fixtures/metadatabox_more_authors_comments.json'
8
+
9
+ const Template = ({ ...args }) => {
10
+ // You can either use a function to create DOM elements or use a plain html string!
11
+ // return `<span>${topline}</span>`;
12
+ return metadatabox_template({ ...args })
13
+ }
14
+
15
+ export default {
16
+ title: 'Seiten/Komponenten/Metadaten-Box',
17
+ argTypes: {
18
+ _showDate: {
19
+ control: 'boolean',
20
+ description: 'Datum anzeigen',
21
+ },
22
+ },
23
+ decorators: [
24
+ (Story) => {
25
+ return `<div class="max-w-[724px] mx-auto mt-10">
26
+ ${Story()}
27
+ </div>`
28
+ },
29
+ ],
30
+ }
31
+
32
+ export const Default = {
33
+ render: Template.bind({}),
34
+ name: 'Nur Datum',
35
+ args: metadatabox_json,
36
+ }
37
+
38
+ export const WithOneAuthor = {
39
+ render: Template.bind({}),
40
+ name: 'Ein Autor',
41
+ args: metadatabox_one_author_json,
42
+ }
43
+
44
+ export const WithOneAuthorWithoutPicture = {
45
+ render: Template.bind({}),
46
+ name: 'Ein Autor ohne Bild',
47
+ args: metadatabox_one_author_without_picture_json,
48
+ }
49
+
50
+
51
+ export const WithMoreAuthors = {
52
+ render: Template.bind({}),
53
+ name: 'Mehrere Autoren',
54
+ args: metadatabox_more_authors_json,
55
+ }
56
+
57
+ export const WithOneAuthorAndComments = {
58
+ render: Template.bind({}),
59
+ name: 'Ein Autor und Kommentar-Link',
60
+ args: metadatabox_one_author_comments_json,
61
+ }
62
+
63
+ export const WithMoreAuthorsAndComments = {
64
+ render: Template.bind({}),
65
+ name: 'Mehrere Autoren und Kommentar-Link',
66
+ args: metadatabox_more_authors_comments_json,
67
+ }
@@ -1,4 +1,4 @@
1
- <div class="{{#unless this.hasMoreThanOneAuthor}}-mt-5 ml-14 {{/unless}}text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
1
+ <div class="{{#unless this.hasMoreThanOneAuthor}}{{#if this.authorImage.isImage}}-mt-5 ml-14 {{/if}}{{/unless}}text-xs sm480:text-sm font-headingSerif text-gray-scorpion dark:text-text-dark">
2
2
 
3
3
  {{#with this.documentModificationDate~}}
4
4
 
@@ -0,0 +1 @@
1
+ {"_showDate":true,"hasMoreThanOneAuthor":false,"hasDwellTime":true,"documentModificationDate":{"isModificationDate":false,"isPublicationDate":true,"htmlDateTime":"2024-02-15T19:30+0200","date":"15.02.24","time":"19:30"},"socialSharing":{"twitterLink":"/twitterLink-url","facebookLink":"/facebookLink-url","whatsappLink":"/whatsappLink-url","mailtoLink":"/mailtoLink-url"}}
@@ -0,0 +1 @@
1
+ {"_showDate":true,"hasMoreThanOneAuthor":true,"hasDwellTime":true,"documentModificationDate":{"isModificationDate":false,"isPublicationDate":true,"htmlDateTime":"2024-02-15T19:30+0200","date":"15.02.24","time":"19:30"},"authorItems":[{"hasProfileLink":false,"from":"Von","textAfterAuthor":"Horst Schlämmer","delimiter":", "},{"hasProfileLink":false,"from":"","textAfterAuthor":"Karl Dall","delimiter":" und "},{"hasProfileLink":true,"from":"","authorName":"Peter Lustig","delimiter":"","link":{"url":"/author-url","isTargetBlank":false}}],"socialSharing":{"twitterLink":"/twitterLink-url","facebookLink":"/facebookLink-url","whatsappLink":"/whatsappLink-url","mailtoLink":"/mailtoLink-url"}}
@@ -0,0 +1 @@
1
+ {"_showDate":true,"hasMoreThanOneAuthor":true,"hasDwellTime":true,"documentModificationDate":{"isModificationDate":false,"isPublicationDate":true,"htmlDateTime":"2024-02-15T19:30+0200","date":"15.02.24","time":"19:30"},"userComments":{"HasOneComment":false,"quantity":"117"},"authorItems":[{"hasProfileLink":false,"from":"Von","textAfterAuthor":"Horst Schlämmer","delimiter":", "},{"hasProfileLink":false,"from":"","textAfterAuthor":"Karl Dall","delimiter":" und "},{"hasProfileLink":true,"from":"","authorName":"Peter Lustig","delimiter":"","link":{"url":"/author-url","isTargetBlank":false}}],"socialSharing":{"twitterLink":"/twitterLink-url","facebookLink":"/facebookLink-url","whatsappLink":"/whatsappLink-url","mailtoLink":"/mailtoLink-url"}}
@@ -0,0 +1 @@
1
+ {"_showDate":true,"hasMoreThanOneAuthor":false,"hasDwellTime":true,"documentModificationDate":{"isModificationDate":false,"isPublicationDate":true,"htmlDateTime":"2024-02-15T19:30+0200","date":"15.02.24","time":"19:30"},"authorTitle":"Steffen Rebhahn","authorImage":{"isImage":true,"caption":"Steffen Rebhahn","copyrightWithLinks":"hr","responsiveImage":{"asPicture":false,"asImage":true,"fallback":"images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1_small.jpg","sources":[{"sizes":"50px","srcset":"images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1__xsmall.jpg 260w, images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1__small.jpg 380w, images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1__medium.jpg 480w, images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1.jpg 720w, images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1__large.jpg 960w"}]}},"authorUrl":"/author-url","webviewAuthorUrl":"webview-author-url","socialSharing":{"twitterLink":"/twitterLink-url","facebookLink":"/facebookLink-url","whatsappLink":"/whatsappLink-url","mailtoLink":"/mailtoLink-url"}}
@@ -0,0 +1 @@
1
+ {"_showDate":true,"hasMoreThanOneAuthor":false,"hasDwellTime":true,"documentModificationDate":{"isModificationDate":false,"isPublicationDate":true,"htmlDateTime":"2024-02-15T19:30+0200","date":"15.02.24","time":"19:30"},"userComments":{"HasOneComment":false,"quantity":"117"},"authorTitle":"Steffen Rebhahn","authorImage":{"isImage":true,"caption":"Steffen Rebhahn","copyrightWithLinks":"hr","responsiveImage":{"asPicture":false,"asImage":true,"fallback":"images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1_small.jpg","sources":[{"sizes":"50px","srcset":"images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1__xsmall.jpg 260w, images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1__small.jpg 380w, images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1__medium.jpg 480w, images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1.jpg 720w, images/mitarbeiter-portraet-steffen-rebhahn-106_v-1to1__large.jpg 960w"}]}},"authorUrl":"/author-url","webviewAuthorUrl":"webview-author-url","socialSharing":{"twitterLink":"/twitterLink-url","facebookLink":"/facebookLink-url","whatsappLink":"/whatsappLink-url","mailtoLink":"/mailtoLink-url"}}
@@ -0,0 +1 @@
1
+ {"_showDate":true,"hasMoreThanOneAuthor":false,"hasDwellTime":true,"documentModificationDate":{"isModificationDate":false,"isPublicationDate":true,"htmlDateTime":"2024-02-15T19:30+0200","date":"15.02.24","time":"19:30"},"authorTitle":"Steffen Rebhahn","authorUrl":"/author-url","webviewAuthorUrl":"webview-author-url","socialSharing":{"twitterLink":"/twitterLink-url","facebookLink":"/facebookLink-url","whatsappLink":"/whatsappLink-url","mailtoLink":"/mailtoLink-url"}}
@@ -15,4 +15,7 @@ export const Default = {
15
15
  render: Template.bind({}),
16
16
  name: 'default',
17
17
  args: story_json,
18
+ parameters: {
19
+ layout: 'fullscreen',
20
+ }
18
21
  }