Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/area.js

This file was deleted.

6 changes: 6 additions & 0 deletions modules/@apostrophecms/home-page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export default {
type: 'area',
options: {
widgets: {
'@apostrophecms/layout': {
columns: 6,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 12

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not appropriate here, it's tested and feels right in the context of the space it has.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Default page has 12. This also showcases the option override.

defaultSpan: 3,
minSpan: 1,
gap: '1rem'
},
'@apostrophecms/rich-text': {},
'@apostrophecms/image': {},
'@apostrophecms/video': {}
Expand Down
18 changes: 18 additions & 0 deletions modules/@apostrophecms/layout-column-widget/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Modify the layout column widget to allow the desired content types
// in the Layout widget.
export default {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boutell Explicit define so that it's clear how to modify.

fields: {
add: {
content: {
type: 'area',
options: {
widgets: {
'@apostrophecms/rich-text': {},
'@apostrophecms/image': {},
'@apostrophecms/video': {}
}
}
}
}
}
};
2 changes: 1 addition & 1 deletion modules/asset/ui/src/scss/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ body {
main,
.bp-footer {
width: 100%;
max-width: 800px;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
}
Expand Down
13 changes: 11 additions & 2 deletions modules/default-page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ export default {
fields: {
add: {
main: {
type: 'area',
options: {
widgets: {
'@apostrophecms/layout': {},
}
}
},
content: {
type: 'area',
options: {
widgets: {
Expand All @@ -14,14 +22,15 @@ export default {
'@apostrophecms/video': {}
}
}
}
},
},
group: {
basics: {
label: 'Basics',
fields: [
'title',
'main'
'main',
'content'
]
}
}
Expand Down
7 changes: 5 additions & 2 deletions modules/default-page/views/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
{% extends "layout.html" %}

{% block main %}
<section class="bp-content">
<h1>{{ data.page.title }}</h1>
<h1>{{ data.page.title }}</h1>
<section class="bp-layout">
{% area data.page, 'main' %}
</section>
<section class="bp-content">
{% area data.page, 'content' %}
</section>
{% endblock %}