Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Super12138 committed Aug 28, 2024
1 parent 78729eb commit 2620edc
Show file tree
Hide file tree
Showing 26 changed files with 1,861 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20

- name: Setup Pages
uses: actions/[email protected]

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Upload artifact
uses: actions/[email protected]
with:
path: dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Cache
package-lock.json
30 changes: 30 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE HTML>
<html lang="zh-CN" class="mdui-theme-auto">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no">
<meta name="renderer" content="webkit">
<link href="./src/index.css" rel="stylesheet">
<title>问心</title>
</head>

<body>
<mdui-layout>
<mdui-navigation-bar id="navigationBar"></mdui-navigation-bar>
<mdui-navigation-rail id="navigationRail"></mdui-navigation-rail>
<mdui-layout-main id="container"></mdui-layout-main>
<mdui-top-app-bar>
<mdui-button-icon id="backBtn">
<mdui-icon-arrow-back></mdui-icon-arrow-back>
</mdui-button-icon>
<mdui-top-app-bar-title id="appTitle">问心</mdui-top-app-bar-title>
</mdui-top-app-bar>
</mdui-layout>
<script type="module" src="./src/index.ts"></script>
<script type="module" src="./src/list/index.ts"></script>
<script type="module" src="./src/test/index.ts"></script>
<script type="module" src="./src/settings/index.ts"></script>
</body>

</html>
2 changes: 2 additions & 0 deletions list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- <mdui-text-field clearable label="输入你想搜索的量表" id="searchBar"></mdui-text-field> -->
<mdui-list id="questionnaireList"></mdui-list>
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "ask-yourself",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Super12138/Ask-Yourself.git"
},
"author": "Super12138",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/Super12138/Ask-Yourself/issues"
},
"homepage": "https://github.com/Super12138/Ask-Yourself#readme",
"devDependencies": {
"@mdui/icons": "^1.0.2",
"@types/node": "^22.4.1",
"typedoc": "^0.26.6",
"typedoc-plugin-markdown": "^4.2.5",
"typescript": "^5.5.4",
"vite": "^5.4.2",
"vite-plugin-html": "^3.2.2"
},
"dependencies": {
"mdui": "^2.1.2"
}
}
27 changes: 27 additions & 0 deletions settings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<mdui-list>
<mdui-list-item id="clearAllDataItem" headline="清除全部数据">
<mdui-icon-delete--outlined slot="icon"></mdui-icon-delete--outlined>
</mdui-list-item>
<mdui-list-item id="aboutItem" headline="关于">
<mdui-icon-info--outlined slot="icon"></mdui-icon-info--outlined>
</mdui-list-item>
</mdui-list>

<mdui-dialog close-on-overlay-click headline="关于" id="about">
<p id="appVersion" style="margin-bottom: 0;"></p>
<p id="listVersion" style="margin-top: 5px;"></p>

<p>本项目旨在解决网上寻找心理自评量表困难的问题。</p>

<p>在项目的所有量表中,都会注明相关的参考信息。如果你在使用过程中发现错误/遗漏,欢迎通过 GitHub Issues 进行反馈/使用 Pull Request 进行提交</p>
<p>本项目所有的量表均为收集互联网上的信息并整理,不对网站内任何量表具有版权。如侵权请联系我,我会及时删除。</p>
<strong class="red">所有量表的测量结果仅供参考,不作为任何医学诊断的依据。</strong>

<mdui-divider style="margin-top: 15px;"></mdui-divider>

<p class="center" style="margin-bottom: 0;">由 Super12138 开发,网站本体遵循 GPL 3.0 协议在 GitHub 上开源</p>
<p class="center" style="margin-top: 5px; margin-bottom: 0;">量表内容的版权归研究者所有</p>
<p class="center" style="margin-top: 5px;">❤️</p>

<mdui-button slot="action" id="aboutCloseBtn" variant="tonal">确定</mdui-button>
</mdui-dialog>
21 changes: 21 additions & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* 应用版本名称
*/
declare const VERSION_NAME: string;

/**
* 应用运行环境
* * dev - 开发
* * web - 在线
*/
declare const VARIANT: string;

/**
* 版本提交 Hash
*/
declare const COMMIT_HASH: string;

/**
* 应用版本号
*/
declare const VERSION_CODE: string;
Loading

0 comments on commit 2620edc

Please sign in to comment.