Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localstuff #47

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions assets/css/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
--font-size-xl: 1.25rem; /* 20px */
--font-size-2xl: 1.5rem; /* 24px */
--font-size-3xl: 1.875rem; /* 30px */
--font-size-4xl: 2.25rem; /* 36px */
--font-size-4xl: 2.5rem; /* 40px */
--font-size-5xl: 3rem; /* 48px */
--font-size-6xl: 3.75rem; /* 60px */
--font-size-7xl: 4.5rem; /* 72px */
Expand All @@ -103,7 +103,7 @@
--line-height-xl: 1.75rem; /* 28px */
--line-height-2xl: 2rem; /* 32px */
--line-height-3xl: 2.25rem; /* 36px */
--line-height-4xl: 2.5rem; /* 40px */
--line-height-4xl: 2.75rem; /* 40px */
--line-height-5xl: 1;
--line-height-6xl: 1;
--line-height-7xl: 1;
Expand Down Expand Up @@ -173,4 +173,5 @@

/* Shadows */
--shadow-base: 0px 1.875rem 3.75rem -1.875rem rgba(0, 0, 0, 0.05), 0px 0.125rem 0.25rem 0px rgba(0, 0, 0, 0.05);
--shadow-primary: 0px 1.875rem 3.75rem -1.875rem rgba(102, 68, 255, 0.1), 0px 0.125rem 0.25rem 0px rgba(102, 68, 255, 0.1);
}
62 changes: 49 additions & 13 deletions components/Base/Heading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
if (headingSize === 'title') return 'large';
return headingSize;
});

const formattedContent = computed(() => {

Check warning on line 26 in components/Base/Heading.vue

View workflow job for this annotation

GitHub Actions / Lint

'formattedContent' is assigned a value but never used. Allowed unused vars must match /^_/u
// TinyMCE wraps content in <p> tags, so we need to strip them out
return unref(props.content).replace(/<p>/g, '').replace(/<\/p>/g, '');
});
</script>

<template>
Expand All @@ -40,22 +45,12 @@
<BaseIcon v-if="icon && size !== 'title'" :name="icon" :size="iconSize" :weight="700" />

<!-- eslint-disable-next-line vue/no-v-html -->
<span class="content" v-html="content" />
<span v-html="content" />
</component>
</div>
</template>

<style lang="scss" scoped>
.base-heading-container {
container-type: inline-size;
}

.content {
:deep(> *) {
margin: 0;
}
}

<style scoped lang="scss">
.display {
font-family: var(--family-display);
}
Expand All @@ -66,9 +61,10 @@

.base-heading {
color: currentColor;
font-weight: 700;
font-weight: 600;
margin: 0;
text-align: v-bind(align);
text-wrap: balance;
}

.base-heading :deep(em) {
Expand All @@ -83,13 +79,53 @@
vertical-align: middle;
}

<<<<<<< Updated upstream
.small {
font-size: var(--font-size-base);
line-height: var(--line-height-base);

.base-icon {
vertical-align: -2px;
margin-right: var(--space-05);
=======
.title {
font-size: var(--font-size-5xl);
line-height: var(--line-height-5xl);

@media (width > 50rem) {
font-size: var(--font-size-7xl);
line-height: var(--line-height-7xl);
}

@media (width > 75rem) {
font-size: var(--font-size-8xl);
line-height: var(--line-height-8xl);
}
}

.medium {
font-size: var(--font-size-2xl);
line-height: var(--line-height-2xl);
}

.medium .base-icon {
vertical-align: -4px;
margin-right: var(--space-1);
}

.small {
font-size: var(--font-size-sm);
line-height: var(--line-height-sm);

@media (width > 50rem) {
font-size: var(--font-size-base);
line-height: var(--line-height-base);
}

@media (width > 75rem) {
font-size: var(--font-size-lg);
line-height: var(--line-height-lg);
>>>>>>> Stashed changes
}
}

Expand Down
104 changes: 93 additions & 11 deletions components/Base/Text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,105 @@ defineProps<BaseTextProps>();
<div class="base-text" :class="[`align-${align}`]" v-html="content" />
</template>

<style scoped>
<style lang="scss" scoped>
.base-text {
font-family: var(--family-body);
font-size: var(--font-size-base);
line-height: var(--line-height-xl);
color: var(--gray-500);
text-align: v-bind(align);

/* @TODO: Add styling for all base elements */
}
/* First child element should have no top margin */
:deep(:first-child) {
margin-block-start: 0;
}

.align-start {
text-align: start;
}
/* Last child element should have no bottom margin */
:deep(:last-child) {
margin-block-end: 0;
}

.align-center {
text-align: center;
}
/* Base Size */
:deep(p) {
margin-block: var(--space-4);
}

:deep(ul) {
margin-block: var(--space-6);
}

:deep(ol) {
margin-block: var(--space-6);
}

:deep(ul),
:deep(ol) {
padding-inline-start: var(--space-6);
}

:deep(li) {
margin-block: var(--space-2);
}

:deep(li) {
margin-block: var(--space-2);
}

:deep(h1),
:deep(h2),
:deep(h3),
:deep(h4),
:deep(h5),
:deep(h6) {
font-family: var(--family-display);
}

:deep(h1) {
font-size: var(--font-size-2xl);
line-height: var(--line-height-2xl);
font-weight: 700;
margin-block-start: var(--space-8);
margin-block-end: var(--space-6);
}

:deep(h2) {
font-size: var(--font-size-xl);
line-height: var(--line-height-xl);
font-weight: 700;
margin-block-start: var(--space-8);
margin-block-end: var(--space-4);
}

:deep(h3) {
font-size: var(--font-size-lg);
line-height: var(--line-height-lg);
font-weight: 700;
margin-block-start: var(--space-8);
margin-block-end: var(--space-4);
}

:deep(h4) {
font-size: var(--font-size-base);
line-height: var(--line-height-base);
font-weight: 700;
margin-block-start: var(--space-8);
margin-block-end: var(--space-4);
}

:deep(h5) {
font-size: var(--font-size-sm);
line-height: var(--line-height-sm);
font-weight: 700;
margin-block-start: var(--space-8);
margin-block-end: var(--space-4);
}

.align-end {
text-align: end;
:deep(h6) {
font-size: var(--font-size-xs);
line-height: var(--line-height-xs);
font-weight: 700;
margin-block-start: var(--space-8);
margin-block-end: var(--space-4);
}
}
</style>
39 changes: 39 additions & 0 deletions components/Block/CardGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
cards: [
'id',
'title',
<<<<<<< Updated upstream

Check failure on line 22 in components/Block/CardGroup.vue

View workflow job for this annotation

GitHub Actions / Typecheck

Merge conflict marker encountered.
=======

Check failure on line 23 in components/Block/CardGroup.vue

View workflow job for this annotation

GitHub Actions / Typecheck

Merge conflict marker encountered.
'image',
'image_size',
>>>>>>> Stashed changes

Check failure on line 26 in components/Block/CardGroup.vue

View workflow job for this annotation

GitHub Actions / Typecheck

Merge conflict marker encountered.
'description',
'external_url',
'image',
Expand All @@ -36,8 +41,14 @@
<BaseCard
v-for="card in block.cards"
:key="card.id"
<<<<<<< Updated upstream
:title="card.title ?? undefined"
:image="card.image ?? undefined"
=======
:title="card.title"
:image="card.image"
:image_size="card.image_size"
>>>>>>> Stashed changes
:description="card.description"
:href="card.external_url ?? undefined"
:to="card.page?.permalink /*?? resourcePermalink(card.resource) */ ?? undefined"
Expand All @@ -48,7 +59,35 @@
<style lang="scss" scoped>
.block-cardgroup {
display: grid;
<<<<<<< Updated upstream
grid-template-columns: repeat(auto-fit, minmax(var(--space-72), 1fr));
=======

gap: var(--space-8);

@media (width > 50rem) {
grid-template-columns: repeat(2, 1fr);
}
}

.white-group {
display: grid;

@media (width > 30rem) {
grid-template-columns: repeat(2, 1fr);
}

@media (width > 50rem) {
grid-template-columns: repeat(3, 1fr);
}

gap: var(--space-8);
}

.resource-group {
display: grid;
grid-template-columns: repeat(1, 1fr);
>>>>>>> Stashed changes
gap: var(--space-8);
}
</style>
29 changes: 16 additions & 13 deletions components/Block/Columns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,34 @@ const components: Record<ComponentType, ReturnType<typeof resolveComponent>> = {

<template>
<div v-if="block" class="block-columns">
<div class="column">
<div class="column col-one">
<component :is="components[row.collection!]" v-for="row in block.col_one" :key="row.id" :uuid="row.item" />
</div>

<div class="column">
<div class="column col-two">
<component :is="components[row.collection!]" v-for="row in block.col_two" :key="row.id" :uuid="row.item" />
</div>
</div>
</template>

<style scoped>
<style scoped lang="scss">
.block-columns {
display: grid;
position: relative;
grid-template-columns: repeat(2, 1fr);
gap: var(--space-16);
container-type: inline-size;
flex-wrap: wrap;
width: 100%;

@media (width > 50rem) {
display: flex;
gap: var(--space-16);
}
}

.block-columns .column {
grid-column: auto / span 2;
:deep(.column) {
width: 100%;
> * + * {
margin-top: var(--space-4);
}

@container (width > 50rem) {
grid-column: auto / span 1;
@media (width > 50rem) {
width: 50%;
}
}
</style>
7 changes: 7 additions & 0 deletions components/Block/MediaFullWidth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
})
)
);

const imgSrc = computed(() => {

Check warning on line 16 in components/Block/MediaFullWidth.vue

View workflow job for this annotation

GitHub Actions / Lint

'imgSrc' is assigned a value but never used. Allowed unused vars must match /^_/u
const type = unref(block)?.type;
const imageId = unref(block)?.image?.id;
if (type !== 'image' || !imageId) return null;
return imageId;
});
</script>

<template>
Expand Down
8 changes: 8 additions & 0 deletions components/Comp/Heading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@
</script>

<template>
<<<<<<< Updated upstream

Check failure on line 18 in components/Comp/Heading.vue

View workflow job for this annotation

GitHub Actions / Lint

Parsing error: invalid-first-character-of-tag-name

Check failure on line 18 in components/Comp/Heading.vue

View workflow job for this annotation

GitHub Actions / Lint

Parsing error: invalid-first-character-of-tag-name

Check failure on line 18 in components/Comp/Heading.vue

View workflow job for this annotation

GitHub Actions / Lint

Parsing error: invalid-first-character-of-tag-name

Check failure on line 18 in components/Comp/Heading.vue

View workflow job for this annotation

GitHub Actions / Lint

Parsing error: invalid-first-character-of-tag-name

Check failure on line 18 in components/Comp/Heading.vue

View workflow job for this annotation

GitHub Actions / Lint

Parsing error: invalid-first-character-of-tag-name

Check failure on line 18 in components/Comp/Heading.vue

View workflow job for this annotation

GitHub Actions / Lint

Parsing error: invalid-first-character-of-tag-name

Check failure on line 18 in components/Comp/Heading.vue

View workflow job for this annotation

GitHub Actions / Lint

Parsing error: invalid-first-character-of-tag-name
<div class="comp-heading-container">
<BaseBadge v-if="comp?.preheading" class="badge" caps border>{{ comp.preheading }}</BaseBadge>
<BaseHeading v-if="comp?.heading" class="heading" :content="comp.heading" />
<BaseText v-if="comp?.subheading" class="subheading" :content="comp.subheading" />
</div>
=======
<div>
<BaseBadge v-if="comp?.preheading" caps>{{ comp.preheading }}</BaseBadge>
</div>
<BaseHeading v-if="comp?.heading" :content="comp.heading" tag="h3" />
<BaseText v-if="comp?.subheading" :content="comp.subheading" />
>>>>>>> Stashed changes
</template>

<style lang="scss" scoped>
Expand Down
2 changes: 1 addition & 1 deletion components/Comp/Quote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const { data: comp } = useAsyncData(props.uuid, () =>
align-items: flex-start;
padding: var(--space-4) var(--space-8);
background: var(--gray-100);
border-radius: var(--rounded-lg);
border-radius: var(--rounded-md);
}

.comp-quote > * + * {
Expand Down
Loading
Loading