Skip to content

Commit

Permalink
progress Landing
Browse files Browse the repository at this point in the history
  • Loading branch information
bdrtsky committed Apr 27, 2023
1 parent 3d58ee5 commit 848c1aa
Show file tree
Hide file tree
Showing 14 changed files with 1,062 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .docs/.studio/app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"medium": ""
},
"aside": {
"level": 0,
"level": 1,
"collapsed": false,
"exclude": []
},
Expand Down
123 changes: 123 additions & 0 deletions .docs/components/landing/BlockHeroVisuals.vue

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions .docs/components/landing/Glow.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<script setup lang="ts">
import type { PropType } from 'vue'
const props = defineProps({
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '100vh'
},
zIndex: {
type: String,
default: '0'
},
top: {
type: String,
default: '0'
},
bottom: {
type: String,
default: 'auto'
},
left: {
type: String,
default: '0'
},
right: {
type: String,
default: 'auto'
},
blur: {
type: String,
default: '0px'
},
maskGradient: {
type: [String, Object] as PropType<string | { light: string; dark: string }>,
default: 'radial-gradient(at 50% 50%, red, rgba(255, 0, 0, 0) 85%)'
},
gradient: {
type: [String, Object] as PropType<string | { light: string; dark: string }>,
default: 'radial-gradient(circle at 10% 50%, #4200ff 7%, #23d70c73 35%, #fbca0563 45%, #ff4700e6 82%)'
},
noise: {
type: Boolean,
default: false
},
backgroundImage: {
type: String,
default: 'none'
}
})
</script>

<template>
<div class="glow" :class="{noise}">
<svg v-if="noise">
<filter id="f">
<feTurbulence type="fractalNoise" baseFrequency="7.5" />
</filter>
</svg>
</div>
</template>

<style scoped lang="ts">
css({
'.glow': {
'--mask-gradient': (props) => typeof props.maskGradient === 'string' ? props.maskGradient : props.maskGradient.light,
'--gradient': (props) => typeof props.gradient === 'string' ? props.gradient : props.gradient.light,
'@dark': {
'--mask-gradient': (props) => typeof props.maskGradient === 'string' ? props.maskGradient : props.maskGradient.dark,
'--gradient': (props) => typeof props.gradient === 'string' ? props.gradient : props.gradient.dark
},
pointerEvents: 'none',
position: 'absolute',
top: (props) => props.top,
insetInlineStart: (props) => props.left,
insetInlineEnd: (props) => props.right,
zIndex: (props) => props.zIndex,
width: (props) => props.width,
height: (props) => props.height,
opacity: 0,
overflow: 'hidden',
backgroundImage: props => props.backgroundImage,
'&::before, &::after': {
opacity: 0,
content: '""',
position: 'absolute',
inset: 0,
'--mask': 'var(--mask-gradient), var(--mask-gradient), var(--mask-gradient)',
'-webkit-mask': 'var(--mask)',
mask: 'var(--mask)',
maskComposite: 'intersect',
'-webkit-mask-composite': 'source-in',
mixBlendMode: 'color'
},
'&.noise::before': {
filter: 'url(#f)'
},
'&::after': {
background: 'var(--gradient)',
}
}
})
</style>

<style scoped>
.glow {
animation: enter-opacity 1000ms forwards 500ms $dt('ease.expo.inOut');
}
@keyframes enter-opacity {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.glow::after, .glow::before {
animation: enter-scale 1000ms forwards 500ms $dt('ease.expo.inOut');
}
@keyframes enter-scale {
from {
opacity: 0;
transform: scale(2);
}
to {
opacity: 1;
transform: scale(1);
}
}
</style>
89 changes: 74 additions & 15 deletions .docs/content/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ main:
fluid: false
---

<!-- :ellipsis{right=0px width=75% blur=150px} -->

::block-hero
---
cta:
Expand All @@ -18,11 +16,37 @@ secondary:
- https://github.com/nuxt-themes/docus
---

#root
:block-hero-visuals

::glow
---
top: calc(0px - var(--docus-header-height))
height: calc(var(--block-hero-height) + var(--docus-header-height) + 20rem)
maskGradient:
light:
initial: radial-gradient(circle at 51% 64%, rgba(0,0,0, 1) -7%, rgba(0,0,0, 0) 70%)
xl: radial-gradient(at 70% 45%, red, rgba(255, 0, 0, 0) 85%)
dark:
initial: radial-gradient(circle at 51% 64%, rgba(0,0,0, 1) -7%, rgba(0,0,0, 0) 70%)
xl: radial-gradient(at 70% 45%, red, rgba(255, 0, 0, 0) 85%)
gradient:
light:
initial: radial-gradient(circle at 10% 50%,#4200ff 4%,#fbca0563 25%,#ff4700 65%)
xl: radial-gradient(circle at 10% 50%,#4200ff 7%,#23d70c73 35%,#fbca0563 56%,#ff4700e6 82%)
dark:
initial: radial-gradient(circle at 10% 50%,#4142dc,#fbca05db 45%,#ff4700 82%)
xl: radial-gradient(circle at 10% 50%,#4200ff 7%,#23d70c73 35%,#fbca0563 45%,#ff4700e6 82%)
noise: true
backgroundImage: linear-gradient(transparent 75%, {docus.body.backgroundColor})
---
::

#title
The best place to start your documentation.

#description
Write pages in [Markdown](https://content.nuxtjs.org), use [Vue](https://vuejs.org) components and enjoy the power of [Nuxt](https://nuxt.com).
Write pages in [:icon{name=mdi:language-markdown}]{style="margin-right:4px"} [Markdown](https://content.nuxtjs.org), use [:icon{name=vscode-icons:file-type-vue}]{style="margin-right:4px"} [Vue](https://vuejs.org) components and enjoy the power of [:icon{name=vscode-icons:file-type-nuxt}]{style="margin-right:4px"} [Nuxt](https://nuxt.com).

#extra
::list
Expand All @@ -44,22 +68,39 @@ Write pages in [Markdown](https://content.nuxtjs.org), use [Vue](https://vuejs.o
- npm install
- npm run dev
---
::
::
::

::card-grid{cols=6 gap=1rem}

#subtitle
Subtitle

#title
What's included

#root
:ellipsis{left=0px width=40rem top=10rem blur=140px}
::glow
---
left: 20%
width: 60vw
height: 15rem
top: 45%
blur: 150px
colors:
- '{color.yellow.700}'
- '{color.primary.700}'
- '{color.red.800}'
---
::

#default
::card{icon=logos:nuxt-icon}
---
col: 3
row: 2
show: true
col:
initial: 6
sm: 3
row: 1
---
#title
Nuxt Architecture
Expand All @@ -69,7 +110,12 @@ What's included

::card{icon=IconNuxtStudio}
---
col: 3
col:
initial: 6
sm: 2
row:
initial: 1
sm: 2
---
#title
Nuxt Studio ready
Expand All @@ -79,7 +125,10 @@ What's included

::card{icon=logos:vue}
---
col: 2
col:
initial: 6
sm: 2
row: 1
---
#title
Vue Components
Expand All @@ -89,7 +138,9 @@ What's included

::card{icon=simple-icons:markdown}
---
col: 2
col:
initial: 6
sm: 2
---
#title
Write Markdown
Expand All @@ -99,18 +150,26 @@ What's included

::card{icon=noto:rocket}
---
col: 2
col:
initial: 6
sm: 3
---
#title
Deploy anywhere
#description
Zero config on [Vercel](https://vercel.com) or [Netlify](https://netlify.com). Choose between static generation, on-demand rendering (Node) or edge-side rendering on [CloudFlare workers](https://workers.cloudflare.com).
::

::card
::card{icon=material-symbols:token-outline}
---
col:
initial: 6
sm: 3
---

#title
Extensible
Design Tokens
#description
Customize the whole design, or add components using slots - you can make Docus your own.
Make Docus your own! Use [Design Tokens](https://pinceau.dev/configuration/design-tokens) to build your own Design System.
::
::
12 changes: 11 additions & 1 deletion .docs/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { createResolver } from '@nuxt/kit'
const { resolve } = createResolver(import.meta.url)

export default defineNuxtConfig({
extends: '../',
app: {
Expand All @@ -7,5 +10,12 @@ export default defineNuxtConfig({
}
}
},
modules: ['@nuxtjs/plausible', '@nuxt/devtools']
modules: ['@nuxtjs/plausible', '@nuxt/devtools'],
components: [
{
prefix: '',
path: resolve('./components/landing'),
global: true
},
],
})
11 changes: 11 additions & 0 deletions .docs/tokens.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import { defineTheme } from 'pinceau'

export default defineTheme({
docus: {
landing: {
blockHero: {
content: {
title: {
mixBlendMode: 'luminosity'
}
}
}
}
}
})
13 changes: 13 additions & 0 deletions components/app/AppFooter.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<script setup lang="ts">
const { config } = useDocus()
const route = useRoute()
const socialIcons = ref(null)
const icons = computed(() => config.value?.footer?.iconLinks || [])
const textLinks = computed(() => config.value?.footer?.textLinks || [])
const socialIconsCount = computed(() => Object.entries(config.value?.socials || {}).filter(([_, v]) => v).length)
const nbSocialIcons = computed(() => (socialIcons.value ? socialIconsCount.value : 0))
const isIndex = computed(() => route.path === '/')
watch(isIndex, (value) => {
updateAppConfig({
docus: {
footer: {
fluid: !value
}
}
})
}, { immediate: true })
</script>

<template>
Expand Down
Loading

0 comments on commit 848c1aa

Please sign in to comment.