Skip to content

Commit

Permalink
refactor: some page
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed May 15, 2024
1 parent 1c9333e commit c194517
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 187 deletions.
6 changes: 3 additions & 3 deletions components/Bg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const afterStyle_1_animate = computed(() => afterStyles.value[0].animation)
</div>
</template>

<style lang="scss" scoped>
// @unocss-skip-start
<style scoped>
/* @unocss-skip-start */
.bg-stars::after {
content: '';
display: block;
Expand All @@ -69,5 +69,5 @@ const afterStyle_1_animate = computed(() => afterStyles.value[0].animation)
box-shadow: v-bind(afterStyle_1_boxShadow);
animation: v-bind(afterStyle_1_animate);
}
// @unocss-skip-end
/* @unocss-skip-end */
</style>
2 changes: 1 addition & 1 deletion components/Cursor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ watch(() => route.fullPath, () => {
}
</style>

<style>
<style scoped>
html * {
--uno: important-cursor-none;
}
Expand Down
96 changes: 48 additions & 48 deletions components/PersonInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,54 @@ const { data: user } = await useFetch('/api/user')
</script>

<template>
<div flex flex-col items-center md="gap-10 flex-row">
<ImgBlurHash
:src="user!.avatar_url"
blurhash="U8B4RsM[08%j00og?ZR.%io$s:jVo$oeM^RP"
alt="Avatar"
w-10
h-10
md="w-10 h-10"
rounded-full
/>
<div>
<h2 fic justify-center md="justify-start">
{{ user?.name }}
</h2>
<p text-lg text-center md="text-left">
{{ user?.bio }}
<div flex items-center md="gap-10 flex-row">
<h1 fsc gap-5>
<UserAvatar />
</h1>
<section>
<p>
I'm <strong c-primary>{{ user?.name }}</strong>, front-end engineer 🧑🏻‍💻 & open source enthusiast.
</p>
<div fic gap-4 justify-center md="justify-start">
<div fic gap-2>
<div class="text-3.5" i-carbon-building />
{{ user?.company }}
</div>
<div fic gap-2>
<div class="text-3.5" i-carbon-location />
{{ user?.location }}
</div>
<div fic gap-2>
<div class="text-3.5" i-carbon-campsite />
{{ user?.blog }}
</div>
</div>
<div my-4 fic justify-center md="justify-start">
<div i-carbon-user-favorite-alt-filled mr2 />
<span>
{{ user?.followers }}
<span class="text-xs">
followers
</span>
</span>
<span mx-2>·</span>
<span>
{{ user?.following }}
<span class="text-xs">
following
</span>
</span>
</div>
<p />
</div>
<p italic font-dm mt-2>
「 {{ user?.bio }} 」
</p>
<ul my-6 space-y-2>
<li>
<i i-fluent-emoji-sports-medal mr-1 />
Team member of:
<IconsUnoCSS />
,
<IconsElk />
</li>
<li>
<i i-fluent-emoji-sparkles mr-1 />
Creator of:
<IconsOnuUI />
,
<IconsUnPreset />
</li>
<li>
<i i-fluent-emoji-party-popper mr-1 />
Contributor of:
<IconsVite />
<IconsVue />
<IconsNuxt /> & etc.
</li>
<li>
<i i-fluent-emoji-party-popper mr-1 />
Find me on:
<IconsBilibili />
& etc.
</li>
</ul>
<p>
<a trans text-p-r class="group" hover-op-75 :href="`mailto:${user?.email ?? '[email protected]'}`">
Hire Me
<i trans group-hover="ml-2" i-ri:arrow-right-up-line bg-gradient-to-r />
</a>
</p>
</section>
</div>
</template>
20 changes: 9 additions & 11 deletions components/nav/NavFooter.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<template>
<div
backdrop-blur
py-2
fbc
prose
ma
>
<div text="xs gray4" flex justify-center gap-3>
<footer backdrop-blur py-2 fbc min-w-65ch w-fit ma gap-6 pos-sticky bottom-0>
<div font-dm text="xs gray4" fsc flex-wrap gap-3>
<a href="https://beian.miit.gov.cn/" target="_blank">蜀ICP备2022005364号</a>
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a>2023-PRESENT © Chris
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a>
<span>2023-PRESENT © Chris</span>
</div>
<i i-fluent-emoji:ghost />
</div>
<div fcc gap-3>
<!-- <Timer /> -->
<i i-fluent-emoji:ghost />
</div>
</footer>
</template>
48 changes: 0 additions & 48 deletions composables/dark.ts

This file was deleted.

18 changes: 8 additions & 10 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<template>
<div>
<NavHeader />
<main px-7 pt-10 pb-18>
<!-- <router-view v-slot="{ Component, route }">
<NavHeader />
<main>
<!-- <router-view v-slot="{ Component, route }">
<transition
enter-active-class="animate-fade-in animate-duration-500"
leave-active-class="animate-fade-out animate-duration-500"
Expand All @@ -13,10 +12,9 @@
</keep-alive>
</transition>
</router-view> -->
<slot />
</main>
<NavFooter />
<Cursor />
<!-- <Bg /> -->
</div>
<slot />
</main>
<NavFooter />
<!-- <Cursor /> -->
<!-- <Bg /> -->
</template>
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineNuxtConfig({
'~/styles/vars.css',
],
devtools: {
enabled: true,
enabled: false,
},
// content: {
// highlight: {
Expand Down
51 changes: 5 additions & 46 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,20 @@
useHead({
title: 'Chris',
})
const { data: user } = await useFetch('/api/user')
</script>

<template>
<div prose ma c-primary text-op-64>
<!-- <PersonInfo /> -->
<h1 fsc gap-5>
<UserAvatar />
</h1>
<p>
I'm <strong c-primary>{{ user?.name }}</strong>, front-end engineer 🧑🏻‍💻 & open source enthusiast.
</p>
<p italic font-dm>
「 {{ user?.bio }} 」
</p>
<p>
<i i-fluent-emoji-sports-medal mr-1 />
Team member of:
<IconsUnoCSS />
,
<IconsElk />
</p>
<p>
<i i-fluent-emoji-sparkles mr-1 />
Creator of:
<IconsOnuUI />
,
<IconsUnPreset />
</p>
<p>
<i i-fluent-emoji-party-popper mr-1 />
Contributor of:
<IconsVite />
<IconsVue />
<IconsNuxt /> & etc.
</p>

<div ma w-fit>
<PersonInfo />
<!-- <p>
I have diverse interests, including watching anime, mountain climbing, music appreciation, foreign language acquisition, gaming,
and recently, I have embarked on video editing with the goal of becoming a content
<IconsBilibili />
.
</p> -->

<div v-if="user" lt-sm-fcc>
<GC :username="user.login" :month="8" borderable />
</div>

<p>
<a trans text-p-r class="group" hover-op-75 :href="`mailto:${user?.email ?? '[email protected]'}`">
Hire Me
<i trans group-hover="ml-2" i-ri:arrow-right-up-line bg-gradient-to-r />
</a>
</p>
<!-- <div v-if="user" lt-sm-fcc>
<GC :username="user.login" borderable />
</div> -->
</div>
</template>
26 changes: 7 additions & 19 deletions styles/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
html,
body,
#__nuxt {
min-height: 100%;
}

body{
--uno: h-full trans text bg;
--uno: text text-op-64 bg;
}

body::-webkit-scrollbar {
Expand All @@ -10,24 +16,6 @@ body::-webkit-scrollbar {
--uno: text-primary;
}

::view-transition-old(root),
::view-transition-new(root) {
animation: none;
mix-blend-mode: normal;
}
::view-transition-old(root) {
z-index: 1;
}
::view-transition-new(root) {
z-index: 9999;
}
.dark::view-transition-old(root) {
z-index: 9999;
}
.dark::view-transition-new(root) {
z-index: 1;
}

.transLogo {
view-transition-name: logo;
}
Expand Down

0 comments on commit c194517

Please sign in to comment.