Skip to content

Commit 591ca28

Browse files
committed
rework buttons, reduce styles
1 parent 8319a2b commit 591ca28

1 file changed

Lines changed: 11 additions & 34 deletions

File tree

hacks/codemirror.md

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ permalink: /code
1616
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/javascript/javascript.min.js"></script>
1717

1818
<style>
19+
20+
.CodeMirror {
21+
height: 400px;
22+
font-size: 14px;
23+
}
24+
1925
.control-group label {
2026
color: white;
2127
font-weight: 600;
@@ -38,30 +44,11 @@ permalink: /code
3844
min-width: 150px;
3945
}
4046

41-
.btn-group {
42-
display: flex;
43-
gap: 10px;
44-
margin-left: auto;
45-
}
46-
47-
button {
48-
transition: all 0.2s;
49-
}
50-
5147
button:hover {
5248
transform: translateY(-2px);
5349
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
5450
}
5551

56-
.run-btn {
57-
font-weight: 600;
58-
padding: 10px 24px;
59-
}
60-
61-
.secondary-btn {
62-
opacity: 0.9;
63-
}
64-
6552
.editor-container {
6653
border: 1px solid rgba(128, 128, 128, 0.3);
6754
border-radius: 8px;
@@ -70,11 +57,6 @@ permalink: /code
7057
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
7158
}
7259

73-
.CodeMirror {
74-
height: 400px;
75-
font-size: 14px;
76-
}
77-
7860
.output-section {
7961
border: 1px solid rgba(128, 128, 128, 0.3);
8062
border-radius: 8px;
@@ -216,11 +198,6 @@ permalink: /code
216198
align-items: stretch;
217199
}
218200

219-
.btn-group {
220-
margin-left: 0;
221-
width: 100%;
222-
}
223-
224201
.example-buttons {
225202
flex-direction: column;
226203
}
@@ -243,9 +220,9 @@ permalink: /code
243220
<option value="18">18px</option>
244221
<option value="20">20px</option>
245222
</select>
246-
<span id="copyBtn" class="icon-btn" title="Copy">⎘</span>
247-
<span id="clearBtn" class="icon-btn" title="Clear">⎚</span>
248-
<span id="helpBtn" class="icon-btn" title="Help">?</span>
223+
<button id="copyBtn" title="Copy">⎘</button>
224+
<button id="clearBtn" title="Clear">⎚</button>
225+
<button id="helpBtn" title="Help">?</button>
249226
</div>
250227
<div id="help-panel" class="help-panel">
251228
<strong>Tips & Shortcuts:</strong>
@@ -265,7 +242,7 @@ permalink: /code
265242
<div class="output-section">
266243
<div class="control-bar">
267244
<span>Output</span>
268-
<span id="copyOutputIcon" title="Copy Output" class="icon-btn">⎘</span>
245+
<button id="copyOutputIcon" title="Copy Output">⎘</button>
269246
</div>
270247
<div class="output-content" id="output">Click "Run Code" to see output here...</div>
271248
</div>
@@ -490,7 +467,7 @@ document.addEventListener("DOMContentLoaded", () => {
490467

491468
const body = JSON.stringify({ code });
492469
const options = { ...fetchOptions, method: "POST", body };
493-
470+
494471
fetch(runURL, options)
495472
.then(res => res.json())
496473
.then(result => {

0 commit comments

Comments
 (0)