diff --git a/base-components/codemirror/footHtml/Codemirror styles.html b/base-components/codemirror/footHtml/Codemirror styles.html index f5ab220..bf763e6 100644 --- a/base-components/codemirror/footHtml/Codemirror styles.html +++ b/base-components/codemirror/footHtml/Codemirror styles.html @@ -1,2 +1,2 @@ - - \ No newline at end of file + + \ No newline at end of file diff --git a/components/1-styling/componentCss/fullscreen-editors.css b/components/1-styling/componentCss/fullscreen-editors.css new file mode 100644 index 0000000..3be2028 --- /dev/null +++ b/components/1-styling/componentCss/fullscreen-editors.css @@ -0,0 +1,43 @@ +body:has(.simplycode-editor-code :focus) { + overflow: hidden; +} +.simplycode-editors:not(.simplycode-dual) .simplycode-editor-code:has(:focus) { + position: fixed; + top: 65px; + bottom: 0; + left: 0; + right: 0; + z-index: 100; + display: flex !important; + flex-direction: column; +} +.simplycode-editors:not(.simplycode-dual) .simplycode-editor-code:has(:focus) .CodeMirror { + flex-grow: 1; +} +.simplycode-editors.simplycode-dual:has(.simplycode-editor-code :focus) { + position: fixed; + top: 65px; + bottom: 0; + left: 0; + right: 0; + z-index: 100; + display: flex !important; + flex-direction: column; +} +.simplycode-editors:not(.simplycode-dual) .simplycode-editor-code.simplycode-dual:has(:focus):has(.CodeMirror ~ .CodeMirror) { + flex-direction: row; +} +.simplycode-editors.simplycode-dual:has(.simplycode-editor-code :focus) .simplycode-previews { + display: none; +} +.simplycode-editors.simplycode-dual:has(.simplycode-editor-code :focus) .simplycode-editor-code { + flex-grow: 1; + height: 100%; +} +.simplycode-editors:not(.simplycode-dual) .simplycode-editor-code.simplycode-dual:has(:focus) .CodeMirror, +.simplycode-editors.simplycode-dual:has(.simplycode-editor-code :focus) .CodeMirror { + height: 100%; +} +.simplycode-html { + grid-column: span 2 / span 2; +} \ No newline at end of file diff --git a/components/1-styling/componentCss/style.css b/components/1-styling/componentCss/style.css index 1d6d1b8..32c64ff 100644 --- a/components/1-styling/componentCss/style.css +++ b/components/1-styling/componentCss/style.css @@ -177,6 +177,8 @@ nav > ul > li[data-simply-command=expandMenu]::before { } .simplycode-part .simplycode-dual { display: grid; + grid-template-areas: "left right" + "footer footer"; grid-template-columns: 1fr 1fr; } .simplycode-part .simplycode-dual-preview { diff --git a/components/component-component-html/commands/tests/addComponentTemplate/testAddComponentTemplate.js b/components/component-component-html/commands/tests/addComponentTemplate/testAddComponentTemplate.js new file mode 100644 index 0000000..dd8fb51 --- /dev/null +++ b/components/component-component-html/commands/tests/addComponentTemplate/testAddComponentTemplate.js @@ -0,0 +1,17 @@ +function(assert) { + editor = { + "pageData" : { + "component" : { + "parts" : { + "componentTemplates" : [] + } + } + } + }; + + assert.equal(editor.pageData.component.parts.componentTemplates.length, 0); + commands.addComponentTemplate(); + assert.equal(editor.pageData.component.parts.componentTemplates.length, 1); + commands.addComponentTemplate(); + assert.equal(editor.pageData.component.parts.componentTemplates.length, 2); +} \ No newline at end of file diff --git a/components/component-page-template/componentTemplates/componentPageTemplate.html b/components/component-page-template/componentTemplates/componentPageTemplate.html index 42ee026..882eaa2 100644 --- a/components/component-page-template/componentTemplates/componentPageTemplate.html +++ b/components/component-page-template/componentTemplates/componentPageTemplate.html @@ -39,8 +39,8 @@