diff --git a/Writerside/topics/themer/cmp/cmp_themes.md b/Writerside/topics/themer/cmp/cmp_themes.md
index 44664b11..f88a7840 100644
--- a/Writerside/topics/themer/cmp/cmp_themes.md
+++ b/Writerside/topics/themer/cmp/cmp_themes.md
@@ -27,9 +27,54 @@ When you create a Theme, Fred will automatically create a directory named for th
### Default Element
-The default element setting allows you to chose a default Fred Element and target area for placing the content on existing documents. The setting is formatted as `ID|target` where ID is the identification number of the Fred Element and the target is the HTML object within containing a `data-fred-name` attribute. This is useful for converting a standard resource to Fred, as it will place the existing content in the default element.
-
-If you aren't finding the identification number of the Fred Element, right-click on the top of the element grid and make sure the ID column is selected.
+The default element setting allows you to choose a default Fred Element and target area for placing the content on existing documents. The setting is formatted as `UUID|target` where UUID is the universally unique identification number of the Fred Element and the target is the HTML object within containing a `data-fred-name` attribute. This is useful for converting a standard resource to Fred, as it will place the existing content in the default element.
+
+If you aren't finding the UUID of the Fred Element, open an element and look for a display field labeled "UUID".
+
+### Theme Settings
+
+Themes can have settings that are used to configure the theme. These settings are stored in the "Settings" section of the Theme. The settings are stored as a JSON object and can be accessed in the theme's twig templates using the `theme_setting` object. For example, if you have a setting named `logo`, you can access it in a template like this:
+
+```twig
+
+```
+
+Theme settings are saved in the system settings and can be accessed outside of fred using the theme's Setting Prefix. For example, if the theme's setting prefix is `my_theme`, you can access the setting `logo` in a chunk like this:
+
+```html
+
+```
+
+Theme settings can use any of the [setting types](settings.md#available-settings-types) described in the option groups documentation.
+
+#### Format
+
+The theme settings are formatted as a JSON array. Here is an example of a theme setting:
+
+```json
+[
+ {
+ "group": "Look and Feel",
+ "settings": [
+ {
+ "name": "site_color",
+ "type": "colorswatch",
+ "options": [
+ "lightcoral",
+ "red",
+ "black"
+ ]
+ },
+ {
+ "name": "site_logo",
+ "type": "image"
+ }
+ ]
+ }
+]
+```
+
+One additional option that is specific to Theme Settings is that each setting can have a `"global": false` flag. This flag will cause the setting to save to the context it is used in, rather than the system settings. This is useful for multi-context sites where you want to have different settings for different contexts.
### Elements
diff --git a/Writerside/topics/themer/elements/attributes.md b/Writerside/topics/themer/elements/attributes.md
index e5294759..3e31eed9 100644
--- a/Writerside/topics/themer/elements/attributes.md
+++ b/Writerside/topics/themer/elements/attributes.md
@@ -28,7 +28,7 @@ The value of this attribute has to be unique in each Element, but you can have m
Default value
-
+
```
## data-fred-editable
@@ -48,7 +48,7 @@ Defines other HTML attributes (comma separated) to save with the content of the
### Example {id="example_3"}
```html
-
+
```
## data-fred-render
@@ -124,7 +124,7 @@ Identical to `data-fred-media-source` but only for images.
### Example {id="example_8"}
```html
-
+
```
## data-fred-block-class
diff --git a/Writerside/topics/themer/elements/markup.md b/Writerside/topics/themer/elements/markup.md
index 3181c3b3..5d621337 100644
--- a/Writerside/topics/themer/elements/markup.md
+++ b/Writerside/topics/themer/elements/markup.md
@@ -23,7 +23,7 @@ Template Variables can be accessed in the element markup object with the prefix
Default Value
-

+
diff --git a/Writerside/topics/themer/themes.md b/Writerside/topics/themer/themes.md
index ae497d3a..eab78b76 100644
--- a/Writerside/topics/themer/themes.md
+++ b/Writerside/topics/themer/themes.md
@@ -1,4 +1,4 @@
-# Basic Tutorial Tutorial
+# Basic Tutorial
Once you have created a design you are happy with, it is straightforward to build a Theme to share. To start creating a theme, follow the steps below:
diff --git a/_build/assets/js/Actions/blueprints.js b/_build/assets/js/Actions/blueprints.js
index 247bdd3b..4dba3262 100644
--- a/_build/assets/js/Actions/blueprints.js
+++ b/_build/assets/js/Actions/blueprints.js
@@ -39,7 +39,6 @@ export const createBlueprint = (name, description, category, rank, isPublic, dat
};
export const createBlueprintCategory = (name, rank, isPublic, templates) => {
- console.log({name, rank, isPublic, templates});
return fetch(`${fredConfig.config.assetsUrl}endpoints/ajax.php?modx=${fredConfig.config.modxVersion}&action=blueprints-create-category`, {
method: "post",
headers: {
diff --git a/_build/assets/js/Components/Sidebar/PageSettings.js b/_build/assets/js/Components/Sidebar/PageSettings.js
index e5cee75b..7719aeeb 100644
--- a/_build/assets/js/Components/Sidebar/PageSettings.js
+++ b/_build/assets/js/Components/Sidebar/PageSettings.js
@@ -19,8 +19,11 @@ export default class PageSettings extends SidebarPlugin {
this.setTVWithEmitter = this.setTVWithEmitter.bind(this);
this.setMultiTVWithEmitter = this.setMultiTVWithEmitter.bind(this);
this.addTVChangeListener = this.addTVChangeListener.bind(this);
+ this.setThemeSettingWithEmitter = this.setThemeSettingWithEmitter.bind(this);
+ this.setMultiThemeSettingWithEmitter = this.setMultiThemeSettingWithEmitter.bind(this);
this.pageSettings = fredConfig.pageSettings;
+ this.themeSettings = fredConfig.themeSettings;
this.content = this.render();
}
@@ -33,6 +36,8 @@ export default class PageSettings extends SidebarPlugin {
settingsForm.appendChild(this.getGeneralFields());
+ settingsForm.appendChild(this.getThemeSettingFields());
+
if (fredConfig.permission.fred_settings_advanced) {
settingsForm.appendChild(this.getAdvancedFields());
}
@@ -157,6 +162,122 @@ export default class PageSettings extends SidebarPlugin {
return advancedList;
}
+ getThemeSettingFields() {
+ const advancedList = dl();
+
+ const advancedTab = dt('fred.fe.page_settings.theme_settings', ['fred--accordion-cog'], e => {
+ const activeTabs = advancedList.parentElement.querySelectorAll('dt.active');
+
+ const isActive = advancedTab.classList.contains('active');
+
+ for (let tab of activeTabs) {
+ tab.classList.remove('active');
+ }
+
+ if (!isActive) {
+ advancedTab.classList.add('active');
+ e.stopPropagation();
+ emitter.emit('fred-sidebar-dt-active', advancedTab, advancedContent);
+ }
+
+ });
+
+ const advancedContent = dd();
+ const advancedHeader = h3('fred.fe.page_settings.theme_settings');
+ const fields = fieldSet(['fred--page_settings_form_theme_settings']);
+
+ this.themeSettings.forEach(setting => {
+ if (setting.group && setting.settings) {
+ const groupEl = this.renderThemeSettingsGroup(setting);
+ if (groupEl !== false) {
+ fields.appendChild(groupEl);
+ }
+ } else {
+ const settingEl = this.renderThemeSetting(setting);
+ if (settingEl !== false) {
+ fields.appendChild(settingEl);
+ }
+ }
+ });
+
+ advancedContent.appendChild(advancedHeader);
+ advancedContent.appendChild(fields);
+ advancedList.appendChild(advancedTab);
+ advancedList.appendChild(advancedContent);
+
+ return advancedList;
+ }
+
+ renderThemeSettingsGroup(group) {
+ const content = dl();
+
+ const settingGroup = dt(group.group, [], (e, el) => {
+ const activeTabs = content.parentElement.querySelectorAll('dt.active');
+
+ const isActive = el.classList.contains('active');
+
+ for (let tab of activeTabs) {
+ tab.classList.remove('active');
+ }
+
+ if (!isActive) {
+ el.classList.add('active');
+ e.stopPropagation();
+ }
+ });
+ const settingGroupContent = dd();
+
+ group.settings.forEach(setting => {
+ const settingEl = this.renderThemeSetting(setting);
+ if (settingEl !== false) {
+ settingGroupContent.appendChild(settingEl);
+ }
+ });
+
+ content.appendChild(settingGroup);
+ content.appendChild(settingGroupContent);
+
+ return content;
+ }
+
+ renderThemeSetting(setting) {
+ const defaultValue = setting.value;
+
+ switch (setting.type) {
+ case 'select':
+ return ui.select(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'toggle':
+ return ui.toggle(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'colorswatch':
+ return ui.colorSwatch(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'colorpicker':
+ return ui.colorPicker(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'slider':
+ return ui.slider(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'page':
+ return ui.page(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'chunk':
+ return ui.chunk(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'tagger':
+ return ui.tagger(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'image':
+ return ui.image(setting, defaultValue, this.setThemeSettingWithEmitter);
+ case 'file': {
+ return ui.file(setting, defaultValue, this.setThemeSettingWithEmitter);
+ }
+ case 'folder': {
+ return ui.folder(setting, defaultValue, this.setThemeSettingWithEmitter);
+ }
+ case 'togglegroup':
+ case 'checkbox':
+ return ui.toggleGroup(setting, defaultValue, this.setMultiThemeSettingWithEmitter);
+ case 'textarea':
+ return ui.area(setting, defaultValue, this.setThemeSettingWithEmitter);
+ default:
+ return ui.text(setting, defaultValue, this.setThemeSettingWithEmitter);
+ }
+ }
+
getTaggerFields() {
const taggerList = dl();
@@ -299,6 +420,11 @@ export default class PageSettings extends SidebarPlugin {
}
}
+ setThemeSetting(name, value) {
+ fredConfig.setThemeSettingValue(name, value);
+ emitter.emit('fred-content-changed');
+ }
+
getSetting(name, namespace = null) {
if (namespace) {
if (!this.pageSettings[namespace]) this.pageSettings[namespace] = {};
@@ -309,6 +435,27 @@ export default class PageSettings extends SidebarPlugin {
}
}
+ setThemeSettingWithEmitter(name, value, input) {
+ this.setThemeSetting(name, value);
+
+ emitter.emit('fred-theme-setting-change', name, value, valueParser(value), input);
+ }
+
+ setMultiThemeSettingWithEmitter(name, value, input) {
+ let oValue = this.themeSettings[name];
+ oValue = (oValue) ? oValue.split('||') : [];
+ let nValue = [value];
+ oValue.forEach((ov) => {
+ if(value !== ov){
+ nValue.push(ov);
+ }
+ });
+ nValue = this.trim(nValue.join('||'), '|');
+ this.setThemeSetting(name, nValue);
+
+ emitter.emit('fred-theme-setting-change', name, value, valueParser(value), input);
+ }
+
setSettingWithEmitter(name, value, input) {
this.setSetting(name, value);
diff --git a/_build/assets/js/Config.js b/_build/assets/js/Config.js
index 19ade7bf..cf33c9c9 100644
--- a/_build/assets/js/Config.js
+++ b/_build/assets/js/Config.js
@@ -1,4 +1,5 @@
import fredEditors from './Editors';
+import {valueParser} from "./Utils";
class Config {
constructor() {
@@ -9,6 +10,10 @@ class Config {
this._toolbarPlugins = {};
this._pluginsData = {};
this._pageSettings = {};
+ this._allThemeSettings = {};
+ this._themeSettings = {};
+ this._indexedThemeSettings = {};
+ this._cache = {};
this._tagger = [];
this._tvs = [];
this._lang = {};
@@ -34,6 +39,29 @@ class Config {
this._pageSettings = pageSettings;
}
+ set allThemeSettings(allThemeSettings) {
+ if (!allThemeSettings || Array.isArray(allThemeSettings)) {
+ allThemeSettings = {};
+ }
+
+ this._allThemeSettings = allThemeSettings;
+ }
+
+ set themeSettings(themeSettings) {
+ this._themeSettings = themeSettings;
+ delete this._cache['themeSettings'];
+ for (const setting of this._themeSettings) {
+ if (setting['group'] !== undefined && setting['settings'] !== undefined) {
+ for (const groupSetting of setting['settings']) {
+ this._indexedThemeSettings[groupSetting['name']] = groupSetting;
+ }
+ continue;
+ }
+
+ this._indexedThemeSettings[setting['name']] = setting;
+ }
+ }
+
set tagger(tagger) {
this._tagger = tagger;
}
@@ -120,6 +148,14 @@ class Config {
return this._pageSettings;
}
+ get themeSettings() {
+ return this._themeSettings;
+ }
+
+ get allThemeSettings() {
+ return this._allThemeSettings;
+ }
+
get fred() {
return this._fred;
}
@@ -236,6 +272,102 @@ class Config {
lngExists(key) {
return this._lang[key] !== undefined;
}
+
+ themeSettingsExists(name) {
+ return this._indexedThemeSettings[name] !== undefined;
+ }
+
+ getThemeSettingValue(name) {
+ return this._indexedThemeSettings[name]?.value || undefined;
+ }
+
+ setThemeSettingValue(name, value) {
+ if (!this._indexedThemeSettings[name]) return;
+
+ delete this._cache['themeSettings'];
+ this._indexedThemeSettings[name].value = value;
+ }
+
+ getEditableThemeSettingsMap(parseValue = false, parseModx= false, cleanRender= false) {
+ const cacheKey = `editable-${+parseValue}${+parseModx}${+cleanRender}`;
+
+ if (this._cache['themeSettings']?.[cacheKey]) {
+ return this._cache['themeSettings'][cacheKey];
+ }
+
+ if (!this._cache['themeSettings']) {
+ this._cache['themeSettings'] = {};
+ }
+
+ this._cache['themeSettings'][cacheKey] = Object.values(this._indexedThemeSettings).reduce((acc, item) => {
+ if (!parseValue) {
+ acc[item.name] = item.value;
+ } else {
+ if (cleanRender === true) {
+ if (parseModx === true) {
+ acc[item.name] = valueParser(item.value, false);
+ } else {
+ acc[item.name] = `[[++${this.config.themeSettingsPrefix}.setting.${item.name}]]`;
+ }
+ } else {
+ acc[item.name] = valueParser(item.value, false);
+ }
+ }
+ return acc;
+ }, {});
+
+
+ return this._cache['themeSettings'][cacheKey];
+ }
+
+ getThemeSettingsMap(parseValue = false, parseModx= false, cleanRender= false) {
+ const cacheKey = `all-${+parseValue}${+parseModx}${+cleanRender}`;
+
+ if (this._cache['themeSettings']?.[cacheKey]) {
+ return this._cache['themeSettings'][cacheKey];
+ }
+
+ const allSettings = Object.entries(this._allThemeSettings).reduce((acc, [name, value]) => {
+ if (!parseValue) {
+ acc[name] = value;
+ } else {
+ if (cleanRender === true) {
+ if (parseModx === true) {
+ acc[name] = valueParser(value, false);
+ } else {
+ acc[name] = `[[++${this.config.themeSettingsPrefix}.setting.${name}]]`;
+ }
+ } else {
+ acc[name] = valueParser(value, false);
+ }
+ }
+ return acc;
+ }, {});
+
+ if (!this._cache['themeSettings']) {
+ this._cache['themeSettings'] = {};
+ }
+
+ this._cache['themeSettings'][cacheKey] = Object.values(this._indexedThemeSettings).reduce((acc, item) => {
+ if (!parseValue) {
+ acc[item.name] = item.value;
+ } else {
+ if (cleanRender === true) {
+ if (parseModx === true) {
+ acc[item.name] = item.raw;
+ } else {
+ acc[item.name] = `[[++${this.config.themeSettingsPrefix}.setting.${item.name}]]`;
+ }
+ } else {
+ acc[item.name] = item.raw;
+ }
+ }
+ return acc;
+ }, allSettings);
+
+
+ return this._cache['themeSettings'][cacheKey];
+ }
}
const config = new Config();
diff --git a/_build/assets/js/Content/Element.js b/_build/assets/js/Content/Element.js
index f41a36f3..319d2c45 100644
--- a/_build/assets/js/Content/Element.js
+++ b/_build/assets/js/Content/Element.js
@@ -23,6 +23,7 @@ export class Element {
this.wrapper = null;
this.invalidTheme = this.el.dataset.invalidTheme === 'true';
this.renderOn = [];
+ this.usedThemeSettings = {};
this.setUpRenderOn();
if (!elId) {
@@ -88,11 +89,17 @@ export class Element {
this.dzs = {};
this.inEditor = false;
- emitter.on('fred-page-setting-change', (setting, value, rawValue, el) => {
+ emitter.on('fred-page-setting-change', (setting) => {
if (this.renderOn.indexOf(setting) !== -1) {
this.render(true, false);
}
});
+
+ emitter.on('fred-theme-setting-change', (setting) => {
+ if (this.usedThemeSettings[setting]) {
+ this.render(true, false);
+ }
+ });
}
static fromMarkup(data, markup, dropzone) {
@@ -150,6 +157,13 @@ export class Element {
) {
this.renderOn.push(element);
}
+
+ if (element.startsWith(`setting.`)) {
+ const themeElement = element.replace(`setting.`, '');
+ if (this.usedThemeSettings[themeElement] === undefined && fredConfig.themeSettingsExists(themeElement)) {
+ this.usedThemeSettings[themeElement] = true;
+ }
+ }
});
this.el.elementMarkup.replace(/data-fred-target="([^"]+)"/g, (match, p1) => {
// if renderOn contains match then remove it
@@ -835,13 +849,16 @@ export class Element {
settings = this.parsedSettings;
}
- return this.template.render({...settings, ...(getTemplateSettings(cleanRender && !isPreview)), id: this.elId});
+ const themeSettings = {theme_setting: fredConfig.getThemeSettingsMap(true, parseModx, cleanRender)};
+
+ return this.template.render({...settings, ...(getTemplateSettings(cleanRender && !isPreview)), ...themeSettings, id: this.elId});
}
remoteTemplateRender(parseModx = true, cleanRender = false, isPreview = false, refreshCache = false) {
const cacheOutput = this.options.cacheOutput === true;
+ const themeSettings = {theme_setting: fredConfig.getThemeSettingsMap()}
- return renderElement(this.id, {...(cleanRender ? this.parsedSettingsClean : this.parsedSettings), ...(getTemplateSettings(cleanRender && !isPreview)), id: this.elId}, parseModx, cacheOutput, refreshCache).then(json => {
+ return renderElement(this.id, {...(cleanRender ? this.parsedSettingsClean : this.parsedSettings), ...(getTemplateSettings(cleanRender && !isPreview)), ...themeSettings, id: this.elId}, parseModx, cacheOutput, refreshCache).then(json => {
const html = twig({data: json.data.html}).render(getTemplateSettings(cleanRender && !isPreview));
this.setEl(html);
diff --git a/_build/assets/js/UI/Inputs.ts b/_build/assets/js/UI/Inputs.ts
index f7853fbd..bae9ff45 100644
--- a/_build/assets/js/UI/Inputs.ts
+++ b/_build/assets/js/UI/Inputs.ts
@@ -512,7 +512,7 @@ export const slider = (
}
const slider = noUiSlider.create(sliderEl, {
- start: defaultValue,
+ start: defaultValue ?? setting.value ?? setting.min,
connect: [true, false],
tooltips: {
to: value => {
diff --git a/_build/assets/js/Utils.js b/_build/assets/js/Utils.js
index b9e572c0..396083d4 100644
--- a/_build/assets/js/Utils.js
+++ b/_build/assets/js/Utils.js
@@ -261,7 +261,7 @@ export const getTemplateSettings = (cleanRender = false) => {
}
return {
...pageSettings,
- theme_dir: '{{theme_dir}}',
+ theme_dir: cleanRender ? `[[++${fredConfig.config.themeSettingsPrefix}.theme_dir]]` : fredConfig.config.themeDir,
template: {
theme_dir: cleanRender ? `[[++${fredConfig.config.themeSettingsPrefix}.theme_dir]]` : fredConfig.config.themeDir
},
diff --git a/_build/assets/js/index.js b/_build/assets/js/index.js
index 1a46013f..abceba4c 100644
--- a/_build/assets/js/index.js
+++ b/_build/assets/js/index.js
@@ -31,6 +31,12 @@ export default class Fred {
fredConfig.resource = config.resource;
delete config.resource;
+ fredConfig.themeSettings = config.themeSettings;
+ delete config.themeSettings;
+
+ fredConfig.allThemeSettings = config.allThemeSettings;
+ delete config.allThemeSettings;
+
fredConfig.config = config || {};
fredConfig.fred = this;
this.loading = null;
@@ -57,9 +63,15 @@ export default class Fred {
});
}
+ getConfig() {
+ return fredConfig;
+ }
+
render() {
this.wrapper = div(['fred']);
-
+ if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
+ this.wrapper.classList.add('fred--safari');
+ }
document.body.appendChild(this.wrapper);
}
@@ -211,6 +223,7 @@ export default class Fred {
body.data = data;
body.plugins = fredConfig.pluginsData;
body.pageSettings = JSON.parse(JSON.stringify(fredConfig.pageSettings));
+ body.themeSettings = JSON.parse(JSON.stringify(fredConfig.getEditableThemeSettingsMap()));
body.fingerprint = this.fingerprint;
if (body.pageSettings.tvs) {
diff --git a/_build/assets/sass/_panels.scss b/_build/assets/sass/_panels.scss
index d9b4ab9b..b04283e4 100644
--- a/_build/assets/sass/_panels.scss
+++ b/_build/assets/sass/_panels.scss
@@ -118,26 +118,3 @@
height: initial;
}
}
-//Safari Fixes
-@media not all and (min-resolution:.001dpcm)
-{ @supports (-webkit-appearance:none) {
-
- .fred--panel {
- overflow-y: auto;
- }
- .fred--panel dl:last-of-type dt:last-of-type.active{
- margin-bottom: 0;
- }
- .fred--panel dd dl dt{
- &.active + dd{
- position: relative;
- left: 0;
- margin-bottom: 18px;
- }
- & + dd{
- height: auto !important;
- width: 260px !important;
- transition: 0s;
- }
- }
-}}
diff --git a/_build/assets/sass/_safari.scss b/_build/assets/sass/_safari.scss
new file mode 100644
index 00000000..63f18cff
--- /dev/null
+++ b/_build/assets/sass/_safari.scss
@@ -0,0 +1,39 @@
+.fred.fred--safari {
+ /** Panel **/
+ .fred--panel {
+ overflow-y: auto;
+ }
+ .fred--panel dl:last-of-type dt:last-of-type.active{
+ margin-bottom: 0;
+ }
+ .fred--panel dd dl dt{
+ &.active + dd{
+ position: relative;
+ left: 0;
+ margin-bottom: 18px;
+ }
+ & + dd{
+ height: auto !important;
+ width: 260px !important;
+ transition: 0s;
+ }
+ }
+ /** Sidebar **/
+ .fred--sidebar {
+ overflow-y: visible;
+ }
+ .fred--accordion dd{
+ overflow: auto;
+ }
+ .fred--accordion dd dl dt{
+ &.active + dd{
+ position: relative;
+ left: 0;
+ }
+ & + dd{
+ height: auto !important;
+ width: 260px !important;
+ transition: 0s;
+ }
+ }
+}
diff --git a/_build/assets/sass/_sidebar.scss b/_build/assets/sass/_sidebar.scss
index 0f6d732e..63e7b259 100644
--- a/_build/assets/sass/_sidebar.scss
+++ b/_build/assets/sass/_sidebar.scss
@@ -412,6 +412,12 @@
+ dd {
transition: .001s;
transition-delay: .3s;
+ dl {
+ dt {
+ background-color: $offwhite;
+ margin-top: 10px;
+ }
+ }
}
&.active {
+ dd {
@@ -428,6 +434,32 @@
transition: $timing;
transition-delay: .001s;
z-index: 99;
+ dl {
+ dt {
+ &.active {
+ + dd {
+ margin-top: 16px;
+ height: auto;
+ max-height: 9999px;
+ position: relative;
+ left: 0;
+ }
+ }
+ }
+ }
+ }
+ }
+ + dd {
+ dl {
+ dt {
+ + dd {
+ max-height: 0;
+ position: relative;
+ transition-delay: 0s;
+ left: 0;
+ width: 280px;
+ }
+ }
}
}
&:hover:not(:focus) {
@@ -466,6 +498,7 @@
border-left: 1px solid rgba($black, .25);
margin: 0 0 0 20px;
transition: $timing left;
+ max-width: calc(100% - 20px);
&:not(.fred--hidden){
position: relative;
left: 0;
@@ -533,28 +566,6 @@
}
}
}
-//Safari Fixes
-@media not all and (min-resolution:.001dpcm)
-{ @supports (-webkit-appearance:none) {
-
- .fred--sidebar {
- overflow-y: visible;
- }
- .fred--accordion dd{
- overflow: auto;
- }
- .fred--accordion dd dl dt{
- &.active + dd{
- position: relative;
- left: 0;
- }
- & + dd{
- height: auto !important;
- width: 260px !important;
- transition: 0s;
- }
- }
-}}
@keyframes fred--fadein {
0% {
opacity: 0;
diff --git a/_build/assets/sass/fred.scss b/_build/assets/sass/fred.scss
index 8e4479bd..3ff1e56d 100644
--- a/_build/assets/sass/fred.scss
+++ b/_build/assets/sass/fred.scss
@@ -37,3 +37,4 @@
@import "dropzone";
@import "buttons";
@import "body";
+@import "safari";
diff --git a/_build/config.json b/_build/config.json
index d83b8aed..58c54f75 100644
--- a/_build/config.json
+++ b/_build/config.json
@@ -3,7 +3,7 @@
"lowCaseName": "fred",
"description": "Frontend Editor",
"author": "John Peca",
- "version": "3.0.2-pl",
+ "version": "3.1.0-pl",
"package": {
"menus": [
{
diff --git a/_build/gpm.json b/_build/gpm.json
index 3aec5872..ee258b1e 100644
--- a/_build/gpm.json
+++ b/_build/gpm.json
@@ -3,7 +3,7 @@
"lowCaseName": "fred",
"description": "Frontend Editor",
"author": "John Peca",
- "version": "3.0.1-pl",
+ "version": "3.1.0-pl",
"menus": [
{
"text": "fred.menu.fred",
diff --git a/_static/notify.html b/_static/notify.html
index 270318fe..178f38bd 100644
--- a/_static/notify.html
+++ b/_static/notify.html
@@ -265,7 +265,7 @@ Sub-page (16)
Text and Image
Click on the image to edit it.
-
@@ -432,4 +432,4 @@ Sub-page (16)