Skip to content

Commit

Permalink
feat: reorganise to reduce the number of files again
Browse files Browse the repository at this point in the history
  • Loading branch information
buuhuu committed Jul 19, 2024
1 parent 959230e commit b3e48fa
Show file tree
Hide file tree
Showing 25 changed files with 411 additions and 386 deletions.
8 changes: 4 additions & 4 deletions .hlxignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LICENSE
package.json
package-lock.json
test/*
universal-editor/*
blocks/*/*-definition.json
blocks/*/*-filter.json
blocks/*/*-model.json
_component-definition.json
_component-models.json
_component-filters.json
blocks/*/component.json
15 changes: 0 additions & 15 deletions blocks/cards/card-definition.json

This file was deleted.

19 changes: 0 additions & 19 deletions blocks/cards/card-model.json

This file was deleted.

15 changes: 0 additions & 15 deletions blocks/cards/cards-definition.json

This file was deleted.

6 changes: 0 additions & 6 deletions blocks/cards/cards-filter.json

This file was deleted.

63 changes: 63 additions & 0 deletions blocks/cards/component.json
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"
]
}
]
}
15 changes: 0 additions & 15 deletions blocks/columns/columns-definition.json

This file was deleted.

20 changes: 0 additions & 20 deletions blocks/columns/columns-model.json

This file was deleted.

51 changes: 51 additions & 0 deletions blocks/columns/component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"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": "column",
"components": [
"text",
"image",
"button",
"title"
]
}
]
}
Empty file added blocks/hero/component.json
Empty file.
15 changes: 0 additions & 15 deletions blocks/hero/hero-definition.json

This file was deleted.

26 changes: 0 additions & 26 deletions blocks/hero/hero-model.json

This file was deleted.

57 changes: 57 additions & 0 deletions models/button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"definitions": [
{
"title": "Button",
"id": "button",
"plugins": {
"xwalk": {
"page": {
"resourceType": "core/franklin/components/button/v1/button",
"template": {}
}
}
}
}
],
"models": [
{
"id": "button",
"fields": [
{
"component": "aem-content",
"name": "link",
"label": "Link"
},
{
"component": "text",
"name": "linkText",
"label": "Text"
},
{
"component": "text",
"name": "linkTitle",
"label": "Title"
},
{
"component": "select",
"name": "linkType",
"label": "Type",
"options": [
{
"name": "default",
"value": ""
},
{
"name": "primary",
"value": "primary"
},
{
"name": "secondary",
"value": "secondary"
}
]
}
]
}
]
}
40 changes: 40 additions & 0 deletions models/component-definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"groups": [
{
"title": "Default Content",
"id": "default",
"components": [
{
"...": "./text.json#/definitions"
},
{
"...": "./title.json#/definitions"
},
{
"...": "./image.json#/definitions"
},
{
"...": "./button.json#/definitions"
}
]
},
{
"title": "Sections",
"id": "sections",
"components": [
{
"...": "./section.json#/definitions"
}
]
},
{
"title": "Blocks",
"id": "blocks",
"components": [
{
"...": "../blocks/*/component.json#/defintions"
}
]
}
]
}
14 changes: 14 additions & 0 deletions models/component-filters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"id": "main",
"components": [
"section"
]
},
{
"...": "./section.json#/filters"
},
{
"...": "../blocks/*/componnet.json#/filters"
}
]
Loading

0 comments on commit b3e48fa

Please sign in to comment.