Skip to content

Commit

Permalink
Merge branch 'nuxt:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibochkarev authored Aug 3, 2024
2 parents be54bbd + a9d12b0 commit 130b966
Show file tree
Hide file tree
Showing 43 changed files with 727 additions and 163 deletions.
1 change: 1 addition & 0 deletions components/AppBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if (import.meta.server) {
<div class="flex items-center justify-end lg:flex-1">
<button
class="p-1.5 rounded-md inline-flex hover:bg-primary/90"
aria-label="Close banner"
@click.prevent="hideBanner"
>
<UIcon name="i-heroicons-x-mark-20-solid" class="w-5 h-5 text-white dark:text-gray-900" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<script setup lang="ts">
defineProps({
quote: {
type: String,
default: ''
},
author: {
type: String,
default: ''
},
job: {
type: String,
default: ''
},
logo: {
type: Object as PropType<{ light: string, dark: string, alt: string, width: number, height: number }>,
default: () => ({})
},
achievements: {
type: Array as PropType<Array<{ title: string, color: string }>>,
default: () => []
}
})
</script>

<template>
<UPageCard>
<template #description>
{{ quote }}
</template>

<div class="flex flex-col justify-end h-full gap-y-4">
<div class="flex justify-between gap-x-8 pt-6">
<div>
<div class="font-semibold text-gray-900 dark:text-white">
{{ author }}
</div>
<div class="text-sm text-gray-600 dark:text-gray-400">
{{ job }}
</div>
</div>

<UColorModeImage
:light="logo.light"
:dark="logo.dark"
:width="logo.width"
:height="logo.height"
:alt="logo.alt"
class="h-[24px]"
/>
</div>

<ul class="flex gap-x-1 flex-wrap gap-2">
<li v-for="achievement in achievements" :key="achievement.title">
<UBadge v-bind="achievement" variant="subtle" />
</li>
</ul>
</div>
</UPageCard>
<!-- Safelist color for badge -->
<!-- <UBadge color="pink" /> -->
<!-- <UBadge color="orange" /> -->
<!-- <UBadge color="yellow" /> -->
<!-- <UBadge color="purple" /> -->
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script lang="ts" setup>
const { logo } = defineProps({
logo: {
type: Object as PropType<{ src: string, height: number, width: number, color: string, alt: string }>,
default: () => {}
}
})
const color = logo.color
const circle = ref<HTMLDivElement>()
const { elementX, elementY } = useMouseInElement(circle)
</script>

<template>
<div
ref="circle"
:style="{
'--x': `${elementX}px`,
'--y': `${elementY}px`
}"
class="relative group isolate ring-1 bg-white dark:bg-gray-900 ring-gray-200 dark:ring-gray-800 before:hidden before:lg:block before:absolute before:-inset-[2px] before:h-[calc(100%+4px)] before:w-[calc(100%+4px)] before:z-[-1] before:rounded-full lg:flex-1 flex flex-col shadow circle-gradient items-center justify-center rounded-full"
>
<div class="p-5 sm:p-6 flex-1 flex flex-col overflow-hidden rounded-full divide-y divide-gray-200 dark:divide-gray-800 bg-white dark:bg-gray-900 hover:bg-opacity-90 dark:hover:bg-opacity-90 transition-[background-opacity]">
<img :src="logo.src" :width="logo.width" :height="logo.height" :alt="logo.alt">
</div>
</div>
</template>

<style scoped lang="postcss">
.circle-gradient::before {
background: radial-gradient(
70px circle at var(--x) var(--y),
v-bind(color) 0%,
transparent 100%
);
will-change: background;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ defineProps({
}
>,
default: () => ({})
},
call: {
type: Object as PropType<{ title: string, description: string, button: any }>,
default: () => ({})
}
})
Expand Down Expand Up @@ -84,51 +80,39 @@ async function onSubmit(event: FormSubmitEvent<any>) {
</script>

<template>
<div class="flex flex-col lg:flex-row">
<div class="w-full">
<UCard :ui="{ background: 'form-bg', body: { base: 'flex flex-col space-y-6 w-full', padding: 'px-4 py-5 sm:p-8' } }">
<UForm :validate="validate" :state="state" class="space-y-6" @submit="onSubmit">
<UFormGroup :label="form.name.label" name="name" required>
<UInput v-model="state.name" :placeholder="form.name.placeholder" />
</UFormGroup>

<UFormGroup :label="form.email.label" name="email" required>
<UInput v-model="state.email" type="email" :placeholder="form.email.placeholder" />
</UFormGroup>

<UFormGroup :label="form.company.label" name="company" required>
<UInput v-model="state.company" :placeholder="form.company.placeholder" />
</UFormGroup>

<UFormGroup :label="form.body.label" name="body" required>
<UTextarea v-model="state.body" autoresize :placeholder="form.body.placeholder" :rows="6" />
</UFormGroup>

<!-- eslint-disable-next-line vue/no-v-html -->
<!-- <div class="text-gray-700 dark:text-gray-400" v-html="form.info" /> -->
<ClientOnly>
<NuxtTurnstile v-if="showTurnstile" ref="turnstile" v-model="token" :options="{ theme: $colorMode.value }" />
</ClientOnly>

<UButton
v-bind="form.button"
type="submit"
color="gray"
class="w-fit pt-2"
:loading="loading"
:disabled="!canSend"
/>
</UForm>
</UCard>
</div>

<UDivider label="OR" color="gray" orientation="vertical" class="hidden lg:flex w-[40%] py-16" :ui="{ label: 'text-xl py-8' }" />
<UDivider label="OR" color="gray" class="lg:hidden py-16" :ui="{ label: 'text-xl py-8' }" />

<div class="w-full flex items-start justify-center flex-col">
<MDC :value="call.description" class="prose dark:prose-invert" />
<UButton class="mt-8" color="gray" v-bind="call.button" />
</div>
<div class="w-full max-w-[640px]">
<UCard :ui="{ background: 'form-bg', body: { base: 'flex flex-col space-y-6 w-full', padding: 'px-4 py-5 sm:p-8' } }">
<UForm :validate="validate" :state="state" class="space-y-6" @submit="onSubmit">
<UFormGroup :label="form.name.label" name="name" required>
<UInput v-model="state.name" :placeholder="form.name.placeholder" />
</UFormGroup>

<UFormGroup :label="form.email.label" name="email" required>
<UInput v-model="state.email" type="email" :placeholder="form.email.placeholder" />
</UFormGroup>

<UFormGroup :label="form.company.label" name="company" required>
<UInput v-model="state.company" :placeholder="form.company.placeholder" />
</UFormGroup>

<UFormGroup :label="form.body.label" name="body" required>
<UTextarea v-model="state.body" autoresize :placeholder="form.body.placeholder" :rows="6" />
</UFormGroup>

<ClientOnly>
<NuxtTurnstile v-if="showTurnstile" ref="turnstile" v-model="token" :options="{ theme: $colorMode.value }" />
</ClientOnly>

<UButton
v-bind="form.button"
type="submit"
color="gray"
class="w-fit pt-2"
:loading="loading"
:disabled="!canSend"
/>
</UForm>
</UCard>
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<script lang="ts" setup>
const { logos } = defineProps({
logos: {
type: Array<{ src: string, width: number, height: number, alt: string, light: string, dark: string }>,
require: true
}
})
const carousel = ref<HTMLElement>(null)
const stopAnimation = () => {
if (carousel.value) {
carousel.value.style.animationPlayState = 'paused'
}
}
const startAnimation = () => {
if (carousel.value) {
carousel.value.style.animationPlayState = 'running'
}
}
</script>

<template>
<div class="overflow-hidden whitespace-nowrap relative h-12">
<div class="h-12 w-[50px] sm:w-[100px] md:w-[200px] lg:w-[400px] bg-gradient-to-r from-white dark:from-slate-950 via-transparent to-transparent absolute left-0 z-10" />
<div class="h-12 w-[50px]sm:w-[100px] md:w-[200px] lg:w-[400px] bg-gradient-to-r to-white dark:to-slate-950 via-transparent from-transparent absolute right-0 z-10" />
<div
ref="carousel"
class="flex carousel"
@mouseover="stopAnimation"
@mouseleave="startAnimation"
>
<div v-for="({ light, dark, width, height, alt }, index) in logos.concat(logos)" :key="index" class="carousel-item items-center">
<UColorModeImage :light="light" :dark="dark" :width="width" :height="height" :alt="alt" />
</div>
</div>
</div>
</template>

<style scoped lang="postcss">
.carousel {
animation: scroll 30s linear infinite;
animation-play-state: running;
}
.carousel-item {
flex: 0 0 auto;
margin-right: 68px;
}
@keyframes scroll {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-166%));
}
}
</style>
2 changes: 1 addition & 1 deletion content/3.deploy/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ GitLab Pages поддерживает только статические сай
::caution
If you are **not** using a custom domain, you need to set `NUXT_APP_BASE_URL` to your repository-slug for your build step.

**Example**: `https://<group/user>.gitlab.io/<repository>/`: `NUXT_APP_BASE_URL=/<repository>/ npm run genertate`
**Example**: `https://<group/user>.gitlab.io/<repository>/`: `NUXT_APP_BASE_URL=/<repository>/ npm run generate`
::

## Развертывание
Expand Down
2 changes: 1 addition & 1 deletion content/7.blog/16.new-website.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ We are big fans of having a custom image when we share a link on social media. T

Example of the [Installation page](/docs/getting-started/installation):

:img{src="/docs/getting-started/installation/__og_image__/og.png" alt="Nuxt OG Image" width="1200" height="630" class="border rounded border-gray-700"}
:img{src="/__og-image__/image/docs/getting-started/introduction/og.png" alt="Nuxt OG Image" width="1200" height="630" class="border rounded border-gray-700"}

::read-more{to="https://nuxtseo.com/og-image/getting-started/installation" target="_blank"}
Discover the **Nuxt OG Image** module.
Expand Down
Loading

0 comments on commit 130b966

Please sign in to comment.