[opt] md-text

This commit is contained in:
xaoxuu 2022-11-23 22:44:11 +08:00
parent a88cb29bbb
commit 670014ca4a
28 changed files with 70 additions and 70 deletions

View File

@ -5,7 +5,7 @@ page.comment_title = '';
page.header = 'auto'; page.header = 'auto';
page.robots = 'none'; page.robots = 'none';
%> %>
<article class='md error-page'> <article class='md-text error-page'>
<h1><img id='error' src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/404/1c830bfcd517d.svg' alt='404'></h1> <h1><img id='error' src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/404/1c830bfcd517d.svg' alt='404'></h1>
<p class='what'> <p class='what'>
<strong> <strong>

View File

@ -19,7 +19,7 @@ function layoutWikiCover() {
cover = ['logo', 'title', 'description']; cover = ['logo', 'title', 'description'];
} }
el += '<div class="l_cover wiki' + scrollreveal() + '">'; el += '<div class="l_cover wiki' + scrollreveal() + '">';
el += '<article class="cover-wrap md">'; el += '<article class="cover-wrap md-text">';
if (logo && logo.src && cover.includes('logo')) { if (logo && logo.src && cover.includes('logo')) {
el += '<div class="preview">'; el += '<div class="preview">';

View File

@ -11,7 +11,7 @@ if (poster) {
} }
function div_default() { function div_default() {
var el = ''; var el = '';
el += '<article class="md">'; el += '<article class="md-text">';
// 封面 // 封面
if (obj.image || theme.article.auto_cover) { if (obj.image || theme.article.auto_cover) {

View File

@ -1,7 +1,7 @@
<% <%
function layoutDiv() { function layoutDiv() {
var el = ''; var el = '';
el += '<article class="md">'; el += '<article class="md-text">';
if (proj.logo && proj.logo.src) { if (proj.logo && proj.logo.src) {
el += '<div class="preview">'; el += '<div class="preview">';
el += '<img src="' + proj.logo.src + '" alt="logo"'; el += '<img src="' + proj.logo.src + '" alt="logo"';

View File

@ -31,7 +31,7 @@ if (cmt.service && page[cmt.service]) {
page.cmt = cmt; page.cmt = cmt;
%> %>
<% if (loadComment) { %> <% if (loadComment) { %>
<div class='related-wrap md reveal' id="comments"> <div class='related-wrap md-text reveal' id="comments">
<div class='cmt-title cap theme'> <div class='cmt-title cap theme'>
<%- page.comment_title != undefined ? markdown(page.comment_title) : __('meta.comment_title') %> <%- page.comment_title != undefined ? markdown(page.comment_title) : __('meta.comment_title') %>
</div> </div>

View File

@ -15,7 +15,7 @@ function layoutDiv() {
if (page.h1 || page.title || (page.content && page.content.length > 0)) { if (page.h1 || page.title || (page.content && page.content.length > 0)) {
el += partial('_partial/main/navbar/breadcrumb'); el += partial('_partial/main/navbar/breadcrumb');
} }
el += '<article class="content md ' + page.layout + (page.indent ? ' indent' : '') + scrollreveal() + '">'; el += '<article class="md-text content ' + page.layout + (page.indent ? ' indent' : '') + scrollreveal() + '">';
el += layoutTitle(); el += layoutTitle();
if (page.content && page.content.length > 0) { if (page.content && page.content.length > 0) {
el += page.content; el += page.content;

View File

@ -23,7 +23,7 @@ if (theme.plugins.heti && theme.plugins.heti.enable) {
<%- partial('mathjax') %> <%- partial('mathjax') %>
<% } %> <% } %>
<%- partial('_partial/main/navbar/breadcrumb') %> <%- partial('_partial/main/navbar/breadcrumb') %>
<article class='content<%- heti %> md <%- post.layout %><%- post.indent ? ' indent' : '' %><%- scrollreveal() %>'> <article class='md-text content<%- heti %> <%- post.layout %><%- post.indent ? ' indent' : '' %><%- scrollreveal() %>'>
<%- layoutTitle() %> <%- layoutTitle() %>
<%- post.content %> <%- post.content %>
<%- partial('_partial/main/article/article_footer') %> <%- partial('_partial/main/article/article_footer') %>

View File

@ -30,7 +30,7 @@ function layoutTitle() {
} }
%> %>
<%- partial('_partial/main/navbar/breadcrumb') %> <%- partial('_partial/main/navbar/breadcrumb') %>
<article class='content md <%- page.layout %><%- scrollreveal() %>'> <article class='md-text content <%- page.layout %><%- scrollreveal() %>'>
<%- layoutTitle() %> <%- layoutTitle() %>
<%- page.content %> <%- page.content %>
<%- partial('_partial/main/article/article_footer') %> <%- partial('_partial/main/article/article_footer') %>

View File

@ -12,7 +12,7 @@ a
&:hover &:hover
color: $color-hover color: $color-hover
.md p:not([class]) .md-text p:not([class])
text-align: convert(hexo-config('style.text-align')) text-align: convert(hexo-config('style.text-align'))
hr hr

View File

@ -10,7 +10,7 @@ p>code:not([class]),li>code:not([class])
border-radius: 4px border-radius: 4px
color: var(--text-code) color: var(--text-code)
article.md .highlight, pre:not([class]):has(>code) .md-text .highlight, pre:not([class]):has(>code)
margin: var(--gap-p) 0 margin: var(--gap-p) 0
border-radius: $border-block border-radius: $border-block
overflow: hidden overflow: hidden
@ -22,7 +22,7 @@ article.md .highlight, pre:not([class]):has(>code)
@media screen and (min-width: $device-mobile) @media screen and (min-width: $device-mobile)
min-width: 180px min-width: 180px
article.md .highlight .md-text .highlight
position: relative position: relative
overflow: auto overflow: auto
display: block display: block
@ -75,7 +75,7 @@ article.md .highlight
.gutter+.code pre .gutter+.code pre
padding-left: 0.25em padding-left: 0.25em
article.md .gist .md-text .gist
.gist-file .gist-file
border: 1px solid var(--block-border) border: 1px solid var(--block-border)
border-radius: $border-block border-radius: $border-block
@ -96,7 +96,7 @@ table:not([class])
border-collapse: collapse border-collapse: collapse
article.md pre .md-text pre
>.caption >.caption
color: var(--text-p3) color: var(--text-p3)
>.hljs >.hljs
@ -106,7 +106,7 @@ article.md pre
line-height: 1.5 line-height: 1.5
box-sizing: border-box box-sizing: border-box
article.md .highlight .md-text .highlight
.code .code
vertical-align: top vertical-align: top
&:before &:before

View File

@ -62,7 +62,7 @@
// common article // common article
.post-list article.md .post-list .md-text
padding: 1rem padding: 1rem
@media screen and (max-width: $device-mobile) @media screen and (max-width: $device-mobile)
padding: 0.5rem 1rem padding: 0.5rem 1rem

View File

@ -1,4 +1,4 @@
article.md .md-text
max-width: 100% max-width: 100%
padding: 0 1rem padding: 0 1rem
margin-top: 1rem margin-top: 1rem
@ -8,7 +8,7 @@ article.md
line-height: 1.7 line-height: 1.7
word-break: break-word word-break: break-word
article.md.excerpt .md-text.excerpt
p p
font-size: $fs-14 font-size: $fs-14
margin: 1em 0 margin: 1em 0
@ -19,7 +19,7 @@ h1.article-title
line-height: 1.2 line-height: 1.2
color: var(--text-p0) color: var(--text-p0)
article.md.content .md-text.content
position: relative position: relative
margin-bottom: 2rem margin-bottom: 2rem
display: flex display: flex
@ -53,7 +53,7 @@ article.md.content
article.md .md-text
ul:not(:last-child), ul:not(:last-child),
ol:not(:last-child) ol:not(:last-child)
padding-bottom: .5rem padding-bottom: .5rem
@ -75,7 +75,7 @@ article.md
display: block display: block
// titles // titles
article.md.content .md-text.content
a.headerlink:before a.headerlink:before
opacity: 0 opacity: 0
content: '#' content: '#'
@ -101,28 +101,28 @@ article.md.content
h5+h6 h5+h6
margin-top: -0.5rem margin-top: -0.5rem
article.md p .md-text p
font-size: $fs-p font-size: $fs-p
article.md pre .md-text pre
-webkit-font-smoothing: auto -webkit-font-smoothing: auto
-moz-osx-font-smoothing: auto -moz-osx-font-smoothing: auto
article.md .md-text
.center .center
align-self: center align-self: center
// div // div
article.md>div .md-text>div
margin: var(--gap-p) 0 margin: var(--gap-p) 0
article.md img .md-text img
border-radius: $border-image border-radius: $border-image
margin: auto margin: auto
display: block display: block
article.md .md-text
p:not([class]), li:not([class]) p:not([class]), li:not([class])
a:not([class]) a:not([class])
position: relative position: relative

View File

@ -1,4 +1,4 @@
article.md.error-page .md-text.error-page
text-align: center text-align: center
margin-top: 2rem margin-top: 2rem
img#error img#error
@ -21,5 +21,5 @@ article.md.error-page
border: 2px solid black border: 2px solid black
@media screen and (max-width: $device-tablet) @media screen and (max-width: $device-tablet)
article.md.error-page .md-text.error-page
margin-top: 4rem margin-top: 4rem

View File

@ -1,4 +1,4 @@
.md .article-footer .md-text .article-footer
margin-top: 4rem margin-top: 4rem
padding: 1rem padding: 1rem
background: var(--block) background: var(--block)
@ -32,11 +32,11 @@
padding-top: 1rem padding-top: 1rem
border-top: 1px solid var(--block-border) border-top: 1px solid var(--block-border)
.md .article-footer .social-wrap .md-text .article-footer .social-wrap
grid-gap: 0.5rem 1rem grid-gap: 0.5rem 1rem
margin: 0 margin: 0
.md .article-footer .qrcode .md-text .article-footer .qrcode
width: 128px width: 128px
padding: 4px padding: 4px
background: white background: white
@ -47,7 +47,7 @@
img img
object-fit: contain object-fit: contain
.md .article-footer .qrcode.display .md-text .article-footer .qrcode.display
margin: 2rem auto 1rem margin: 2rem auto 1rem
height: 128px !important height: 128px !important
visibility: visible !important visibility: visible !important

View File

@ -1,4 +1,4 @@
.md .checkbox .md-text .checkbox
display: flex display: flex
font-size: $fs-15 font-size: $fs-15
line-height: 1.2 line-height: 1.2

View File

@ -1,4 +1,4 @@
.md .tag-plugin.copy .md-text .tag-plugin.copy
display: flex display: flex
justify-content: space-between justify-content: space-between
box-sizing: border-box box-sizing: border-box

View File

@ -1,4 +1,4 @@
.md .tag-plugin.emoji .md-text .tag-plugin.emoji
display: inline-block display: inline-block
margin: -4px 2px 0 margin: -4px 2px 0
vertical-align: middle vertical-align: middle

View File

@ -1,4 +1,4 @@
.md .frame-wrap .md-text .frame-wrap
position: relative position: relative
overflow: hidden overflow: hidden
margin: 0 auto margin: 0 auto
@ -8,7 +8,7 @@
align-items: center align-items: center
img,video img,video
border-radius: 0 border-radius: 0
.md .frame-wrap .frame .md-text .frame-wrap .frame
z-index: 1 z-index: 1
display: block display: block
position: absolute; position: absolute;
@ -16,11 +16,11 @@
background-repeat: no-repeat; background-repeat: no-repeat;
overflow: hidden; overflow: hidden;
.md .tag-plugin.img-wrap .frame-wrap .md-text .tag-plugin.img-wrap .frame-wrap
&[focus] &[focus]
height: auto height: auto
.md .frame-wrap .md-text .frame-wrap
&#iphone11 &#iphone11
img,video img,video
width: 287px width: 287px
@ -44,7 +44,7 @@
bottom: 0 bottom: 0
@media screen and (max-width: $device-mobile) @media screen and (max-width: $device-mobile)
.md .frame-wrap .md-text .frame-wrap
&#iphone11 &#iphone11
img,video img,video
width: 208px width: 208px

View File

@ -1,4 +1,4 @@
.md .md-text
u u
text-decoration: none text-decoration: none
border-bottom: 2px solid $color-hover border-bottom: 2px solid $color-hover

View File

@ -1,4 +1,4 @@
.md .tag-plugin.link .md-text .tag-plugin.link
max-width: 100% max-width: 100%
margin: 1em auto margin: 1em auto
display: flex display: flex
@ -6,7 +6,7 @@
@media screen and (max-width: $device-mobile-375) @media screen and (max-width: $device-mobile-375)
width: 100% width: 100%
.md .link-card .md-text .link-card
background: var(--card) background: var(--card)
display: inline-flex display: inline-flex
justify-content: space-between justify-content: space-between
@ -24,17 +24,17 @@
box-shadow: $boxshadow-card-float box-shadow: $boxshadow-card-float
transform: translateY(-1px) transform: translateY(-1px)
.md .link-card.plain .md-text .link-card.plain
flex-direction: row flex-direction: row
align-items: center align-items: center
.md .link-card.rich .md-text .link-card.rich
flex-direction: column flex-direction: column
align-items: stretch align-items: stretch
width: 460px width: 460px
text-align: justify text-align: justify
.md .link-card .md-text .link-card
>.left >.left
overflow: hidden overflow: hidden
margin: 0.75rem 0 0.75rem 0.75rem margin: 0.75rem 0 0.75rem 0.75rem
@ -72,7 +72,7 @@
font-size: $fs-15 font-size: $fs-15
margin-bottom: 0.5rem margin-bottom: 0.5rem
.md .link-card .md-text .link-card
line-height: 1.2 line-height: 1.2
.title .title
display: -webkit-box display: -webkit-box

View File

@ -1,4 +1,4 @@
.md .tag-plugin.mark .md-text .tag-plugin.mark
margin: 0 1px margin: 0 1px
padding: 1px 2px padding: 1px 2px
border-radius: 4px border-radius: 4px

View File

@ -1,4 +1,4 @@
.md .tag-plugin.navbar .md-text .tag-plugin.navbar
text-align: center text-align: center
nav.cap nav.cap
margin: 0 margin: 0

View File

@ -1,4 +1,4 @@
.md .tag-plugin.note .md-text .tag-plugin.note
position: relative position: relative
margin-top: 1rem margin-top: 1rem
margin-bottom: 1rem margin-bottom: 1rem
@ -21,13 +21,13 @@
margin: 1rem 0 margin: 1rem 0
.md .tag-plugin.note[color] .md-text .tag-plugin.note[color]
code code
background: none background: none
.md .tag-plugin.note:not([color]) .md-text .tag-plugin.note:not([color])
.highlight .highlight
background: var(--block-hover) background: var(--block-hover)
.md .tag-plugin.note[child=codeblock] .md-text .tag-plugin.note[child=codeblock]
padding: 0 padding: 0
>.title, >.body:only-child >.title, >.body:only-child
margin-top: 0 margin-top: 0
@ -38,13 +38,13 @@
border: none border: none
background: none background: none
.md .tag-plugin.note[child=tabs] .md-text .tag-plugin.note[child=tabs]
>.body >.body
margin: 0 margin: 0
>.tabs >.tabs
margin-top: .5rem margin-top: .5rem
.md .tag-plugin.note[child=iframe] .md-text .tag-plugin.note[child=iframe]
overflow: hidden overflow: hidden
padding: 0 padding: 0
>.body >.body
@ -52,5 +52,5 @@
iframe iframe
margin: 0 margin: 0
.md .tag-plugin .tag-plugin.note .md-text .tag-plugin .tag-plugin.note
--gap-p: 1rem --gap-p: 1rem

View File

@ -1,4 +1,4 @@
.md .tag-plugin.poetry .md-text .tag-plugin.poetry
align-self: center align-self: center
&[align=center] &[align=center]
align-items: center align-items: center
@ -25,7 +25,7 @@
font-size: $fs-12 font-size: $fs-12
// //
.md .tag-plugin.poetry .md-text .tag-plugin.poetry
padding-left: 1rem padding-left: 1rem
position: relative position: relative
&:before &:before

View File

@ -1,9 +1,9 @@
.md .tag-plugin.quot .md-text .tag-plugin.quot
text-align: center text-align: center
position: relative position: relative
align-items: center align-items: center
max-width 400px max-width 400px
.md .tag-plugin.quot:not(span) .md-text .tag-plugin.quot:not(span)
display: inline-flex display: inline-flex
align-self: center align-self: center
border-bottom: none border-bottom: none
@ -18,7 +18,7 @@
line-height: 1.2 line-height: 1.2
// override // override
article.md.content .md-text.content
.quot:not(span) .quot:not(span)
color: var(--text-p0) color: var(--text-p0)
h1.quot h1.quot
@ -33,7 +33,7 @@ article.md.content
font-size: $fs-h4 font-size: $fs-h4
// type=text // type=text
.md .tag-plugin.quot[type=text]:not(span) .md-text .tag-plugin.quot[type=text]:not(span)
&:before,&:after &:before,&:after
content: "" content: ""
position: absolute position: absolute
@ -49,14 +49,14 @@ article.md.content
bottom: 0 bottom: 0
border-right: 6px solid $color-accent border-right: 6px solid $color-accent
border-bottom: 6px solid $color-accent border-bottom: 6px solid $color-accent
article.md.content h1.quot[type=text] .md-text.content h1.quot[type=text]
&:before,&:after &:before,&:after
width: 12px width: 12px
height: 20px height: 20px
border-width: 8px border-width: 8px
// type=icon // type=icon
.md .tag-plugin.quot[type=icon]:not(span) .md-text .tag-plugin.quot[type=icon]:not(span)
.icon .icon
height: 1.5em height: 1.5em
display: inline-block display: inline-block
@ -69,7 +69,7 @@ article.md.content h1.quot[type=text]
margin-left: .5rem margin-left: .5rem
// inline quot // inline quot
.md span.tag-plugin.quot .md-text span.tag-plugin.quot
font-weight: 500 font-weight: 500
&:before,&:after &:before,&:after
color: $color-accent color: $color-accent

View File

@ -80,7 +80,7 @@
&.active &.active
display: block display: block
.md.indent .tag-plugin.tabs .tab-content p:not([class]) .md-text.indent .tag-plugin.tabs .tab-content p:not([class])
text-indent: 'calc(%s * 2)' % $fs-p text-indent: 'calc(%s * 2)' % $fs-p
a a
text-indent: 0 text-indent: 0

View File

@ -1,7 +1,7 @@
.md .tag-plugin.folding .body:has(.timeline) .md-text .tag-plugin.folding .body:has(.timeline)
background: var(--site-bg) background: var(--site-bg)
.md .tag-plugin.timeline .md-text .tag-plugin.timeline
position: relative position: relative
margin-top: 0 margin-top: 0
padding-left: 16px padding-left: 16px
@ -20,7 +20,7 @@
&:before &:before
display: none display: none
.md .tag-plugin.timeline .timenode .md-text .tag-plugin.timeline .timenode
position: relative position: relative
display: flex display: flex
flex-direction: column flex-direction: column

View File

@ -92,7 +92,7 @@ const init = {
stellar.jQuery(() => { stellar.jQuery(() => {
const scrollOffset = 32; const scrollOffset = 32;
var segs = []; var segs = [];
$("article.md :header").each(function (idx, node) { $("article.md-text :header").each(function (idx, node) {
segs.push(node) segs.push(node)
}); });
// 滚动 // 滚动