Skip to content

Commit

Permalink
feat: add background image
Browse files Browse the repository at this point in the history
  • Loading branch information
k-urtica committed Jul 10, 2024
1 parent a878427 commit 4655927
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 27 deletions.
6 changes: 4 additions & 2 deletions src/app.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<script setup lang="ts"></script>

<template>
<NuxtLayout>
<main class="min-h-dvh">
<img src="@/assets/bg.webp" class="fixed inset-0 size-full object-cover">
<div class="fixed inset-0 size-full bg-gradient-to-b from-[rgb(0_0_0/0.08)] to-[rgb(0_0_0/0.35)]" />
<NuxtPage />
</NuxtLayout>
</main>
</template>
Binary file added src/assets/bg.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/FadeUp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ withDefaults(
}>(),
{
duration: '0.5s',
delay: '0.25s',
delay: '0.15s',
},
);
</script>
Expand Down
9 changes: 1 addition & 8 deletions src/components/GlassCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,8 @@ withDefaults(
<template>
<component
:is="tag"
class="bg-blur rounded-2xl border border-zinc-300/20 bg-zinc-900/25 shadow-xl shadow-zinc-600/10"
class="rounded-2xl border border-zinc-300/20 bg-zinc-950/35 shadow-xl shadow-zinc-600/10 backdrop-blur-[6px]"
>
<slot />
</component>
</template>

<style scoped>
/* TODO: Temporary fix: https://github.com/tailwindlabs/tailwindcss/discussions/7835 */
.bg-blur {
backdrop-filter: blur(8px);
}
</style>
7 changes: 0 additions & 7 deletions src/layouts/default.vue

This file was deleted.

4 changes: 2 additions & 2 deletions src/pages/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ useHead({
</script>

<template>
<div class="px-4 py-16 sm:px-0 sm:py-20">
<GlassCard tag="article" class="relative p-6 sm:p-9">
<div class="flex min-h-dvh items-center px-5 py-20">
<GlassCard tag="article" class="mx-auto max-w-5xl p-8">
<NavLink
class="absolute right-0 top-0 rounded-bl-xl rounded-tr-2xl border-b border-l border-slate-300/20 bg-gray-700/50"
/>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const menus = [
</script>

<template>
<div class="flex h-screen px-5">
<GlassCard tag="article" class="relative m-auto w-full px-7 py-9 sm:w-112">
<div class="flex min-h-dvh items-center p-5">
<GlassCard tag="article" class="mx-auto w-full p-8 sm:w-[500px]">
<header>
<h1 class="mb-3 text-4xl font-bold text-slate-50">
K
Expand All @@ -50,7 +50,7 @@ const menus = [
</p>
</header>

<section class="mb-3 mt-7 border-t border-slate-600">
<section class="mb-3 mt-6 border-t border-zinc-400/40">
<ul class="mt-5 space-y-5">
<li v-for="{ title, to, icon, caption } in menus" :key="title">
<NuxtLink :to class="flex items-center justify-between gap-2 text-indigo-300">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/picture.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ useHead({
</script>

<template>
<div class="px-4 py-16 sm:px-0 sm:py-20">
<GlassCard tag="article" class="relative p-6 sm:p-9">
<div class="flex min-h-dvh items-center px-5 py-20">
<GlassCard tag="article" class="mx-auto max-w-5xl p-8">
<NavLink
class="absolute right-0 top-0 rounded-bl-xl rounded-tr-2xl border-b border-l border-slate-300/20 bg-gray-700/50"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/portfolio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ useHead({
</script>

<template>
<div class="px-4 py-16 sm:px-0 sm:py-20">
<GlassCard tag="article" class="relative p-6 sm:p-9">
<div class="flex min-h-dvh items-center px-5 py-20">
<GlassCard tag="article" class="mx-auto max-w-5xl p-8">
<NavLink
class="absolute right-0 top-0 rounded-bl-xl rounded-tr-2xl border-b border-l border-slate-300/20 bg-gray-700/50"
/>
Expand Down

0 comments on commit 4655927

Please sign in to comment.