Skip to content

Commit

Permalink
Merge pull request #382 from anbrue/feature/ActionBanner
Browse files Browse the repository at this point in the history
added Action Banner compoent and related items
  • Loading branch information
lovesitecore authored Feb 29, 2024
2 parents e613458 + b4aead0 commit 1b8c900
Show file tree
Hide file tree
Showing 17 changed files with 1,019 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.component.action-banner {
background-color: red;
color: #ffffff;
display: flex;
justify-content: space-around;


.component-content {
max-width: 70%;
display: flex;
align-items: flex-start;
flex-direction: row;

div {
display: flex;
padding: 10px;
align-content: center;
justify-content: center;

}

.col-1 {
width: 30%;
}

.col-2 {
width: 60%;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import 'component-navigation';
@import 'component-promo';
@import '_component-richtext-content';
@import '_component-action-banner';

@import 'common';
@import 'container';
Expand All @@ -16,5 +17,4 @@
@import 'link-list';
@import 'rich-text';
@import 'people-grid';
@import 'icon-link-list';

@import 'icon-link-list';
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react';
import { Field, Link as JssLink, LinkField, Text as JssText } from '@sitecore-jss/sitecore-jss-nextjs';

interface Fields {
Title: Field<string>;
Text: Field<string>;
CallToAction: LinkField;
}

type ActionBannerProps = {
params: { [key: string]: string };
fields: Fields;
};

const ActionBannerDefaultComponent = (props: ActionBannerProps): JSX.Element => (
<div className={`component promo ${props.params.styles}`}>
<div className="component-content">
<span className="is-empty-hint">Agenda</span>
</div>
</div>
);

export const Default = (props: ActionBannerProps): JSX.Element => {
const id = props.params.RenderingIdentifier;

if (props?.fields) {
return (
<div className={`component action-banner ${props.params.styles}`} id={id ? id : undefined}>
<div className="component-content">
<div className="col-1"><h2><JssText field={props.fields.Title} /></h2></div>
<div className="col-2"><JssText field={props.fields.Text} /></div>
<div className="col-1"><JssLink field={props.fields.CallToAction} /></div>
</div>
</div>
);
}

return <ActionBannerDefaultComponent {...props} />;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
ID: "bb602be4-8a4a-4cb1-8477-1b8715346ca2"
Parent: "6f3393fc-0bcf-43fa-9ee2-47dcff255efc"
Template: "3aea335c-d06d-45b1-841a-cbc8d2d1ce40"
Path: /sitecore/system/Settings/Project/Sugcon2024/Basic Components/Basic Components Headless Site Setup/Add ActionBanners Data Item
SharedFields:
- ID: "52c91c75-6698-4701-a8a2-242ace59a8d6"
Hint: Location
Value: "{BA2F959D-A614-4C92-8B57-F1FC1A323ABE}"
- ID: "7868e6bc-525c-4fce-ab8a-77da3e09b171"
Hint: Name
Value: ActionBanner
- ID: "e62c28f0-9d3b-46e2-8bec-a5e120542499"
Hint: Template
Value: "{AA40029C-6410-4CB0-944C-649A20E083C8}"
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20240229T075859Z
- ID: "52807595-0f8f-4b20-8d2a-cb71d28c6103"
Hint: __Owner
Value: |
sitecore\x3rLvWVVyq
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\x3rLvWVVyq
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "5870f1b5-8980-4b82-87ec-3d895ebe3424"
- ID: "badd9cf9-53e0-4d0c-bcc0-2d784c282f6a"
Hint: __Updated by
Value: |
sitecore\x3rLvWVVyq
- ID: "d9cf14b1-fa16-4ba6-9288-e8a174d4d522"
Hint: __Updated
Value: 20240229T075859Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
ID: "b2abbd0a-b9c5-4da2-a0f4-40c24e2ebe39"
Parent: "ddc6ed3d-2e47-4945-a316-9a5304a0db3b"
Template: "04646a89-996f-4ee7-878a-ffdbf1f0ef0d"
Path: /sitecore/layout/Renderings/Project/Sugcon2024/Basic Components/ActionBanner
SharedFields:
- ID: "037fe404-dd19-4bf7-8e30-4dadf68b27b0"
Hint: componentName
Value: ActionBanner
- ID: "06d5295c-ed2f-4a54-9bf2-26228d113318"
Hint: __Icon
Value: Office/32x32/hand_touch.png
- ID: "1a7c85e5-dc0b-490d-9187-bb1dbcb4c72f"
Hint: Datasource Template
Value: /sitecore/templates/Project/Sugcon2024/Basic Components/ActionBanner/ActionBanner
- ID: "7d8ae35f-9ed1-43b5-96a2-0a5f040d4e4e"
Hint: Open Properties after Add
Value: 0
- ID: "9c6106ea-7a5a-48e2-8cad-f0f693b1e2d4"
Hint: __Read Only
Value: 0
- ID: "a77e8568-1ab3-44f1-a664-b7c37ec7810d"
Hint: Parameters Template
Value: "{5165BB7E-E67F-4530-8B4A-20B0AC60BEBE}"
- ID: "b5b27af1-25ef-405c-87ce-369b3a004016"
Hint: Datasource Location
Value: "query:$site/*[@@name='Data']/*[@@templatename='ActionBanner Folder']|query:$sharedSites/*[@@name='Data']/*[@@templatename='ActionBanner Folder']"
- ID: "c39a90ce-0035-41bb-90f6-3c8a6ea87797"
Hint: AddFieldEditorButton
Value:
- ID: "e829c217-5e94-4306-9c48-2634b094fdc2"
Hint: OtherProperties
Value: IsRenderingsWithDynamicPlaceholders=true
Languages:
- Language: "de-DE"
Fields:
- ID: "b5e02ad9-d56f-4c41-a065-a133db87bdeb"
Hint: __Display name
Value: Promo
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20240125T152634Z
- ID: "52807595-0f8f-4b20-8d2a-cb71d28c6103"
Hint: __Owner
Value: |
sitecore\Admin
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\Admin
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "c5100b7f-97cb-4d5a-9601-9d07dafe7323"
- ID: "badd9cf9-53e0-4d0c-bcc0-2d784c282f6a"
Hint: __Updated by
Value: |
sitecore\Admin
- ID: "d9cf14b1-fa16-4ba6-9288-e8a174d4d522"
Hint: __Updated
Value: 20240125T152634Z
- Language: en
Fields:
- ID: "b5e02ad9-d56f-4c41-a065-a133db87bdeb"
Hint: __Display name
Value: Action Banner
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20211012T120931Z
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\JssImport
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "6c964515-47d0-4261-9961-6c1fdfbc1671"
- ID: "badd9cf9-53e0-4d0c-bcc0-2d784c282f6a"
Hint: __Updated by
Value: |
sitecore\x3rLvWVVyq
- ID: "d9cf14b1-fa16-4ba6-9288-e8a174d4d522"
Hint: __Updated
Value: 20240229T094540Z
- Language: "ja-JP"
Fields:
- ID: "b5e02ad9-d56f-4c41-a065-a133db87bdeb"
Hint: __Display name
Value: プロモ
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20240125T152634Z
- ID: "52807595-0f8f-4b20-8d2a-cb71d28c6103"
Hint: __Owner
Value: |
sitecore\Admin
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\Admin
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "c5100b7f-97cb-4d5a-9601-9d07dafe7323"
- ID: "badd9cf9-53e0-4d0c-bcc0-2d784c282f6a"
Hint: __Updated by
Value: |
sitecore\Admin
- ID: "d9cf14b1-fa16-4ba6-9288-e8a174d4d522"
Hint: __Updated
Value: 20240125T152634Z
- Language: "zh-CN"
Fields:
- ID: "b5e02ad9-d56f-4c41-a065-a133db87bdeb"
Hint: __Display name
Value: 促销
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20240125T152634Z
- ID: "52807595-0f8f-4b20-8d2a-cb71d28c6103"
Hint: __Owner
Value: |
sitecore\Admin
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\Admin
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "c5100b7f-97cb-4d5a-9601-9d07dafe7323"
- ID: "badd9cf9-53e0-4d0c-bcc0-2d784c282f6a"
Hint: __Updated by
Value: |
sitecore\Admin
- ID: "d9cf14b1-fa16-4ba6-9288-e8a174d4d522"
Hint: __Updated
Value: 20240125T152634Z
31 changes: 31 additions & 0 deletions src/Project/Sugcon2024/items/SiteEU/EU/Data/Action Banners.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
ID: "a988fe1a-cf7d-473f-ad66-69cc610dac3b"
Parent: "968dab46-6eda-4775-8a0f-85037e2d92f2"
Template: "aa40029c-6410-4cb0-944c-649a20e083c8"
Path: /sitecore/content/Sugcon2024/EU/Data/Action Banners
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20240229T094625Z
- ID: "52807595-0f8f-4b20-8d2a-cb71d28c6103"
Hint: __Owner
Value: |
sitecore\x3rLvWVVyq
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\x3rLvWVVyq
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "294c801f-7639-4785-868a-227efdd4508f"
- ID: "badd9cf9-53e0-4d0c-bcc0-2d784c282f6a"
Hint: __Updated by
Value: |
sitecore\x3rLvWVVyq
- ID: "d9cf14b1-fa16-4ba6-9288-e8a174d4d522"
Hint: __Updated
Value: 20240229T094625Z
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Path: /sitecore/content/Sugcon2024/Shared/Presentation/Available Renderings/Basi
SharedFields:
- ID: "715ae6c0-71c8-4744-ab4f-65362d20ad65"
Hint: Renderings
Value: "{4718D9E1-E2BC-4FDD-8305-4CBA3DF7466B}"
Value: |
{4718D9E1-E2BC-4FDD-8305-4CBA3DF7466B}
{B2ABBD0A-B9C5-4DA2-A0F4-40C24E2EBE39}
Languages:
- Language: en
Versions:
Expand All @@ -25,11 +27,11 @@ Languages:
sitecore\UzWooIJE3y
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "180c7779-0fe4-4e3a-8052-b6254cd24bcb"
Value: "431b6964-9130-4fdf-9bb9-28d781bfcce3"
- ID: "badd9cf9-53e0-4d0c-bcc0-2d784c282f6a"
Hint: __Updated by
Value: |
sitecore\UzWooIJE3y
sitecore\x3rLvWVVyq
- ID: "d9cf14b1-fa16-4ba6-9288-e8a174d4d522"
Hint: __Updated
Value: 20240220T125912Z
Value: 20240229T094530Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
ID: "a98a7df6-6eec-42fe-b708-4fd0e642e369"
Parent: "057961fa-04d8-4403-8c1f-97bfa6909972"
Template: "0437fee2-44c9-46a6-abe9-28858d9fee8c"
Path: /sitecore/templates/Project/Sugcon2024/Basic Components/ActionBanner
Languages:
- Language: en
Fields:
- ID: "b5e02ad9-d56f-4c41-a065-a133db87bdeb"
Hint: __Display name
Value: Action Banner
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20240229T094106Z
- ID: "52807595-0f8f-4b20-8d2a-cb71d28c6103"
Hint: __Owner
Value: |
sitecore\x3rLvWVVyq
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\x3rLvWVVyq
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "2495bd52-a8aa-4bd6-993e-def86f50ec8e"
- ID: "badd9cf9-53e0-4d0c-bcc0-2d784c282f6a"
Hint: __Updated by
Value: |
sitecore\x3rLvWVVyq
- ID: "d9cf14b1-fa16-4ba6-9288-e8a174d4d522"
Hint: __Updated
Value: 20240229T094111Z
Loading

0 comments on commit 1b8c900

Please sign in to comment.