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

docs: add sponsors and ads to sidebar #420

Merged
merged 53 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
93b4378
:sparkles: (docs and exemple ) add collapsed and redirect navigation
Flosciante Jun 11, 2021
fc5277d
:bento: (iconAlert) add icon alert
Flosciante Jun 11, 2021
40e9cd7
:wrench: (windi.config.js) add purple color
Flosciante Jun 11, 2021
60ea89a
:sparkles: (Alert) add Alert component and new alert types
Flosciante Jun 11, 2021
dada4d4
:bug: (Alert) fix classes and name
Flosciante Jun 11, 2021
31fbcd0
:sparkles: (iconAlert) update svg
Flosciante Jun 11, 2021
7de42a5
:recycle: (installation) refacto w/ docus component
Flosciante Jun 11, 2021
33f9fab
:recycle: (routing) refacto w/ docus component
Flosciante Jun 11, 2021
89b86ab
:recycle: (directory-structure) refacto w/ docus compoenents
Flosciante Jun 11, 2021
08587e5
:recycle: (commands) refacto w/ docus components
Flosciante Jun 11, 2021
0033669
:recycle: (docs/conclusion) refacto w/ docus components
Flosciante Jun 11, 2021
05df440
:recycle: (docs/upgrading) refacto w/ docus components
Flosciante Jun 11, 2021
4b6f57f
:recycle: (docs/views) refacto w/ docus components
Flosciante Jun 11, 2021
3d3d077
:recycle: (docs - context-helpers) refacto w/ docus components
Flosciante Jun 11, 2021
03b2842
:recycle: (server-side-rendering) update
Flosciante Jun 11, 2021
ff7e61f
:recycle: (docs - static-site-generation) update
Flosciante Jun 11, 2021
457243d
:recycle: (docs - nuxt-lifecycle) refact w/ docus components
Flosciante Jun 11, 2021
53e8ac5
:recycle: (docs) update links (remove /2.x)
Flosciante Jun 11, 2021
f220f18
:recycle: (docs - features) update w/ docus components
Flosciante Jun 11, 2021
330bedf
:recycle: (docs - directory-structure) refacto w/ docus components
Flosciante Jun 11, 2021
bafa1b6
:recycle: (docs - configuration glossary) refacto w/ docus components
Flosciante Jun 11, 2021
ef74dcc
docs: update icon and title
clemcode Jun 14, 2021
9ebbe59
:recycle: (docs - internals-glossary) refacto w/ docus components
Flosciante Jun 14, 2021
eb7d78c
:sparkles: (docs) add redirect on first page section if last page sec…
Flosciante Jun 14, 2021
07b37e9
:recycle: (docs - components-glossary) refacto w/ docus components
Flosciante Jun 14, 2021
771cd87
:bug: (docs - components gloassry - $nuxt) fix description
Flosciante Jun 14, 2021
c2d0c00
:bento: (img) add github imgs for deployment section
Flosciante Jun 14, 2021
7b940ee
:recycle: (docs - deployment) refacto w/ docus components
Flosciante Jun 14, 2021
f9b07b0
:recycle: (examples - routing) refacto w/ docus components
Flosciante Jun 14, 2021
0776cb7
docs: add sponsors and ads to sidebar
clemcode Jun 14, 2021
9ce6f7b
:recycle: (examples - data-fetching) refacto w/ docus components
Flosciante Jun 14, 2021
6e670e0
:recycle: (examples - assets-management) refacto w/ docus components
Flosciante Jun 14, 2021
1c82433
:recycle: (examples - transitions) refacto w/ docus components
Flosciante Jun 14, 2021
7feb75b
:recycle: (examples - seo) refacto w/ docus components
Flosciante Jun 14, 2021
d139b7a
:recycle: (examples - loading) refacto w/ docus components
Flosciante Jun 14, 2021
dbb5e08
:recycle: (examples - miscellaneous) refacto w/ docus components
Flosciante Jun 14, 2021
80beb33
:recycle: (examples - middlewares) refacto w/ docus components
Flosciante Jun 14, 2021
62a20ea
:sparkles: (examples - plugins) refacto w/ docus components
Flosciante Jun 14, 2021
b2c9a1f
:recycle: (examples - modules) refacto w/ docus components
Flosciante Jun 14, 2021
6624d55
:recycle: (examples) replace code-sandbox w/ docus code-sandbox compo…
Flosciante Jun 14, 2021
f0e317f
:recycle: (static-site-generation) refacto base alert w/ docus compon…
Flosciante Jun 14, 2021
0d49089
fix: Update svg asset path
clemcode Jun 14, 2021
1b61fe0
Merge branch 'dev' into docs-update-components
Tahul Jun 14, 2021
e8e33b7
Merge branch 'docs-update-components' into docs-sidebar
Tahul Jun 14, 2021
028e710
fix: use defineComponent for ads
clemcode Jun 15, 2021
6db5cc7
docs: use md and docus API to get partners
clemcode Jun 15, 2021
bf0caa3
Merge branch 'docs-sidebar' of github.com:nuxtlabs/docus into docs-si…
clemcode Jun 15, 2021
08bac9d
Merge remote-tracking branch 'origin/dev' into docs-sidebar
clemcode Jun 15, 2021
7c03bae
fix: remove aside slider and improve home slider
atinux Jun 15, 2021
628641b
chore: remove un-used components for partners
atinux Jun 15, 2021
028aafe
:bug: (adsblock) margin adsblock
Tahul Jun 17, 2021
fa78ae4
Merge branch 'dev' into docs-sidebar
Tahul Jun 17, 2021
840324e
:bug: (dark) fix dark mode
Tahul Jun 17, 2021
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
1 change: 1 addition & 0 deletions nuxtjs.org/assets/img/blocked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions nuxtjs.org/components/AdsBlock.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<article>
<AdsFallback v-if="$store.state.adBlocked" />
<AdsCarbon v-else :key="$route.params.slug" />
</article>
</template>
117 changes: 117 additions & 0 deletions nuxtjs.org/components/AdsCarbon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<template>
<div ref="carbonads" class="Carbon" />
</template>

<script>
import { defineComponent } from '@nuxtjs/composition-api'

export default defineComponent({
name: 'AdsCarbon',
mounted() {
if (this.$refs.carbonads) {
const script = document.createElement('script')
script.setAttribute('type', 'text/javascript')
script.setAttribute('src', '//cdn.carbonads.com/carbon.js?serve=CKYILK7U&placement=nuxtjsorg')
script.setAttribute('id', '_carbonads_js')
this.$refs.carbonads.appendChild(script)
}
}
})
</script>

<style lang="postcss">
.dark-mode .Carbon {
background-color: theme('colors.dark.surface');

.carbon-text {
color: theme('colors.dark.onSurfacePrimary');

&:hover {
color: theme('colors.dark.onSurfaceSecondary');
}
}
}

.light-mode .Carbon {
background-color: theme('colors.gray.200');

.carbon-text {
@apply text-gray-600;

&:hover {
@apply text-gray-800;
}
}
}

.Carbon {
@apply p-4 flex flex-col mt-4 max-w-full;

@screen sm {
@apply max-w-xs;
}

@screen lg {
@apply mt-0;
max-width: 160px;
}

#carbonads span {
@apply flex flex-col justify-between;

.carbon-wrap {
@apply flex flex-col;

flex: 1;

@media (min-width: 320px) {
@apply flex-row;
}

@screen lg {
@apply flex-col;
}

.carbon-img {
@apply flex items-start justify-center mb-4;

@media (min-width: 320px) {
@apply mb-0;
}

@screen lg {
@apply mb-4;
}
}

.carbon-text {
@apply flex-1 text-sm w-full m-0 text-left block leading-relaxed;

&:hover {
@apply no-underline;
}

@media (min-width: 320px) {
@apply ml-4;
}

@screen lg {
@apply ml-0;
}
}
}
}

img {
@apply w-full;
}

& .carbon-poweredby {
@apply ml-2 text-xs text-right text-gray-400 block pt-2;

&:hover {
@apply no-underline text-gray-500;
}
}
}
</style>
35 changes: 35 additions & 0 deletions nuxtjs.org/components/AdsFallback.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<div class="nui-support-nuxt">
<div class="pr-4 sm:pr-0">
<BlockedIcon alt="Support NuxtJS" width="125" height="125" class="block mr-4" />
</div>
<div>
<p class="m-0 font-bold sm:text-sm text-nuxt-green">NuxtJS needs you!</p>
<p class="p-0 m-0 leading-normal text-gray-600 sm:text-xs">
By whitelisting nuxtjs.org on your Ad-Blocker, you support our work and help us financially.
</p>
</div>
</div>
</template>

<script>
import BlockedIcon from '~/assets/img/blocked.svg?inline'

export default {
components: {
BlockedIcon
}
}
</script>

<style lang="postcss">
.nui-support-nuxt {
@apply bg-gray-200 p-4 flex flex-row w-full items-center mt-4;
}

@screen sm {
.nui-support-nuxt {
@apply bg-white flex-col w-40 mt-0;
}
}
</style>
93 changes: 45 additions & 48 deletions nuxtjs.org/components/HomeDiscoverPartners.vue
Original file line number Diff line number Diff line change
@@ -1,59 +1,56 @@
<template>
<HomeSection class="pt-20">
<template #section-content>
<SectionContent class="col-span-12 items-center">
<template #category>
<CategoryLabel label="Discover" />
</template>

<template #title>
<SectionTitle class="text-center"
>Art in the <span class="text-primary-green italic">Making</span></SectionTitle
>
</template>

<template #paragraph>
<SectionDescription class="text-center"
>Be part of the Nuxt.js community and help us Nuxtify the world.</SectionDescription
>
</template>

<template #banner>
<MPartnersBanner class="pb-0" :partners-logo="partners" />
</template>
</SectionContent>
</template>

<template #footer-illustration>
<img
loading="lazy"
:src="`/img/home/discover/partners/dark/landscape-discover-partners.svg`"
class="w-full h-40 object-fill left-0 mt-10 -mb-2 light:hidden"
alt="A landscape image"
/>
<img
loading="lazy"
:src="`/img/home/discover/partners/light/landscape-discover-partners.svg`"
class="w-full h-40 object-fill left-0 mt-10 -mb-2 dark:hidden"
alt="A landscape image"
/>
</template>
</HomeSection>
<section class="relative pt-20">
<AContainer class="flex flex-col items-center">
<div class="flex flex-col w-full items-center col-span-12">
<div class="mb-2">
<CategoryLabel :label="category" />
</div>
<h2 class="font-normal font-serif text-display-6 md:text-display-5 2xl:text-display-4 mb-2">
<Markdown slot="title" unwrap="p" />
</h2>
<p class="font-normal text-body-base md:text-body-lg 2xl:text-body-xl mb-8">
<Markdown slot="description" unwrap="p" />
</p>
<MPartnersBanner class="pb-0" :partners-logo="partners" />
</div>
</AContainer>
<img
loading="lazy"
:src="`/img/home/discover/partners/dark/landscape-discover-partners.svg`"
class="w-full h-40 object-fill left-0 mt-10 -mb-2 light:hidden"
alt="A landscape image"
/>
<img
loading="lazy"
:src="`/img/home/discover/partners/light/landscape-discover-partners.svg`"
class="w-full h-40 object-fill left-0 mt-10 -mb-2 dark:hidden"
alt="A landscape image"
/>
</section>
</template>

<script>
import { defineComponent } from '@nuxtjs/composition-api'
import { defineComponent, ref, useContext, useFetch } from '@nuxtjs/composition-api'
import { Markdown } from '~docus/utils'

export default defineComponent({
components: { Markdown },
props: {
category: {
type: String,
default: 'Category'
}
},
setup() {
const partners = [
{ component: 'IconMasteringNuxt', alt: 'Mastering Nuxt logo' },
{ component: 'IconNetlify', alt: 'Netlify logo' },
{ component: 'IconVercel', alt: 'Vercel logo' },
{ component: 'IconVueMastery', alt: 'Vue Mastery logo' },
{ component: 'IconVueSchool', alt: 'Vue School logo' }
]
const { $docus } = useContext()
const partners = ref()

useFetch(async () => {
partners.value = await $docus
.search('/sponsors', { deep: true })
.where({ tier: { $in: ['MVP Partners', 'Partners'] } })
.fetch()
})
return {
partners
}
Expand Down
8 changes: 0 additions & 8 deletions nuxtjs.org/components/IconMasteringNuxt.vue

This file was deleted.

Loading