فهرست منبع

:pencil: info

Liyuan Li 5 سال پیش
والد
کامیت
80967acbd0
4فایلهای تغییر یافته به همراه33 افزوده شده و 27 حذف شده
  1. 2 2
      demo/index.html
  2. 2 2
      demo/static-preview.html
  3. 2 2
      demo/static.html
  4. 27 21
      src/ts/toolbar/Info.ts

+ 2 - 2
demo/index.html

@@ -40,8 +40,8 @@
     <a href="https://hacpai.com/article/1549638745630?r=Vanessa" target="_blank">API</a> |
     <a href="https://hacpai.com/article/1549638745630?r=Vanessa" target="_blank">API</a> |
     <a target="_blank" href="demo/static-preview.html?lang=zh_CN">中文预览</a>
     <a target="_blank" href="demo/static-preview.html?lang=zh_CN">中文预览</a>
     <a target="_blank" href="demo/static-preview.html?lang=ko_KR">한글预览</a> |
     <a target="_blank" href="demo/static-preview.html?lang=ko_KR">한글预览</a> |
-    <button onclick="window.vditor.setTheme('dark', 'dark',  'native')">Dark Theme</button>
-    <button onclick="window.vditor.setTheme('light', 'light', 'github')">Light Theme</button>
+    <button onclick="window.vditor.setTheme('dark', 'dark',  'native')">Dark Mode</button>
+    <button onclick="window.vditor.setTheme('light', 'light', 'github')">Light Mode</button>
 </h2>
 </h2>
 <div id="vditor">
 <div id="vditor">
 <h1>Vditor</h1>
 <h1>Vditor</h1>

+ 2 - 2
demo/static-preview.html

@@ -67,8 +67,8 @@
     <a href="static-preview.html?lang=zh_CN">中文预览</a>
     <a href="static-preview.html?lang=zh_CN">中文预览</a>
     <a href="static-preview.html?lang=ko_KR">한글预览</a> |
     <a href="static-preview.html?lang=ko_KR">한글预览</a> |
     <a href="static.html" id="VditorForYou">编辑器</a> |
     <a href="static.html" id="VditorForYou">编辑器</a> |
-    <button onclick="setTheme('dark')">Dark Theme</button>
-    <button onclick="setTheme('light')">Light Theme</button>
+    <button onclick="setTheme('dark')">Dark Mode</button>
+    <button onclick="setTheme('light')">Light Mode</button>
 </h2>
 </h2>
 <div id="previewWrap">
 <div id="previewWrap">
     <div id="preview" class="preview"></div>
     <div id="preview" class="preview"></div>

+ 2 - 2
demo/static.html

@@ -42,8 +42,8 @@
     <a href="https://hacpai.com/article/1549638745630?r=Vanessa" target="_blank">API</a> |
     <a href="https://hacpai.com/article/1549638745630?r=Vanessa" target="_blank">API</a> |
     <a href="static-preview.html?lang=zh_CN">中文预览</a>
     <a href="static-preview.html?lang=zh_CN">中文预览</a>
     <a href="static-preview.html?lang=ko_KR">한글预览</a> |
     <a href="static-preview.html?lang=ko_KR">한글预览</a> |
-    <button onclick="window.vditor.setTheme('dark', 'dark',  'native')">Dark Theme</button>
-    <button onclick="window.vditor.setTheme('light', 'light', 'github')">Light Theme</button>
+    <button onclick="window.vditor.setTheme('dark', 'dark',  'native')">Dark Mode</button>
+    <button onclick="window.vditor.setTheme('light', 'light', 'github')">Light Mode</button>
 </h2>
 </h2>
 <div id="vditor">
 <div id="vditor">
 <h1>Vditor</h1>
 <h1>Vditor</h1>

+ 27 - 21
src/ts/toolbar/Info.ts

@@ -1,4 +1,4 @@
-import { VDITOR_VERSION} from "../constants";
+import {VDITOR_VERSION} from "../constants";
 import {getEventName} from "../util/compatibility";
 import {getEventName} from "../util/compatibility";
 import {MenuItem} from "./MenuItem";
 import {MenuItem} from "./MenuItem";
 
 
@@ -7,29 +7,35 @@ export class Info extends MenuItem {
         super(vditor, menuItem);
         super(vditor, menuItem);
         this.element.children[0].addEventListener(getEventName(), (event) => {
         this.element.children[0].addEventListener(getEventName(), (event) => {
             event.preventDefault();
             event.preventDefault();
-            vditor.tip.show(`<div style="max-width: 520px; font-size: 14px;line-height: 22px;margin: 0 0 7px 6px;">
+            vditor.tip.show(`<div style="max-width: 520px; font-size: 14px;line-height: 22px;margin-bottom: 14px;">
 <p style="text-align: center">
 <p style="text-align: center">
-<img src="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"><br>
-<em>下一代的 Markdown 编辑器,为未来而构建</em>
+    <em>下一代的 Markdown 编辑器,为未来而构建</em>
 </p>
 </p>
-<p>
-Vditor 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。
-它使用 TypeScript 实现,支持原生 JavaScript、Vue、React 和Angular。</p>
+<div style="display: flex;margin-bottom: 14px">
+    <img src="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png" style="margin-right: 10px;height: 68px"/>
+    <div>
+        Vditor 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。
+        它使用 TypeScript 实现,支持原生 JavaScript、Vue、React 和Angular。
+    </div>
+</div>
 <div style="display: flex;align-items: center">
 <div style="display: flex;align-items: center">
-<ul style="flex: 1;list-style: none">
-    <li>
-    项目地址:<a href="https://github.com/Vanessa219/vditor" target="_blank">https://github.com/Vanessa219/vditor</a>
-    </li>
-    <li>
-    开源协议:MIT
-    </li>
-    <li>
-    组件版本:Vditor v${VDITOR_VERSION} / Lute v${Lute.Version}
-    </li>
-    <li>
-    赞助捐赠:<a href="https://hacpai.com/sponsor" target="_blank">https://hacpai.com/sponsor</a>
-    </li>
-</ul>
+    <ul style="list-style: none;flex: 1">
+        <li>
+        项目地址:<a href="https://github.com/Vanessa219/vditor" target="_blank">GitHub</a>
+        <a href="https://gitee.com/dl88250/vditor" target="_blank">码云</a>
+        </li>
+        <li>
+        开源协议:MIT
+        </li>
+    </ul>
+    <ul style="list-style: none;margin-right: 18px">
+        <li>
+        组件版本:Vditor v${VDITOR_VERSION} / Lute v${Lute.Version}
+        </li>
+        <li>
+        赞助捐赠:<a href="https://hacpai.com/sponsor" target="_blank">https://hacpai.com/sponsor</a>
+        </li>
+    </ul>
 </div>
 </div>
 </div>`, 0);
 </div>`, 0);
         });
         });