diff options
35 files changed, 443 insertions, 637 deletions
@@ -98,10 +98,6 @@ dmypy.json # Pyre type checker .pyre/ -# Project -.idea -.vscode - # Docs node_modules/ @@ -174,12 +170,6 @@ coverage.xml # Sphinx documentation docs/_build/ -# PyCharm -.idea/ - -# VSCode -.vscode/ - # Pyenv .python-version diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..658ca8a --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "lextudio.restructuredtext", + "esbenp.prettier-vscode", + "dbaeumer.vscode-eslint", + "golang.go", + "sumneko.lua", + "lextudio.iis", + "vue.volar" + ] +}
\ No newline at end of file diff --git a/.vscode/vue3.0.code-snippets b/.vscode/vue3.0.code-snippets new file mode 100644 index 0000000..bb43589 --- /dev/null +++ b/.vscode/vue3.0.code-snippets @@ -0,0 +1,22 @@ +{ + "Vue3.0快速生成模板": { + "scope": "vue", + "prefix": "Vue3.0", + "body": [ + "<template>", + "\t<div>test</div>", + "</template>\n", + "<script lang='ts'>", + "export default {", + "\tsetup() {", + "\t\treturn {}", + "\t}", + "}", + "</script>\n", + "<style lang='scss' scoped>\n", + "</style>", + "$2" + ], + "description": "Vue3.0" + } +} diff --git a/.vscode/vue3.2.code-snippets b/.vscode/vue3.2.code-snippets new file mode 100644 index 0000000..2cebb46 --- /dev/null +++ b/.vscode/vue3.2.code-snippets @@ -0,0 +1,17 @@ +{ + "Vue3.2+快速生成模板": { + "scope": "vue", + "prefix": "Vue3.2+", + "body": [ + "<script setup lang='ts'>", + "</script>\n", + "<template>", + "\t<div>test</div>", + "</template>\n", + "<style lang='scss' scoped>\n", + "</style>", + "$2" + ], + "description": "Vue3.2+" + } +} diff --git a/.vscode/vue3.3.code-snippets b/.vscode/vue3.3.code-snippets new file mode 100644 index 0000000..dc7a106 --- /dev/null +++ b/.vscode/vue3.3.code-snippets @@ -0,0 +1,20 @@ +{ + "Vue3.3+defineOptions快速生成模板": { + "scope": "vue", + "prefix": "Vue3.3+", + "body": [ + "<script setup lang='ts'>", + "defineOptions({", + "\tname: ''", + "})", + "</script>\n", + "<template>", + "\t<div>test</div>", + "</template>\n", + "<style lang='scss' scoped>\n", + "</style>", + "$2" + ], + "description": "Vue3.3+defineOptions快速生成模板" + } +} diff --git a/docs/Makefile b/docs/Makefile index 6fdb78c..bdf65e8 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -23,4 +23,8 @@ help: # update translation command translate: - @$(SPHINXINTL) update -p ./build/gettext -l $(lang) $(O)
\ No newline at end of file + @$(SPHINXINTL) update -p ./build/gettext -l $(lang) $(O) + +# build for debug +dev: + sphinx-autobuild source _build/html
\ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 899492a..3945c31 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,4 +4,5 @@ myst-parser>=0.18.1 sphinx>=5.3.0 tomli sphinx_design -sphinx-intl>=2.1.0
\ No newline at end of file +sphinx-intl>=2.1.0 +hydro-roll[dev]
\ No newline at end of file diff --git a/docs/source/about/complying_with_licenses.rst b/docs/source/about/complying_with_licenses.rst index 1402bc7..8fa2ae2 100644 --- a/docs/source/about/complying_with_licenses.rst +++ b/docs/source/about/complying_with_licenses.rst @@ -2,13 +2,13 @@ ========== 什么是许可证? -------------- +--------------- 需求 ----- +--------------- 包含 ----- +--------------- 第三方许可证 -------------
\ No newline at end of file +---------------
\ No newline at end of file diff --git a/docs/source/about/faq.rst b/docs/source/about/faq.rst index 016e962..2c89e9a 100644 --- a/docs/source/about/faq.rst +++ b/docs/source/about/faq.rst @@ -2,57 +2,55 @@ ======== 可以用水系做什么?需要花多少钱?有哪些许可条款? ---------------------------------------------- +---------------------------------------------------------------- 水系支持哪些平台? ----------------- +-------------------------------- 水系支持哪些编程语言? --------------------- +-------------------------------- Nivis 是什么?为什么要用它? --------------------------- +-------------------------------- 创建 Nivis 背后的动机是什么? ---------------------------- +-------------------------------- 水系会支持【此处插入赵骰、星骰、溯洄/shiki 等闭源或半闭源骰系/核心/驱动的名字】的模块化吗? -------------------------------------------------------------------------------------- +--------------------------------------------------------------------------------------------------------------------- 如何扩展水系? -------------- +------------------------------------------------------------------ 如何在我的系统上安装 HydroRoll 水系框架(进行桌面集成)? ------------------------------------------------------- +------------------------------------------------------------------ HydroRoll 水系是绿色应用/软件/程序吗? ------------------------------------- +------------------------------------------------------------------ 为什么水系基于规则包构建? ------------------------- +------------------------------------------------------------------ 如何适配多个平台、协议,其他骰系的模块化,资产应做哪些处理? --------------------------------------------------------- +------------------------------------------------------------------ HydroRoll 的下一个版本什么时候发布? --------------------------------------- +------------------------------------------------------------------ 新的骰系项目/模型项目使用哪个版本的 HydroRoll? ---------------------------------------------- +------------------------------------------------------------------ 是否需要将我的项目升级到 HydroRoll 最新版本? ------------------------------------------- +------------------------------------------------------------------ 我想要贡献!该如何开始? ----------------------- +------------------------------------------------------------------ 我有一个关于 HydroRoll 的好主意,该如何分享它? ---------------------------------------------- +------------------------------------------------------------------ 能否用 HydroRoll 创建非 TRPG/TTRPG 系统? ----------------------------------------- +------------------------------------------------------------------ 是否能够将 HydroRoll 作为库使用? -------------------------------- - - +------------------------------------------------------------------ diff --git a/docs/source/about/introduction.rst b/docs/source/about/introduction.rst index bde8bed..02c627a 100644 --- a/docs/source/about/introduction.rst +++ b/docs/source/about/introduction.rst @@ -2,15 +2,15 @@ ==== 在开始之前 ---------- +---------------------------- 关于 HydroRoll 水系 ------------------- +---------------------------- 文档结构 -------- +---------------------------- 关于本文档 ---------- +---------------------------- diff --git a/docs/source/about/list_of_features.rst b/docs/source/about/list_of_features.rst index 89b4c6a..6bfa49f 100644 --- a/docs/source/about/list_of_features.rst +++ b/docs/source/about/list_of_features.rst @@ -17,25 +17,25 @@ -------- 模块化 ------- +---------------- 去中心化 --------- +---------------- 跨平台 ------- +---------------- 脚本插件 --------- +---------------- 掷骰表达式解析 -------------- +---------------- 人工智能 --------- +---------------- 渐进式 ------- +---------------- 杂项 -----
\ No newline at end of file +----------------
\ No newline at end of file diff --git a/docs/source/about/release_policy.rst b/docs/source/about/release_policy.rst index bf4d265..33a60da 100644 --- a/docs/source/about/release_policy.rst +++ b/docs/source/about/release_policy.rst @@ -2,19 +2,19 @@ ============ HydroRoll 版本 --------------- +------------------------------------------ 发布支持时间表 --------------- +------------------------------------------ 新项目应该使用哪个版本? ----------------------- +------------------------------------------ 我应该把项目升级到新版本的水系框架吗? ------------------------------------ +------------------------------------------ 下一个版本什么时候发布? ----------------------- +------------------------------------------ 水系框架版本之间的兼容标准是怎样的? ----------------------------------
\ No newline at end of file +------------------------------------------
\ No newline at end of file diff --git a/docs/source/about/system_requirements.rst b/docs/source/about/system_requirements.rst index 8f4b883..3151c01 100644 --- a/docs/source/about/system_requirements.rst +++ b/docs/source/about/system_requirements.rst @@ -2,7 +2,7 @@ ======== 开发水系 --------- +---------------- 运行水系 ---------
\ No newline at end of file +----------------
\ No newline at end of file diff --git a/docs/source/community/code-of-conduct.rst b/docs/source/community/code-of-conduct.rst index 977e032..e9da725 100644 --- a/docs/source/community/code-of-conduct.rst +++ b/docs/source/community/code-of-conduct.rst @@ -2,7 +2,7 @@ ========== 我们的承诺 ---------- +------------------ 身为社区成员、贡献者和领袖,我们承诺使社区参与者不受骚扰,无论其年龄、体型、可见或不可见的缺陷、族裔、性征、性别认同和表达、经验水平、教育程度、社会与经济地位、国籍、相貌、种族、种姓、肤色、宗教信仰、性倾向或性取向如何。 @@ -10,7 +10,7 @@ 我们的准则 ---------- +------------------ 有助于为我们的社区创造积极环境的行为例子包括但不限于: @@ -30,7 +30,7 @@ 责任和权力 ---------- +------------------ 社区领袖有责任解释和落实我们所认可的行为准则,并妥善公正地对他们认为不当、威胁、冒犯或有害的任何行为采取纠正措施。 @@ -38,7 +38,7 @@ 适用范围 --------- +----------------- 本行为准则适用于所有社区场合,也适用于在公共场所代表社区时的个人。 @@ -46,7 +46,7 @@ 监督 ----- +-------- 辱骂、骚扰或其他不可接受的行为可通过 [插入联系方式] 向负责监督的社区领袖报告。 所有投诉都将得到及时和公平的审查和调查。 diff --git a/docs/source/getting_started/first_language_model/index.rst b/docs/source/getting_started/first_language_model/index.rst index 75e9a7b..98d5a59 100644 --- a/docs/source/getting_started/first_language_model/index.rst +++ b/docs/source/getting_started/first_language_model/index.rst @@ -1,2 +1,2 @@ 你的第一个智能语言模型 -=====================
\ No newline at end of file +==========================================
\ No newline at end of file diff --git a/docs/source/getting_started/first_rule_book_impl/index.rst b/docs/source/getting_started/first_rule_book_impl/index.rst index 3a5ad87..73416b9 100644 --- a/docs/source/getting_started/first_rule_book_impl/index.rst +++ b/docs/source/getting_started/first_rule_book_impl/index.rst @@ -1,2 +1,2 @@ 你的第一个规则书实现 -===================
\ No newline at end of file +======================================
\ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 3c4827b..0894b44 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,7 +1,7 @@ .. hide-toc: true 跨平台、多模态、高度自定义的骰系开发框架 -======================================= +=========================================================== .. include:: ../../README.rst :start-after: start-index diff --git a/docs/source/tutorials/logshader/index.rst b/docs/source/tutorials/logshader/index.rst index d62c5f7..4c84003 100644 --- a/docs/source/tutorials/logshader/index.rst +++ b/docs/source/tutorials/logshader/index.rst @@ -1,2 +1,2 @@ 跑团日志记录着色器 -=================
\ No newline at end of file +==================================
\ No newline at end of file diff --git a/site/src/App.vue b/site/src/App.vue index c70a3fa..88a4d52 100644 --- a/site/src/App.vue +++ b/site/src/App.vue @@ -1,47 +1,7 @@ -<script setup lang="ts"> -import Left from './components/Left.vue' -import TheWelcome from './components/Right.vue' -</script> - <template> - <header> - <img alt="Vue logo" class="logo" src="./assets/Hydroroll-small.svg" width="125" height="125" /> - - <div class="wrapper"> - <Left msg="饼在画了!" /> - </div> - </header> - - <main> - <TheWelcome /> - </main> + <router-view /> </template> -<style scoped> -header { - line-height: 1.5; -} - -.logo { - display: block; - margin: 0 auto 2rem; -} - -@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; - } -} -</style> +<script lang="ts"> +export default {} +</script>
\ No newline at end of file diff --git a/site/src/assets/base.css b/site/src/assets/base.css index fe48a2f..9c513a5 100644 --- a/site/src/assets/base.css +++ b/site/src/assets/base.css @@ -14,10 +14,10 @@ /*--vt-c-indigo: #2c3e50;*/ --vt-c-indigo: rgba(255,255,255,0.5); - --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); + --vt-c-divider-light-1: rgba(60, 60, 60); /*边框色*/ /*--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);*/ - --vt-c-divider-light-2: rgba(255, 255, 255, 0.12); + --vt-c-divider-light-2: rgba(150, 150, 150); --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); diff --git a/site/src/assets/main.css b/site/src/assets/main.css index 996e651..890703f 100644 --- a/site/src/assets/main.css +++ b/site/src/assets/main.css @@ -1,7 +1,7 @@ @import './base.css'; #app { - max-width: 1280px; + max-width: 90dvi; margin: 0 auto; padding: 2rem; @@ -25,7 +25,7 @@ a, } } -@media (min-width: 1024px) { +@media screen and (orientation:landscape) { body { display: flex; place-items: center; diff --git a/site/src/assets/video/bg.mp4 b/site/src/assets/video/bg.mp4 Binary files differnew file mode 100644 index 0000000..37e71d2 --- /dev/null +++ b/site/src/assets/video/bg.mp4 diff --git a/site/src/components/ChangeLog.vue b/site/src/components/ChangeLog.vue deleted file mode 100644 index e58ee39..0000000 --- a/site/src/components/ChangeLog.vue +++ /dev/null @@ -1,61 +0,0 @@ -<script lang="ts"> -import axios from 'axios'; - -export default { - data() { - return { - ChangeLogMessage: 'testChangeLogMessage', - } - }, - props: { - msg: { - type: String, - require: true - }, - date: { - type: Date, - default: new Date('2024-07-14T12:00:00Z') - } - }, - methods: { - getChangeLog() { - axios.get('https://api.github.com/repos/HydroRoll-Team/HydroRoll/releases/latest').then(res => { - - this.ChangeLogMessage ="## "+ res.data['tag_name']+"\n"+res.data['body']; - console.log(res.data); - }) - } - }, - beforeMount() { - this.getChangeLog() - } - -} -</script> - - -<template> - <div class="details" style="overflow-y:scroll;overflow-x:hidden;height:100%"> - <h3> - ChangeLog - </h3> - <v-md-preview :text="ChangeLogMessage"></v-md-preview> - </div> -</template> - - -<style scoped> - - -h3 { - font-size: 1.2rem; - font-weight: 500; - margin-bottom: 0.4rem; - color: var(--color-heading); -} - -.details { - flex: 1; - margin-left: 1rem; -} -</style> diff --git a/site/src/components/Right.vue b/site/src/components/Right.vue deleted file mode 100644 index 055d11b..0000000 --- a/site/src/components/Right.vue +++ /dev/null @@ -1,203 +0,0 @@ -<script lang="ts"> -import ChangeLog from './ChangeLog.vue' -import RightPage1 from './RightPage1.vue' -import DocumentationIcon from './icons/IconDocumentation.vue' - -export default { - data() { - return { - mainPage: 1, - changelogDisplay: "", - page2Display: "none", - page3Display: "none", - page4Display: "none", - icon1Back: "var(--icon-highlight)", - icon2Back: "", - icon3Back: "", - icon4Back: "", - } - }, - components: { - ChangeLog, - RightPage1, - DocumentationIcon - }, - methods: { - control_page(type: string, n: number) { - if (type == "over") { - this.mainPage = n - this.change_page(n) - } - if (type == "click") { - this.mainPage = n - this.change_page(n) - } - if (type == "out") { - this.change_page(this.mainPage) - } - }, - change_page(n: number) { - if (n == 1) { - this.changelogDisplay = ""; - this.page2Display = "none"; - this.page3Display = "none"; - this.page4Display = "none"; - this.icon1Back = "var(--icon-highlight)"; - this.icon2Back = "var(--color-border)"; - this.icon3Back = "var(--color-border-hover)"; - this.icon4Back = "var(--color-border-hover)"; - } else if (n == 2) { - this.changelogDisplay = "none"; - this.page2Display = ""; - this.page3Display = "none"; - this.page4Display = "none"; - this.icon1Back = "var(--color-border)"; - this.icon2Back = "var(--icon-highlight)"; - this.icon3Back = "var(--color-border-hover)"; - this.icon4Back = "var(--color-border-hover)"; - } else if (n == 3) { - this.changelogDisplay = "none"; - this.page2Display = "none"; - this.page3Display = ""; - this.page4Display = "none"; - this.icon1Back = "var(--color-border)"; - this.icon2Back = "var(--color-border)"; - this.icon3Back = "var(--color-border-hover)"; - this.icon4Back = "var(--color-border-hover)"; - } else if (n == 4) { - this.changelogDisplay = "none"; - this.page2Display = "none"; - this.page3Display = "none"; - this.page4Display = ""; - this.icon1Back = "var(--color-border)"; - this.icon2Back = "var(--color-border)"; - this.icon3Back = "var(--color-border-hover)"; - this.icon4Back = "var(--color-border-hover)"; - } - - } - } -} - -</script> - -<template> - <div class="item"> - <el-tooltip content="ChangeLog" placement="left"> - <i :style="{background:icon1Back}" @mouseover="control_page('over',1)" @click="control_page('click',1)" - @mouseout="control_page('out',1)"> - <DocumentationIcon/> - </i> - </el-tooltip> - <el-tooltip content="Page2" placement="left"> - <i :style="{background:icon2Back}" @mouseover="control_page('over',2)" @click="control_page('click',2)" - @mouseout="control_page('out',2)"> - <DocumentationIcon/> - </i> - </el-tooltip> - <el-tooltip content="敬请期待" placement="left"> - <i :style="{background:icon3Back}" @mouseover="control_page('over',3)" @click="control_page('click',3)" - @mouseout="control_page('out',3)"> - <DocumentationIcon/> - </i> - </el-tooltip> - <el-tooltip content="敬请期待" placement="left"> - <i :style="{background:icon4Back}" @mouseover="control_page('over',4)" @click="control_page('click',4)" - @mouseout="control_page('out',4)"> - <DocumentationIcon/> - </i> - </el-tooltip> - <div> - <ChangeLog :style="{display:changelogDisplay}"/> - <RightPage1 title="Test Page 2" :style="{display:page2Display}"/> - <RightPage1 title="Test Page 3" :style="{display:page3Display}"/> - <RightPage1 title="Test Page 4" :style="{display:page4Display}"/> - </div> - </div> - -</template> - -<style> - -.item { - height: 600px; - margin-top: 2rem; - display: flex; - position: relative; -} - - -i { - display: flex; - place-items: center; - place-content: center; - width: 32px; - height: 32px; - color: var(--color-text); -} - - -h3 { - font-size: 1.2rem; - font-weight: 500; - margin-bottom: 0.4rem; - color: var(--color-heading); -} - -@media (min-width: 1024px) { - .item { - margin-top: 0; - padding: 0.4rem 0 1rem calc(var(--section-gap) / 2); - } - - i { - left: -26px; - position: absolute; - border-radius: 8px; - width: 50px; - height: 50px; - } - - div i:nth-child(1) { - top: calc(20% - 25px); - } - - div i:nth-child(2) { - top: calc(40% - 25px); - } - - div i:nth-child(3) { - top: calc(60% - 25px); - } - - div i:nth-child(4) { - top: calc(80% - 25px); - } - - .item:before { - content: ' '; - border-left: 1px solid var(--color-border); - position: absolute; - left: 0; - bottom: calc(50% + 25px); - height: calc(50% - 25px); - } - - .item:after { - content: ' '; - border-left: 1px solid var(--color-border); - position: absolute; - left: 0; - top: calc(50% + 25px); - height: calc(50% - 25px); - } - - .item:first-of-type:before { - display: none; - } - - .item:last-of-type:after { - display: none; - } -} -</style> diff --git a/site/src/components/RightPage1.vue b/site/src/components/RightPage1.vue deleted file mode 100644 index 5b93ea8..0000000 --- a/site/src/components/RightPage1.vue +++ /dev/null @@ -1,65 +0,0 @@ -<script lang="ts"> -import axios from "axios"; - -export default { - data() { - return { - ChangeLogTagName: "beta", - ChangeLogMessage: 'testChangeLogMessage', - } - }, - props: { - title: { - type: String, - default: "1", - }, - msg: { - type: String, - require: true - }, - date: { - type: Date, - default: new Date('2024-07-14T12:00:00Z') - } - }, - methods: { - getChangeLog() { - axios.get('https://api.github.com/repos/HydroRoll-Team/HydroRoll/releases/latest').then(res => { - this.ChangeLogTagName = res.data['tag_name']; - this.ChangeLogMessage = res.data['body']; - console.log(res.data); - }) - } - }, - beforeMount() { - this.getChangeLog() - } -} -</script> - - -<template> - <div class="details" style="overflow-y:scroll;overflow-x:hidden;height:100%"> - <h3> - {{ title }} - </h3> - <v-md-preview :text="ChangeLogMessage"></v-md-preview> - </div> -</template> - - -<style scoped> - - -h3 { - font-size: 1.2rem; - font-weight: 500; - margin-bottom: 0.4rem; - color: var(--color-heading); -} - -.details { - flex: 1; - margin-left: 1rem; -} -</style> diff --git a/site/src/components/TheWelcome.vue b/site/src/components/TheWelcome.vue deleted file mode 100644 index 49d8f73..0000000 --- a/site/src/components/TheWelcome.vue +++ /dev/null @@ -1,88 +0,0 @@ -<script setup lang="ts"> -import WelcomeItem from './WelcomeItem.vue' -import DocumentationIcon from './icons/IconDocumentation.vue' -import ToolingIcon from './icons/IconTooling.vue' -import EcosystemIcon from './icons/IconEcosystem.vue' -import CommunityIcon from './icons/IconCommunity.vue' -import SupportIcon from './icons/IconSupport.vue' -</script> - -<template> - <WelcomeItem> - <template #icon> - <DocumentationIcon /> - </template> - <template #heading>Documentation</template> - - Vue’s - <a href="https://vuejs.org/" target="_blank" rel="noopener">official documentation</a> - provides you with all information you need to get started. - </WelcomeItem> - - <WelcomeItem> - <template #icon> - <ToolingIcon /> - </template> - <template #heading>Tooling</template> - - This project is served and bundled with - <a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener">Vite</a>. The - recommended IDE setup is - <a href="https://code.visualstudio.com/" target="_blank" rel="noopener">VSCode</a> + - <a href="https://github.com/johnsoncodehk/volar" target="_blank" rel="noopener">Volar</a>. If - you need to test your components and web pages, check out - <a href="https://www.cypress.io/" target="_blank" rel="noopener">Cypress</a> and - <a href="https://on.cypress.io/component" target="_blank" rel="noopener" - >Cypress Component Testing</a - >. - - <br /> - - More instructions are available in <code>README.md</code>. - </WelcomeItem> - - <WelcomeItem> - <template #icon> - <EcosystemIcon /> - </template> - <template #heading>Ecosystem</template> - - Get official tools and libraries for your project: - <a href="https://pinia.vuejs.org/" target="_blank" rel="noopener">Pinia</a>, - <a href="https://router.vuejs.org/" target="_blank" rel="noopener">Vue Router</a>, - <a href="https://test-utils.vuejs.org/" target="_blank" rel="noopener">Vue Test Utils</a>, and - <a href="https://github.com/vuejs/devtools" target="_blank" rel="noopener">Vue Dev Tools</a>. If - you need more resources, we suggest paying - <a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">Awesome Vue</a> - a visit. - </WelcomeItem> - - <WelcomeItem> - <template #icon> - <CommunityIcon /> - </template> - <template #heading>Community</template> - - Got stuck? Ask your question on - <a href="https://chat.vuejs.org" target="_blank" rel="noopener">Vue Land</a>, our official - Discord server, or - <a href="https://stackoverflow.com/questions/tagged/vue.js" target="_blank" rel="noopener" - >StackOverflow</a - >. You should also subscribe to - <a href="https://news.vuejs.org" target="_blank" rel="noopener">our mailing list</a> and follow - the official - <a href="https://twitter.com/vuejs" target="_blank" rel="noopener">@vuejs</a> - twitter account for latest news in the Vue world. - </WelcomeItem> - - <WelcomeItem> - <template #icon> - <SupportIcon /> - </template> - <template #heading>Support Vue</template> - - As an independent project, Vue relies on community backing for its sustainability. You can help - us by - <a href="https://vuejs.org/sponsor/" target="_blank" rel="noopener">becoming a sponsor</a>. - </WelcomeItem> -</template> diff --git a/site/src/components/WelcomeItem.vue b/site/src/components/WelcomeItem.vue deleted file mode 100644 index 6d7086a..0000000 --- a/site/src/components/WelcomeItem.vue +++ /dev/null @@ -1,87 +0,0 @@ -<template> - <div class="item"> - <i> - <slot name="icon"></slot> - </i> - <div class="details"> - <h3> - <slot name="heading"></slot> - </h3> - <slot></slot> - </div> - </div> -</template> - -<style scoped> -.item { - margin-top: 2rem; - display: flex; - position: relative; -} - -.details { - flex: 1; - margin-left: 1rem; -} - -i { - display: flex; - place-items: center; - place-content: center; - width: 32px; - height: 32px; - - color: var(--color-text); -} - -h3 { - font-size: 1.2rem; - font-weight: 500; - margin-bottom: 0.4rem; - color: var(--color-heading); -} - -@media (min-width: 1024px) { - .item { - margin-top: 0; - padding: 0.4rem 0 1rem calc(var(--section-gap) / 2); - } - - i { - top: calc(50% - 25px); - left: -26px; - position: absolute; - border: 1px solid var(--color-border); - background: var(--color-background); - border-radius: 8px; - width: 50px; - height: 50px; - } - - .item:before { - content: ' '; - border-left: 1px solid var(--color-border); - position: absolute; - left: 0; - bottom: calc(50% + 25px); - height: calc(50% - 25px); - } - - .item:after { - content: ' '; - border-left: 1px solid var(--color-border); - position: absolute; - left: 0; - top: calc(50% + 25px); - height: calc(50% - 25px); - } - - .item:first-of-type:before { - display: none; - } - - .item:last-of-type:after { - display: none; - } -} -</style> diff --git a/site/src/router/index.ts b/site/src/router/index.ts index 65353da..38c65fd 100644 --- a/site/src/router/index.ts +++ b/site/src/router/index.ts @@ -4,18 +4,13 @@ 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'), - }, - ], + component: () => import('@/views/index/index.vue'), }, + { + path: '/:path(.*)', + name: '404', + component: () => import('@/views/404.vue'), + } ] const router = createRouter({ diff --git a/site/src/views/404.vue b/site/src/views/404.vue new file mode 100644 index 0000000..7462697 --- /dev/null +++ b/site/src/views/404.vue @@ -0,0 +1,18 @@ +<template> + <div>404</div> +</template> + +<script lang='ts'> +export default { + setup() { + return {} + }, + beforeCreate() { + location.href = '/' + } +} +</script> + +<style lang='scss' scoped> + +</style> diff --git a/site/src/views/Home.vue b/site/src/views/Home.vue deleted file mode 100644 index f07e0c8..0000000 --- a/site/src/views/Home.vue +++ /dev/null @@ -1,7 +0,0 @@ -<template> - <HelloWorld /> -</template> - -<script lang="ts" setup> - import HelloWorld from '@/components/Left.vue' -</script> diff --git a/site/src/components/Left.vue b/site/src/views/index/Left.vue index 672ba36..f774223 100644 --- a/site/src/components/Left.vue +++ b/site/src/views/index/Left.vue @@ -44,7 +44,7 @@ export default { <div class="greetings"> <h1 class="green">{{ msg }}</h1> <h3> - 距离水系公测还有 + 距离水系公测计划: </h3> <h2> {{ day }} 天 {{ hour }} 时 {{ min }} 分 {{ sec }} 秒 @@ -72,7 +72,7 @@ h3 { text-align: center; } -@media (min-width: 1024px) { +@media screen and (orientation:landscape) { .greetings h1, .greetings h2 { text-align: left; diff --git a/site/src/views/index/Notepad/changelog.ts b/site/src/views/index/Notepad/changelog.ts new file mode 100644 index 0000000..111f8f2 --- /dev/null +++ b/site/src/views/index/Notepad/changelog.ts @@ -0,0 +1,16 @@ +import axios from 'axios'; + +export const getChangeLog = async() => +{ + const changeLog = axios.get('https://api.github.com/repos/HydroRoll-Team/HydroRoll/releases/latest') + .then(res => { + console.log(res.data); + const ChangeLogMessage ="## "+ res.data['tag_name']+"\n"+res.data['body']; + return ChangeLogMessage; + }) + .catch(err => { + console.log(err); + return err.toString(); + }) + return changeLog; +} diff --git a/site/src/views/index/Notepad/index.vue b/site/src/views/index/Notepad/index.vue new file mode 100644 index 0000000..c4c82aa --- /dev/null +++ b/site/src/views/index/Notepad/index.vue @@ -0,0 +1,45 @@ +<script lang="ts"> +export default { + props: { + title: { + type: String, + default: "1", + }, + message: { + type: String, + require: true + }, + date: { + type: Date, + default: new Date('2024-07-14T12:00:00Z') + } + }, +} +</script> + + +<template> + <div class="details" style="overflow-y:scroll;overflow-x:hidden;height:100%"> + <h3> + {{ title }} + </h3> + <v-md-preview :text="message" ></v-md-preview> + </div> +</template> + + +<style scoped> + + +h3 { + font-size: 1.2rem; + font-weight: 500; + margin-bottom: 0.4rem; + color: var(--color-heading); +} + +.details { + flex: 1; + width: 30dvw; +} +</style> diff --git a/site/src/views/index/Right.vue b/site/src/views/index/Right.vue new file mode 100644 index 0000000..ba8f294 --- /dev/null +++ b/site/src/views/index/Right.vue @@ -0,0 +1,160 @@ +<script lang="ts"> +import Notepad from './Notepad/index.vue' +import DocumentationIcon from '@/components/icons/IconDocumentation.vue' +import { getChangeLog } from './Notepad/changelog' + + +export default { + data() { + return { + mainPage: 0, + tooltip: [ + "ChangeLog", + "What's new?", + "敬请期待", + "敬请期待", + ], + title: "", + message:"", + changeLogMessage:"", + } + }, + components: { + Notepad, + DocumentationIcon + }, + methods: { + change_page(n: number) { + this.mainPage = n; + this.title = this.tooltip[n]; + switch (n) { + case 0: + this.message = this.changeLogMessage; + break; + default: + this.message = "敬请期待"; + break; + } + }, + getBgColor(index: number) { + if (index < this.mainPage) { + return "var(--color-border)" + } else if (index == this.mainPage) { + return "var(--icon-highlight)" + } else { + return "var(--color-border-hover)" + } + } + }, + beforeCreate() { + getChangeLog().then(res => { + this.changeLogMessage = res; + this.change_page(this.mainPage); + }) + }, +} + +</script> + +<template> + <div class="messageBar"> + <div class="options"> + <li v-for="(item, index) in tooltip" :key="index" class="item"> + <el-tooltip :content="item" placement="left" > + <i :style="{background:getBgColor(index)}" @mouseover="change_page(index)"> + <DocumentationIcon/> + </i> + </el-tooltip> + </li> + </div> + <div class="messageBox"> + <Notepad :title="title" :message="message"/> + </div> + </div> +</template> + +<style lang="scss"> + +.messageBar { + display: flex; + height: 600px; + margin-top: 2rem; + position: relative; + flex-direction: row; +} + +.messageBar .options{ + display: flex; + flex-direction: column; + flex-grow: 1; + width: 32px; + color: var(--color-text); +} + +.messageBar .options .item{ + display: flex; + margin: auto; +} + +.messageBar .messageBox { + height: 100%; + width: 100%; + overflow-y: auto; + overflow-x: hidden; +} + +i { + display: flex; + align-items: center; + justify-content: center; + font-size: 1.2rem; + color: var(--color-text); + width: 32px; + height: 32px; + border-radius: 8px; +} + +@media screen and (orientation:landscape) { + .messageBar { + margin-top: 0; + padding: 5rem 0 5rem calc(var(--section-gap) / 2); + } + + i { + left: -26px; + position: absolute; + border-radius: 8px; + width: 50px; + height: 50px; + } + + // 黑线 + .messageBar:before { + content: ' '; + border-left: 1px solid var(--color-border); + position: absolute; + left: 0; + bottom: calc(50% + 25px); + height: calc(50% - 25px); + } + + // 画白线 + .messageBar:after { + content: ' '; + border-left: 1px solid var(--vt-c-divider-dark-2); + position: absolute; + left: 0; + top: calc(15%); + height: calc(75%); + z-index: -10; + } + + .messageBar:first-of-type:before { + display: none; + } + + .item:last-of-type:after { + display: none; + } +} +</style> diff --git a/site/src/views/index/index.vue b/site/src/views/index/index.vue new file mode 100644 index 0000000..edba96f --- /dev/null +++ b/site/src/views/index/index.vue @@ -0,0 +1,60 @@ +<script setup lang="ts"> +import Left from './Left.vue' +import Right from './Right.vue' +</script> + +<template> + <header> + <img alt="Vue logo" class="logo" src="@/assets/Hydroroll-small.svg" width="125" height="125" /> + + <div class="wrapper"> + <Left msg="饼在画了!" /> + </div> + </header> + + <main class="main"> + <video src="@/assets/video/bg.mp4" loop=true autoplay=true></video> + <Right /> + </main> +</template> + +<style scoped> +header { + display: flex; + line-height: 1.5; +} + +.logo { + display: block; + margin: 0 auto 2rem; +} + +@media screen and (orientation:landscape) { + header { + 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; + } +} + +video{ + position: fixed; + right: 0; + bottom: 0; + min-width: 100%; + min-height: 100%; + width: auto; + height: auto; + z-index: -100; + filter: grayscale(20%); +} +</style> |
