aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-07-28 16:22:01 +0800
committerGitHub <noreply@github.com>2023-07-28 16:22:01 +0800
commitf7d7c8a6d1120d167520a7d989c3e5f4ddec9f2f (patch)
tree47c989c5435120580410a8391cb6c9822d1390ba
parent2e56832f4c6cabf9bb475d8c8bef345d32881512 (diff)
parent8ae446431de24d1d8f0615f4335f8cd5c6b7751a (diff)
downloadinfini-f7d7c8a6d1120d167520a7d989c3e5f4ddec9f2f.tar.gz
infini-f7d7c8a6d1120d167520a7d989c3e5f4ddec9f2f.zip
Merge pull request #10 from HydroRoll-Team/mkdocs
feature: 添加起始页
-rw-r--r--docs/docs/API/index.md (renamed from docs/docs/blog/index.md)0
-rw-r--r--docs/docs/Core/index.md (renamed from docs/docs/changelog/index.md)0
-rw-r--r--docs/docs/Standard/Structure/attribute.md0
-rw-r--r--docs/docs/Standard/Structure/class.md0
-rw-r--r--docs/docs/Standard/Structure/method.md0
-rw-r--r--docs/docs/Standard/Write/prepare.md0
-rw-r--r--docs/docs/Standard/Write/python.md0
-rw-r--r--docs/docs/Standard/Write/write.md0
-rw-r--r--docs/docs/Standard/details-about-rule-pack.md0
-rw-r--r--docs/docs/Standard/what-is-rule-pack.md13
-rw-r--r--docs/docs/Standard/what-is-standard.md0
-rw-r--r--docs/docs/index.md18
-rw-r--r--docs/docs/showcase/index.md24
-rw-r--r--docs/mkdocs.yml21
-rw-r--r--docs/overrides/assets/images/bg.jpgbin0 -> 195735 bytes
-rw-r--r--docs/overrides/assets/images/illustration.pngbin0 -> 197865 bytes
-rw-r--r--docs/overrides/home.html111
-rw-r--r--docs/requirements.txt4
18 files changed, 149 insertions, 42 deletions
diff --git a/docs/docs/blog/index.md b/docs/docs/API/index.md
index e69de29b..e69de29b 100644
--- a/docs/docs/blog/index.md
+++ b/docs/docs/API/index.md
diff --git a/docs/docs/changelog/index.md b/docs/docs/Core/index.md
index e69de29b..e69de29b 100644
--- a/docs/docs/changelog/index.md
+++ b/docs/docs/Core/index.md
diff --git a/docs/docs/Standard/Structure/attribute.md b/docs/docs/Standard/Structure/attribute.md
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/docs/Standard/Structure/attribute.md
diff --git a/docs/docs/Standard/Structure/class.md b/docs/docs/Standard/Structure/class.md
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/docs/Standard/Structure/class.md
diff --git a/docs/docs/Standard/Structure/method.md b/docs/docs/Standard/Structure/method.md
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/docs/Standard/Structure/method.md
diff --git a/docs/docs/Standard/Write/prepare.md b/docs/docs/Standard/Write/prepare.md
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/docs/Standard/Write/prepare.md
diff --git a/docs/docs/Standard/Write/python.md b/docs/docs/Standard/Write/python.md
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/docs/Standard/Write/python.md
diff --git a/docs/docs/Standard/Write/write.md b/docs/docs/Standard/Write/write.md
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/docs/Standard/Write/write.md
diff --git a/docs/docs/Standard/details-about-rule-pack.md b/docs/docs/Standard/details-about-rule-pack.md
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/docs/Standard/details-about-rule-pack.md
diff --git a/docs/docs/Standard/what-is-rule-pack.md b/docs/docs/Standard/what-is-rule-pack.md
new file mode 100644
index 00000000..fc6aac35
--- /dev/null
+++ b/docs/docs/Standard/what-is-rule-pack.md
@@ -0,0 +1,13 @@
+---
+title: "什么是规则包?"
+---
+
+ 规则包是水系核心用来加载的对象,可以理解为框架——水系核心加载的一个一个规则实例,
+
+现在回到规则包,我说规则包就是类似插件的设计,所以规则包也可以是一个Python文件或者一个Python包,但它必须基础一个像Plugin这样的类(不然无法读取,我们姑且叫这个类为Rule),以及在Rule的子类里实现一些像handle()或者rule()这样必须实现的方法(也叫函数),而这些必须实现的方法,就是我们要讨论的,一个通用规则包标准就是明确了一个继承自Rule类的子类它本身应该实现什么方法。
+
+举个例子(随便写的,其中一些必须实现的属性或者类名都是不确定的,以后或许会改):
+
+这样就实现了一个水系规则包,当pl使用.ra鉴定时会调用MyRule里的appriasal方法,如果鉴定结果数值小于5且大于0那么返回大成功。
+
+我们要做的通用规则包标准就是这样一个“到底需要在Rule的子类MyRule里必须实现哪些方法?“的问题。
diff --git a/docs/docs/Standard/what-is-standard.md b/docs/docs/Standard/what-is-standard.md
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/docs/Standard/what-is-standard.md
diff --git a/docs/docs/index.md b/docs/docs/index.md
index 1a2b40e4..cce47e7b 100644
--- a/docs/docs/index.md
+++ b/docs/docs/index.md
@@ -1,19 +1,5 @@
---
-hide:
- - path
- - navigation
- - toc
+template: home.html
---
-<div align="center">
-
- <h1><font color="#002fa7">Hydro</font>RollCore</h1>
-
- <q>HydroRollCore 是一个规则包读取与处理分发用工具,通过读取一个一个规则包实现水系骰子掷骰规则,同时支持模板创建与Wiki站点辅助设计规则书内容。</q><br />
- <b>它是世界主入门水系的关键。</b>
-
-</div>
-
-<p align="center">
- <a class="md-button" href="../forward">什么是规则包</a>
-</p>
+你好,世界主!
diff --git a/docs/docs/showcase/index.md b/docs/docs/showcase/index.md
deleted file mode 100644
index f58ab2fe..00000000
--- a/docs/docs/showcase/index.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-hide:
- - navigation
- - toc
- - path
----
-
-::gantt::
-
-- title: Definition Phase
- activities:
- - title: Creative Brief
- start: 2023-07-21
- end: 2023-08-21
- lasts: 1 months
- - title: Graphic Design Research
- start: 2023-08-22
- end: 2023-08-30
- lasts: 2 weeks
- - title: Brainstorming / Mood Boarding
- start: 2023-08-31
- end: 2023-12-20
-
-::/gantt::
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index 93c758d6..22891ec1 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -147,4 +147,23 @@ plugins:
custom_format: "%d. %B %Y"
# - git-committers:
# repository: HydroRoll-Team/psi
- # branch: main \ No newline at end of file
+ # branch: main
+
+nav:
+ - 主页: "index.md"
+ - 水系核心:
+ - "核心概览": Core/index.md
+ - 通用规则包标准:
+ - 什么是规则包?: Standard/what-is-rule-pack.md
+ - 为什么要做规则包?: Standard/why-rule-pack.md
+ - 什么是通用规则包标准?: Standard/what-is-standard.md
+ - 整体结构:
+ - "类": Standard/Structure/class.md
+ - "方法": Standard/Structure/method.md
+ - "属性": Standard/Structure/attribute.md
+ - 实战编写:
+ - "了解Python": Standard/Write/python.md
+ - "准备规则书": Standard/Write/prepare.md
+ - "编写规则包": Standard/Write/write.md
+ - API Reference:
+ - "API Reference": API/index.md \ No newline at end of file
diff --git a/docs/overrides/assets/images/bg.jpg b/docs/overrides/assets/images/bg.jpg
new file mode 100644
index 00000000..90976a9f
--- /dev/null
+++ b/docs/overrides/assets/images/bg.jpg
Binary files differ
diff --git a/docs/overrides/assets/images/illustration.png b/docs/overrides/assets/images/illustration.png
new file mode 100644
index 00000000..69f739c0
--- /dev/null
+++ b/docs/overrides/assets/images/illustration.png
Binary files differ
diff --git a/docs/overrides/home.html b/docs/overrides/home.html
new file mode 100644
index 00000000..79b18ba8
--- /dev/null
+++ b/docs/overrides/home.html
@@ -0,0 +1,111 @@
+<!--
+ Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to
+ deal in the Software without restriction, including without limitation the
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ IN THE SOFTWARE.
+-->
+
+{% extends "main.html" %}
+
+<!-- Render hero under tabs -->
+{% block tabs %}
+ {{ super() }}
+
+ <!-- Additional styles for landing page -->
+ <style>
+
+ /* Application header should be static for the landing page */
+ .md-header {
+ position: initial;
+ }
+
+ /* Remove spacing, as we cannot hide it completely */
+ .md-main__inner {
+ margin: 0;
+ }
+
+ /* Hide main content for now */
+ .md-content {
+ display: none;
+ }
+
+ /* Hide table of contents */
+ @media screen and (min-width: 60em) {
+ .md-sidebar--secondary {
+ display: none;
+ }
+ }
+
+ /* Hide navigation */
+ @media screen and (min-width: 76.25em) {
+ .md-sidebar--primary {
+ display: none;
+ }
+ }
+ </style>
+
+ <!-- Hero for landing page -->
+ <section class="mdx-container">
+ <div class="md-grid md-typeset">
+ <div class="mdx-hero">
+
+ <!-- Hero image -->
+ <div class="mdx-hero__image">
+ <img
+ src="assets/images/illustration.png"
+ alt=""
+ width="500"
+ height="400"
+ draggable="false"
+ >
+ </div>
+
+ <!-- Hero content -->
+ <div class="mdx-hero__content">
+ <h1><font color="#002fa7">Hydro</font>RollCore</h1>
+ <q>HydroRollCore 是一个规则包读取与处理分发用工具,通过读取一个一个规则包实现水系骰子掷骰规则,同时支持模板创建与Wiki站点辅助设计规则书内容。</q><br />
+ <b>它是世界主入门水系的关键。</b><br />
+ <a
+ href="{{ page.next_page.url | url }}"
+ title="{{ page.next_page.title | e }}"
+ class="md-button md-button--primary"
+ >
+ 快速开始
+ </a>
+ <a
+ href="{{ 'Standard/what-is-standard/' | url }}"
+ title="General Rules Package Standard"
+ class="md-button"
+ >
+ 了解通用规则包标准
+ </a>
+ </div>
+ </div>
+ </div>
+ </section>
+{% endblock %}
+
+<!-- Content -->
+{% block content %}
+
+{% endblock %}
+
+<!-- Application footer -->
+{% block footer %}
+
+{% endblock %} \ No newline at end of file
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 363e9c69..d57171f6 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -3,4 +3,6 @@ mkdocs-blog-plugin
mkdocs-git-revision-date-localized-plugin
mkdocs-git-authors-plugin
mkdocs-material-extensions>=1.1
-neoteroi-mkdocs \ No newline at end of file
+neoteroi-mkdocs
+pillow
+cairosvg \ No newline at end of file