forked from nuxt/website-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: partners new list and details page (nuxt#1857)
Co-authored-by: Florent <[email protected]> Co-authored-by: Sylvain Marroufin <[email protected]>
- Loading branch information
1 parent
91c23ac
commit b92aeb0
Showing
356 changed files
with
1,488 additions
and
1,201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
stroke-width="2" | ||
d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" | ||
/> | ||
</svg> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
stroke-width="2" | ||
d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" | ||
/> | ||
</svg> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<template> | ||
<ul class="flex flex-wrap"> | ||
<li | ||
v-for="(service, index) in services" | ||
:key="index" | ||
class="bg-cloud-surface dark:bg-sky-dark rounded-md px-4 py-2 mt-2 mr-2" | ||
> | ||
{{ service }} | ||
</li> | ||
</ul> | ||
</template> | ||
<script> | ||
export default { | ||
props: { | ||
services: { | ||
type: Array, | ||
default: () => [], | ||
required: true | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<div class="flex flex-col space-y-4 items-center text-center"> | ||
<img :src="`/img/partners/categories/${icon}`" :alt="category" class="w-12 h-12" /> | ||
<h2 class="font-bold text-md md:text-lg"> | ||
<Markdown use="title" unwrap="p" /> | ||
</h2> | ||
<p class="text-sm md:text-base px-8 md:px-12 pb-2"> | ||
<Markdown use="description" unwrap="p" /> | ||
</p> | ||
<SectionButton | ||
:aria-label="category" | ||
size="sm" | ||
class="border border-sky-darker rounded-md hover:border-sky-dark hover:text-sky-dark" | ||
:to="`/partners#${category}`" | ||
> | ||
<Markdown use="button" unwrap="p" /> | ||
</SectionButton> | ||
</div> | ||
</template> | ||
<script> | ||
export default { | ||
props: { | ||
icon: { | ||
type: String, | ||
required: true | ||
}, | ||
category: { | ||
type: String, | ||
required: true | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<template> | ||
<div class="py-4 d-container-content light:text-sky-darker dark:text-white mb-4"> | ||
<div class="flex space-x-4 items-center pb-4"> | ||
<img :src="`/img/partners/categories/${icon}`" :alt="category" class="w-8 h-8" /> | ||
<h2 :id="category" class="font-semibold text-center text-display-6 relative"> | ||
<Markdown use="category-title" unwrap="p" /> | ||
</h2> | ||
</div> | ||
<ul class="grid sm:grid-cols-2 lg:grid-cols-3 gap-6"> | ||
<LogoCard v-for="partner in partners" :key="partner.title" :item="partner"> | ||
<template #footer> | ||
<PartnerServices :services="partner.services" class="text-sm mt-4" /> | ||
</template> | ||
</LogoCard> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, useContext, ref, useFetch, onMounted } from '@nuxtjs/composition-api' | ||
import { scrollToHeading } from '@docus/theme/runtime' | ||
export default defineComponent({ | ||
props: { | ||
category: { | ||
type: String, | ||
required: true | ||
}, | ||
icon: { | ||
type: String, | ||
required: true | ||
} | ||
}, | ||
setup(props) { | ||
const { $docus, i18n } = useContext() | ||
const partners = ref(null) | ||
useFetch(async () => { | ||
partners.value = ( | ||
await $docus | ||
.search(`/collections/partners/${props.category}`, { deep: true }) | ||
.where({ language: i18n.locale }) | ||
.fetch() | ||
).map(partner => ({ ...partner, link: null, to: `/partners/${partner.slug}` })) | ||
}) | ||
onMounted(() => { | ||
if (window.location.hash) { | ||
const hash = window.location.hash.replace('#', '') | ||
// do not remove setTimeout (wrong scroll pos) | ||
setTimeout(() => { | ||
scrollToHeading(hash, '--docs-scroll-margin-block') | ||
}, 300) | ||
} | ||
}) | ||
return { | ||
partners | ||
} | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.