feat: add Button
This commit is contained in:
parent
947aac4ed7
commit
fb37fd45a9
@ -2,7 +2,6 @@
|
|||||||
<html lang="zh-CN">
|
<html lang="zh-CN">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>thehrz</title>
|
<title>thehrz</title>
|
||||||
</head>
|
</head>
|
||||||
|
3
src/components.d.ts
vendored
3
src/components.d.ts
vendored
@ -7,8 +7,7 @@ export {}
|
|||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
Bar: typeof import('./components/Bar.vue')['default']
|
Button: typeof import('./components/button.vue')['default']
|
||||||
Btn: typeof import('./components/Btn.vue')['default']
|
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
}
|
}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
<template>
|
|
||||||
<nav class="px-9xl flex items-center">
|
|
||||||
<p class="font-sans font-semibold text-6">thehrz.net</p>
|
|
||||||
</nav>
|
|
||||||
</template>
|
|
@ -1,13 +0,0 @@
|
|||||||
<template>
|
|
||||||
<button type="button" class="">
|
|
||||||
<slot></slot>
|
|
||||||
</button>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
24
src/components/button.vue
Normal file
24
src/components/button.vue
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<a
|
||||||
|
class="bg-white border-solid border-2 border-#dcdfe6 c-black decoration-none flex items-center rounded text-4 h-11 px-3 shadow"
|
||||||
|
target="_blank"
|
||||||
|
:href="to"
|
||||||
|
>
|
||||||
|
<div v-if="icon" :class="icon" class="h-24px w-24px" />
|
||||||
|
<div class="ml-2" />
|
||||||
|
<slot />
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
defineOptions({
|
||||||
|
name: "AButton",
|
||||||
|
})
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
to: string
|
||||||
|
icon?: string
|
||||||
|
}>()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
@ -1,9 +1,21 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const links = [
|
||||||
|
{
|
||||||
|
icon: "i-mdi-github",
|
||||||
|
link: "https://github.com/thehrz"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<section class="flex flex-col items-center">
|
<section class="flex flex-col items-center">
|
||||||
<img class="w-8em shadow-lg" alt="thehrz" src="/thehrz.jpg" >
|
<img class="w-8em shadow-lg" alt="thehrz" src="/thehrz.jpg" >
|
||||||
|
|
||||||
<h1 class="my-8 text-2.5em leading-[1.1] md:text-3.5em c-coolgray-700 font-300">Hi! I'm thehrz.</h1>
|
<h1 class="my-8 text-2.5em leading-[1.1] md:text-3.5em c-coolgray-700 font-300">Hi! I'm thehrz.</h1>
|
||||||
|
|
||||||
<p class="c-dark-100">🚧 under construction...</p>
|
<Button v-for="link in links" :to="link.link" :icon="link.icon">Github</Button>
|
||||||
|
|
||||||
|
<p class="mt-8 c-dark-100">🚧 under construction...</p>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user