diff --git a/src/css/custom.css b/src/css/custom.css index fc2716e1f..386aeb587 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -30,6 +30,7 @@ --ifm-task-complete-color: #2e9e32e1; --ifm-task-incomplete-color: #3d78cbe1; --ifm-bg-color: #f8f9fa; + --image-filter:invert(0); --site-color-svg-icon-favorite: #ff1100cb; } @@ -45,6 +46,7 @@ --ifm-task-complete-color: #25c2a0; --ifm-task-incomplete-color: #3d78cbe1; --ifm-bg-color: #1a202c; + --image-filter:invert(1); --site-color-svg-icon-favorite: #ff9100e5; } diff --git a/src/pages/LiveEditor/BasicEditor.tsx b/src/pages/LiveEditor/BasicEditor.tsx index af316856f..d61df6052 100644 --- a/src/pages/LiveEditor/BasicEditor.tsx +++ b/src/pages/LiveEditor/BasicEditor.tsx @@ -1,7 +1,8 @@ import React, { useEffect, useState, useRef } from 'react'; +import style from '../../components/BrowserWindow/BrowserWindow.module.css'; -const BasicEditor: React.FC = () => { - const [checker, setChecker] = useState({ html: true, css: false, js: false }); +const BasicEditor= () => { + const [checker, setChecker] = useState({ html: true, css: false, js: false,settings:false,fontSize:10,fontColor:false,backcolor:false }); const [html, setHtml] = useState(""); const [css, setCss] = useState(""); const [js, setJs] = useState(""); @@ -47,11 +48,57 @@ const BasicEditor: React.FC = () => { - - - +
+
+
+

Font Size

+ +

{checker.fontSize}

+ +
+
+

color

+ setChecker(pre=>({...pre,fontColor:e.target.value}))} + /> +
+
+

Bakcground color

+ setChecker(pre=>({...pre,backcolor:e.target.value}))} + /> +
+
+
+ setChecker(pre => ({...pre, settings: !pre.settings}))} alt='settings'/> +
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
- + + +
); } diff --git a/src/pages/LiveEditor/index.css b/src/pages/LiveEditor/index.css index db23b8e8c..d45cbc4ed 100644 --- a/src/pages/LiveEditor/index.css +++ b/src/pages/LiveEditor/index.css @@ -5,11 +5,12 @@ .editor_container{flex:1 0 20rem;display:flex;gap:1rem;justify-content:center;align-items:center;position:relative;padding:3rem;cursor:pointer} .editor_container:hover{border: 1px solid;} .normal_editor{display: flex;flex-wrap: wrap;justify-content: center;align-items: center;width:100vw} -.normal_editor .editor_box,.normal_editor .output_container{ +.normal_editor .editor_box{ flex: 1 0 30rem; height: 35rem; position:relative; } +.normal_editor .output_container{height: 32.3rem;width: 100%;} .normal_editor .output_container{background: white;} .editor_box .editor_nav{position: absolute;z-index: 2;gap: 1rem;display: flex;top: 2%;justify-content: center;align-items: center;right: 1%;} .editor_nav .btn_activated{padding: 0.3rem 1rem;border: none;font-family: monospace;font-weight: 600;cursor: pointer;} @@ -17,12 +18,21 @@ .editor_nav .css{background:rgb(2,119,189);color: white;} .editor_nav .js{background:rgb(255,214,0);color: rgb(0, 0, 0);} .editor_nav .btn_deactivated{display: none;} +.editor_settings_nav{position: absolute;bottom: 1%;right: 1%;} +.editor_settings_nav img{height: 1.5rem;cursor: pointer;filter: var(--image-filter);} +.editor_settings_nav .editor_setting_icon{display: flex;justify-content: flex-end;} +.editor_settings_menu_con{border: 1px solid;padding: 0.3rem;margin-bottom: 0.2rem;transition: 0.3s ease-in;background: var(--docsearch-hit-background);} +.editor_settings_menu_con.activate_menu{opacity: 1;} +.editor_settings_menu_con.deactivate_menu{display: none;} +.editor_settings_menu{display: flex;gap: 1rem;justify-content: space-between;align-items: center;margin: 0.5rem;} +.editor_settings_menu p{margin: 0;} +.editor_settings_menu button{height: 1.5rem; width: 1.5rem;display: flex;justify-content: center;font-family: monospace;font-weight: 900;background:rgb(2,119,189);color: white;border: none;align-items: center;} +.editor_settings_menu input{height: 3rem;width: 3rem;} .editor_textarea_activate{ font-family: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace; width: 100%; min-height: 100%; - float: left; - font-size: 10pt; + float: left; line-height: 14pt; font-weight: 200; padding: 10px; @@ -40,4 +50,4 @@ border-color: #33dd33; } .editor_textarea_deactivate{display: none;} - \ No newline at end of file + diff --git a/src/pages/LiveEditor/index.tsx b/src/pages/LiveEditor/index.tsx index 394dc802e..55781a536 100644 --- a/src/pages/LiveEditor/index.tsx +++ b/src/pages/LiveEditor/index.tsx @@ -89,7 +89,7 @@ export default function LiveEditor() { title="dazzling-swanson-wne32" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-autoplay allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts" - /> : + /> : }