File tree 2 files changed +10
-13
lines changed
2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -5,16 +5,13 @@ import { Preview } from "./preview";
5
5
const defaultCode = `
6
6
# Hello
7
7
8
- This is a markdown editor .
8
+ Edit me .
9
9
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")
14
13
~~~
15
14
16
- </CH.Code>
17
-
18
15
` ;
19
16
20
17
function App ( ) {
@@ -23,17 +20,13 @@ function App() {
23
20
return (
24
21
< div className = "app" >
25
22
< 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" >
30
24
< CodeHikeLogo />
31
25
< h1 >
32
26
Code Hike
33
27
< span > v0.5.1</ span >
34
28
</ h1 >
35
29
</ a >
36
- < a > Docs</ a >
37
30
</ header >
38
31
< main >
39
32
< Editor setCode = { setCode } defaultCode = { defaultCode } />
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ header {
27
27
background-color : # 111 ;
28
28
color : # fafafa ;
29
29
height : 3.2rem ;
30
+ min-height : 3.2rem ;
30
31
border-bottom : 1px solid # 444 ;
31
32
}
32
33
@@ -44,7 +45,7 @@ header h1 span {
44
45
padding-left : 0.5rem ;
45
46
}
46
47
47
- header a {
48
+ header a . code-hike {
48
49
color : inherit;
49
50
text-decoration : inherit;
50
51
display : flex;
77
78
background-color : # 111 ;
78
79
color : # fafafa ;
79
80
height : 2rem ;
81
+ min-height : 2rem ;
80
82
border-bottom : 1px solid # 444 ;
81
83
display : flex;
82
84
align-items : center;
@@ -108,6 +110,8 @@ main {
108
110
border-left : 2px solid cadetblue;
109
111
padding : 1em ;
110
112
flex : 1 ;
113
+ min-height : 0 ;
114
+ overflow : auto;
111
115
}
112
116
113
117
.preview-error {
You can’t perform that action at this time.
0 commit comments