Skip to content

Commit

Permalink
!16 添加打赏入口
Browse files Browse the repository at this point in the history
Merge pull request !16 from kk/coffee
  • Loading branch information
bosichong authored and gitee-org committed May 22, 2023
2 parents f976935 + 91262ed commit 738f990
Show file tree
Hide file tree
Showing 23 changed files with 282 additions and 266 deletions.
28 changes: 0 additions & 28 deletions docs/assets/Layout.4a8d9145.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/assets/Layout.71569664.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions docs/assets/Layout.bc811236.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/assets/Layout.c267aad5.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/Print.245410c3.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/assets/Print.7b9166c7.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/assets/Print.9140e928.css

This file was deleted.

1 change: 1 addition & 0 deletions docs/assets/Print.e6194b22.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/assets/index.47a5d56c.css

This file was deleted.

26 changes: 13 additions & 13 deletions docs/assets/index.973572fc.js → docs/assets/index.820e40f0.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/assets/index.d1f230d2.css

Large diffs are not rendered by default.

Binary file added docs/assets/wx.73af490b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/zfb.d5863586.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>小学数学口算题 | Primary School Mathematics</title><script type="module" crossorigin src="/PrimarySchoolMathematics/assets/index.973572fc.js"></script><link rel="stylesheet" href="/PrimarySchoolMathematics/assets/index.47a5d56c.css"></head><body><div id="app"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>小学数学口算题 | Primary School Mathematics</title><script type="module" crossorigin src="/PrimarySchoolMathematics/assets/index.820e40f0.js"></script><link rel="stylesheet" href="/PrimarySchoolMathematics/assets/index.d1f230d2.css"></head><body><div id="app"></div></body></html>
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build:github": "vite build --base=/PrimarySchoolMathematics/",
"preview:github": "vite preview --base=/PrimarySchoolMathematics/",
"build": "vite build",
"build:suiyan": "vite build --base=/demo/psm/",
"preview": "vite preview"
},
"dependencies": {
Expand All @@ -31,4 +32,4 @@
"vite-plugin-html": "^3.2.0",
"vite-plugin-static-copy": "^0.15.0"
}
}
}
Binary file added src/assets/wx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/zfb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 57 additions & 18 deletions src/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,70 @@
<template>
<footer class="py-6 px-7 flex justify-center flex-wrap items-baseline">
<template v-for="bind in bands">
<p class="h-7">
<a v-if="bind.link" :href="bind.link" target="_blank">
<img :alt="bind.imageAlt" :src="bind.imageSrc" class="mr-2" />
</a>
<img v-else :alt="bind.imageAlt" :src="bind.imageSrc" class="mr-2" />
</p>
</template>
</footer>
<footer class="py-6 px-7 flex justify-center flex-wrap items-baseline">
<template v-for="bind in bands">
<p class="h-7">
<a v-if="bind.link" :href="bind.link" target="_blank">
<img :alt="bind.imageAlt" :src="bind.imageSrc" class="mr-2"/>
</a>
<img v-else :alt="bind.imageAlt" :src="bind.imageSrc" class="mr-2"/>
</p>
</template>

<el-tooltip
class="box-item"
content="请作者喝一杯咖啡!"
placement="top"
>
<el-button type="success" :icon="Coffee" size="large" circle @click="centerDialogVisible = true" class="coffee-me fixed right-5 inset-y-1/4 text-lg"/>
</el-tooltip>

<el-dialog v-model="centerDialogVisible" title="请作者喝一杯咖啡:)" width="30%" center>
<el-row :gutter="20">
<el-col :span="12">
<div class="grid-content ep-bg-purple"/>
<img src="@/assets/wx.png" alt="请作者喝咖啡:)"></el-col>
<el-col :span="12">
<div class="grid-content ep-bg-purple"/>
<img src="@/assets/zfb.png" alt="请作者喝咖啡:)"></el-col>
</el-row>
<div>


</div>
</el-dialog>

</footer>
</template>

<script setup>
import { ref } from 'vue';
import {ref} from 'vue';
import {
Coffee,
} from '@element-plus/icons-vue'
const centerDialogVisible = ref(false)
const bands = ref([
{ imageAlt: "python-3.8.8", imageSrc: "https://img.shields.io/badge/Python-3.8.8-green?logo=python" },
{ imageAlt: "fastAPI-0.85.1", imageSrc: "https://img.shields.io/badge/fastAPI-0.85.1-green" },
{ imageAlt: "Vue-3.2.41", imageSrc: "https://img.shields.io/badge/Vue-3.2.41-blue" },
{ imageAlt: "license-Apache--2.0", imageSrc: "https://img.shields.io/badge/license-Apache--2.0-green" },
{ imageAlt: "", imageSrc: "https://img.shields.io/badge/Gitee--PrimarySchoolMathematics-red?logo=gitee", link: 'https://gitee.com/J_Sky/PrimarySchoolMathematics' },
{ imageAlt: "", imageSrc: "https://img.shields.io/badge/Github--PrimarySchoolMathematics-green?logo=github", link: 'https://github.com/bosichong/PrimarySchoolMathematics' }
{imageAlt: "Vue-3.2.41", imageSrc: "https://img.shields.io/badge/Vue-3.2.41-blue"},
{imageAlt: "license-Apache--2.0", imageSrc: "https://img.shields.io/badge/license-Apache--2.0-green"},
{
imageAlt: "",
imageSrc: "https://img.shields.io/badge/Gitee--PrimarySchoolMathematics-red?logo=gitee",
link: 'https://gitee.com/J_Sky/PrimarySchoolMathematics'
},
{
imageAlt: "",
imageSrc: "https://img.shields.io/badge/Github--PrimarySchoolMathematics-green?logo=github",
link: 'https://github.com/bosichong/PrimarySchoolMathematics'
}
])
</script>

<style lang="scss" scoped>
footer {
background: #f0f2f5;
background: #f0f2f5;
}
.coffee-me{
font-size: 18px;
}
</style>
12 changes: 6 additions & 6 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { createApp } from 'vue'
import { createPinia } from "pinia"
import App from './App.vue'
import { router } from './router';
import ElementPlus from 'element-plus'
import "./styles/tailwind.css";
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import "./styles/tailwind.css";
import "./styles/shared.scss";

import 'element-plus/dist/index.css'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import App from './App.vue'
import { router } from './router';

const pinia = createPinia()
const app = createApp(App);

Expand Down
2 changes: 2 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export const routes = [


const baseUrl = import.meta.env.BASE_URL
// console.log(baseUrl)
export const router = createRouter({
history: createWebHistory(baseUrl),
// history: createWebHashHistory(),
routes,
});
62 changes: 33 additions & 29 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
import path from "path";
import { defineConfig } from 'vite'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import { createHtmlPlugin } from "vite-plugin-html";
import { viteStaticCopy } from "vite-plugin-static-copy";
import {createHtmlPlugin} from "vite-plugin-html";
import {viteStaticCopy} from "vite-plugin-static-copy";

const srcPath = path.resolve(__dirname, 'src')

export default defineConfig({
server: {
port: 1101,
},
resolve: {
alias: {
'@/': `${srcPath}/`,
}
},
plugins: [
vue(),
createHtmlPlugin({
inject: {
data: {
title: '小学数学口算题 | Primary School Mathematics'
server: {
port: 1101,
},
resolve: {
alias: {
'@/': `${srcPath}/`,
}
}
}),
viteStaticCopy({
silent: true,
targets: [
{
src: 'dist/*',
dest: path.resolve(__dirname, 'docs')
}
]
})
]
},
plugins: [
vue(),
createHtmlPlugin({
inject: {
data: {
title: '小学数学口算题 | Primary School Mathematics'
}
}
}),
viteStaticCopy({
silent: true,
targets: [
{
src: 'dist/*',
dest: path.resolve(__dirname, 'docs')
}
]
})
],
base:'./',
build: {
chunkSizeWarningLimit: 1500,
},
})
Loading

0 comments on commit 738f990

Please sign in to comment.