Commit 223c359 Sebastian Flick
committed
1 parent c28b7cc commit 223c359 Copy full SHA for 223c359
File tree 2 files changed +9
-7
lines changed
src/routes/textzeugen/[[sigla]]/[[thirties]]/[[verse]]
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 12
12
13
13
const generateLabel = (/** @type {String[]} */ sigla ) => {
14
14
const info = [... data .codices , ... data .fragments ];
15
- sigla .map ((s ) => {
16
- const found = info .find ((i ) => i .sigil === s);
15
+ sigla = sigla .map ((s ) => {
16
+ const found = info .find ((i ) => i .handle === s);
17
17
if (found) {
18
- const { sigil , handle , ... rest } = found;
19
- return ` ${ sigil} (${ rest} )` ;
18
+ const { sigil , loc , cod } = found;
19
+ const location = loc ? ` Standort: ${ loc} ` : ' ' ;
20
+ const codex = cod ? ` Codex: ${ cod} ` : ' ' ;
21
+ return ` <abbr title='${ [location, codex].join (' , ' )} '>${ sigil} </abbr>` ;
20
22
}
21
23
return s;
22
24
});
67
69
< div class = " grid gap-6 md:grid-cols-2 md:my-8" >
68
70
< p>
69
71
Dies ist die Textzeugenansicht . Derzeit {Number (data .content ? .length ) > 1 ? ' werden' : ' wird' }
70
- {data? .content ? generateLabel (selectedSigla) : ' keine Textzeugen' } angezeigt . Mit dem Selektor
72
+ {@html data? .content ? generateLabel (selectedSigla) : ' keine Textzeugen' } angezeigt . Mit dem Selektor
71
73
können Sie die Textzeugen wechseln.
72
74
< / p>
73
75
< TextzeugenSelector
85
87
>
86
88
< section>
87
89
< div class = " mb-4 relative" >
88
- < h2 class = " h2" > Textzeuge: {generateLabel ([content .sigla ])}< / h2>
90
+ < h2 class = " h2" > Textzeuge: {@html generateLabel ([content .sigla ])}< / h2>
89
91
< p>
90
92
Vers: {localVerses[i]}
91
93
< / p>
Original file line number Diff line number Diff line change 94
94
for (let i = 0 ; i < children .length ; i++ ) {
95
95
const child = children[i];
96
96
if (child .children .length === 0 ) {
97
- if (child .textContent .trim () !== ' ' ) {
97
+ if (child .textContent ? .trim () !== ' ' ) {
98
98
return false ;
99
99
}
100
100
} else {
You can’t perform that action at this time.
0 commit comments