Skip to content

Commit a1a504b

Browse files
Table look for legend paragraphs
1 parent 018de60 commit a1a504b

3 files changed

Lines changed: 39 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Note: _The order of this list might not match the order these features will be a
5959

6060
_Release date: ???????????????????????_
6161

62-
_Work Time: 8h 00m_
62+
_Work Time: 8h 40m_
6363

6464
#### v1.2
6565

pages/equations.css

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ input[name=select] {
104104
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
105105
}
106106

107-
.card > div {
107+
.card:not(:first-of-type) > div {
108108
display: flex;
109109
flex-direction: column;
110110
flex-wrap: wrap;
@@ -126,6 +126,27 @@ h5 {
126126
margin: .15em;
127127
}
128128

129+
.card:first-of-type p {
130+
text-align: left;
131+
}
132+
133+
.card p > span {
134+
display: inline-block;
135+
margin-left: 1em;
136+
}
137+
138+
.card p > span:nth-child(1) {
139+
display: none;
140+
}
141+
142+
.card p > span:nth-child(2) {
143+
width: 6ch;
144+
}
145+
146+
.card p > span:nth-child(3) {
147+
width: max-content;
148+
}
149+
129150
mjx-container[jax="CHTML"][display="true"] {
130151
margin: .5em 0 !important;
131152
}

pages/equations.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function setup() {
3333
label.append(link);
3434
div.append(btn, label, document.createElement('br'));
3535
list.append(div);
36+
//reverse highlighting labels on scroll////////////////////////////////////////////////////
3637
}
3738

3839
// content generation
@@ -61,9 +62,21 @@ function setup() {
6162
let strings = database[elt.obj["Name"]][indices[i]];
6263
for (let j = 0; j < strings.length; j++) {
6364
let p = document.createElement('p');
64-
p.innerHTML = strings[j];
65-
if (i != 0) p.innerHTML = strings[j].replaceAll("/", "\\");
66-
innerContainer.append(p);
65+
if (i != 0) {
66+
p.innerHTML = strings[j];
67+
p.innerHTML = strings[j].replaceAll("/", "\\");
68+
innerContainer.append(p);
69+
} else {
70+
let re = /(.+)\s?:\s?(.+)/;
71+
let spans = re.exec(strings[j]);
72+
for (let str of spans) {
73+
let s = document.createElement('span');
74+
s.innerHTML = str;
75+
p.append(s);
76+
}
77+
let br = document.createElement('br');
78+
innerContainer.append(p, br);
79+
}
6780
}
6881
cards[i].append(title, innerContainer);
6982
}

0 commit comments

Comments
 (0)