mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-08-17 16:07:18 +02:00
reorder items, try again to fix store desc line breaks
This commit is contained in:
+3
-2
@@ -44,17 +44,18 @@ const items = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
const resourceItems = [
|
const resourceItems = [
|
||||||
|
{ title: 'FAQ', icon: 'mdi-help-circle', to: '/what-is-an-alpr' },
|
||||||
{ title: 'Public Records', icon: 'mdi-file-document', to: '/foia' },
|
{ title: 'Public Records', icon: 'mdi-file-document', to: '/foia' },
|
||||||
{ title: 'City Council', icon: 'mdi-account-voice', to: '/council' },
|
{ title: 'City Council', icon: 'mdi-account-voice', to: '/council' },
|
||||||
{ title: 'FAQ', icon: 'mdi-help-circle', to: '/what-is-an-alpr' },
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const getInvolvedItems = [
|
const getInvolvedItems = [
|
||||||
|
{ title: 'Submit Cameras', icon: 'mdi-map-marker-plus', to: '/report' },
|
||||||
{ title: 'Local Groups', icon: 'mdi-account-group', to: '/groups' },
|
{ title: 'Local Groups', icon: 'mdi-account-group', to: '/groups' },
|
||||||
{ title: 'Contact', icon: 'mdi-email-outline', to: '/contact' },
|
{ title: 'Contact', icon: 'mdi-email-outline', to: '/contact' },
|
||||||
{ title: 'GitHub', icon: 'mdi-github', href: 'https://github.com/frillweeman/deflock'},
|
{ title: 'GitHub', icon: 'mdi-github', href: 'https://github.com/frillweeman/deflock'},
|
||||||
{ title: 'Submit Cameras', icon: 'mdi-map-marker-plus', to: '/report' },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const drawer = ref(false)
|
const drawer = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,14 +57,13 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row v-if="collectionDescription" justify="center" class="mb-6">
|
<v-row v-if="collectionDescription" justify="center" class="mb-6">
|
||||||
<v-col cols="12" md="8" lg="6" class="text-center">
|
<v-col cols="12" md="8" lg="6" class="text-center collection-description-col">
|
||||||
<p class="text-body-2 text-medium-emphasis" style="white-space: pre-line;">
|
<div class="text-body-2 text-medium-emphasis" v-html="collectionDescription" />
|
||||||
{{ collectionDescription }}
|
|
||||||
</p>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Skeleton while Shopify SDK initialises -->
|
<!-- Skeleton while Shopify SDK initialises -->
|
||||||
<v-row v-if="!shopifyReady" class="mt-2">
|
<v-row v-if="!shopifyReady" class="mt-2">
|
||||||
<v-col
|
<v-col
|
||||||
@@ -601,7 +600,7 @@ async function fetchCollectionDescription(id: string): Promise<void> {
|
|||||||
query: `
|
query: `
|
||||||
query CollectionDescription($id: ID!) {
|
query CollectionDescription($id: ID!) {
|
||||||
collection(id: $id) {
|
collection(id: $id) {
|
||||||
description
|
descriptionHtml
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
@@ -613,7 +612,8 @@ async function fetchCollectionDescription(id: string): Promise<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
collectionDescription.value = json?.data?.collection?.description ?? '';
|
collectionDescription.value = json?.data?.collection?.descriptionHtml ?? '';
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
collectionDescription.value = '';
|
collectionDescription.value = '';
|
||||||
}
|
}
|
||||||
@@ -765,3 +765,16 @@ onMounted(() => {
|
|||||||
fetchCollectionDescription(collectionId.value);
|
fetchCollectionDescription(collectionId.value);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* Shopify's descriptionHtml comes back as raw <p>/<br>/etc. markup; reset
|
||||||
|
the default browser paragraph margins so multi-paragraph descriptions
|
||||||
|
don't end up with oversized gaps inside this centered column. */
|
||||||
|
.collection-description-col :deep(p) {
|
||||||
|
margin: 0 0 0.75rem;
|
||||||
|
}
|
||||||
|
.collection-description-col :deep(p:last-child) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user