Skip to content

Commit e1064d7

Browse files
committed
Design changes
1 parent 9815807 commit e1064d7

2 files changed

Lines changed: 77 additions & 22 deletions

File tree

index.html

Lines changed: 72 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,46 @@
1919
position: fixed;
2020
width: 100%;
2121
height: 2em;
22-
border: 1px solid black;
22+
border: 1px solid #212529;
2323
z-index: 10;
2424
padding: 0.2em;
25-
background: #ddd;
25+
background: #212529;
2626
}
2727

2828
button {
29-
background: #A2BFFF;
30-
border: 1px solid black;
29+
/*
30+
background: #0d6efd;
31+
*/
32+
background: #FFA500;
33+
color: #212529;
34+
border: 1px solid #212529;
35+
border-radius: 0.375rem;
3136
}
3237
button.solver {
33-
background: #ffc2df;
38+
background: #6610f2;
39+
color: white;
3440
}
35-
button#help {
41+
/*
42+
button.ok {
3643
background: #00CC84;
44+
color: black;
45+
}
46+
button.cancel {
47+
background: #dc3545;
48+
color: white;
49+
}
50+
*/
51+
button#help {
52+
background: #c29cff;
53+
color: black;
3754
}
3855
button#showLKRules {
39-
background: #00CC84;
56+
background: #c29cff;
57+
color: black;
4058
}
4159
button#showHoareRules {
42-
background: #00CC84;
60+
background: #c29cff;
61+
color: black;
4362
}
4463

4564
.help-list {
@@ -50,10 +69,12 @@
5069
}
5170
.help-examples li button{
5271
background: #FFA500;
72+
color: black;
5373
font-size: 0.8em;
5474
height: 1.5em;
5575
width: auto;
5676
margin-left: 1em;
77+
border-radius: 0.25rem;
5778
}
5879
.modal code {
5980
user-select: all;
@@ -76,19 +97,31 @@
7697
#left-bar {
7798
position: fixed;
7899
height: 100%;
79-
width: 11em;
100+
width: 15em;
80101
top: 2.5em;
81102
left: 0;
82-
border: 1px solid black;
103+
border: 1px solid #212529;
83104
z-index: 10;
84105
padding: 0.2em;
85-
background: #ddd;
106+
color: white;
107+
background: #212529;
108+
resize: horizontal;
109+
overflow: auto;
86110
}
87111
#left-bar ol {
88-
margin-left: 1em;
112+
margin-left: 0.2em;
113+
}
114+
#left-bar ol li {
115+
list-style-type: none;
116+
border-bottom: 1px solid white;
117+
padding: 1em 0.2em 1em 0.2em;
118+
}
119+
.selected {
120+
background: #0d6efd;
89121
}
90122
#left-bar button {
91-
height: 1.5em;
123+
height: 2em;
124+
padding: 0.2em;
92125
}
93126

94127
canvas {
@@ -146,6 +179,8 @@
146179
right: 0;
147180
bottom: 0;
148181
background-color: orange;
182+
color: white;
183+
border-radius: 0.375rem;
149184
-webkit-transition: .6s;
150185
transition: .6s;
151186
}
@@ -157,13 +192,15 @@
157192
width: 26px;
158193
left: 4px;
159194
bottom: 4px;
160-
background-color: white;
195+
border-radius: 0.375rem;
196+
background-color: #212529;
161197
-webkit-transition: .6s;
162198
transition: .6s;
163199
}
164200

165201
input:checked + .slider {
166-
background-color: #2ab934;
202+
background-color: #4cd625;
203+
color: white;
167204
}
168205

169206
input:focus + .slider {
@@ -179,7 +216,7 @@
179216
.on { display: none; }
180217

181218
.on, .off {
182-
color: white;
219+
color: #212529;
183220
position: absolute;
184221
transform: translate(-50%,-50%);
185222
top: 50%;
@@ -225,6 +262,7 @@
225262
padding-bottom: 5px;
226263
height: 28px;
227264
border-bottom: 1px solid #888;
265+
border-radius: 0.5rem 0.5rem 0 0;
228266
}
229267

230268
.modal-header:hover {
@@ -237,7 +275,8 @@
237275
border: 1px solid #888;
238276
width: 60%;
239277
max-height: 100%;
240-
overflow: scroll;
278+
overflow-y: auto;
279+
border-radius: 0.5rem;
241280
}
242281

243282
@media screen and (max-width: 992px) {
@@ -294,6 +333,22 @@
294333
}
295334
th, td { padding: 0.5em 1em 0.5em 1em; }
296335

336+
.latex sub, .latex sup {
337+
text-transform: uppercase;
338+
}
339+
340+
.latex sub {
341+
vertical-align: -0.5ex;
342+
margin-left: -0.1667em;
343+
margin-right: -0.125em;
344+
}
345+
346+
.latex sup {
347+
font-size: 0.80em;
348+
vertical-align: 0.15em;
349+
margin-left: -0.36em;
350+
margin-right: -0.15em;
351+
}
297352
</style>
298353
</head>
299354
<body>

src/app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ canvas.setWidth(window.innerWidth)
66
canvas.setHeight(window.innerHeight)
77

88
let incompleteColor = '#FFA500'
9-
let successColor = '#00CC84'
10-
let failureColor = '#FF2500'
9+
let successColor = '#4cd625'
10+
let failureColor = '#dc3545'
1111
let goodColor = 'black'
1212

1313
const isLearnMode = () => document.getElementById('mode').checked
@@ -156,7 +156,7 @@ ${pf.latex()}
156156
\\end{prooftree}
157157
\\end{document}`
158158
copyToClipboard(code)
159-
modalAlert(`LaTeX output for the <code>${pf.conclusion.unicode()}</code> proof tree is copied to the clipboard!`)
159+
modalAlert(`<span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> output for the <code>${pf.conclusion.unicode()}</code> proof tree is copied to the clipboard!`)
160160
}
161161

162162
const removeProof = i => {
@@ -185,7 +185,7 @@ const refreshList = () => {
185185
ol.innerHTML += `<li value="${i}">
186186
${entry.proof.conclusion.unicode()}
187187
<br>
188-
<button onclick="javascript:giveLatex(${i})">LaTeX</button>
188+
<button onclick="javascript:giveLatex(${i})" class="latex">L<sup>a</sup>T<sub>e</sub>X</button>
189189
<button onclick="javascript:removeProof(${i})">✖ Delete</button>
190190
<button onclick="javascript:saveProof(${i})">💾 Save</button>
191191
</li>`
@@ -303,7 +303,7 @@ const help = () => {
303303
You can click on the <span style="color: ${incompleteColor}">orange</span> scissors button (✄) to <strong>detach</strong> a proof, i.e. to create a separate proof tree with the current branch and changing the original one into an incomplete one. You can also <strong>attach</strong> a separate proof on another one by <strong>dragging</strong> the subtree and <strong>dropping</strong> on the main one.
304304
</p>
305305
<p>
306-
As you work on the proof, you can click on the buttons on the left bar to either copy the LaTeX output for a given proof, or to save that proof onto your computer as a file. You can later reload the proof file into the proof assistant by clicking the "Load proof file" button on the top bar.
306+
As you work on the proof, you can click on the buttons on the left bar to either copy the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> output for a given proof, or to save that proof onto your computer as a file. You can later reload the proof file into the proof assistant by clicking the "Load proof file" button on the top bar.
307307
</p>
308308
<br>
309309
<h3>Modes of usage</h3>

0 commit comments

Comments
 (0)