-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #382 from anbrue/feature/ActionBanner
added Action Banner compoent and related items
- Loading branch information
Showing
17 changed files
with
1,019 additions
and
6 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/Project/Sugcon2024/Sugcon/src/assets/sass/components/_component-action-banner.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/Project/Sugcon2024/Sugcon/src/components/Basic Components/ActionBanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} />; | ||
}; |
41 changes: 41 additions & 0 deletions
41
...024/Basic Components/Basic Components Headless Site Setup/Add ActionBanners Data Item.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
146 changes: 146 additions & 0 deletions
146
src/Project/Sugcon2024/items/Renderings/Sugcon2024/Basic Components/ActionBanner.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
31
src/Project/Sugcon2024/items/SiteEU/EU/Data/Action Banners.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/Project/Sugcon2024/items/Templates/Sugcon2024/Basic Components/ActionBanner.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.