forked from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
1,508 additions
and
476 deletions.
There are no files selected for viewing
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,5 @@ | ||
[*.js] | ||
indent_size = 2 | ||
|
||
[*.css] | ||
indent_size = 4 |
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
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ LICENSE | |
package.json | ||
package-lock.json | ||
test/* | ||
_* |
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 @@ | ||
node .husky/pre-commit.mjs |
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,20 @@ | ||
import { exec } from "node:child_process"; | ||
|
||
const run = (cmd) => new Promise((resolve, reject) => exec( | ||
cmd, | ||
(error, stdout) => { | ||
if (error) reject(error); | ||
else resolve(stdout); | ||
} | ||
)); | ||
|
||
const changeset = await run('git diff --cached --name-only --diff-filter=ACMR'); | ||
const modifiedFiles = changeset.split('\n').filter(Boolean); | ||
|
||
// check if there are any model files staged | ||
const modifledPartials = modifiedFiles.filter((file) => file.match(/(^|\/)_.*.json/)); | ||
if (modifledPartials.length > 0) { | ||
const output = await run('npm run build:json --silent'); | ||
console.log(output); | ||
await run('git add component-models.json component-definition.json component-filters.json'); | ||
} |
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
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
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,63 @@ | ||
{ | ||
"definitions": [ | ||
{ | ||
"title": "Cards", | ||
"id": "cards", | ||
"plugins": { | ||
"xwalk": { | ||
"page": { | ||
"resourceType": "core/franklin/components/block/v1/block", | ||
"template": { | ||
"name": "Cards", | ||
"filter": "cards" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"title": "Card", | ||
"id": "card", | ||
"plugins": { | ||
"xwalk": { | ||
"page": { | ||
"resourceType": "core/franklin/components/block/v1/block/item", | ||
"template": { | ||
"name": "Card", | ||
"model": "card" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"models": [ | ||
{ | ||
"id": "card", | ||
"fields": [ | ||
{ | ||
"component": "reference", | ||
"valueType": "string", | ||
"name": "image", | ||
"label": "Image", | ||
"multi": false | ||
}, | ||
{ | ||
"component": "richtext", | ||
"name": "text", | ||
"value": "", | ||
"label": "Text", | ||
"valueType": "string" | ||
} | ||
] | ||
} | ||
], | ||
"filters": [ | ||
{ | ||
"id": "cards", | ||
"components": [ | ||
"card" | ||
] | ||
} | ||
] | ||
} |
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
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,57 @@ | ||
{ | ||
"definitions": [ | ||
{ | ||
"title": "Columns", | ||
"id": "columns", | ||
"plugins": { | ||
"xwalk": { | ||
"page": { | ||
"resourceType": "core/franklin/components/columns/v1/columns", | ||
"template": { | ||
"columns": "2", | ||
"rows": "1" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"models": [ | ||
{ | ||
"id": "columns", | ||
"fields": [ | ||
{ | ||
"component": "text", | ||
"valueType": "number", | ||
"name": "columns", | ||
"value": "", | ||
"label": "Columns" | ||
}, | ||
{ | ||
"component": "text", | ||
"valueType": "number", | ||
"name": "rows", | ||
"value": "", | ||
"label": "Rows" | ||
} | ||
] | ||
} | ||
], | ||
"filters": [ | ||
{ | ||
"id": "columns", | ||
"components": [ | ||
"column" | ||
] | ||
}, | ||
{ | ||
"id": "column", | ||
"components": [ | ||
"text", | ||
"image", | ||
"button", | ||
"title" | ||
] | ||
} | ||
] | ||
} |
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
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 |
---|---|---|
@@ -1,14 +1,20 @@ | ||
footer { | ||
padding: 2rem; | ||
background-color: var(--light-color); | ||
font-size: var(--body-font-size-s); | ||
font-size: var(--body-font-size-xs); | ||
} | ||
|
||
footer .footer { | ||
max-width: 1200px; | ||
footer .footer > div { | ||
margin: auto; | ||
max-width: 1200px; | ||
padding: 40px 24px 24px; | ||
} | ||
|
||
footer .footer p { | ||
margin: 0; | ||
} | ||
|
||
@media (width >= 900px) { | ||
footer .footer > div { | ||
padding: 40px 32px 24px; | ||
} | ||
} |
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,32 @@ | ||
{ | ||
"definitions": [ | ||
{ | ||
"title": "Fragment", | ||
"id": "fragment", | ||
"plugins": { | ||
"xwalk": { | ||
"page": { | ||
"resourceType": "core/franklin/components/block/v1/block", | ||
"template": { | ||
"name": "Fragment", | ||
"model": "fragment" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"models": [ | ||
{ | ||
"id": "fragment", | ||
"fields": [ | ||
{ | ||
"component": "aem-content", | ||
"name": "reference", | ||
"label": "Reference" | ||
} | ||
] | ||
} | ||
], | ||
"filters": [] | ||
} |
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 |
---|---|---|
@@ -1,13 +1 @@ | ||
/* suppress nested section padding */ | ||
.fragment-wrapper > .section { | ||
padding-left: 0; | ||
padding-right: 0; | ||
} | ||
|
||
.fragment-wrapper > .section:first-of-type { | ||
padding-top: 0; | ||
} | ||
|
||
.fragment-wrapper > .section:last-of-type { | ||
padding-bottom: 0; | ||
} | ||
/* stylelint-disable no-empty-source */ |
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
Oops, something went wrong.