-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
135 lines (133 loc) · 2.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<link rel="stylesheet" href="dy-textarea.css">
<style>
:root {
font-family: 'Roboto', monospace;
tab-size: 4;
}
* {
box-sizing: border-box;
}
body {
display: grid;
grid-gap: 2rem;
padding: 1rem;
margin: 0;
}
h1, h2, h3 {
margin: 0;
}
button, textarea, dy-textarea [contenteditable] {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 0.5rem;
border: none;
font: inherit;
padding: 0.5em;
width: 100%;
transition: 0.3s;
}
button:hover {
background-color: rgba(0, 0, 0, 0.1);
}
dynamic-notebook {
display: grid;
grid-gap: 1rem;
}
dynamic-block {
display: grid;
grid-template:
1fr
auto
/ 30rem 1fr;
grid-gap: 0.5rem;
border-left: 3px rgba(0, 0, 0, 0.1) solid;
padding-left: 0.5em;
transition: 0.3s;
}
dynamic-block[state=new] {
animation: New 0.5s;
}
@keyframes New {
from {
opacity: 0;
transform: scale(0.9);
}
}
/*dynamic-block[state=waiting] {
background-color: #ffffe2;
animation: Waiting 1s infinite;
}
@keyframes Waiting {
50% {
background-color: #ffffe4;
}
}*/
dynamic-block[state=waiting] {
background-color: #ffffe2;
animation: Waiting 1s infinite;
}
@keyframes Waiting {
from, to {
background: repeating-linear-gradient(
45deg,
#ffffe2,
#ffffe2 1em,
#ffffe4 1em,
#ffffe4 2em
);
}
50% {
/* background-color: #ffffe4; */
background-position: 2em;
}
}
dynamic-block[state=changed] {
animation: Changed 0.5s;
}
@keyframes Changed {
0%, 40% {
background-color: #f3feff;
border-color: skyblue;
}
}
dynamic-block[state=error] {
background-color: #ffdddd;
color: chocolate;
}
dynamic-block .result {
grid-row: span 2;
display: block;
font-size: 1.2em;
margin: 0;
max-height: 7rem;
overflow: auto;
}
dynamic-block .code {
grid-area: 1 / 2;
font-family: 'Roboto Mono';
}
/* dynamic-block:not(:hover):not(:focus-within) textarea.code { */
dynamic-block[state=hidden] .code {
font-size: 0;
}
dynamic-block .meta {
color: rgba(0, 0, 0, 0.25);
font-size: 0.7em;
grid-area: 2 / 2;
display: flex;
justify-content: space-between;
}
dynamic-block .type {
letter-spacing: 0.07em;
text-transform: uppercase;
}
dynamic-block .references * {
font-weight: bold;
padding: 0.25em;
}
</style>
<body>
<h1>Fluorine ⚗</h1>
<script src="framework.js"></script>
<script src="dy-textarea.js"></script>
<script src="dynamic-notebook.js"></script>
</body>