Skip to content

Commit b0b8406

Browse files
committed
change console and stdin row styling to make them look better and more
functional
1 parent c090d3e commit b0b8406

File tree

2 files changed

+65
-22
lines changed

2 files changed

+65
-22
lines changed

src/html_src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function addServerDropdown(serverName, inactive) {
108108
titleText +
109109
'</p> <a href="#" class="button dropdownArrow"><svg clip-rule="evenodd" class="bloom" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="m16.843 10.211c.108-.141.157-.3.157-.456 0-.389-.306-.755-.749-.755h-8.501c-.445 0-.75.367-.75.755 0 .157.05.316.159.457 1.203 1.554 3.252 4.199 4.258 5.498.142.184.36.29.592.29.23 0 .449-.107.591-.291zm-7.564.289h5.446l-2.718 3.522z" fill-rule="nonzero"/> </svg><svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m16.843 10.211c.108-.141.157-.3.157-.456 0-.389-.306-.755-.749-.755h-8.501c-.445 0-.75.367-.75.755 0 .157.05.316.159.457 1.203 1.554 3.252 4.199 4.258 5.498.142.184.36.29.592.29.23 0 .449-.107.591-.291zm-7.564.289h5.446l-2.718 3.522z" fill-rule="nonzero"/></svg></a></div><div class="dropdownDrop" style: "display: none;"><div class="serverSTDOut ' +
110110
serverName +
111-
'Out"></div><div class="serverSTDIn"><input class="STDInInput" placeholder="place input for STDIn here..."></input><a href="#" class="STDInSubmit">Submit</a></div></div></div>',
111+
'Out"></div><div class="serverSTDIn"><div class="STDInRow"><input class="STDInInput" placeholder="place input for STDIn here..."></input><button type="button" class="STDInSubmit">Submit</button></div></div></div></div>',
112112
);
113113
var arrow = dropdown.find(".dropdownArrow").children().css({
114114
transform: "rotate(-180deg)",

src/html_src/style.css

Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -260,55 +260,98 @@ h1 {
260260
}
261261
.serverSTDOut {
262262
position: relative;
263-
top: 0px;
264-
left: 0px;
265263
width: 100%;
266264
height: 40vh;
267-
border-bottom-color: var(--border-muted);
268-
border-bottom-width: 3px;
269-
border-bottom-style: solid;
265+
background-color: var(--bg-dark);
266+
border: 2px solid var(--border);
267+
border-radius: 8px 8px 0 0;
270268
overflow: auto;
269+
box-sizing: border-box;
270+
margin-bottom: 0;
271+
z-index: 1;
272+
display: block;
271273
}
272274
.serverSTDIn {
275+
width: 100%;
276+
background: var(--bg-dark);
277+
margin-top: 0.5em;
278+
border-radius: 0 0 8px 8px;
273279
position: relative;
274-
top: 0px;
275-
left: 0px;
280+
z-index: 2;
281+
overflow: visible;
282+
box-sizing: border-box;
283+
padding: 0;
284+
}
285+
.STDInRow {
286+
display: flex;
287+
flex-direction: row;
288+
align-items: stretch;
289+
gap: 0.6em;
276290
width: 100%;
277-
height: 3vh;
291+
padding: 0.4em 0.6em;
292+
box-sizing: border-box;
293+
overflow: hidden;
294+
min-width: 0;
278295
}
296+
279297
.STDInInput {
298+
flex: 1 1 0;
299+
min-width: 0;
300+
max-width: 100%;
280301
background-color: var(--bg-dark);
281302
color: var(--text);
282-
padding-left: 2vw;
283-
position: relative;
284-
left: 0px;
285-
top: 0px;
286-
width: 90%;
287-
height: calc(100% - 6px);
288-
font-family: "Roboto", sans-serif;
303+
border: 1.5px solid var(--border-muted);
304+
border-radius: 6px;
305+
padding: 0.5em 1em;
306+
font-family: "Fira Code", "Roboto", "monospace", sans-serif;
307+
font-size: 1em;
308+
outline: none;
309+
transition: border-color 0.2s;
310+
box-sizing: border-box;
311+
overflow: hidden;
312+
}
313+
.STDInInput:focus {
314+
border-color: var(--primary);
289315
}
316+
290317
.STDInSubmit {
291-
left: calc(90% + 9px);
318+
flex: 0 0 auto;
319+
width: 110px;
320+
min-width: 80px;
321+
max-width: 140px;
292322
display: flex;
293323
align-items: center;
294-
/* Vertical alignment */
295324
justify-content: center;
296-
/* Horizontal alignment */
297325
text-decoration: none;
298-
/* Remove underline */
299326
background-color: var(--primary);
300327
color: var(--text);
301-
width: calc(10% - 9px);
328+
border: none;
329+
border-radius: 6px;
330+
padding: 0.5em 1.2em;
302331
font-family: "Roboto", sans-serif;
332+
font-size: 1em;
333+
cursor: pointer;
334+
transition:
335+
background-color 0.2s,
336+
color 0.2s;
337+
box-sizing: border-box;
338+
overflow: hidden;
339+
white-space: nowrap;
303340
}
304-
.STDInSubmit:hover {
341+
.STDInSubmit:hover,
342+
.STDInSubmit:focus {
305343
background-color: color-mix(in srgb, var(--primary) 80%, var(--bg) 20%);
344+
color: var(--bg-dark);
345+
outline: none;
306346
}
307347
.STDOutMessage {
308348
position: relative;
309349
padding-left: 2%;
310350
color: var(--text);
311351
font-family: "Roboto", sans-serif;
352+
background-color: transparent;
353+
padding-top: 2px;
354+
padding-bottom: 2px;
312355
}
313356
.ConfigEditor {
314357
position: absolute;

0 commit comments

Comments
 (0)