Skip to content

Commit 8939e5f

Browse files
committed
Change default code
1 parent bf93a4e commit 8939e5f

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

playground/src/app.jsx

+5-12
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ import { Preview } from "./preview";
55
const defaultCode = `
66
# Hello
77
8-
This is a markdown editor.
8+
Edit me.
99
10-
<CH.Code style={{height: 200}}>
11-
12-
~~~py foo.py
13-
print "Hello, world!";
10+
~~~python hello.py
11+
# mark[16:24]
12+
print("This is Code Hike")
1413
~~~
1514
16-
</CH.Code>
17-
1815
`;
1916

2017
function App() {
@@ -23,17 +20,13 @@ function App() {
2320
return (
2421
<div className="app">
2522
<header>
26-
<a
27-
className="flex items-center gap-2 mr-auto 2cols:ml-6"
28-
href="https://codehike.org"
29-
>
23+
<a className="code-hike" href="https://codehike.org">
3024
<CodeHikeLogo />
3125
<h1>
3226
Code Hike
3327
<span>v0.5.1</span>
3428
</h1>
3529
</a>
36-
<a>Docs</a>
3730
</header>
3831
<main>
3932
<Editor setCode={setCode} defaultCode={defaultCode} />

playground/src/index.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ header {
2727
background-color: #111;
2828
color: #fafafa;
2929
height: 3.2rem;
30+
min-height: 3.2rem;
3031
border-bottom: 1px solid #444;
3132
}
3233

@@ -44,7 +45,7 @@ header h1 span {
4445
padding-left: 0.5rem;
4546
}
4647

47-
header a {
48+
header a.code-hike {
4849
color: inherit;
4950
text-decoration: inherit;
5051
display: flex;
@@ -77,6 +78,7 @@ main {
7778
background-color: #111;
7879
color: #fafafa;
7980
height: 2rem;
81+
min-height: 2rem;
8082
border-bottom: 1px solid #444;
8183
display: flex;
8284
align-items: center;
@@ -108,6 +110,8 @@ main {
108110
border-left: 2px solid cadetblue;
109111
padding: 1em;
110112
flex: 1;
113+
min-height: 0;
114+
overflow: auto;
111115
}
112116

113117
.preview-error {

0 commit comments

Comments
 (0)