From 0368ba427885d0f999601a907ca3b99975a6f4ca Mon Sep 17 00:00:00 2001 From: Bastien OLLIER Date: Tue, 14 May 2024 16:23:07 +0200 Subject: [PATCH] Change editor layout (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: bastien ollier Co-authored-by: clfreville2 Reviewed-on: https://codefirst.iut.uca.fr/git/sandkasten/sandkasten-web/pulls/8 Reviewed-by: Clément FRÉVILLE Co-authored-by: Bastien OLLIER Co-committed-by: Bastien OLLIER --- package-lock.json | 6 +- .../components/editor/editor.component.html | 131 +++++++++++++----- .../components/editor/editor.component.scss | 76 +++++++++- src/styles.scss | 9 ++ 4 files changed, 184 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 869e044..46698d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -436,9 +436,9 @@ } }, "node_modules/@angular/cdk": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.1.1.tgz", - "integrity": "sha512-Q5qC6VUyT7N/hj8eETdh0bkmBmsXm0JZikhXdBvcDUl8yPbhMPKQCkx4UJzBrZJg/+78XyI9FI/q8w/yQAJZJA==", + "version": "17.3.8", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.3.8.tgz", + "integrity": "sha512-9UQovtq1R3iGppBP6c1xgnokhG3LaUObpm6htMyuQ2v034WinemoeMdHbqs/OvyUbqOUttQI/9vz37TVB0DjXA==", "dependencies": { "tslib": "^2.3.0" }, diff --git a/src/app/components/editor/editor.component.html b/src/app/components/editor/editor.component.html index 4ae2c11..df54939 100644 --- a/src/app/components/editor/editor.component.html +++ b/src/app/components/editor/editor.component.html @@ -1,40 +1,107 @@ -
-
- -
- -

+
+
+
+
+ + +
-
- - - - -
- -
- -
- + -
- - +
+ +
+
-
- -
- @if (errorMessage) { -
-

{{ errorMessage }}

+
+
+ +
- } +
+

+    
+
diff --git a/src/app/components/editor/editor.component.scss b/src/app/components/editor/editor.component.scss index 4c38e51..0836334 100644 --- a/src/app/components/editor/editor.component.scss +++ b/src/app/components/editor/editor.component.scss @@ -1,4 +1,74 @@ -.ngx-codemirror { - border: 1px solid #060202; - padding-top: 10px; +#editor-bar-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px; + color: #fff; +} + +.editor-section-bar-header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1rem; +} + +.button-icon { + border: 0; + background: transparent; + cursor: pointer; +} + +svg { + width: 30px; + height: auto; + aspect-ratio: 1; + cursor: pointer; +} + +.button-run { + display: flex; + align-items: center; + justify-content: space-between; + background-color: #04aa6d; + border: none; + color: white; + padding: 12px 16px; + font-size: 16px; + width: 100px; + cursor: pointer; + border-radius: 10px; +} + +select { + background-color: #0000f0; + border: none; + color: white; + padding: 12px 16px; + font-size: 16px; + cursor: pointer; + border-radius: 10px; +} + +/*editor*/ + +.editor-center { + height: 700px; + display: flex; + align-items: center; + justify-content: space-between; + margin: 0px 0px 0px 0px; +} + +.editor-child-element { + min-height: 100px; + height: 100%; + width: 1000px; + background-color: black; + color: #fff; + border-right: 10px solid gray; +} + +::ng-deep .codemirror6-editor { + height: 100%; } diff --git a/src/styles.scss b/src/styles.scss index d8fabd4..2279bae 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -17,3 +17,12 @@ body { overflow: hidden; } } + +html, +body { + height: 100%; +} +body { + margin: 0; + font-family: Roboto, 'Helvetica Neue', sans-serif; +}