Skip to content

Commit 94d4970

Browse files
Merge branch 'design' into develop
2 parents 1aa1da4 + 0bed642 commit 94d4970

4 files changed

Lines changed: 52 additions & 15 deletions

File tree

frontend/src/lib/assets/styles/shiki.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[color-scheme='dark'] .shiki,
2-
[color-scheme='dark'] .shiki span {
1+
[data-color-scheme='dark'] .shiki,
2+
[data-color-scheme='dark'] .shiki span {
33
background-color: var(--shiki-dark-bg) !important;
44
color: var(--shiki-dark) !important;
55
}

frontend/src/lib/components/InscriptionMaterialDetail.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
{#if material?.ref}
1717
<a class="badge strong" href={material.ref}>
1818
{material.type}
19-
{#if material.subtype && material.subtype.length }
19+
{#if material.subtype && material.subtype.length}
2020
> {material.subtype.join(', ')}
2121
{/if}
2222
</a>
2323
{:else}
2424
{material.type}
25-
{#if material.subtype && material.subtype.length }
25+
{#if material.subtype && material.subtype.length}
2626
> {material.subtype.join(', ')}
2727
{/if}
2828
{/if}
@@ -79,4 +79,8 @@
7979
overflow: visible;
8080
text-overflow: clip;
8181
}
82+
83+
dt + dd {
84+
margin-top: var(--size-2);
85+
}
8286
</style>

frontend/src/lib/components/inscription/InscriptionOverview.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
src="{config.imageServer}{slug}/{images[0]?.url || ''}/{config.imageThumbParams}"
7171
alt={images[0]?.desc || 'Inscription image'}
7272
/>
73-
<section id="image-viewer" style="height: 50vh; width: 100%;"></section>
73+
<section id="image-viewer" style="height: 44vh; width: 100%;"></section>
7474
<figcaption>{curImageTitle}</figcaption>
7575
</figure>
7676
{:else}
@@ -113,6 +113,7 @@
113113
border-right: var(--border-size-1) solid var(--border-color);
114114
height: 100%;
115115
overflow-y: auto;
116+
overflow-x: hidden;
116117
margin-top: 0;
117118
padding-inline: var(--size-4);
118119
padding-top: 0;
@@ -137,9 +138,9 @@
137138
#overview .image-placeholder {
138139
grid-column: 1;
139140
grid-row: 1;
140-
margin: 0 auto;
141-
padding-inline: var(--size-2);
142-
width: 100%;
141+
margin-inline: calc(var(--size-4) * -1);
142+
padding-inline: 0;
143+
width: calc(100% + (var(--size-4) * 2));
143144
}
144145
145146
#overview #facsimile-images figcaption {

frontend/src/routes/inscription/[slug]/+page.svelte

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
*/
3232
function nullIfDivEmpty(div) {
3333
// Example
34-
// {id: 'commentary', html: '<h2>commentary</h2> <p> </p> '} => null
34+
// {id: 'commentary', html: '<h2>commentary</h2> <p> </p> '} => null
3535
let ret = null;
3636
if (div && div.html) {
3737
let html = div.html.trim();
3838
// removes heading from start
3939
html = html.replace(/^<(h[1-6])>.*?<\/\1>/, '');
4040
// removes empty <p>
4141
html = html.replace(/<p(\s[^>]*)?>\s*(?:&nbsp;|\s)*<\/p>/gi, '');
42-
html = html.trim()
42+
html = html.trim();
4343
if (html.length) {
4444
ret = div;
4545
}
@@ -49,11 +49,7 @@
4949
5050
const attribution = $derived(html?.editions?.[0]?.html);
5151
const editions = $derived(html?.divs?.find((div) => div.id === 'editions'));
52-
const apparatus = $derived(
53-
nullIfDivEmpty(
54-
html?.divs?.find((div) => div.id === 'apparatus')
55-
)
56-
);
52+
const apparatus = $derived(nullIfDivEmpty(html?.divs?.find((div) => div.id === 'apparatus')));
5753
const translations = $derived(html?.divs?.filter((div) => div.id === 'translation') || []);
5854
5955
/**
@@ -609,6 +605,42 @@ ${changeDate ? `Last revised: ${changeDate}.` : ''}
609605
padding-block: var(--size-2);
610606
}
611607
608+
/* ZL: consistent spacing between section headings and their content */
609+
#text-type h2 {
610+
margin-bottom: var(--size-3);
611+
}
612+
613+
#commentary :global(h2) {
614+
padding-bottom: var(--size-3);
615+
}
616+
617+
#physical-description h3 {
618+
margin-top: var(--size-6);
619+
margin-bottom: var(--size-2);
620+
}
621+
622+
/* ZL: improve spacing and hierarchy in Physical description */
623+
#physical-description dl {
624+
display: flex;
625+
flex-direction: column;
626+
gap: 0;
627+
margin-block: var(--size-2) var(--size-6);
628+
}
629+
630+
#physical-description dt {
631+
font-weight: bold;
632+
margin-top: var(--size-4);
633+
}
634+
635+
#physical-description dt:first-child {
636+
margin-top: 0;
637+
}
638+
639+
#physical-description dd {
640+
margin-inline-start: 0;
641+
margin-top: var(--size-1);
642+
}
643+
612644
#content > section {
613645
border-bottom: var(--border-size-1) solid var(--border-color);
614646
padding-bottom: var(--size-8);

0 commit comments

Comments
 (0)