Skip to content

Commit a70eb3f

Browse files
committed
index.html and styles.css Update
1 parent 8e7def0 commit a70eb3f

File tree

2 files changed

+65
-5
lines changed

2 files changed

+65
-5
lines changed

packages/runtime/index.html

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@
197197
});
198198
}
199199
};
200+
201+
202+
function copyCode(num) {
203+
const shadowContainer = document.getElementById('container').shadowRoot;
204+
const codes = shadowContainer.querySelectorAll('code');
205+
206+
window.navigator.clipboard.writeText(codes[num].textContent);
207+
}
200208
</script>
201209
</head>
202210

@@ -206,7 +214,7 @@
206214
<canvas></canvas>
207215
</div>
208216
<div class="container">
209-
<zero-md
217+
<zero-md id="container"
210218
manual-render="true">
211219
<template>
212220
<link rel="stylesheet"
@@ -218,22 +226,74 @@
218226
contain: content;
219227
box-sizing: border-box;
220228
min-width: 200px;
221-
max-width: 980px;
229+
max-width: 850px;
222230
margin: 0 auto;
223231
padding: 0px;
224232
width: calc(50% - 20px * 2);
225233
height: 100vh;
226234
overflow: scroll;
235+
227236
}
228237

229238
.markdown-body {
230239
height: inherit;
240+
font-size: small;
241+
}
242+
243+
h1{
244+
color: white;
245+
padding: 20px 20px;
246+
}
247+
248+
ol>li{
249+
margin-left: 30px;
250+
font-size: 1.2em;
251+
}
252+
253+
pre{
254+
width: 80%;
255+
margin-left: 60px;
256+
border: 1px solid rgb(124, 124, 124);
257+
}
258+
259+
p{
260+
margin-left: 40px;
261+
}
262+
263+
strong{
264+
color: rgb(38, 114, 255);
265+
}
266+
267+
img{
268+
margin-left: 20px;
269+
width: 90%
270+
}
271+
272+
span{
273+
color: rgb(86, 117, 255);
274+
}
275+
276+
button{
277+
position: absolute;
278+
margin-left: 78%;
279+
margin-top: 20px;
280+
width: 45px;
281+
height: 30px;
282+
background-color: rgb(0, 89, 255);
283+
border: 1px solid rgb(0, 89, 255);
284+
border-radius: 0.4em;
285+
}
286+
287+
button:hover{
288+
background-color: rgb(0, 58, 167);
289+
border: rgb(0, 58, 167);
231290
}
291+
232292
</style>
233293
</template>
234294
</zero-md>
235-
<div class="xterminal" style="width: calc(50% + 16px * 2); height: calc(100% - 18px * 2 );">
295+
<div class="xterminal" style="width: calc(60% + 16px * 2); height: calc(100% - 18px * 2 );">
236296
<div id="terminal"></div>
237297
</div>
238298
</div>
239-
</body>
299+
</body>

packages/runtime/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
body {
22
margin: 0;
33
padding: 0;
4-
background-color: #252735;
54
}
65

76
.container {
@@ -10,6 +9,7 @@ body {
109
display: flex;
1110
align-items: center;
1211
justify-content: center;
12+
background-color: #1a1b20;
1313
}
1414

1515
input[type="button"] {

0 commit comments

Comments
 (0)