Skip to content

Commit d4d14de

Browse files
committed
💄 Refreshed UI colors
1 parent ebce0cf commit d4d14de

File tree

1 file changed

+87
-30
lines changed

1 file changed

+87
-30
lines changed

index.html

Lines changed: 87 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,59 @@
88
</head>
99
<style>
1010
:root {
11-
--font-color: #333;
12-
--bg-color: #fff;
11+
--font-color: #323E48;
12+
--bg-color: #dbe6ee;
13+
--bfont-color: #318B6F;
14+
--dbg-color: rgba(0, 0, 0, 0.1);
1315
}
1416

1517
[data-theme="dark"] {
16-
--font-color: #fff;
17-
--bg-color: #161625;
18+
--font-color: #B3C8D8;
19+
--bg-color: #323E48;
20+
--bfont-color: #9ADECE;
1821
}
1922

2023
* {
2124
box-sizing: border-box;
2225
outline: 0;
2326
border: 0;
24-
font-family: 'Nunito', 'Roboto', 'Noto', sans-serif;
27+
}
28+
29+
::-webkit-scrollbar {
30+
background-color: var(--dbg-color);
31+
width: 8px;
32+
height: 8px;
33+
}
34+
35+
::-webkit-scrollbar-thumb:window-inactive,
36+
::-webkit-scrollbar-thumb {
37+
background: var(--dbg-color);
38+
}
39+
40+
::-webkit-scrollbar-thumb:hover {
41+
background: rgba(0, 0, 0, 0.2);
42+
}
43+
44+
::-webkit-scrollbar-thumb:active {
45+
background: rgba(0, 0, 0, 0.3);
46+
}
47+
48+
::placeholder {
49+
color: var(--font-color);
50+
}
51+
52+
@keyframes fadein {
53+
from {
54+
opacity: 0;
55+
}
56+
57+
to {
58+
opacity: 1;
59+
}
60+
}
61+
62+
a {
63+
color: var(--bfont-color);
2564
}
2665

2766
body {
@@ -34,21 +73,25 @@
3473
color: var(--font-color);
3574
width: 100%;
3675
height: 100vh;
76+
font-size: 16px;
77+
font-family: "SF Mono", "Lucida Console", Monaco, monospace;
78+
line-height: 1.5;
79+
animation: fadein .2s;
3780
}
3881

3982
.theme-switch {
4083
display: inline-block;
41-
height: 32px;
84+
height: 16px;
4285
position: relative;
43-
width: 60px;
86+
width: 32px;
4487
}
4588

4689
.theme-switch input {
4790
display: none;
4891
}
4992

5093
.slider {
51-
background-color: #ccc;
94+
background-color: var(--dbg-color);
5295
bottom: 0;
5396
cursor: pointer;
5497
left: 0;
@@ -59,26 +102,26 @@
59102
}
60103

61104
.slider:before {
62-
background-color: #fff;
63-
bottom: 4px;
105+
background-color: var(--dbg-color);
106+
bottom: 0px;
64107
content: "";
65-
height: 24px;
66-
left: 4px;
108+
height: 16px;
109+
left: 0px;
67110
position: absolute;
68111
transition: .2s;
69-
width: 24px;
112+
width: 16px;
70113
}
71114

72115
input:checked+.slider {
73116
background-color: #58DE71;
74117
}
75118

76119
input:checked+.slider:before {
77-
transform: translateX(28px);
120+
transform: translateX(16px);
78121
}
79122

80123
.slider.round {
81-
border-radius: 32px;
124+
border-radius: 16px;
82125
}
83126

84127
.slider.round:before {
@@ -87,14 +130,17 @@
87130

88131
.container {
89132
display: flex;
90-
background-color: #000;
91133
width: 100%;
92134
height: 100%;
93135
flex-direction: column;
94136
}
95137

96138
.header {
97-
background-color: #fff;
139+
display: flex;
140+
align-items: center;
141+
justify-content: space-between;
142+
padding: 16px;
143+
background-color: var(--dbg-color);
98144
}
99145

100146
.content {
@@ -103,21 +149,26 @@
103149
overflow: hidden;
104150
}
105151

106-
.markdown {
107-
display: inline-flex;
108-
flex-grow: 1;
109-
background-color: #222;
110-
flex-direction: column;
111-
overflow: auto;
112-
}
113-
114152
textarea {
115153
width: 50vw;
116154
height: 100%;
117155
resize: none;
118156
display: flex;
119157
flex-grow: 1;
120-
background-color: #777;
158+
background-color: var(--bg-color);
159+
color: var(--font-color);
160+
padding: 16px;
161+
line-height: 2;
162+
font-size: 14px;
163+
}
164+
165+
.markdown {
166+
display: flex;
167+
flex-grow: 1;
168+
flex-direction: column;
169+
overflow: auto;
170+
padding: 16px;
171+
font-family: 'Nunito', 'Roboto', 'Noto', sans-serif;
121172
}
122173

123174
</style>
@@ -126,10 +177,14 @@
126177
<div class="container">
127178
<div class="header">
128179
<span>markdown</span>
180+
<label class="theme-switch" for="checkbox">
181+
<input type="checkbox" id="checkbox">
182+
<div class="slider round"></div>
183+
</label>
129184
</div>
130185
<div class="content">
131186
<div class="editor">
132-
<textarea name="" id="getm"></textarea>
187+
<textarea name="" id="getm" placeholder="paste markdown here" oninput="keyup()"></textarea>
133188
</div>
134189
<div class="markdown" id="content">
135190
</div>
@@ -146,11 +201,13 @@
146201
}
147202
}
148203
toggleSwitch.addEventListener('change', switchTheme, false);
149-
window.onkeyup = keyup;
150204

151-
function keyup(e) {
205+
function keyup() {
152206
var mark = document.getElementById('getm').value;
153-
document.getElementById('content').innerHTML = marked(mark);
207+
if (mark)
208+
document.getElementById('content').innerHTML = marked(mark);
209+
else
210+
document.getElementById('content').innerHTML = "marcdown will appere here";
154211
}
155212

156213
</script>

0 commit comments

Comments
 (0)