From dbbb3743d8232d8296e7822e9140285a22038771 Mon Sep 17 00:00:00 2001 From: Filip Dragovic <128386451+FroudeDescartes@users.noreply.github.com> Date: Thu, 28 Nov 2024 02:02:33 +0100 Subject: [PATCH] Issue docs 174 (#421) * update: announcement set to not visible * fix: renamed figcaption to div * init conditions * fix: not showing irrelevant content & guidelines * fix: guidelines accessible but not visible in header --- components/app/header.vue | 16 ++++++++----- components/content/sh-guidelines.vue | 9 +++++++ components/content/sh-img-container.vue | 4 ++-- components/prev-next-page.vue | 24 ++++++++++++++++--- content/announcement.md | 2 +- .../1.looks-feel/_dir.yaml | 0 .../1.looks-feel/index.md | 0 .../2.components/_dir.yaml | 0 .../2.components/index.md | 0 .../2.components/sh-action-card.md | 0 .../2.components/sh-alert.md | 0 .../2.components/sh-avatar.md | 0 .../2.components/sh-badge.md | 0 .../2.components/sh-button.md | 0 .../2.components/sh-card.md | 0 .../2.components/sh-carousel.md | 0 .../2.components/sh-column.md | 0 .../2.components/sh-dynamic-table.md | 0 .../2.components/sh-faq.md | 0 .../2.components/sh-img-container.md | 0 .../2.components/sh-list-cards.md | 0 .../2.components/sh-micro-card.md | 0 .../2.components/sh-multi-column.md | 0 .../2.components/sh-segment.md | 0 .../2.components/sh-social.md | 0 .../2.components/sh-text-img.md | 0 .../2.components/sh-two-columns.md | 0 .../2.components/sh-video.md | 0 .../{_8.guidelines => guidelines}/_dir.yaml | 0 .../{_8.guidelines => guidelines}/index.md | 4 ++-- 30 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 components/content/sh-guidelines.vue rename content/{_8.guidelines => guidelines}/1.looks-feel/_dir.yaml (100%) rename content/{_8.guidelines => guidelines}/1.looks-feel/index.md (100%) rename content/{_8.guidelines => guidelines}/2.components/_dir.yaml (100%) rename content/{_8.guidelines => guidelines}/2.components/index.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-action-card.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-alert.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-avatar.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-badge.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-button.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-card.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-carousel.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-column.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-dynamic-table.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-faq.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-img-container.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-list-cards.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-micro-card.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-multi-column.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-segment.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-social.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-text-img.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-two-columns.md (100%) rename content/{_8.guidelines => guidelines}/2.components/sh-video.md (100%) rename content/{_8.guidelines => guidelines}/_dir.yaml (100%) rename content/{_8.guidelines => guidelines}/index.md (95%) diff --git a/components/app/header.vue b/components/app/header.vue index 9f4722004..849de732e 100644 --- a/components/app/header.vue +++ b/components/app/header.vue @@ -141,12 +141,16 @@ const { data: navigation } = await useAsyncData("navigation", () => fetchContentNavigation(), ); -const topLinks = navigation.value.reduce((previous, current) => { - if (current.children) { - previous.push(current); - } - return previous; -}, []); +const topLinks = computed(() => + navigation.value.reduce((previous, current) => { + // Exclude the /guidelines path + if (current.children && !current._path.includes('/guidelines')) { + previous.push(current); + } + return previous; + }, [] as typeof navigation.value), +); + const header = useAppConfig().header; const route = useRoute(); diff --git a/components/content/sh-guidelines.vue b/components/content/sh-guidelines.vue new file mode 100644 index 000000000..8335d28c2 --- /dev/null +++ b/components/content/sh-guidelines.vue @@ -0,0 +1,9 @@ + + {{ guidelines }} + + + \ No newline at end of file diff --git a/components/content/sh-img-container.vue b/components/content/sh-img-container.vue index 489315b7a..1144cdcd1 100644 --- a/components/content/sh-img-container.vue +++ b/components/content/sh-img-container.vue @@ -5,9 +5,9 @@ - + - + diff --git a/components/prev-next-page.vue b/components/prev-next-page.vue index dd812d915..c14cc8756 100644 --- a/components/prev-next-page.vue +++ b/components/prev-next-page.vue @@ -1,13 +1,13 @@ - + {{ prev.title }} {{ prev.description }} - + {{ next.title }} {{ next.description }} @@ -17,9 +17,27 @@