feat: add vditor locally

This commit is contained in:
merlin
2025-11-12 14:39:23 +08:00
parent 16e8fd2d65
commit 4e21c62e26
532 changed files with 43947 additions and 38 deletions

View File

@@ -0,0 +1,210 @@
/*!
* Vditor - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2018-present B3log 开源, b3log.org
*
* 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 NONINFRINGEMENT. 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.
*
*/
.vditor-reset {
color: rgba(0, 0, 0, .85);
font-size: 14px;
line-height: 2;
}
.vditor-reset img {
max-width: calc(100% - 32px);
}
.vditor-reset p > img {
margin: 34px 0;
box-shadow: 0 8px 20px rgba(143, 168, 191, 0.35);
}
.vditor-reset h1 {
margin-bottom: 20px;
color: rgba(0, 0, 0, .85);
font-weight: 500;
font-size: 30px;
font-family: Avenir, -apple-system, BlinkMacSystemFont, segoe ui, Roboto, helvetica neue, Arial, noto sans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji, sans-serif;
line-height: 38px
}
.vditor-reset h2 {
font-size: 24px;
line-height: 32px;
}
.vditor-reset h2,
.vditor-reset h3,
.vditor-reset h4,
.vditor-reset h5,
.vditor-reset h6 {
clear: both;
margin: 1.6em 0 .6em;
color: rgba(0, 0, 0, .85);
font-weight: 500;
font-family: Avenir, -apple-system, BlinkMacSystemFont, segoe ui, Roboto, helvetica neue, Arial, noto sans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji, sans-serif
}
.vditor-reset h3 {
font-size: 18px;
}
.vditor-reset h4 {
font-size: 16px;
}
.vditor-reset h5 {
font-size: 14px;
}
.vditor-reset h6 {
font-size: 12px;
}
.vditor-reset hr {
clear: both;
height: 1px;
margin: 56px 0;
background: #f0f0f0;
border: 0;
}
.vditor-reset p,
.vditor-reset pre {
margin: 1em 0;
}
.vditor-reset ul > li {
margin-left: 20px;
padding-left: 4px;
list-style-type: circle;
}
.vditor-reset ol > li {
margin-left: 20px;
padding-left: 4px;
list-style-type: decimal;
}
.vditor-reset ul > li > p,
.vditor-reset ol > li > p {
margin: 0.2em 0;
}
.vditor-reset code {
margin: 0 1px;
padding: .2em .4em;
font-size: .9em;
border-radius: 3px;
border: 1px solid #f0f0f0;
font-family: sfmono-regular, Consolas, liberation mono, Menlo, Courier, monospace;
}
.vditor-reset code:not(.hljs):not(.highlight-chroma) {
background: #f2f4f5;
color: rgba(0, 0, 0, .65);
}
.vditor-reset pre {
font-family: sfmono-regular, Consolas, liberation mono, Menlo, Courier, monospace;
border-radius: 2px;
}
.vditor-reset .language-abc svg,
.vditor-reset .language-abc path {
fill: currentColor;
color: rgba(0, 0, 0, .85);
}
.vditor-reset .language-graphviz polygon {
fill: transparent;
}
.vditor-reset strong,
.vditor-reset b {
font-weight: 500;
}
.vditor-reset > table {
width: 100%;
margin: 8px 0 16px;
direction: ltr;
empty-cells: show;
border: 1px solid #f0f0f0;
border-collapse: collapse;
border-spacing: 0
}
.vditor-reset > table th {
color: #5c6b77;
font-weight: 500;
white-space: nowrap;
background: rgba(0, 0, 0, .02)
}
.vditor-reset > table th, .vditor-reset > table td {
padding: 16px 24px;
text-align: left;
border: 1px solid #f0f0f0
}
.vditor-reset blockquote {
margin: 1em 0;
padding-left: .8em;
color: rgba(0, 0, 0, .45);
font-size: 90%;
border-left: 4px solid #f0f0f0
}
.vditor-reset blockquote p {
margin: 0;
}
.vditor-reset .vditor-anchor {
margin-left: 8px;
opacity: 0;
transition: opacity 0.3s;
}
.vditor-reset h1:hover .vditor-anchor,
.vditor-reset h2:hover .vditor-anchor,
.vditor-reset h3:hover .vditor-anchor,
.vditor-reset h4:hover .vditor-anchor,
.vditor-reset h5:hover .vditor-anchor,
.vditor-reset h6:hover .vditor-anchor {
display: inline-block;
opacity: 1;
}
.vditor-reset > br,
.vditor-reset > p > br {
clear: both;
}
.vditor-reset a, .vditor-ir__link {
color: #1890ff;
text-decoration: none;
outline: none;
cursor: pointer;
}

View File

@@ -0,0 +1,123 @@
/*!
* Vditor - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2018-present B3log 开源, b3log.org
*
* 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 NONINFRINGEMENT. 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.
*
*/
.vditor-reset {
color: #d1d5da;
}
.vditor-reset a, .vditor-ir__link {
color: #4285f4;
}
.vditor-reset h1, .vditor-reset h2 {
padding-bottom: 0.3em;
border-bottom: 1px solid #d1d5da
}
.vditor-reset hr {
background-color: #d1d5da
}
.vditor-reset blockquote {
padding: 0 1em;
color: #b9b9b9;
border-left: .25em solid #d1d5da
}
.vditor-reset iframe {
border: 1px solid #141414
}
.vditor-reset table tr {
background-color: #2f363d
}
.vditor-reset table td, .vditor-reset table th {
border: 1px solid #dfe2e5
}
.vditor-reset table tbody tr:nth-child(2n) {
background-color: #24292e
}
.vditor-reset code:not(.hljs):not(.highlight-chroma) {
background-color: rgba(66, 133, 244, .36);
}
.vditor-reset .language-abc svg,
.vditor-reset .language-abc path {
fill: currentColor;
color: #d1d5da;
}
.language-graphviz polygon {
fill: rgba(66, 133, 244, .36);
}
.vditor-reset kbd {
color: #d1d5da;
background-color: #2f363d;
border: 1px solid #141414;
box-shadow: inset 0 -1px 0 #141414
}
.vditor-copy svg {
color: #b9b9b9
}
.vditor-speech {
background-color: #1d2125;
border: 1px solid #141414;
color: #b9b9b9
}
.vditor-speech--current, .vditor-speech:hover {
color: #fff
}
.vditor-linkcard a {
background-color: #1d2125;
}
.vditor-linkcard a:visited .vditor-linkcard__abstract {
color: hsla(0, 0%, 72.5%, .36)
}
.vditor-linkcard__title {
color: #d1d5da
}
.vditor-linkcard__abstract {
color: #b9b9b9
}
.vditor-linkcard__site {
color: #fff
}
.vditor-linkcard__image {
background-color: hsla(0, 0%, 72.5%, .36)
}

View File

@@ -0,0 +1,101 @@
/*!
* Vditor - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2018-present B3log 开源, b3log.org
*
* 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 NONINFRINGEMENT. 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.
*
*/
.vditor-reset h1, .vditor-reset h2 {
padding-bottom: 0.3em;
border-bottom: 1px solid #eaecef;
}
.vditor-reset hr {
background-color: #eaecef;
}
.vditor-reset blockquote {
color: #6a737d;
border-left: .25em solid #eaecef
}
.vditor-reset iframe {
border: 1px solid #d1d5da
}
.vditor-reset table tr {
border-top: 1px solid #c6cbd1;
background-color: #fafbfc
}
.vditor-reset table td, .vditor-reset table th {
border: 1px solid #dfe2e5
}
.vditor-reset table tbody tr:nth-child(2n) {
background-color: #fff
}
.vditor-reset code:not(.hljs):not(.highlight-chroma) {
background-color: rgba(27, 31, 35, .05);
}
.vditor-reset kbd {
color: #24292e;
background-color: #fafbfc;
border: solid 1px #d1d5da;
box-shadow: inset 0 -1px 0 #d1d5da;
}
.vditor-speech {
background-color: #f6f8fa;
border: 1px solid #d1d5da;
color: #586069;
}
.vditor-speech--current, .vditor-speech:hover {
color: #4285f4;
}
.vditor-linkcard a {
background-color: #f6f8fa;
}
.vditor-linkcard a:visited .vditor-linkcard__abstract {
color: rgba(88, 96, 105, 0.36);
}
.vditor-linkcard__title {
color: #24292e;
}
.vditor-linkcard__abstract {
color: #586069;
}
.vditor-linkcard__site {
color: #4285f4;
}
.vditor-linkcard__image {
background-color: rgba(88, 96, 105, 0.36);
}

View File

@@ -0,0 +1,94 @@
/*!
* Vditor - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2018-present B3log 开源, b3log.org
*
* 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 NONINFRINGEMENT. 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.
*
*/
.vditor-reset {
font-family: "mp-quote", -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols";
color: rgb(62, 62, 62);
}
.vditor-reset a, .vditor-ir__link {
color: #576b95;
}
.vditor-reset h1 {
font-weight: 400;
text-align: center;
color: rgb(26, 173, 25);
font-size: 24px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAAGElEQVQImWNkXs/wn4GKgImahjEwMDAAAA6aAbVUOzXRAAAAAElFTkSuQmCC);
background-repeat: no-repeat;
background-position: center bottom;
}
.vditor-reset h2 {
font-weight: 400;
text-align: center;
font-size: 20px;
}
.vditor-reset h3,
.vditor-reset h4,
.vditor-reset h5,
.vditor-reset h6 {
font-weight: 400;
}
.vditor-reset hr {
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
transform-origin: 0 0;
transform: scale(1, 0.5);
height: 0;
}
.vditor-reset blockquote {
padding: 4px 0 0 10px;
border-left: 3px solid #dbdbdb;
color: #9a9a9a;
line-height: 1.6;
font-size: 15px;
margin: 1em 0;
}
.vditor-reset code {
font-size: 14px;
border: 1px solid #f0f0f0;
border-radius: 2px;
}
.vditor-reset code:not(.hljs):not(.highlight-chroma) {
background-color: rgba(0, 0, 0, 0.03);
color: #333;
}
.vditor-reset .language-abc svg,
.vditor-reset .language-abc path {
fill: currentColor;
color: rgb(62, 62, 62);
}
.vditor-reset .language-graphviz polygon {
fill: transparent;
}