[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.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>
<p class='what'>
<strong>

View File

@ -19,7 +19,7 @@ function layoutWikiCover() {
cover = ['logo', 'title', 'description'];
}
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')) {
el += '<div class="preview">';

View File

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

View File

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

View File

@ -31,7 +31,7 @@ if (cmt.service && page[cmt.service]) {
page.cmt = cmt;
%>
<% 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'>
<%- page.comment_title != undefined ? markdown(page.comment_title) : __('meta.comment_title') %>
</div>

View File

@ -15,7 +15,7 @@ function layoutDiv() {
if (page.h1 || page.title || (page.content && page.content.length > 0)) {
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();
if (page.content && page.content.length > 0) {
el += page.content;

View File

@ -23,7 +23,7 @@ if (theme.plugins.heti && theme.plugins.heti.enable) {
<%- partial('mathjax') %>
<% } %>
<%- 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() %>
<%- post.content %>
<%- partial('_partial/main/article/article_footer') %>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -80,7 +80,7 @@
&.active
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
a
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)
.md .tag-plugin.timeline
.md-text .tag-plugin.timeline
position: relative
margin-top: 0
padding-left: 16px
@ -20,7 +20,7 @@
&:before
display: none
.md .tag-plugin.timeline .timenode
.md-text .tag-plugin.timeline .timenode
position: relative
display: flex
flex-direction: column

View File

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