Skip to content

Commit 220c4f0

Browse files
committed
Emergency Fix
* Emergency CSS Fix * Lint * Pretty
1 parent 70d4623 commit 220c4f0

9 files changed

Lines changed: 43 additions & 37 deletions

File tree

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ WebBox is an interactive code editor focused on web development, providing live
88

99
---
1010

11-
* [Create a File](./docs/CreateFile.md)
12-
* [Open a File](./docs/OpenFile.md)
13-
* [Save a File](./docs/SaveFile.md)
14-
* [Viewer Windows](./docs/ViewerWindows.md)
15-
* [Shortcuts](./docs/Shortcuts.md)
16-
* [Customize Colors](./docs/CustomColors.md)
11+
- [Create a File](./docs/CreateFile.md)
12+
- [Open a File](./docs/OpenFile.md)
13+
- [Save a File](./docs/SaveFile.md)
14+
- [Viewer Windows](./docs/ViewerWindows.md)
15+
- [Shortcuts](./docs/Shortcuts.md)
16+
- [Customize Colors](./docs/CustomColors.md)
1717

1818
---
1919

@@ -24,4 +24,5 @@ Developed as a school project by **Ethan Mahlstedt**
2424
Want to help? Send me a [mail](mailto:ethan.mahlstedt@hotmail.com)
2525

2626
---
27-
<p style="font-size: 10px">Last modified at 13/05/25 by Ethan Mahlstedt; v1.0.0-rc2 </p>
27+
28+
<p style="font-size: 10px">Last modified at 13/05/25 by Ethan Mahlstedt; v1.0.0-rc2 </p>

docs/CreateFile.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ Filename **must** include extension.
2020

2121
---
2222

23-
2423
Filename and folder **are mandatory**.
2524

2625
---
2726

28-
<p style="font-size: 10px">Last modified at 12/05/25 by Ethan Mahlstedt; v1.0-rc1 </p>
27+
<p style="font-size: 10px">Last modified at 12/05/25 by Ethan Mahlstedt; v1.0-rc1 </p>

docs/CustomColors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ If you want to use custom colors, you must edit the files located at `editor/fro
1414

1515
---
1616

17-
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
17+
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>

docs/OpenFile.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@
1010

1111
To open files, WebBox will prompt you to choose a file that matches the following file types:
1212

13-
* **HTML** (.html, .htm)
14-
* **JavaScript** (.js, .jsx, .mjs, .cjs)
15-
* **TypeScript** (.ts, .tsx)
16-
* **CSS** (.css)
17-
* **JSON** (.JSON)
18-
* **Markdown** (.md)
19-
* **PHP** (.php)
20-
* **Text Documents** (.txt)
21-
* **XML** (.xml)
22-
23-
13+
- **HTML** (.html, .htm)
14+
- **JavaScript** (.js, .jsx, .mjs, .cjs)
15+
- **TypeScript** (.ts, .tsx)
16+
- **CSS** (.css)
17+
- **JSON** (.JSON)
18+
- **Markdown** (.md)
19+
- **PHP** (.php)
20+
- **Text Documents** (.txt)
21+
- **XML** (.xml)
2422

2523
---
2624

27-
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
25+
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>

docs/SaveFile.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
###### Go back to [index](../README.md)
32

43
---
@@ -13,8 +12,8 @@ When closing files, WebBox will prompt you to save the file if it has unsaved ch
1312

1413
![fileSaveDialog.png](../resources/docs/fileSaving/fileSaveDialog.png)
1514

16-
Whenever a file has unsaved changes, the file name will be displayed in *italic* in the tab bar. This is a visual indicator that the file has unsaved changes.
15+
Whenever a file has unsaved changes, the file name will be displayed in _italic_ in the tab bar. This is a visual indicator that the file has unsaved changes.
1716

1817
---
1918

20-
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
19+
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>

docs/Shortcuts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
## Shortcut list
1010

1111
| Shortcut | Action |
12-
|--------------------|-------------------------------------|
12+
| ------------------ | ----------------------------------- |
1313
| `Ctrl + N` | Create File |
1414
| `Ctrl + O` | Open File |
1515
| `Ctrl + S` | Save File |
@@ -20,4 +20,4 @@
2020

2121
---
2222

23-
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
23+
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>

docs/ViewerWindows.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
###### Go back to [index](../README.md)
32

43
---
@@ -19,4 +18,4 @@ In the case you want to refresh the viewer, you can use the **"Refresh Viewer"**
1918

2019
---
2120

22-
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
21+
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>

front/editor/editor.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>WebBox</title>
7-
<link rel="stylesheet" href="editor.css" />
87
</head>
98
<body>
109
<div id="FilePicker"></div>

front/editor/editor.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -845,15 +845,26 @@ pickWindowBtn.addEventListener("click", () => {
845845
});
846846

847847
//////////////////////////////////////////////////////////
848-
// Load Highlighter
848+
// Load Stylesheets
849849
/////////////////////////////////////////////////////////
850850

851-
const cssPath = path.join(process.cwd(), "front", "editor", "highlighter.css");
852-
853-
const link = document.createElement("link");
854-
link.rel = "stylesheet";
855-
link.href = `file://${cssPath}`;
856-
document.head.appendChild(link);
851+
const HighlighterPath = path.join(
852+
process.cwd(),
853+
"front",
854+
"editor",
855+
"highlighter.css"
856+
);
857+
const EditorPath = path.join(process.cwd(), "front", "editor", "editor.css");
858+
859+
appendStylesheet(HighlighterPath);
860+
appendStylesheet(EditorPath);
861+
862+
function appendStylesheet(dir) {
863+
const link = document.createElement("link");
864+
link.rel = "stylesheet";
865+
link.href = `file://${dir}`;
866+
document.head.appendChild(link);
867+
}
857868

858869
//////////////////////////////////////////////////////////
859870
// Handle Window Deletion

0 commit comments

Comments
 (0)