1
0
mirror of https://github.com/fumiama/sekusu.git synced 2026-06-05 00:32:42 +08:00

first commit

This commit is contained in:
源文雨
2024-02-22 02:58:27 +09:00
commit 9e32993a82
29 changed files with 2830 additions and 0 deletions

15
.eslintrc.cjs Normal file
View File

@@ -0,0 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}

32
.gitignore vendored Normal file
View File

@@ -0,0 +1,32 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.tsbuildinfo
/dist.zip

8
.prettierrc.json Normal file
View File

@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}

8
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,8 @@
{
"recommendations": [
"Vue.volar",
"Vue.vscode-typescript-vue-plugin",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}

46
README.md Normal file
View File

@@ -0,0 +1,46 @@
# sekusu
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
1. Disable the built-in TypeScript Extension
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
## Customize configuration
See [Vite Configuration Reference](https://vitejs.dev/config/).
## Project Setup
```sh
pnpm install
```
### Compile and Hot-Reload for Development
```sh
pnpm dev
```
### Type-Check, Compile and Minify for Production
```sh
pnpm build
```
### Lint with [ESLint](https://eslint.org/)
```sh
pnpm lint
```

9
auto-imports.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
}

19
components.d.ts vendored Normal file
View File

@@ -0,0 +1,19 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
declare module 'vue' {
export interface GlobalComponents {
IconKantoku: typeof import('./src/components/icons/IconKantoku.vue')['default']
VarButton: typeof import('@varlet/ui')['_ButtonComponent']
VarCard: typeof import('@varlet/ui')['_CardComponent']
VarCell: typeof import('@varlet/ui')['_CellComponent']
VarChip: typeof import('@varlet/ui')['_ChipComponent']
VarCol: typeof import('@varlet/ui')['_ColComponent']
VarIcon: typeof import('@varlet/ui')['_IconComponent']
VarRow: typeof import('@varlet/ui')['_RowComponent']
}
}

1
env.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
/// <reference types="vite/client" />

13
index.html Normal file
View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>堰洲 - 源文雨(fumiama)</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

43
package.json Normal file
View File

@@ -0,0 +1,43 @@
{
"name": "sekusu",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "run-p \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/"
},
"dependencies": {
"@varlet/touch-emulator": "^3.0.3",
"@varlet/ui": "^3.0.2",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"vue": "^3.4.15"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.3.3",
"@tsconfig/node20": "^20.1.2",
"@types/node": "^20.11.10",
"@varlet/import-resolver": "^3.0.2",
"@vitejs/plugin-vue": "^5.0.3",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"npm-run-all2": "^6.1.1",
"postcss-px-to-viewport": "^1.1.1",
"prettier": "^3.0.3",
"typescript": "~5.3.0",
"unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.0.11",
"vite-plugin-compression": "^0.5.1",
"vue-tsc": "^1.8.27"
}
}

2314
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
public/ads.txt Normal file
View File

@@ -0,0 +1 @@
google.com, pub-1435053067354518, DIRECT, f08c47fec0942fa0

BIN
public/assets/imgs/bgl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 KiB

BIN
public/assets/imgs/bgr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

BIN
public/assets/imgs/g1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
public/assets/imgs/g2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
public/assets/imgs/g3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
public/assets/imgs/g4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
public/assets/imgs/g5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

198
src/App.vue Normal file
View File

@@ -0,0 +1,198 @@
<script setup lang="ts">
import { StyleProvider, Themes } from '@varlet/ui'
import { useDayNightStore } from '@/stores/main';
import { ref } from 'vue';
import IconKantoku from '@/components/icons/IconKantoku.vue'
const { isNight, toggle } = useDayNightStore()
const isNightRef = ref(isNight)
StyleProvider(isNight?Themes.md3Dark:Themes.md3Light)
function toggleTheme() {
isNightRef.value = toggle()
StyleProvider(isNightRef.value?Themes.md3Dark:Themes.md3Light)
}
function nav2(l: string) {
window.location.href = l
}
</script>
<template>
<div class="background-with-overlay">
<IconKantoku class="icon-sign" />
<div class="girls-container">
<img class="girl-1" :src="'/assets/imgs/g1.png'"/>
<img class="girl-2" :src="'/assets/imgs/g2.png'"/>
<img class="girl-3" :src="'/assets/imgs/g3.png'"/>
<img class="girl-4" :src="'/assets/imgs/g4.png'"/>
</div>
<img class="girl-5" :src="'/assets/imgs/g5.png'"/>
</div>
<var-cell class="title-container">
<var-row :gutter="[16, 0]">
<var-col :span="24" align="center" justify="center">
<var-chip class="kuzusi-font" type="primary" size="large">
堰洲
<template #right>
<var-button round text color="transparent" @click="toggleTheme">
<var-icon :name="isNightRef? 'weather-night' : 'white-balance-sunny'"/>
</var-button>
</template>
</var-chip>
</var-col>
<var-col :span="24" align="center" justify="center">
<var-chip type="success">
临堰洲以少憩兮芝兰馨而木繁枝
</var-chip>
</var-col>
<var-col :span="24" align="center" justify="center">
<var-chip type="warning">
<var-button text round @click="nav2('https\://github.com/fumiama')">
<var-icon name="github" />
</var-button>
</var-chip>
</var-col>
</var-row>
</var-cell>
<var-cell class="content-container">
<var-row :gutter="[0, 32]">
<var-col :span="8" align="center" justify="center">
<var-card
title="CMoe-Counter"
subtitle="多种风格的萌萌计数器"
>
<template #extra>
<var-button text round @click="nav2('https\://counter.seku.su')">
<var-icon name="chevron-right" />
</var-button>
</template>
</var-card>
</var-col>
<var-col :span="8" align="center" justify="center">
<var-card
title="Emozi"
subtitle="颜文字汉字抽象转写器"
>
<template #extra>
<var-button text round @click="nav2('https\://emozi.seku.su')">
<var-icon name="chevron-right" />
</var-button>
</template>
</var-card>
</var-col>
<var-col :span="8" align="center" justify="center">
<var-card
title="Words-Away"
subtitle="误屏蔽词绕过检测工具"
>
<template #extra>
<var-button text round @click="nav2('https\://words-away.seku.su')">
<var-icon name="chevron-right" />
</var-button>
</template>
</var-card>
</var-col>
</var-row>
</var-cell>
</template>
<style>
body {
margin: 0;
transition: background-color .25s, color .25s;
color: var(--color-text);
background-image: url('/assets/imgs/bgl.png'), url('/assets/imgs/bgr.png');
background-size: 42.5vw auto, 38vw auto;
background-position: top left, top right;
background-repeat: no-repeat, no-repeat;
background-color: var(--color-body);
min-width: 360px;
}
.title-container {
position: absolute;
top: 24px;
opacity: 0.8;
}
.content-container {
position: absolute;
bottom: 24px;
opacity: 0.6;
padding-left: 32px;
padding-right: 32px;
}
.girls-container {
position: relative;
display: flex;
justify-content: space-between;
width: 57%;
@media (min-width: 800px) {
width: 70%;
}
@media (min-width: 1000px) {
width: 74%;
}
}
.girl-1 {
display: none;
height: 100vh;
@media (min-width: 440px) {
display: inline;
}
}
.girl-2 {
display: none;
height: 100vh;
@media (min-width: 630px) {
display: inline;
}
}
.girl-3 {
display: none;
height: 100vh;
@media (min-width: 800px) {
display: inline;
}
}
.girl-4 {
display: none;
height: 100vh;
@media (min-width: 1000px) {
display: inline;
}
}
.girl-5 {
position: absolute;
top: 0;
right: 0;
height: 100%;
}
.icon-sign {
position: absolute;
top: 24px;
left: 35%;
}
.background-with-overlay::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)); /* Adjust the opacity as needed */
}
@font-face {
font-family: 'FZWenZhengMingXingCaoS';
src: url('@/assets/fonts/FZWenZMXCJW.woff2') format('woff2');
}
.kuzusi-font {
font-family: 'FZWenZhengMingXingCaoS';
font-size: 64px;
--chip-large-height: 80px;
}
</style>

Binary file not shown.

File diff suppressed because one or more lines are too long

20
src/main.ts Normal file
View File

@@ -0,0 +1,20 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import Varlet from '@varlet/ui'
import '@varlet/ui/es/style'
import '@varlet/touch-emulator'
import App from './App.vue'
const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(Varlet)
app.use(pinia)
app.mount('#app')

12
src/stores/main.ts Normal file
View File

@@ -0,0 +1,12 @@
import { ref } from 'vue'
import { defineStore } from 'pinia'
export const useDayNightStore = defineStore('daynight', () => {
const isNight = ref(false)
function toggle(): boolean {
isNight.value = !isNight.value
return isNight.value
}
return { isNight, toggle }
}, { persist: true })

14
tsconfig.app.json Normal file
View File

@@ -0,0 +1,14 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}

12
tsconfig.json Normal file
View File

@@ -0,0 +1,12 @@
{
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
}
],
"include": ["auto-imports.d.ts", "components.d.ts"]
}

19
tsconfig.node.json Normal file
View File

@@ -0,0 +1,19 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"include": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*"
],
"compilerOptions": {
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
}
}

32
vite.config.ts Normal file
View File

@@ -0,0 +1,32 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import components from 'unplugin-vue-components/vite'
import autoImport from 'unplugin-auto-import/vite'
import { VarletImportResolver } from '@varlet/import-resolver'
import viteCompression from 'vite-plugin-compression'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
components({
resolvers: [VarletImportResolver()]
}),
autoImport({
resolvers: [VarletImportResolver({ autoImport: true })]
}),
viteCompression({
algorithm: 'gzip',
threshold: 10240,
verbose: false,
deleteOriginFile: false
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})