@concretecms/bedrock 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/bedrock/scss/_frontend.scss +1 -0
- package/assets/bedrock/scss/_theme-context-root.scss +17 -0
- package/assets/cms/components/customizer/FontFamilyPageCustomizerWidget.vue +3 -3
- package/assets/cms/components/customizer/ThemeCustomizer.vue +2 -2
- package/assets/cms/components/form/ConcreteThemeColorInput.vue +1 -1
- package/assets/cms/scss/bootstrap/_reboot.scss +0 -29
- package/assets/imagery/scss/frontend/_hero-image.scss +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// What is the purpose of this file, you ask?
|
|
2
|
+
// In our theme color input selector, we use CSS variables to display colors.
|
|
3
|
+
// e.g. var(--bs-primary)
|
|
4
|
+
// However, since .ccm-ui has the CMS variables attached to it, and the ::root has the
|
|
5
|
+
// theme bootstrap variables attached to it, the primary color shown in the color input
|
|
6
|
+
// Will come from .ccm-ui instead of ::root, since .ccm-ui is inside ::root.
|
|
7
|
+
// So instead, let's ALSO define the theme colors against the .ccm-context-theme
|
|
8
|
+
// class, and then wrap any controls that need to have access to theme specific variables
|
|
9
|
+
// within the .ccm-context-theme class.
|
|
10
|
+
|
|
11
|
+
.ccm-context-theme {
|
|
12
|
+
|
|
13
|
+
@each $color, $value in $theme-colors {
|
|
14
|
+
--#{$variable-prefix}#{$color}: #{$value};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<select @change="componentUpdated" class="selectpicker" v-model="selectedFont">
|
|
3
3
|
<option value="" :data-content="'<span>Default</span>'">Default</option>
|
|
4
|
-
<option v-for="font in
|
|
4
|
+
<option v-for="font in customFonts" :value="font" :data-content="'<span style=\'font-family: ' + font + '\'>' + font + '</span>'">{{ font }}</option>
|
|
5
5
|
<option v-for="font in standardFonts" :value="font" :data-content="'<span style=\'font-family: ' + font + '\'>' + font + '</span>'">{{ font }}</option>
|
|
6
6
|
</select>
|
|
7
7
|
</template>
|
|
@@ -42,13 +42,13 @@ export default {
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
computed: {
|
|
45
|
-
|
|
45
|
+
customFonts: function() {
|
|
46
46
|
var fonts = []
|
|
47
47
|
var my = this
|
|
48
48
|
this.styleValue.style.fonts.forEach(function(font) {
|
|
49
49
|
fonts.push(font.name)
|
|
50
50
|
})
|
|
51
|
-
if (fonts.indexOf(my.selectedFont) === -1) {
|
|
51
|
+
if (fonts.indexOf(my.selectedFont) === -1 && my.standardFonts.indexOf(my.selectedFont) === -1) {
|
|
52
52
|
fonts.push(my.selectedFont)
|
|
53
53
|
}
|
|
54
54
|
return fonts
|
|
@@ -178,7 +178,7 @@ export default {
|
|
|
178
178
|
url: my.createNewSkinAction,
|
|
179
179
|
data: {
|
|
180
180
|
skinName: my.newSkinName,
|
|
181
|
-
styles: my.customizerStyles,
|
|
181
|
+
styles: JSON.stringify(my.customizerStyles),
|
|
182
182
|
customCss: my.customizerCustomCss,
|
|
183
183
|
ccm_token: CCM_SECURITY_TOKEN
|
|
184
184
|
},
|
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
new ConcreteAjaxRequest({
|
|
302
302
|
url: my.saveSkinAction,
|
|
303
303
|
data: {
|
|
304
|
-
styles: my.customizerStyles,
|
|
304
|
+
styles: JSON.stringify(my.customizerStyles),
|
|
305
305
|
customCss: my.customizerCustomCss,
|
|
306
306
|
ccm_token: CCM_SECURITY_TOKEN
|
|
307
307
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="mb-3">
|
|
2
|
+
<div class="mb-3 ccm-context-theme">
|
|
3
3
|
<select :name="inputName" data-select="theme-colors" data-width="100%">
|
|
4
4
|
<option v-for="color in colorCollection.colors" :selected="selectedColor == color.variable" :data-content="dataContentAttribute(color)" :value="color.variable">{{ color.name }}</option>
|
|
5
5
|
</select>
|
|
@@ -20,35 +20,6 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
// Root
|
|
24
|
-
//
|
|
25
|
-
// Ability to the value of the root font sizes, affecting the value of `rem`.
|
|
26
|
-
// null by default, thus nothing is generated.
|
|
27
|
-
|
|
28
|
-
:root {
|
|
29
|
-
font-size: $font-size-root;
|
|
30
|
-
|
|
31
|
-
@if $enable-smooth-scroll {
|
|
32
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
33
|
-
scroll-behavior: smooth;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// Body
|
|
40
|
-
//
|
|
41
|
-
// 1. Remove the margin in all browsers.
|
|
42
|
-
// 2. As a best practice, apply a default `background-color`.
|
|
43
|
-
// 3. Prevent adjustments of font size after orientation changes in iOS.
|
|
44
|
-
// 4. Change the default tap highlight to be completely transparent in iOS.
|
|
45
|
-
|
|
46
|
-
html.ccm-toolbar-visible {
|
|
47
|
-
// We _could_ set this by setting font-size-root, but we don't really want to screw with the theme loading this
|
|
48
|
-
// unless we know the toolbar is visible.
|
|
49
|
-
font-size: 16px; // By setting this here, rem declarations in BS5 work off of 16px, and the base theme can do whatever it wants at body
|
|
50
|
-
}
|
|
51
|
-
|
|
52
23
|
.ccm-ui {
|
|
53
24
|
margin: 0; // 1
|
|
54
25
|
font-family: $font-family-base;
|
package/package.json
CHANGED