mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-23 08:20:38 +01:00
Improve banner
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap');
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@900&display=swap');
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
transform: translate(3px, -3px);
|
transform: translate(3px, -3px);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="my-16 md:my-32 w-full flex items-center justify-center">
|
<section class="my-16 w-full flex items-center justify-center">
|
||||||
<div class="text-center flex flex-col items-center">
|
<div class="text-center flex flex-col items-center">
|
||||||
<h1 class="text-6xl font-bold text-gray-700 dark:text-gray-400">
|
<h1 class="text-6xl font-bold text-gray-700 dark:text-gray-400">
|
||||||
{{ $t('home.banner.hello') }} <span class="text-black dark:text-white">Arthur Danjou</span> 👋,
|
{{ $t('home.banner.hello') }} <span class="text-black dark:text-white">Arthur Danjou</span> 👋,
|
||||||
@@ -8,26 +8,66 @@
|
|||||||
<strong>{{ $t('home.banner.role') }}</strong>. <br />
|
<strong>{{ $t('home.banner.role') }}</strong>. <br />
|
||||||
{{ $t('home.banner.student.main') }} <strong>{{ $t('home.banner.student.strong') }}</strong>.
|
{{ $t('home.banner.student.main') }} <strong>{{ $t('home.banner.student.strong') }}</strong>.
|
||||||
</h2>
|
</h2>
|
||||||
<p class="mt-4 text-lg text-gray-800 mb-10 dark:text-gray-300">{{ $t('home.banner.contact.follow') }}
|
<div class="select-none mt-4 text-5xl text-gray-800 mb-10 dark:text-gray-300">
|
||||||
<a href="https://twitter.com/arthurdanj" target="_blank" rel="noreferrer noopener" class="link">Twitter</a>,
|
<span id="develop" class="color blue">Develop.</span>
|
||||||
<a href="https://twitch.tv/arthurdanjou" target="_blank" rel="noreferrer noopener" class="link">Twitch</a>
|
<span id="publish" class="color">Publish.</span>
|
||||||
{{ $t('home.banner.contact.and') }}
|
<span id="improve" class="color">Improve.</span>
|
||||||
<a href="https://github.com/arthurdanjou" target="_blank" rel="noreferrer noopener" class="link">Github</a>
|
</div>
|
||||||
{{ $t('home.banner.contact.spacer') }}
|
|
||||||
<nuxt-link to="contact" class="link">{{ $t('home.banner.contact.contact') }}</nuxt-link> {{ $t('home.banner.contact.me') }}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
import {defineComponent, onMounted, onUnmounted} from "@nuxtjs/composition-api";
|
||||||
name: "Banner"
|
|
||||||
|
interface Color {
|
||||||
|
name: string,
|
||||||
|
color: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const COLORS: Color[] = [
|
||||||
|
{ name: 'develop', color: 'blue' },
|
||||||
|
{ name: 'publish', color: 'red' },
|
||||||
|
{ name: 'improve', color: 'green' }
|
||||||
|
]
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: "Banner",
|
||||||
|
setup() {
|
||||||
|
let task
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
let CURRENT = 0
|
||||||
|
task = setInterval(() => {
|
||||||
|
const color = COLORS[CURRENT]
|
||||||
|
const new_color = COLORS[CURRENT === COLORS.length -1 ? 0 : CURRENT + 1]
|
||||||
|
document.getElementById(new_color.name)!.classList.toggle(new_color.color)
|
||||||
|
setTimeout(() => document.getElementById(color.name)!.classList.toggle(color.color), 0)
|
||||||
|
CURRENT === COLORS.length - 1 ? CURRENT = 0 : CURRENT++
|
||||||
|
}, 3000)
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnmounted(() => clearInterval(task))
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.link {
|
.link {
|
||||||
@apply font-medium cursor-pointer border-b-2 border-gray-200 text-indigo-600 hover:border-indigo-600 duration-200 dark:(font-white border-gray-700) hover:dark:border-indigo-600
|
@apply font-medium cursor-pointer border-b-2 border-gray-200 text-indigo-600 hover:border-indigo-600 duration-200 dark:(font-white border-gray-700) hover:dark:border-indigo-600
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.color {
|
||||||
|
@apply duration-500 text-white dark:text-black font-color;
|
||||||
|
|
||||||
|
&.red {
|
||||||
|
@apply select-text bg-clip-text text-transparent bg-gradient-to-r from-red-600 to-rose-300
|
||||||
|
}
|
||||||
|
&.blue {
|
||||||
|
@apply select-text bg-clip-text text-transparent bg-gradient-to-r from-blue-600 to-cyan-400
|
||||||
|
}
|
||||||
|
&.green {
|
||||||
|
@apply select-text bg-clip-text text-transparent bg-gradient-to-r from-emerald-600 to-lime-500
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
>
|
>
|
||||||
<Announcement />
|
<Announcement />
|
||||||
<Header />
|
<Header />
|
||||||
<Nuxt class="z-10 pt-16 lg:pt-24 content"/>
|
<Nuxt class="z-10 pt-16 content"/>
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {defineConfig} from "windicss/helpers";
|
import {defineConfig} from "windicss/helpers";
|
||||||
|
|
||||||
const colors = require('windicss/colors')
|
const colors = require('windicss/colors')
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
@@ -320,9 +319,9 @@ module.exports = defineConfig({
|
|||||||
'"Segoe UI Symbol"',
|
'"Segoe UI Symbol"',
|
||||||
'"Noto Color Emoji"',
|
'"Noto Color Emoji"',
|
||||||
],
|
],
|
||||||
serif: ['raleway', 'ui-serif', 'Georgia', 'Cambria', '"Times New Roman"', 'Times', 'serif'],
|
serif: ['Raleway', 'ui-serif', 'Georgia', 'Cambria', '"Times New Roman"', 'Times', 'serif'],
|
||||||
mono: [
|
mono: [
|
||||||
'raleway',
|
'Raleway',
|
||||||
'ui-monospace',
|
'ui-monospace',
|
||||||
'SFMono-Regular',
|
'SFMono-Regular',
|
||||||
'Menlo',
|
'Menlo',
|
||||||
@@ -332,6 +331,7 @@ module.exports = defineConfig({
|
|||||||
'"Courier New"',
|
'"Courier New"',
|
||||||
'monospace',
|
'monospace',
|
||||||
],
|
],
|
||||||
|
color: ['Roboto', 'serif']
|
||||||
},
|
},
|
||||||
fontSize: {
|
fontSize: {
|
||||||
xs: ['0.75rem', { lineHeight: '1rem' }],
|
xs: ['0.75rem', { lineHeight: '1rem' }],
|
||||||
|
|||||||
Reference in New Issue
Block a user