add element pdf path

This commit is contained in:
Yisroel Baum 2026-05-27 20:19:11 +03:00
parent 6c6b3ad257
commit cc1735ee7b
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
13 changed files with 76 additions and 0 deletions

View file

@ -56,6 +56,18 @@ watch(
v-html="element.richText"
/>
<div v-if="element.pdfPath !== null" class="element-page__actions">
<a
:href="element.pdfPath"
class="element-page__pdf-link"
data-cy="element-pdf-link"
target="_blank"
rel="noreferrer"
>
View PDF
</a>
</div>
<nav
v-if="childElements.length > 0"
class="element-page__children"
@ -137,6 +149,44 @@ watch(
font-weight: 700;
}
.element-page__actions {
display: flex;
justify-content: center;
margin-top: 1.75rem;
}
.element-page__pdf-link {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 2.75rem;
padding: 0.7rem 1.15rem;
color: var(--color-white);
background: var(--color-olive);
border-radius: 8px;
font-family: var(--font-sans);
font-size: 0.95rem;
font-weight: 700;
line-height: 1;
text-decoration: none;
transition:
background-color 180ms ease,
box-shadow 180ms ease,
transform 180ms ease;
}
.element-page__pdf-link:hover,
.element-page__pdf-link:focus-visible {
background: #4d5b3c;
box-shadow: 0 10px 24px rgb(44 44 44 / 12%);
transform: translateY(-1px);
}
.element-page__pdf-link:focus-visible {
outline: 3px solid rgb(94 107 76 / 38%);
outline-offset: 4px;
}
.element-page__children {
margin-top: 3rem;
}