Skip to content

Commit d774a26

Browse files
committed
Review and simplify
1 parent d59d1c0 commit d774a26

File tree

4 files changed

+43
-54
lines changed

4 files changed

+43
-54
lines changed

term_timer/server/static/css/style.css

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,23 +1858,12 @@ twisty-alg-viewer {
18581858

18591859
/* Case Detail Page */
18601860

1861-
/* Section padding (direct children of .card) */
1862-
.case-section {
1863-
padding: 0 1rem 1rem 1rem;
1864-
}
1865-
18661861
/* Muted intro text after a card-header */
18671862
.case-description {
18681863
padding: 1rem;
18691864
color: var(--text-secondary);
18701865
}
18711866

1872-
/* Contextual spacing inside .case-section */
1873-
.case-section > .case-note,
1874-
.case-section > .case-mono {
1875-
margin-top: 0.5rem;
1876-
}
1877-
18781867
/* Spacing for inner panel in a logiqx/algo item */
18791868
.case-panel > .case-panel-sm {
18801869
margin-bottom: 0.5rem;
@@ -1967,10 +1956,6 @@ twisty-alg-viewer {
19671956
}
19681957

19691958
/* Text helpers */
1970-
.case-note.secondary {
1971-
color: var(--text-secondary);
1972-
}
1973-
19741959
.case-accent {
19751960
color: var(--info);
19761961
display: block;

term_timer/server/templates/academy/case.html

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,18 @@ <h2 class="card-title">
137137
<a href="#main-algorithm" id="main-algorithm">Main Algorithm</a>
138138
</h2>
139139
</div>
140+
<p class="card-description">
141+
Algorithm used to solve the case.
142+
</p>
140143
<div class="moves-card">
141144
<div class="moves-content">
142145
{% for m in case.main_algorithm %}
143146
<span class="move">{{ m }}</span>
144147
{% endfor %}
145148
</div>
146149
<div class="moves-footer">
150+
{{ algorithm_button_detail(case.main_algorithm) }}
151+
{{ algorithm_button_copy(case.main_algorithm) }}
147152
<span class="spec-label htm">
148153
HTM: {{ case.main_algorithm.metrics.htm }}
149154
</span>
@@ -153,8 +158,6 @@ <h2 class="card-title">
153158
<span class="spec-label memo">
154159
MEMO: {{ "%0.1f"|format(case.main_algorithm.memory.memory_score) }}
155160
</span>
156-
{{ algorithm_button_detail(case.main_algorithm) }}
157-
{{ algorithm_button_copy(case.main_algorithm) }}
158161
</div>
159162
</div>
160163
</div>
@@ -201,25 +204,26 @@ <h2 class="card-title">
201204
<a href="#recognition" id="recognition">Recognition</a>
202205
</h2>
203206
</div>
204-
<div class="case-section case-grid-sm">
207+
<p class="card-description">
208+
Tips and tricks to recognize the case from different orientations.
209+
</p>
210+
<div class="case-grid-sm">
205211
{% for recog_case in case.recognition.cases %}
206212
<div class="case-panel">
207213
<strong class="case-accent">{{ recog_case.feature.name }}</strong>
208-
<div class="case-note">
214+
<p>
215+
{{ recog_case.description }}
216+
</p>
217+
{% if recog_case.observation %}
209218
<p>
210-
{{ recog_case.description }}
219+
<b>Observation:</b> {{ recog_case.observation }}
211220
</p>
212-
{% if recog_case.observation %}
213-
<p>
214-
<b>Observation:</b> {{ recog_case.observation }}
215-
</p>
216-
{% endif %}
217-
{% if recog_case.notes %}
218-
<p>
219-
<b>Notes:</b> {{ recog_case.notes }}
220-
</p>
221-
{% endif %}
222-
</div>
221+
{% endif %}
222+
{% if recog_case.notes %}
223+
<p>
224+
<b>Notes:</b> {{ recog_case.notes }}
225+
</p>
226+
{% endif %}
223227
</div>
224228
{% endfor %}
225229
</div>
@@ -235,7 +239,7 @@ <h2 class="card-title">
235239
<a href="#all-algorithms" id="all-algorithms">All Known Algorithms</a>
236240
</h2>
237241
</div>
238-
<p class="case-section case-note secondary">
242+
<p class="card-description">
239243
{{ all_algorithms|length }} total algorithm(s) in the database for this case.
240244
Different algorithms might be more comfortable depending on your solving style.
241245
</p>
@@ -250,6 +254,8 @@ <h2 class="card-title">
250254
{% endfor %}
251255
</div>
252256
<div class="moves-footer">
257+
{{ algorithm_button_detail(algo) }}
258+
{{ algorithm_button_copy(algo) }}
253259
<span class="spec-label htm">
254260
HTM: {{ algo.metrics.htm }}
255261
</span>
@@ -259,8 +265,6 @@ <h2 class="card-title">
259265
<span class="spec-label memo">
260266
MEMO: {{ "%0.1f"|format(algo.memory.memory_score) }}
261267
</span>
262-
{{ algorithm_button_detail(algo) }}
263-
{{ algorithm_button_copy(algo) }}
264268
</div>
265269
</div>
266270
{% endfor %}
@@ -277,7 +281,7 @@ <h2 class="card-title">
277281
<a href="#setup-algorithms" id="setup-algorithms">Setup Algorithms</a>
278282
</h2>
279283
</div>
280-
<p class="case-section case-note secondary">
284+
<p class="card-description">
281285
Top {{ setup_algorithms|length }} of the best setup algorithm(s) for this case.
282286
</p>
283287
<div class="algorithms-grid">
@@ -291,6 +295,8 @@ <h2 class="card-title">
291295
{% endfor %}
292296
</div>
293297
<div class="moves-footer">
298+
{{ algorithm_button_detail(setup) }}
299+
{{ algorithm_button_copy(setup) }}
294300
<span class="spec-label htm">
295301
HTM: {{ setup.metrics.htm }}
296302
</span>
@@ -300,8 +306,6 @@ <h2 class="card-title">
300306
<span class="spec-label memo">
301307
MEMO: {{ "%0.2f"|format(setup.memory.memory_score) }}
302308
</span>
303-
{{ algorithm_button_detail(setup) }}
304-
{{ algorithm_button_copy(setup) }}
305309
</div>
306310
</div>
307311
{% endfor %}
@@ -318,7 +322,7 @@ <h2 class="card-title">
318322
<a href="#badmephisto" id="badmephisto">BadMephisto Algorithms</a>
319323
</h2>
320324
</div>
321-
<p class="case-section case-note secondary">
325+
<p class="card-description">
322326
{{ badmephisto.algos|length }} algorithm(s) provided by the famous BadMephisto.
323327
</p>
324328
{% for algorithm in badmephisto.algos %}
@@ -329,6 +333,8 @@ <h2 class="card-title">
329333
{% endfor %}
330334
</div>
331335
<div class="moves-footer">
336+
{{ algorithm_button_detail(algorithm) }}
337+
{{ algorithm_button_copy(algorithm) }}
332338
<span class="spec-label htm">
333339
HTM: {{ algorithm.metrics.htm }}
334340
</span>
@@ -338,8 +344,6 @@ <h2 class="card-title">
338344
<span class="spec-label memo">
339345
MEMO: {{ "%0.1f"|format(algorithm.memory.memory_score) }}
340346
</span>
341-
{{ algorithm_button_detail(algorithm) }}
342-
{{ algorithm_button_copy(algorithm) }}
343347
</div>
344348
</div>
345349
{% endfor %}
@@ -367,7 +371,7 @@ <h2 class="card-title">
367371
<a href="#two-phase" id="two-phase">Two-Phase Algorithms</a>
368372
</h2>
369373
</div>
370-
<p class="case-section case-note secondary">
374+
<p class="card-description">
371375
{{ case.two_phase_algorithms|length }} algorithm(s) computed by two-phase solver.
372376
</p>
373377
{% for algorithm in case.two_phase_algorithms %}
@@ -378,6 +382,8 @@ <h2 class="card-title">
378382
{% endfor %}
379383
</div>
380384
<div class="moves-footer">
385+
{{ algorithm_button_detail(algorithm) }}
386+
{{ algorithm_button_copy(algorithm) }}
381387
<span class="spec-label htm">
382388
HTM: {{ algorithm.metrics.htm }}
383389
</span>
@@ -387,8 +393,6 @@ <h2 class="card-title">
387393
<span class="spec-label memo">
388394
MEMO: {{ "%0.1f"|format(algorithm.memory.memory_score) }}
389395
</span>
390-
{{ algorithm_button_detail(algorithm) }}
391-
{{ algorithm_button_copy(algorithm) }}
392396
</div>
393397
</div>
394398
{% endfor %}
@@ -403,7 +407,7 @@ <h2 class="card-title">
403407
<a href="#external-links" id="external-links">External Resources</a>
404408
</h2>
405409
</div>
406-
<div class="case-links-grid case-section">
410+
<div class="case-links-grid">
407411
{% if case.cubing_fache_url %}
408412
<a href="{{ case.cubing_fache_url }}" target="_blank" class="link case-external-link">
409413
<i class="fas fa-external-link-alt"></i>

term_timer/server/templates/algorithm.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ <h2 class="card-title">
467467
{% endfor %}
468468
</div>
469469
<div class="moves-footer">
470+
{{ algorithm_button_copy(algorithm) }}
470471
<a class="spec-label htm" href="#metrics">
471472
HTM: {{ algorithm.metrics.htm }}
472473
</a>
@@ -476,7 +477,6 @@ <h2 class="card-title">
476477
<a class="spec-label memo" href="#memory">
477478
MEMO: {{ "%0.1f"|format(algorithm.memory.memory_score) }}
478479
</a>
479-
{{ algorithm_button_copy(algorithm) }}
480480
</div>
481481
</div>
482482
<br>
@@ -529,6 +529,8 @@ <h2 class="card-title">
529529
{% endfor %}
530530
</div>
531531
<div class="moves-footer">
532+
{{ algorithm_button_detail(inverse_variation) }}
533+
{{ algorithm_button_copy(inverse_variation) }}
532534
<span class="spec-label htm">
533535
HTM: {{ inverse_variation.metrics.htm }}
534536
</span>
@@ -538,8 +540,6 @@ <h2 class="card-title">
538540
<span class="spec-label memo">
539541
MEMO: {{ "%0.1f"|format(inverse_variation.memory.memory_score) }}
540542
</span>
541-
{{ algorithm_button_detail(inverse_variation) }}
542-
{{ algorithm_button_copy(inverse_variation) }}
543543
</div>
544544
</div>
545545

@@ -588,6 +588,8 @@ <h2 class="card-title">
588588
{% endfor %}
589589
</div>
590590
<div class="moves-footer">
591+
{{ algorithm_button_detail(variation.algorithm) }}
592+
{{ algorithm_button_copy(variation.algorithm) }}
591593
<span class="spec-label htm">
592594
HTM: {{ variation.algorithm.metrics.htm }}
593595
</span>
@@ -597,8 +599,6 @@ <h2 class="card-title">
597599
<span class="spec-label memo">
598600
MEMO: {{ "%0.1f"|format(variation.algorithm.memory.memory_score) }}
599601
</span>
600-
{{ algorithm_button_detail(variation.algorithm) }}
601-
{{ algorithm_button_copy(variation.algorithm) }}
602602
</div>
603603
</div>
604604
{% endfor %}
@@ -624,6 +624,8 @@ <h2 class="card-title">
624624
{% endfor %}
625625
</div>
626626
<div class="moves-footer">
627+
{{ algorithm_button_detail(variation.algorithm) }}
628+
{{ algorithm_button_copy(variation.algorithm) }}
627629
<span class="spec-label htm">
628630
HTM: {{ variation.algorithm.metrics.htm }}
629631
</span>
@@ -633,8 +635,6 @@ <h2 class="card-title">
633635
<span class="spec-label memo">
634636
MEMO: {{ "%0.1f"|format(variation.algorithm.memory.memory_score) }}
635637
</span>
636-
{{ algorithm_button_detail(variation.algorithm) }}
637-
{{ algorithm_button_copy(variation.algorithm) }}
638638
</div>
639639
</div>
640640
{% endfor %}

term_timer/server/templates/solve.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ <h2 class="card-title">
845845
</h2>
846846
</div>
847847
<p class="card-description">
848-
Computer generated scramble
848+
Computer generated scramble.
849849
</p>
850850
<div class="scramble-card moves-card">
851851
<div class="moves-content">
@@ -870,7 +870,7 @@ <h2 class="card-title">
870870
</h2>
871871
</div>
872872
<p class="card-description">
873-
Human generated solution
873+
Human generated solution.
874874
</p>
875875
{% set solution = solve.solution|prettify %}
876876
<div class="solution-card moves-card">
@@ -1396,7 +1396,7 @@ <h2 class="card-title">
13961396
</h2>
13971397
</div>
13981398
<p class="card-description">
1399-
Raw moves recorded
1399+
Raw moves recorded from the bluetooth cube.
14001400
</p>
14011401
<div class="solution-card moves-card">
14021402
<div class="moves-content">

0 commit comments

Comments
 (0)