Web Maker v2.8.1
diff --git a/src/script.js b/src/script.js
index d896bb2..518629e 100644
--- a/src/script.js
+++ b/src/script.js
@@ -6,7 +6,7 @@ notificationsModal, notificationsBtn, codepenBtn, saveHtmlBtn, saveBtn, settings
onboardModal, settingsModal, notificationsBtn, onboardShowInTabOptionBtn, editorThemeLinkTag,
onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl, indentationSizeValueEl,
runBtn, searchInput, consoleEl, consoleLogEl, logCountEl, fontStyleTag, fontStyleTemplate,
-customEditorFontInput
+customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea
*/
/* eslint-disable no-extra-semi */
(function(alertsService) {
@@ -95,7 +95,8 @@ customEditorFontInput
cmPath: 'css',
cmMode: 'css',
codepenVal: 'notsupported',
- cmDisable: true
+ cmDisable: true,
+ hasSettings: true
};
const AUTO_SAVE_INTERVAL = 15000; // 15 seconds
@@ -369,6 +370,9 @@ customEditorFontInput
currentItem.htmlMode = htmlMode;
currentItem.cssMode = cssMode;
currentItem.jsMode = jsMode;
+ currentItem.cssSettings = {
+ acssConfig: scope.acssSettingsCm.getValue()
+ };
currentItem.updatedOn = Date.now();
currentItem.layoutMode = currentLayoutMode;
currentItem.externalLibs = {
@@ -592,6 +596,11 @@ customEditorFontInput
scope.cm.css.refresh();
scope.cm.js.refresh();
+ scope.acssSettingsCm.setValue(
+ currentItem.cssSettings ? currentItem.cssSettings.acssConfig : ''
+ );
+ scope.acssSettingsCm.refresh();
+
scope.clearConsole();
// To have the library count updated
@@ -614,6 +623,7 @@ customEditorFontInput
addLibraryModal.classList.remove('is-modal-visible');
onboardModal.classList.remove('is-modal-visible');
settingsModal.classList.remove('is-modal-visible');
+ cssSettingsModal.classList.remove('is-modal-visible');
toggleSavedItemsPane(false);
document.dispatchEvent(new Event('overlaysClosed'));
}
@@ -681,6 +691,9 @@ customEditorFontInput
cssModelLabel.parentElement.querySelector('select').value = value;
scope.cm.css.setOption('mode', modes[value].cmMode);
scope.cm.css.setOption('readOnly', modes[value].cmDisable);
+ cssSettingsBtn.classList[modes[value].hasSettings ? 'remove' : 'add'](
+ 'hide'
+ );
CodeMirror.autoLoadMode(
scope.cm.css,
modes[value].cmPath || modes[value].cmMode
@@ -770,7 +783,15 @@ customEditorFontInput
} else if (cssMode === CssModes.ACSS) {
const html = scope.cm.html.getValue();
const foundClasses = atomizer.findClassNames(html);
- const finalConfig = atomizer.getConfig(foundClasses, {});
+ var finalConfig;
+ try {
+ finalConfig = atomizer.getConfig(
+ foundClasses,
+ JSON.parse(scope.acssSettingsCm.getValue())
+ );
+ } catch (e) {
+ finalConfig = atomizer.getConfig(foundClasses, {});
+ }
const acss = atomizer.getCss(finalConfig);
scope.cm.css.setValue(acss);
d.resolve(acss);
@@ -1046,7 +1067,7 @@ customEditorFontInput
}
scope.setPreviewContent = function(isForced) {
- if( !prefs.preserveConsoleLogs ) {
+ if (!prefs.preserveConsoleLogs) {
scope.clearConsole();
}
@@ -1832,6 +1853,10 @@ customEditorFontInput
var intervalID = window.setInterval(checkWindow, 500);
};
+ scope.openCssSettingsModal = function() {
+ scope.toggleModal(cssSettingsModal);
+ };
+
function init() {
var lastCode;
@@ -2270,6 +2295,13 @@ customEditorFontInput
}
);
+ scope.acssSettingsCm = CodeMirror.fromTextArea(acssSettingsTextarea, {
+ mode: 'json'
+ });
+ scope.acssSettingsCm.on('blur', () => {
+ scope.setPreviewContent(true);
+ });
+
var options = '';
[
'3024-day',
From 02c32a3eaac107a095968acd54e5d72766c23fe4 Mon Sep 17 00:00:00 2001
From: Kushagra Gour
Date: Wed, 13 Sep 2017 00:15:35 +0530
Subject: [PATCH 08/26] set same theme on acss config codemirror
---
src/script.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/script.js b/src/script.js
index 518629e..c7d4eec 100644
--- a/src/script.js
+++ b/src/script.js
@@ -1690,6 +1690,10 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea
scope.cm[type].refresh();
});
scope.consoleCm.setOption('theme', $('[data-setting=editorTheme]').value);
+ scope.acssSettingsCm.setOption(
+ 'theme',
+ $('[data-setting=editorTheme]').value
+ );
if (prefs.autoSave) {
if (!autoSaveInterval) {
autoSaveInterval = setInterval(autoSaveLoop, AUTO_SAVE_INTERVAL);
@@ -2296,7 +2300,7 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea
);
scope.acssSettingsCm = CodeMirror.fromTextArea(acssSettingsTextarea, {
- mode: 'json'
+ mode: 'application/ld+json'
});
scope.acssSettingsCm.on('blur', () => {
scope.setPreviewContent(true);
From 6232d7a12cdf0b4cf1ce1cf674db29cde237a48f Mon Sep 17 00:00:00 2001
From: jlapitan
Date: Thu, 14 Sep 2017 15:09:37 +0400
Subject: [PATCH 09/26] add bootstrap 4 beta library
---
src/library-list.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/library-list.js b/src/library-list.js
index e19b6d4..dd7172a 100644
--- a/src/library-list.js
+++ b/src/library-list.js
@@ -15,6 +15,13 @@ window.jsLibs = [
label: 'Bootstrap 4α',
type: 'js'
},
+ {
+ url:
+ 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js',
+ label: 'Bootstrap 4β',
+ type: 'js'
+ },
+
{
url:
'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/js/foundation.min.js',
@@ -87,6 +94,12 @@ window.cssLibs = [
label: 'Bootstrap 4α',
type: 'css'
},
+ {
+ url:
+ 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css',
+ label: 'Bootstrap 4β',
+ type: 'css'
+ },
{
url: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.2/css/bulma.min.css',
label: 'Bulma',
From 6494b4ccda78e0d2f14efcbfb59e566970aec00f Mon Sep 17 00:00:00 2001
From: jlapitan
Date: Thu, 14 Sep 2017 15:16:20 +0400
Subject: [PATCH 10/26] fix trailing space
---
src/library-list.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/library-list.js b/src/library-list.js
index dd7172a..bb46cc9 100644
--- a/src/library-list.js
+++ b/src/library-list.js
@@ -21,7 +21,6 @@ window.jsLibs = [
label: 'Bootstrap 4β',
type: 'js'
},
-
{
url:
'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/js/foundation.min.js',
From a8ec36cc49e899a08206fe90dcf675309d09cfc4 Mon Sep 17 00:00:00 2001
From: May Kittens Devour Your Soul
Date: Fri, 15 Sep 2017 10:16:22 +0200
Subject: [PATCH 11/26] Update library-list.js
* updated foundation | bulma
* updated vue | react | d3
* removed bootstrap alpha in favor of bootstrap beta (in another pull request already)
* added Semantic UI as requested in #189
---
src/library-list.js | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/src/library-list.js b/src/library-list.js
index e19b6d4..88216e7 100644
--- a/src/library-list.js
+++ b/src/library-list.js
@@ -11,14 +11,14 @@ window.jsLibs = [
},
{
url:
- 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js',
- label: 'Bootstrap 4α',
+ 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/js/foundation.min.js',
+ label: 'Foundation',
type: 'js'
},
{
url:
- 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/js/foundation.min.js',
- label: 'Foundation',
+ 'https://semantic-ui.com/dist/semantic.min.js',
+ label: 'Semantic UI',
type: 'js'
},
{
@@ -32,12 +32,12 @@ window.jsLibs = [
type: 'js'
},
{
- url: 'https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react-dom.min.js',
+ url: 'https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.min.js',
label: 'React DOM',
type: 'js'
},
{
- url: 'https://unpkg.com/vue@2.4.2/dist/vue.min.js',
+ url: 'https://unpkg.com/vue@2.4.4/dist/vue.min.js',
label: 'Vue.js',
type: 'js'
},
@@ -47,7 +47,7 @@ window.jsLibs = [
type: 'js'
},
{
- url: 'https://cdnjs.cloudflare.com/ajax/libs/d3/4.9.1/d3.min.js',
+ url: 'https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.2/d3.min.js',
label: 'D3',
type: 'js'
},
@@ -69,7 +69,7 @@ window.jsLibs = [
},
{
url:
- 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/js/uikit.min.js',
+ 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/js/uikit.min.js',
label: 'UIkit 3',
type: 'js'
}
@@ -82,19 +82,13 @@ window.cssLibs = [
type: 'css'
},
{
- url:
- 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css',
- label: 'Bootstrap 4α',
- type: 'css'
- },
- {
- url: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.2/css/bulma.min.css',
+ url: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.2/css/bulma.min.css',
label: 'Bulma',
type: 'css'
},
{
url:
- 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/css/foundation.min.css',
+ 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/css/foundation.min.css',
label: 'Foundation',
type: 'css'
},
@@ -103,6 +97,11 @@ window.cssLibs = [
label: 'Hint.css',
type: 'css'
},
+ {
+ url:'https://semantic-ui.com/dist/semantic.min.css',
+ label: 'Semantic UI',
+ type: 'css'
+ },
{
url:
'https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.4/css/uikit.min.css',
@@ -111,7 +110,7 @@ window.cssLibs = [
},
{
url:
- 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/css/uikit.min.css',
+ 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/css/uikit.min.css',
label: 'UIkit 3',
type: 'css'
},
From eb1cd50ebbb78d74a326d7ccc63403c5bc25ff9a Mon Sep 17 00:00:00 2001
From: Kushagra Gour
Date: Sat, 16 Sep 2017 16:56:03 +0530
Subject: [PATCH 12/26] refactor code for light version mode. fixes #172
---
src/index.html | 8 ++++----
src/script.js | 8 ++++----
src/style.css | 3 ++-
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/index.html b/src/index.html
index db4c0fe..bcda82d 100644
--- a/src/index.html
+++ b/src/index.html
@@ -460,7 +460,7 @@
-