Skip to content

Commit

Permalink
refactor all container usage to use overridable container template.
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Jun 1, 2021
1 parent 10119d2 commit bc0fd52
Show file tree
Hide file tree
Showing 33 changed files with 219 additions and 193 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template data-sly-template.variant="${@ componentProperties}">
<sly data-sly-test="${componentProperties.showParsys}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/details/contact-details */-->
<sly data-sly-use.container="../../layout/container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</sly>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template data-sly-template.variant="${@ componentProperties}">
<sly data-sly-test="${componentProperties.showParsys}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/details/contact-details */-->
<sly data-sly-use.container="../../layout/container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</sly>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template data-sly-template.field="${@ componentProperties}">
<sly data-sly-test="${componentProperties.badgeCustom || 'custom' in componentProperties.variant || componentProperties.legacyBadgeSelected || (( componentProperties.legacyVariant || 'default' in componentProperties.variant) ? !componentProperties.showParsys : true)}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/details/generic-details */-->
<sly data-sly-use.container="../../layout/container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</sly>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template data-sly-template.field="${@ componentProperties}">
<sly data-sly-test="${componentProperties.badgeCustom || 'custom' in componentProperties.variant || componentProperties.legacyBadgeSelected || (( componentProperties.legacyVariant || 'default' in componentProperties.variant) ? !componentProperties.hideDescription : true)}">
<div class="card-text">${componentProperties.badgeDescription @ context = 'html'}</div>
<div class="card-text"
data-sly-test="${componentProperties.componentBadgeSelected}">${componentProperties.badgeDescription @ context = 'html'}</div>
<div class="card-text"
data-sly-test="${!componentProperties.componentBadgeSelected}">${componentProperties.description @ context = 'html'}</div>
</sly>
</template>
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<template data-sly-template.field="${@ componentProperties}">
<sly data-sly-test="${componentProperties.badgeCustom || 'custom' in componentProperties.variant || componentProperties.legacyBadgeSelected || (( componentProperties.legacyVariant || 'default' in componentProperties.variant) ? !componentProperties.hideTitle : true)}">
<title class="card-title"
data-sly-element="${componentProperties.badgeTitleType @ context='elementName'}" itemprop="name">${componentProperties.badgeTitle @ context='html'}</title>
<title class="card-title"
data-sly-test="${componentProperties.componentBadgeSelected}"
data-sly-element="${componentProperties.badgeTitleType @ context='elementName'}" itemprop="name">${componentProperties.badgeTitle @ context='html'}</title>
<title class="card-title"
data-sly-test="${!componentProperties.componentBadgeSelected}"
data-sly-element="${componentProperties.titleType @ context='elementName'}" itemprop="name">${componentProperties.title @ context='html'}</title>
</sly>
</template>
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template data-sly-template.field="${@ componentProperties}">
<sly data-sly-test="${componentProperties.badgeCustom || 'custom' in componentProperties.variant || componentProperties.legacyBadgeSelected || (( componentProperties.legacyVariant || 'default' in componentProperties.variant) ? !componentProperties.hideTitle : true)}">
<title class="card-title"
data-sly-element="${componentProperties.badgeTitleType @ context='elementName'}">${componentProperties.titleFormatted @ context='html'}</title>
<title class="card-title"
data-sly-element="${componentProperties.badgeTitleType @ context='elementName'}" itemprop="name">${componentProperties.titleFormatted @ context='html'}</title>
<title class="card-title"
data-sly-test="${!componentProperties.componentBadgeSelected}"
data-sly-element="${componentProperties.titleType @ context='elementName'}" itemprop="name">${componentProperties.titleFormatted @ context='html'}</title>
</sly>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template data-sly-template.variant="${@ componentProperties}">
<sly data-sly-test="${componentProperties.showParsys}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/details/news-details */-->
<sly data-sly-use.container="../../layout/container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</sly>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template data-sly-template.variant="${@ componentProperties}">
<sly data-sly-test="${componentProperties.showParsys}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/details/news-details */-->
<sly data-sly-use.container="../../layout/container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</sly>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template data-sly-template.variant="${@ componentProperties}">
<sly data-sly-test="${componentProperties.showParsys}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/details/page-details */-->
<sly data-sly-use.container="../../layout/container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</sly>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template data-sly-template.variant="${@ componentProperties}">
<sly data-sly-test="${componentProperties.showParsys}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/details/page-details */-->
<sly data-sly-use.container="../../layout/container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</sly>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template data-sly-template.variant="${@ componentProperties}">
<article style="${componentProperties.attr.data.style @ context = 'unsafe'}"
data-sly-attribute="${componentProperties.attr.data @ context = 'unsafe'}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/layout/article */-->
<sly data-sly-use.container="../container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</article>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template data-sly-template.variant="${@ componentProperties}">
<aside style="${componentProperties.attr.data.style @ context = 'unsafe'}"
data-sly-attribute="${componentProperties.attr.data @ context = 'unsafe'}">
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container', decorationTagName='div'}"></sly>
<!--/* template path is this relative to aemdesign/components/layout/aside */-->
<sly data-sly-use.container="../container/par.html"
data-sly-call="${container.container @ componentProperties=componentProperties}"></sly>
</aside>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:description="Includes PARSYS or GRID as a container"
jcr:primaryType="cq:Component"
jcr:title="Container"
cq:isContainer="{Boolean}true"
cq:icon="code"
sling:resourceSuperType="wcm/foundation/components/responsivegrid"
componentGroup=".hidden"/>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:icon="code"
cq:isContainer="{Boolean}true"
jcr:description="Includes PARSYS or GRID as a container"
jcr:primaryType="cq:Component"
jcr:title="Container"
sling:resourceSuperType="wcm/foundation/components/responsivegrid"
componentGroup=".hidden"/>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
class="responsivegrid"/>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
class="responsivegrid"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<template data-sly-template.container="${@ componentProperties}">
<!--/* TODO: HTL does not allow for expression syntax in resourceType so tenant will need to override this. */-->
<sly data-sly-resource="${'./par' @ resourceType='aemdesign/components/layout/container' }"></sly>
</template>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:icon="mBox"
cq:isContainer="{Boolean}true"
jcr:description="Primary block for content"
jcr:primaryType="cq:Component"
jcr:title="Content Block (v2)"
componentGroup="hidden"/>
cq:icon="mBox"
cq:isContainer="{Boolean}true"
jcr:description="Primary block for content"
jcr:primaryType="cq:Component"
jcr:title="Content Block (v2)"
componentGroup="hidden"/>
Loading

0 comments on commit bc0fd52

Please sign in to comment.