This commit is contained in:
rsgltzyd 2024-10-05 20:35:41 +08:00
parent 602d11f85b
commit ca0cac99c8
7 changed files with 145 additions and 131 deletions

View File

@ -11,6 +11,8 @@
"format": "prettier --write src/"
},
"dependencies": {
"@ant-design/icons-vue": "^7.0.1",
"ant-design-vue": "^4.2.5",
"pinia": "^2.1.7",
"vue": "^3.4.29",
"vue-router": "^4.3.3"

View File

@ -1,82 +1,51 @@
<script setup>
import { RouterLink, RouterView } from 'vue-router'
</script>
<script setup lang="js">
import { RouterView } from 'vue-router'
import { h, ref } from 'vue'
import { AppstoreOutlined, MailOutlined } from '@ant-design/icons-vue'
import CustomCard from '@/components/CustomCard.vue'
const current = ref(['mail'])
const items = ref([
{
key: 'home',
icon: () => h(MailOutlined),
label: h('a', { href: '/' }, '首页'),
title: '首页'
},
{
key: 'about',
icon: () => h(AppstoreOutlined),
label: h('a', { href: '/about' }, '关于'),
title: '关于'
}
])
</script>
import CustomCard from '@/components/CustomCard.vue'
<template>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
<a-menu v-model:selectedKeys="current" mode="horizontal" :items="items" />
</nav>
</div>
</header>
<main>
<article>
<RouterView />
</article>
<aside>
<CustomCard :style="{margin: 'auto', padding: '10px'}" />
</aside>
</main>
</template>
<style scoped>
header {
line-height: 1.5;
max-height: 100vh;
article {
flex: 5;
}
.logo {
display: block;
margin: 0 auto 2rem;
}
nav {
width: 100%;
font-size: 12px;
text-align: center;
margin-top: 2rem;
}
nav a.router-link-exact-active {
color: var(--color-text);
}
nav a.router-link-exact-active:hover {
background-color: transparent;
}
nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
}
nav a:first-of-type {
border: 0;
}
@media (min-width: 1024px) {
header {
display: flex;
place-items: center;
padding-right: calc(var(--section-gap) / 2);
}
.logo {
margin: 0 2rem 0 0;
}
header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
}
nav {
text-align: left;
margin-left: -1rem;
font-size: 1rem;
padding: 1rem 0;
margin-top: 1rem;
}
aside {
flex: 2;
}
</style>

View File

@ -5,6 +5,21 @@
margin: 0 auto;
padding: 2rem;
font-weight: normal;
display: flex;
flex-direction: column;
}
header {
margin: 0 auto;
}
main {
/*width: 80%;*/
width: 1080px;
display: flex;
justify-content: center;
flex: 2 800px;
margin: 0 auto;
}
a,
@ -22,11 +37,6 @@ a,
}
@media (min-width: 1024px) {
body {
display: flex;
place-items: center;
}
#app {
padding: 0 2rem;
}

View File

@ -7,9 +7,7 @@ const customCard = ref(new CustomCard())
<template>
<div class="card">
<div class="avatar">
<!-- <img :src="require(customCard.avatar)" alt="avatar" />-->
<!-- <img src="./images/avatar.jpg" alt="avatar" />-->
<img :src="customCard.avatar" alt="avatar">
<img :src="customCard.avatar" alt="avatar" height="100px" width="100px" />
</div>
<div class="name">
@ -25,15 +23,15 @@ const customCard = ref(new CustomCard())
<style scoped>
.card {
display: flex;
flex-wrap: wrap;
flex-direction: column;
text-align: center;
align-items: center;
box-sizing: border-box;
width: 200px;
.avatar {
width: 50%;
img {
width: 80%;
height: 80%;
border-radius: 50%;
}
}
@ -45,4 +43,16 @@ const customCard = ref(new CustomCard())
width: 100%;
}
}
@media screen and (max-width: 800px) {
.card {
width: 160px;
}
}
@media screen and (min-width: 800px) {
.card {
width: 200px;
}
}
</style>

View File

@ -5,10 +5,11 @@ import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.mount('#app')
app.use(Antd).mount('#app')

View File

@ -7,7 +7,6 @@
<style>
@media (min-width: 1024px) {
.about {
min-height: 100vh;
display: flex;
align-items: center;
}

View File

@ -1,58 +1,81 @@
<script setup>
import CustomCard from '@/components/CustomCard.vue'
const cardStyle = {
width: '200px'
}
const moduleList_1 = [
{
title: 'Gitea',
url: 'http://10.120.20.137:3000/'
},
{
title: 'Pve',
url: 'https://10.120.20.15:8006/'
}
]
const moduleList_2 = [
{
title: 'zero tier',
url: 'https://zerotier.yulinling.asia/'
},
{
title: 'gitea',
url: 'https://gitea.yulinling.asia/'
}
]
</script>
<template>
<main>
<article>
<h1>An Exciting Blog Post</h1>
<p>
Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth
tatsoi tomatillo melon azuki bean garlic.
</p>
<p>
Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts
fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea
peanut soko zucchini.
</p>
<p>
Turnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth
water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato
scallion desert raisin horseradish spinach carrot soko. Lotus root water spinach fennel
kombu maize bamboo shoot green bean swiss chard seakale pumpkin onion chickpea gram corn
pea. Brussels sprout coriander water chestnut gourd swiss chard wakame kohlrabi beetroot
carrot watercress. Corn amaranth salsify bunya nuts nori azuki bean chickweed potato bell
pepper artichoke.
</p>
<p>
Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery. Bunya
nuts black-eyed pea prairie turnip leek lentil turnip greens parsnip. Sea lettuce lettuce
water chestnut eggplant winter purslane fennel azuki bean earthnut pea sierra leone bologi
leek soko chicory celtuce parsley jícama salsify.
</p>
<p>
Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlic gram
celery bitterleaf wattle seed collard greens nori. Grape wattle seed kombu beetroot
horseradish carrot squash brussels sprout chard.
</p>
</article>
<aside>
<h2>Photography</h2>
<CustomCard />
<ul class="photos"></ul>
</aside>
</main>
<div>
<h2>Zero tier</h2>
<ul>
<a-card
v-for="(item, index) in moduleList_1"
:key="index"
:style="cardStyle"
:body-style="{ padding: 0, overflow: 'hidden' }"
>
<a-flex justify="space-between">
<a-flex vertical align="flex-end" justify="space-between" :style="{ padding: '32px' }">
<a-typography>
<a-typography-title :level="3"> {{ item.title }}</a-typography-title>
</a-typography>
<a-button type="primary" :href="item.url" target="_blank">Get Start</a-button>
</a-flex>
</a-flex>
</a-card>
</ul>
</div>
<div>
<h2>aliyun</h2>
<ul>
<a-card
v-for="(item, index) in moduleList_2"
:key="index"
:style="cardStyle"
:body-style="{ padding: 0, overflow: 'hidden' }"
>
<a-flex justify="space-between">
<a-flex vertical align="flex-end" justify="space-between" :style="{ padding: '32px' }">
<a-typography>
<a-typography-title :level="3"> {{ item.title }}</a-typography-title>
</a-typography>
<a-button type="primary" :href="item.url" target="_blank">Get Start</a-button>
</a-flex>
</a-flex>
</a-card>
</ul>
</div>
</template>
<style>
main {
width: 80%;
<style scoped>
ul {
display: flex;
flex: 3 1;
flex-direction: row;
}
ul > div {
margin: 10px;
}
</style>