From 477ea421a6ecd12645dd25b4d14fd1d67085f08f Mon Sep 17 00:00:00 2001 From: 白咕咕 <67865300+baimianxiao@users.noreply.github.com> Date: Tue, 7 Nov 2023 01:28:02 +0800 Subject: 倒计时组件 (#72) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 部署官网框架 * 部署官网框架 * 部署官网框架 * 修改标题 * 初步完成左侧倒计时组件 * favicon --------- Co-authored-by: 白咕咕 --- site/src/App.vue | 47 +++++++++++++ site/src/assets/Hydroroll-small.svg | 61 +++++++++++++++++ site/src/assets/base.css | 86 ++++++++++++++++++++++++ site/src/assets/main.css | 35 ++++++++++ site/src/components/Left.vue | 78 ++++++++++++++++++++++ site/src/components/TheWelcome.vue | 88 +++++++++++++++++++++++++ site/src/components/WelcomeItem.vue | 87 ++++++++++++++++++++++++ site/src/components/icons/IconCommunity.vue | 7 ++ site/src/components/icons/IconDocumentation.vue | 7 ++ site/src/components/icons/IconEcosystem.vue | 7 ++ site/src/components/icons/IconSupport.vue | 7 ++ site/src/components/icons/IconTooling.vue | 19 ++++++ site/src/layouts/default/AppBar.vue | 13 ++++ site/src/layouts/default/Default.vue | 12 ++++ site/src/layouts/default/View.vue | 9 +++ site/src/main.ts | 22 +++++++ site/src/plugins/index.ts | 20 ++++++ site/src/plugins/vuetify.ts | 26 ++++++++ site/src/router/index.ts | 26 ++++++++ site/src/store/app.ts | 8 +++ site/src/store/index.ts | 4 ++ site/src/styles/settings.scss | 10 +++ site/src/views/Home.vue | 7 ++ site/src/vite-env.d.ts | 7 ++ 24 files changed, 693 insertions(+) create mode 100644 site/src/App.vue create mode 100644 site/src/assets/Hydroroll-small.svg create mode 100644 site/src/assets/base.css create mode 100644 site/src/assets/main.css create mode 100644 site/src/components/Left.vue create mode 100644 site/src/components/TheWelcome.vue create mode 100644 site/src/components/WelcomeItem.vue create mode 100644 site/src/components/icons/IconCommunity.vue create mode 100644 site/src/components/icons/IconDocumentation.vue create mode 100644 site/src/components/icons/IconEcosystem.vue create mode 100644 site/src/components/icons/IconSupport.vue create mode 100644 site/src/components/icons/IconTooling.vue create mode 100644 site/src/layouts/default/AppBar.vue create mode 100644 site/src/layouts/default/Default.vue create mode 100644 site/src/layouts/default/View.vue create mode 100644 site/src/main.ts create mode 100644 site/src/plugins/index.ts create mode 100644 site/src/plugins/vuetify.ts create mode 100644 site/src/router/index.ts create mode 100644 site/src/store/app.ts create mode 100644 site/src/store/index.ts create mode 100644 site/src/styles/settings.scss create mode 100644 site/src/views/Home.vue create mode 100644 site/src/vite-env.d.ts (limited to 'site/src') diff --git a/site/src/App.vue b/site/src/App.vue new file mode 100644 index 0000000..8b16a9d --- /dev/null +++ b/site/src/App.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/site/src/assets/Hydroroll-small.svg b/site/src/assets/Hydroroll-small.svg new file mode 100644 index 0000000..242c16c --- /dev/null +++ b/site/src/assets/Hydroroll-small.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/site/src/assets/base.css b/site/src/assets/base.css new file mode 100644 index 0000000..8816868 --- /dev/null +++ b/site/src/assets/base.css @@ -0,0 +1,86 @@ +/* color palette from */ +:root { + --vt-c-white: #ffffff; + --vt-c-white-soft: #f8f8f8; + --vt-c-white-mute: #f2f2f2; + + --vt-c-black: #181818; + --vt-c-black-soft: #222222; + --vt-c-black-mute: #282828; + + --vt-c-indigo: #2c3e50; + + --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); + --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); + --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); + --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); + + --vt-c-text-light-1: var(--vt-c-indigo); + --vt-c-text-light-2: rgba(60, 60, 60, 0.66); + --vt-c-text-dark-1: var(--vt-c-white); + --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); +} + +/* semantic color variables for this project */ +:root { + --color-background: var(--vt-c-white); + --color-background-soft: var(--vt-c-white-soft); + --color-background-mute: var(--vt-c-white-mute); + + --color-border: var(--vt-c-divider-light-2); + --color-border-hover: var(--vt-c-divider-light-1); + + --color-heading: var(--vt-c-text-light-1); + --color-text: var(--vt-c-text-light-1); + + --section-gap: 160px; +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--vt-c-black); + --color-background-soft: var(--vt-c-black-soft); + --color-background-mute: var(--vt-c-black-mute); + + --color-border: var(--vt-c-divider-dark-2); + --color-border-hover: var(--vt-c-divider-dark-1); + + --color-heading: var(--vt-c-text-dark-1); + --color-text: var(--vt-c-text-dark-2); + } +} + +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + font-weight: normal; +} + +body { + min-height: 100vh; + color: var(--color-text); + background: var(--color-background); + transition: + color 0.5s, + background-color 0.5s; + line-height: 1.6; + font-family: + Inter, + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + Oxygen, + Ubuntu, + Cantarell, + 'Fira Sans', + 'Droid Sans', + 'Helvetica Neue', + sans-serif; + font-size: 15px; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} diff --git a/site/src/assets/main.css b/site/src/assets/main.css new file mode 100644 index 0000000..e8667cd --- /dev/null +++ b/site/src/assets/main.css @@ -0,0 +1,35 @@ +@import './base.css'; + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + + font-weight: normal; +} + +a, +.green { + text-decoration: none; + color: hsla(160, 100%, 37%, 1); + transition: 0.4s; +} + +@media (hover: hover) { + a:hover { + background-color: hsla(160, 100%, 37%, 0.2); + } +} + +@media (min-width: 1024px) { + body { + display: flex; + place-items: center; + } + + #app { + display: grid; + grid-template-columns: 1fr 1fr; + padding: 0 2rem; + } +} diff --git a/site/src/components/Left.vue b/site/src/components/Left.vue new file mode 100644 index 0000000..342e49b --- /dev/null +++ b/site/src/components/Left.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/site/src/components/TheWelcome.vue b/site/src/components/TheWelcome.vue new file mode 100644 index 0000000..dab9536 --- /dev/null +++ b/site/src/components/TheWelcome.vue @@ -0,0 +1,88 @@ + + + diff --git a/site/src/components/WelcomeItem.vue b/site/src/components/WelcomeItem.vue new file mode 100644 index 0000000..6d7086a --- /dev/null +++ b/site/src/components/WelcomeItem.vue @@ -0,0 +1,87 @@ + + + diff --git a/site/src/components/icons/IconCommunity.vue b/site/src/components/icons/IconCommunity.vue new file mode 100644 index 0000000..2dc8b05 --- /dev/null +++ b/site/src/components/icons/IconCommunity.vue @@ -0,0 +1,7 @@ + diff --git a/site/src/components/icons/IconDocumentation.vue b/site/src/components/icons/IconDocumentation.vue new file mode 100644 index 0000000..6d4791c --- /dev/null +++ b/site/src/components/icons/IconDocumentation.vue @@ -0,0 +1,7 @@ + diff --git a/site/src/components/icons/IconEcosystem.vue b/site/src/components/icons/IconEcosystem.vue new file mode 100644 index 0000000..c3a4f07 --- /dev/null +++ b/site/src/components/icons/IconEcosystem.vue @@ -0,0 +1,7 @@ + diff --git a/site/src/components/icons/IconSupport.vue b/site/src/components/icons/IconSupport.vue new file mode 100644 index 0000000..7452834 --- /dev/null +++ b/site/src/components/icons/IconSupport.vue @@ -0,0 +1,7 @@ + diff --git a/site/src/components/icons/IconTooling.vue b/site/src/components/icons/IconTooling.vue new file mode 100644 index 0000000..660598d --- /dev/null +++ b/site/src/components/icons/IconTooling.vue @@ -0,0 +1,19 @@ + + diff --git a/site/src/layouts/default/AppBar.vue b/site/src/layouts/default/AppBar.vue new file mode 100644 index 0000000..4d0660e --- /dev/null +++ b/site/src/layouts/default/AppBar.vue @@ -0,0 +1,13 @@ + + + diff --git a/site/src/layouts/default/Default.vue b/site/src/layouts/default/Default.vue new file mode 100644 index 0000000..e642631 --- /dev/null +++ b/site/src/layouts/default/Default.vue @@ -0,0 +1,12 @@ + + + diff --git a/site/src/layouts/default/View.vue b/site/src/layouts/default/View.vue new file mode 100644 index 0000000..8e9e414 --- /dev/null +++ b/site/src/layouts/default/View.vue @@ -0,0 +1,9 @@ + + + diff --git a/site/src/main.ts b/site/src/main.ts new file mode 100644 index 0000000..11c062f --- /dev/null +++ b/site/src/main.ts @@ -0,0 +1,22 @@ +/** + * main.ts + * + * Bootstraps Vuetify and other plugins then mounts the App` + */ + +// Components +import App from './App.vue' + +// Composables +import { createApp } from 'vue' + +// Plugins +import { registerPlugins } from '@/plugins' + +import './assets/main.css' + +const app = createApp(App) + +registerPlugins(app) + +app.mount('#app') diff --git a/site/src/plugins/index.ts b/site/src/plugins/index.ts new file mode 100644 index 0000000..baa02f3 --- /dev/null +++ b/site/src/plugins/index.ts @@ -0,0 +1,20 @@ +/** + * plugins/index.ts + * + * Automatically included in `./src/main.ts` + */ + +// Plugins +import vuetify from './vuetify' +import pinia from '../store' +import router from '../router' + +// Types +import type { App } from 'vue' + +export function registerPlugins (app: App) { + app + .use(vuetify) + .use(router) + .use(pinia) +} diff --git a/site/src/plugins/vuetify.ts b/site/src/plugins/vuetify.ts new file mode 100644 index 0000000..c276519 --- /dev/null +++ b/site/src/plugins/vuetify.ts @@ -0,0 +1,26 @@ +/** + * plugins/vuetify.ts + * + * Framework documentation: https://vuetifyjs.com` + */ + +// Styles +import '@mdi/font/css/materialdesignicons.css' +import 'vuetify/styles' + +// Composables +import { createVuetify } from 'vuetify' + +// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides +export default createVuetify({ + theme: { + themes: { + light: { + colors: { + primary: '#1867C0', + secondary: '#5CBBF6', + }, + }, + }, + }, +}) diff --git a/site/src/router/index.ts b/site/src/router/index.ts new file mode 100644 index 0000000..65353da --- /dev/null +++ b/site/src/router/index.ts @@ -0,0 +1,26 @@ +// Composables +import { createRouter, createWebHistory } from 'vue-router' + +const routes = [ + { + path: '/', + component: () => import('@/layouts/default/Default.vue'), + children: [ + { + path: '', + name: 'Home', + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue'), + }, + ], + }, +] + +const router = createRouter({ + history: createWebHistory(process.env.BASE_URL), + routes, +}) + +export default router diff --git a/site/src/store/app.ts b/site/src/store/app.ts new file mode 100644 index 0000000..7429543 --- /dev/null +++ b/site/src/store/app.ts @@ -0,0 +1,8 @@ +// Utilities +import { defineStore } from 'pinia' + +export const useAppStore = defineStore('app', { + state: () => ({ + // + }), +}) diff --git a/site/src/store/index.ts b/site/src/store/index.ts new file mode 100644 index 0000000..1536252 --- /dev/null +++ b/site/src/store/index.ts @@ -0,0 +1,4 @@ +// Utilities +import { createPinia } from 'pinia' + +export default createPinia() diff --git a/site/src/styles/settings.scss b/site/src/styles/settings.scss new file mode 100644 index 0000000..3e36a27 --- /dev/null +++ b/site/src/styles/settings.scss @@ -0,0 +1,10 @@ +/** + * src/styles/settings.scss + * + * Configures SASS variables and Vuetify overwrites + */ + +// https://vuetifyjs.com/features/sass-variables/` +// @use 'vuetify/settings' with ( +// $color-pack: false +// ); diff --git a/site/src/views/Home.vue b/site/src/views/Home.vue new file mode 100644 index 0000000..f07e0c8 --- /dev/null +++ b/site/src/views/Home.vue @@ -0,0 +1,7 @@ + + + diff --git a/site/src/vite-env.d.ts b/site/src/vite-env.d.ts new file mode 100644 index 0000000..323c78a --- /dev/null +++ b/site/src/vite-env.d.ts @@ -0,0 +1,7 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + const component: DefineComponent<{}, {}, any> + export default component +} -- cgit v1.2.3-70-g09d2