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
2 changes: 1 addition & 1 deletion modules/@apostrophecms/asset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
options: {
// Change to `apos` for admin UI HMR
// `public` is the default and provides HMR for project UI code
hmr: 'public',
hmr: 'apos',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Only here for debug purposes, not required at all.

refreshOnRestart: true
}
};
17 changes: 17 additions & 0 deletions modules/@apostrophecms/layout-column-widget/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
export default {
options: {
// Do not display tabs when there is only one.
// Since there is only one Styles tab, it will be hidden.
hideSingleTab: true
},
styles: {
add: {
background: 'background'
}
},
fields: {
add: {
content: {
Expand All @@ -12,6 +22,13 @@ export default {
}
}
}
},
// Let the content be shown in the Styles tab schema.
// Keep in mind this is only a visual change, no layout logic is affected.
group: {
styles: {
fields: [ 'content' ]
}
}
}
};
11 changes: 11 additions & 0 deletions modules/@apostrophecms/recently-edited/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Hide recently edited feature from the admin bar.
// Showcases how to opt-out from the new Recently Edited feature.
export default {
methods(self) {
return {
addToAdminBar() {
// no-op
}
};
}
};
24 changes: 24 additions & 0 deletions modules/@apostrophecms/styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,5 +377,29 @@ export default {
}
}
}
},
extendMethods(self) {
return {
registerPresets(_super) {
_super();
const bg = self.getPreset('background');
bg.fields.add.blur = {
label: 'Blur',
type: 'range',
min: 0,
max: 20,
def: 0,
unit: 'px',
property: '--preset-bg-blur',
class: 'has-bg-blur',
if: {
enabled: true,
backgroundType: 'image'
},
skipFalsyValues: true
};
self.setPreset('background', bg);
}
};
}
};
25 changes: 25 additions & 0 deletions modules/asset/ui/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,28 @@
@import './scss/_layout';
@import './scss/_welcome';
@import './scss/_widgets';

.has-bg-blur {
--preset-bg-image-layer: none;
--preset-bg-overlay-layer: none;
position: relative;
isolation: isolate;
}

.has-bg-blur::before {
content: '';
position: absolute;
inset: calc(var(--preset-bg-blur) * -2);
z-index: -1;
background: var(--preset-bg-image) center / cover no-repeat;
filter: blur(var(--preset-bg-blur));
clip-path: inset(calc(var(--preset-bg-blur) * 2 - 1px));
}

.has-bg-blur::after {
content: '';
position: absolute;
inset: 0;
z-index: -1;
background: var(--preset-bg-overlay);
}
Loading