diff --git a/docs/en/sidebar.md b/docs/en/sidebar.md index 30e1f695..ebdf4d24 100644 --- a/docs/en/sidebar.md +++ b/docs/en/sidebar.md @@ -1,6 +1,4 @@ -- Start - - - [Introduction](/en/README.md) +- [Introduction](/en/README.md) - Usage - [Start](/en/start.md) @@ -8,11 +6,8 @@ - [Settings](/en/settings.md) - [Tray icon](/en/trayicon.md) -- OCR instructions - - [OCR instructions](/en/ocrsetsumei.md) +- [OCR instructions](/en/ocrsetsumei.md) -- HOOK instructions - - [HOOK instructions](/en/hooksetsumei.md) +- [HOOK instructions](/en/hooksetsumei.md) -- Support author - - [Support author](/en/support.md) \ No newline at end of file +- [Support author](/en/support.md) \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 33c15040..454f411e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,62 +1,99 @@ - - - + + + LunaTranslator 使用说明 + + + - - - - - - + + + + + + + + + + +
+
+
+ +
+ +
+ +
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + \ No newline at end of file diff --git a/docs/main.js b/docs/main.js new file mode 100644 index 00000000..ae6326b2 --- /dev/null +++ b/docs/main.js @@ -0,0 +1,109 @@ + +window.$docsify = { + homepage: '/redirect.html', + requestHeaders: { + 'cache-control': 'max-age=0', + }, + + pagination: { + previousText: '上一节', + nextText: '下一节', + crossChapter: true, + crossChapterText: true, + }, + repo: 'https://lunatranslator.xyz/Github/LunaTranslator', + + alias: { + '/zh/_sidebar.md': '/zh/sidebar.md', + '/ru/_sidebar.md': '/ru/sidebar.md', + '/en/_sidebar.md': '/en/sidebar.md', + '/_navbar.md': '/navbar.md', + '/_coverpage.md': '/coverpage.md', + }, + loadNavbar: true, + loadSidebar: true, + + auto2top: true, + + search: { + noData: { + '/zh/': '没有结果!', + '/': 'No results!', + }, + paths: 'auto', + placeholder: { + '/zh/': '搜索', + '/': 'Search', + } + }, + + executeScript: true +} + + + +let dropdowns = document.getElementsByClassName('dropdown') +for (let i = 0; i < dropdowns.length; i++) { + + let dropdown = dropdowns[i] + dropdown.addEventListener('mouseover', function () { + let dropdownContent = this.querySelector('.dropdown-content'); + dropdownContent.style.display = 'block'; + }); + dropdown.addEventListener('mouseout', function () { + let dropdownContent = this.querySelector('.dropdown-content'); + dropdownContent.style.display = 'none'; + }); +} + + +function randombg() { + let list = ['luna2.jpg']// ['luna.jpg', 'luna2.jpg', 'luna3.jpg', 'luna4.jpg']; + let randomIndex = Math.floor(Math.random() * list.length); + let selectedItem = list[randomIndex]; + document.querySelector("body > div.backgroud").style.backgroundImage = `url("https://image.lunatranslator.xyz/${selectedItem}")` +} +randombg() +var currentlang = ""; +const navitexts = { + zh: { + homepage: '官方网站', + downloadlink: '软件下载', + vediotutorial: '视频教学', + contactme: '交流群' + }, + ru: { + homepage: 'HomePage', + downloadlink: 'Download', + vediotutorial: 'Vedio Tutorial', + contactme: 'Chat Groups' + }, + en: { + homepage: 'HomePage', + downloadlink: 'Download', + vediotutorial: 'Vedio Tutorial', + contactme: 'Chat Groups' + } +} +window.onpopstate = function (event) { + let url = window.location.href; + let thislang = currentlang + if (url.includes('/zh/')) { + thislang = 'zh' + } + else if (url.includes('/en/')) { + thislang = 'en' + } + else if (url.includes('/ru/')) { + thislang = 'ru' + } + if (thislang != currentlang) { + currentlang = thislang + console.log(navitexts[currentlang]) + + for (let key in navitexts[currentlang]) { + document.getElementById(key).innerText = navitexts[currentlang][key] + + } + } +}; \ No newline at end of file diff --git a/docs/ru/sidebar.md b/docs/ru/sidebar.md index 3003bdcd..8471aae8 100644 --- a/docs/ru/sidebar.md +++ b/docs/ru/sidebar.md @@ -1,6 +1,4 @@ -- Начало - - - [Введение](/ru/README.md) +- [Введение](/ru/README.md) - Инструкции - [Первый запуск](/ru/start.md) @@ -8,11 +6,8 @@ - [Основные настройки](/ru/settings.md) - [Иконка на панели задач](/ru/trayicon.md) -- OCR - - [Подробное описание OCR](/ru/ocrsetsumei.md) +- [Подробное описание OCR](/ru/ocrsetsumei.md) -- HOOK - - [Подробное описание HOOK](/ru/hooksetsumei.md) +- [Подробное описание HOOK](/ru/hooksetsumei.md) -- Поддержать автора программы - - [Поддержать автора программы](/ru/support.md) \ No newline at end of file +- [Поддержать автора программы](/ru/support.md) diff --git a/docs/style.css b/docs/style.css new file mode 100644 index 00000000..cedca972 --- /dev/null +++ b/docs/style.css @@ -0,0 +1,123 @@ +:root { + /* Change link's style */ + --link-color: var(--theme-color); + --link-text-decoration: none; + /* Change navbar's style*/ + --sidebar-nav-pagelink-background-image: none; + --sidebar-nav-link-before-content-l3: none; + +} + +/* Fix sidebar fold arrow */ +.sidebar-nav li>a[href^='#/']:not([href*='?id=']):not(:only-child) { + background-image: var(--sidebar-nav-pagelink-background-image--collapse, + var(--sidebar-nav-pagelink-background-image--loaded, + var(--sidebar-nav-pagelink-background-image))); + background-position: var(--sidebar-nav-pagelink-background-position--collapse, + var(--sidebar-nav-pagelink-background-position--loaded, + var(--sidebar-nav-pagelink-background-image))); +} + +.sidebar-nav li.open>a[href^='#/']:not([href*='?id=']):not(:only-child) { + background-image: var(--sidebar-nav-pagelink-background-image--active, + var(--sidebar-nav-pagelink-background-image--loaded, + var(--sidebar-nav-pagelink-background-image))); + background-position: var(--sidebar-nav-pagelink-background-position--active, + var(--sidebar-nav-pagelink-background-position--loaded, + var(--sidebar-nav-pagelink-background-image))); +} + +.markdown-section { + border: 1px solid deepskyblue; + margin-top: 60px; + margin-bottom: 10px; + border-radius: 5px; +} + +.app-nav { + font-size: 21px; +} + +.dropdown { + position: relative; + display: inline-block; + +} + +.dropdown-content { + display: none; + position: absolute; + background-color: rgba(255, 255, 255, 0.9); +} + +.goodlink { + text-decoration: none; + color: black; + line-height: 50px; + display: block; + +} + +.goodlink:hover { + color: deepskyblue; + background-color: rgba(255, 255, 255, 0.9); +} + + +.buttonsize { + width: 180px; + line-height: 50px; +} + +.buttonitem { + display: inline-block; + text-align: center; +} + +.headercenter { + width: 100%; + display: flex; + justify-content: center; +} + +.header { + font-size: 21px; + position: fixed; + height: 50px; + box-shadow: 0 0 4px 1px gray; + z-index: 100; + background-color: #ffffff80; + backdrop-filter: blur(4px); +} + +.backgroud { + /* background-image: url("./luna.jpg"); */ + background-size: 100% auto; + content: ''; + opacity: 0.33; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: -2; +} + +.xiamian { + position: fixed; + left: 0; + right: 0; + top: 60px; + bottom: 0; + overflow-x: auto; + overflow-y: auto; +} + +.buttons { + align-items: center; + display: flex; + justify-content: center; + + white-space: nowrap; + +} \ No newline at end of file diff --git a/docs/zh/README.md b/docs/zh/README.md index 9e29759e..e9b56de7 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -1,15 +1,5 @@ -# LunaTranslator 使用说明 - - - -

- - -

- -### [使用说明](https://docs.lunatranslator.xyz/#/zh/) [视频教程](https://space.bilibili.com/592120404/video) [QQ群](https://lunatranslator.xyz/Resource/QQGroup) [Discord](https://discord.gg/f8NSvaDU) - +> **一款galgame翻译器** ## 功能支持 diff --git a/docs/zh/mangaocr.md b/docs/zh/mangaocr.md index 3b1d18e2..fd416638 100644 --- a/docs/zh/mangaocr.md +++ b/docs/zh/mangaocr.md @@ -25,4 +25,4 @@ ![img](https://image.lunatranslator.xyz/zh/mangaocr/succ.png) -等待一会儿首次运行的下载模型和每次运行都需要的加载模型。显示“* Running on http://127.0.0.1:5665”表示服务已正常启动。 \ No newline at end of file +等待一会儿首次运行的下载模型和每次运行都需要的加载模型。显示“`* Running on http://127.0.0.1:5665`”表示服务已正常启动。 \ No newline at end of file diff --git a/docs/zh/qas.md b/docs/zh/qas.md new file mode 100644 index 00000000..0d12c883 --- /dev/null +++ b/docs/zh/qas.md @@ -0,0 +1,13 @@ +[mangaocr 整合包无法启动怎么办](/zh/mangaocr.md) + +[OCR 自动化执行方法的参数含义](/zh/ocrparam.md) + +[Windows OCR 如何安装额外的语言支持](/zh/windowsocr.md) + +[如何使用 Mecab 分词&词性颜色标注](/zh/qa1.md) + +[如何自动划词进 anki](/zh/qa2.md) + +[如何使用离线 chatgpt](/zh/qa3.md) + +[如何使用 gemini 免费 api](/zh/qa4.md) \ No newline at end of file diff --git a/docs/zh/sidebar.md b/docs/zh/sidebar.md index a97fdea0..d5a3fe80 100644 --- a/docs/zh/sidebar.md +++ b/docs/zh/sidebar.md @@ -1,34 +1,13 @@ -- 简介 - - [简介](/zh/README.md) - -- 基本用法 - - [获取软件和启动](/zh/start.md) - - [最基本的使用](/zh/basicuse.md) - - - -- 软件更新 - - [软件更新](/zh/update.md) - -- 常见问题 - - [mangaocr 整合包无法启动怎么办](/zh/mangaocr.md) - - [OCR 自动化执行方法的参数含义](/zh/ocrparam.md) - - [Windows OCR 如何安装额外的语言支持](/zh/windowsocr.md) - - [如何使用 Mecab 分词&词性颜色标注](/zh/qa1.md) - - [如何自动划词进 anki](/zh/qa2.md) - - [如何使用离线 chatgpt](/zh/qa3.md) - - [如何使用 gemini 免费 api](/zh/qa4.md) - - [其他问题](https://github.com/HIllya51/LunaTranslator/issues?q=label%3AQ%26A) - -- 支持作者 - - [支持作者](/zh/support.md) \ No newline at end of file +- [简介](/zh/README.md) +- [基本用法](/zh/basicuse.md) + - [获取软件和启动](/zh/start.md) +- [软件更新](/zh/update.md) +- [常见问题](/zh/qas.md) + - [mangaocr 整合包无法启动怎么办](/zh/mangaocr.md) + - [OCR 自动化执行方法的参数含义](/zh/ocrparam.md) + - [Windows OCR 如何安装额外的语言支持](/zh/windowsocr.md) + - [如何使用 Mecab 分词&词性颜色标注](/zh/qa1.md) + - [如何自动划词进 anki](/zh/qa2.md) + - [如何使用离线 chatgpt](/zh/qa3.md) + - [如何使用 gemini 免费 api](/zh/qa4.md) +- [支持作者](/zh/support.md) \ No newline at end of file