feature(pages): build archives,categores,category
This commit is contained in:
parent
04806b3555
commit
3325019d5e
21
archives.ftl
21
archives.ftl
@ -4,10 +4,10 @@
|
||||
<#include "module/header.ftl">
|
||||
<div class="archives">
|
||||
<#list archives as archive>
|
||||
<div class="year">${archive.year?c}</div>
|
||||
<div class="title">${archive.year?c}</div>
|
||||
<div class="list">
|
||||
<#list archive.posts?sort_by("createTime")?reverse as post>
|
||||
<div class="title">
|
||||
<div class="post-title">
|
||||
<a href="${post.fullPath!}">${post.title!}</a>
|
||||
<div class="time"><span class="date">${post.createTime?string('MM-dd')}</span></div>
|
||||
</div>
|
||||
@ -15,6 +15,21 @@
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#include "module/pagination.ftl">
|
||||
<#if posts.totalPages gt 1>
|
||||
<@paginationTag method="archives" page="${posts.number}" total="${posts.totalPages}" display="3">
|
||||
<div class="pagenav">
|
||||
<#if pagination.hasPrev>
|
||||
<a href="${pagination.prevPageFullPath!}" class="pre">
|
||||
返回上页
|
||||
</a>
|
||||
</#if>
|
||||
<#if pagination.hasNext>
|
||||
<a href="${pagination.nextPageFullPath!}" class="next">
|
||||
更多文章
|
||||
</a>
|
||||
</#if>
|
||||
</div>
|
||||
</@paginationTag>
|
||||
</#if>
|
||||
</main>
|
||||
</@layout>
|
||||
|
@ -1,13 +1,21 @@
|
||||
<#include "module/macro.ftl">
|
||||
<@layout title="分类列表 - ${blog_title!}">
|
||||
<h1>分类列表</h1>
|
||||
<ul>
|
||||
<@categoryTag method="list">
|
||||
<#if categories?? && categories?size gt 0>
|
||||
<#list categories as category>
|
||||
<li><a href="${category.fullPath!}">${category.name}</a></li>
|
||||
</#list>
|
||||
</#if>
|
||||
</@categoryTag>
|
||||
</ul>
|
||||
<main>
|
||||
<#include "module/header.ftl">
|
||||
<div class="tags">
|
||||
<ul>
|
||||
<@categoryTag method="list">
|
||||
<#if categories?? && categories?size gt 0>
|
||||
<#list categories as category>
|
||||
<li>
|
||||
<a href="${category.fullPath!}">
|
||||
${category.name!} <span class="count">${category.postCount!0}</span>
|
||||
</a>
|
||||
</li>
|
||||
</#list>
|
||||
</#if>
|
||||
</@categoryTag>
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
</@layout>
|
||||
|
68
category.ftl
68
category.ftl
@ -1,45 +1,33 @@
|
||||
<#include "module/macro.ftl">
|
||||
<@layout title="分类:${category.name} - ${blog_title!}">
|
||||
<h1>分类:${category.name}</h1>
|
||||
<ul>
|
||||
<#list posts.content as post>
|
||||
<li>
|
||||
<a href="${post.fullPath}">${post.title}</a>
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
<h1>分页</h1>
|
||||
|
||||
<#if posts.totalPages gt 1>
|
||||
<ul>
|
||||
<@paginationTag method="categoryPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${category.slug!}">
|
||||
<#if pagination.hasPrev>
|
||||
<li>
|
||||
<a href="${pagination.prevPageFullPath!}">
|
||||
上一页
|
||||
</a>
|
||||
</li>
|
||||
</#if>
|
||||
<#list pagination.rainbowPages as number>
|
||||
<li>
|
||||
<#if number.isCurrent>
|
||||
<span class="current">第 ${number.page!} 页</span>
|
||||
<#else>
|
||||
<a href="${number.fullPath!}">第 ${number.page!} 页</a>
|
||||
</#if>
|
||||
</li>
|
||||
<main>
|
||||
<#include "module/header.ftl">
|
||||
<div class="category">
|
||||
<div class="title">分类:${category.name}</div>
|
||||
<div class="list">
|
||||
<#list posts.content as post>
|
||||
<div class="post-title">
|
||||
<a href="${post.fullPath!}">${post.title!}</a>
|
||||
<div class="time"><span class="date">${post.createTime?string('yyyy-MM-dd')}</span></div>
|
||||
</div>
|
||||
</#list>
|
||||
<#if pagination.hasNext>
|
||||
<li>
|
||||
<a href="${pagination.nextPageFullPath!}">
|
||||
下一页
|
||||
</div>
|
||||
</div>
|
||||
<#if posts.totalPages gt 1>
|
||||
<@paginationTag method="categoryPosts" page="${posts.number}" total="${posts.totalPages}" display="3">
|
||||
<div class="pagenav">
|
||||
<#if pagination.hasPrev>
|
||||
<a href="${pagination.prevPageFullPath!}" class="pre">
|
||||
返回上页
|
||||
</a>
|
||||
</li>
|
||||
</#if>
|
||||
</@paginationTag>
|
||||
</ul>
|
||||
<#else>
|
||||
<span>当前只有一页</span>
|
||||
</#if>
|
||||
</#if>
|
||||
<#if pagination.hasNext>
|
||||
<a href="${pagination.nextPageFullPath!}" class="next">
|
||||
更多文章
|
||||
</a>
|
||||
</#if>
|
||||
</div>
|
||||
</@paginationTag>
|
||||
</#if>
|
||||
</main>
|
||||
</@layout>
|
||||
|
18
index.ftl
18
index.ftl
@ -24,7 +24,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
|
||||
<#include "module/pagination.ftl">
|
||||
<#if posts.totalPages gt 1>
|
||||
<@paginationTag method="index" page="${posts.number}" total="${posts.totalPages}" display="3">
|
||||
<div class="pagenav">
|
||||
<#if pagination.hasPrev>
|
||||
<a href="${pagination.prevPageFullPath!}" class="pre">
|
||||
返回上页
|
||||
</a>
|
||||
</#if>
|
||||
<#if pagination.hasNext>
|
||||
<a href="${pagination.nextPageFullPath!}" class="next">
|
||||
更多文章
|
||||
</a>
|
||||
</#if>
|
||||
</div>
|
||||
</@paginationTag>
|
||||
</#if>
|
||||
</main>
|
||||
</@layout>
|
@ -9,9 +9,12 @@
|
||||
<meta name="description" content="${meta_description!}" />
|
||||
<@global.head />
|
||||
|
||||
<link rel="stylesheet" href="${theme_base!}/source/css/normalize.css"/>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css"/>
|
||||
<link rel="stylesheet" href="${theme_base!}/source/plugins/normalize.css"/>
|
||||
<link rel="stylesheet" href="${theme_base!}/source/plugins/animate.css"/>
|
||||
<link rel="stylesheet" href="${theme_base!}/source/plugins/remixicon/remixicon.css"/>
|
||||
<#-- <link rel="stylesheet" href="${theme_base!}/source/plugins/typo.css"/> -->
|
||||
<#-- <link rel="stylesheet" href="${theme_base!}/source/plugins/han.css"/> -->
|
||||
<#-- <link rel="stylesheet" href="//unpkg.com/heti/umd/heti.min.css"> -->
|
||||
<link rel="stylesheet" href="${theme_base!}/source/css/color.css"/>
|
||||
<link rel="stylesheet" href="${theme_base!}/source/css/redemption.css"/>
|
||||
</head>
|
||||
@ -28,6 +31,13 @@
|
||||
</div>
|
||||
<@global.footer />
|
||||
</footer>
|
||||
|
||||
<script src="//unpkg.com/heti/umd/heti-addon.min.js"></script>
|
||||
|
||||
<script>
|
||||
const heti = new Heti('.heti');
|
||||
heti.autoSpacing();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</#macro>
|
||||
|
@ -1,16 +0,0 @@
|
||||
<#if posts.totalPages gt 1>
|
||||
<@paginationTag method="index" page="${posts.number}" total="${posts.totalPages}" display="3">
|
||||
<div class="pagenav">
|
||||
<#if pagination.hasPrev>
|
||||
<a href="${pagination.prevPageFullPath!}" class="pre">
|
||||
返回上页
|
||||
</a>
|
||||
</#if>
|
||||
<#if pagination.hasNext>
|
||||
<a href="${pagination.nextPageFullPath!}" class="next">
|
||||
更多文章
|
||||
</a>
|
||||
</#if>
|
||||
</div>
|
||||
</@paginationTag>
|
||||
</#if>
|
2
post.ftl
2
post.ftl
@ -1,7 +1,7 @@
|
||||
<#include "module/macro.ftl">
|
||||
<@layout title="${post.title!} - ${blog_title!}">
|
||||
<h1>${post.title!}</h1>
|
||||
<article>
|
||||
<article class="heti">
|
||||
${post.formatContent!}
|
||||
</article>
|
||||
<#include "module/comment.ftl">
|
||||
|
@ -106,41 +106,55 @@ main .pagenav > a {
|
||||
text-decoration: none;
|
||||
margin: 0 2rem;
|
||||
}
|
||||
main .archives {
|
||||
main .archives, main .category, main tags {
|
||||
width: 45rem;
|
||||
padding-top: 1rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
main .archives > li {
|
||||
main .archives li, main .category li {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
main .archives > .year {
|
||||
main .archives .title, main .category .title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 600;
|
||||
font-weight: bold;
|
||||
line-height: 2.2rem;
|
||||
letter-spacing: 0.1rem;
|
||||
padding: 0.625rem 0;
|
||||
}
|
||||
main .archives > .list {
|
||||
main .archives .list, main .category .list {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
main .archives .list .post-title, main .category .list .post-title {
|
||||
padding-bottom: 0.3rem;
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
main .archives > .list .title {
|
||||
padding-bottom: 0.3rem;
|
||||
}
|
||||
main .archives > .list .title a {
|
||||
main .archives .list .post-title a, main .category .list .post-title a {
|
||||
display: inline-block;
|
||||
width: 85%;
|
||||
color: #1f1f1f;
|
||||
}
|
||||
main .archives > .list .title .time {
|
||||
main .archives .list .post-title .time, main .category .list .post-title .time {
|
||||
float: right;
|
||||
color: #c5c5c5;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
main .archives > .list .title a:hover {
|
||||
color: #1f1f1f;
|
||||
main .tags {
|
||||
text-align: center;
|
||||
margin: 4rem 0;
|
||||
}
|
||||
main .tags ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
main .tags ul li {
|
||||
margin: 0.5rem 1rem;
|
||||
display: inline-block;
|
||||
font-size: 1rem;
|
||||
}
|
||||
main .tags .count {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -8px;
|
||||
right: -2px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
footer {
|
||||
|
@ -137,51 +137,68 @@ main {
|
||||
}
|
||||
}
|
||||
|
||||
.archives{
|
||||
.archives,.category,tags{
|
||||
width: 45rem;
|
||||
padding-top: 1rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.archives > {
|
||||
|
||||
.archives,.category{
|
||||
li {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.year {
|
||||
.title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 600;
|
||||
font-weight: bold;
|
||||
line-height: 2.2rem;
|
||||
letter-spacing: 0.1rem;
|
||||
padding: 0.625rem 0;
|
||||
}
|
||||
|
||||
.list {
|
||||
margin-bottom: 3rem;
|
||||
line-height: 1.75rem;
|
||||
|
||||
.title{
|
||||
.post-title{
|
||||
padding-bottom: 0.3rem;
|
||||
line-height: 1.75rem;
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
width: 85%;
|
||||
color: #1f1f1f;
|
||||
}
|
||||
|
||||
.time {
|
||||
float: right;
|
||||
color: #c5c5c5;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #1f1f1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.tags {
|
||||
text-align: center;
|
||||
margin: 4rem 0;
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul li {
|
||||
margin: 0.5rem 1rem;
|
||||
display: inline-block;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.count {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -8px;
|
||||
right: -2px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
footer {
|
||||
|
@ -70,13 +70,22 @@ main .pagenav a {
|
||||
main .pagenav a:hover {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
main .archives > .list .title a {
|
||||
color: black;
|
||||
main .archives .list .post-title a, main .category .list .post-title a {
|
||||
color: #000001;
|
||||
}
|
||||
main .archives > .list .title a:hover {
|
||||
main .archives .list .post-title a:hover, main .category .list .post-title a:hover {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
main .archives > .list .title .time {
|
||||
main .archives .list .post-title .time, main .category .list .post-title .time {
|
||||
color: #c5c5c5;
|
||||
}
|
||||
main .tags ul li a {
|
||||
color: #000001;
|
||||
}
|
||||
main .tags ul li a:hover {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
main .tags .count {
|
||||
color: #c5c5c5;
|
||||
}
|
||||
|
||||
|
@ -108,12 +108,12 @@ main {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 归档页面
|
||||
.archives > {
|
||||
// 归档页面,类别页面
|
||||
.archives,.category{
|
||||
.list {
|
||||
.title{
|
||||
.post-title{
|
||||
a {
|
||||
color: rgb(0, 0, 0);
|
||||
color: rgb(0, 0, 0.85);
|
||||
|
||||
&:hover {
|
||||
color: rgb(0, 0, 0, 0.65);
|
||||
@ -126,6 +126,24 @@ main {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 标记页面
|
||||
.tags {
|
||||
ul {
|
||||
li{
|
||||
a{
|
||||
color: rgb(0, 0, 0.85);
|
||||
|
||||
&:hover {
|
||||
color: rgb(0, 0, 0, 0.65);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.count {
|
||||
color: #c5c5c5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 脚注
|
||||
@ -141,5 +159,3 @@ footer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
@ -1 +0,0 @@
|
||||
index.js
|
4074
source/plugins/animate.css
vendored
Normal file
4074
source/plugins/animate.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
653
source/plugins/han.css
Normal file
653
source/plugins/han.css
Normal file
@ -0,0 +1,653 @@
|
||||
@charset "utf-8";
|
||||
|
||||
:root {
|
||||
--active-file-bg-color: #dadada;
|
||||
--active-file-bg-color: rgba(32, 43, 51, 0.63);
|
||||
--active-file-text-color: white;
|
||||
--bg-color: #fff;
|
||||
--text-color: #333;
|
||||
--side-bar-bg-color: #f5f5f5;
|
||||
--control-text-color: #666;
|
||||
}
|
||||
|
||||
/* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
|
||||
html {
|
||||
color: #333;
|
||||
background: #fff;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
text-rendering: optimizelegibility;
|
||||
font-size: 14px;
|
||||
-webkit-font-smoothing: initial;
|
||||
}
|
||||
|
||||
#write {
|
||||
max-width: 960px;
|
||||
padding-top: 2em;
|
||||
padding-left: 60px;
|
||||
padding-right: 60px;
|
||||
min-height: calc(100vh - 6em);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.typora-node #write {
|
||||
min-height: calc(100% - 6em);
|
||||
}
|
||||
|
||||
pre.md-meta-block {
|
||||
background: #f5f5f5;
|
||||
padding: 1em;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#write {
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1100px) {
|
||||
body, #footer-word-count-info {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
body.pin-outline,
|
||||
.pin-outline #footer-word-count-info,
|
||||
.pin-outline footer {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#write {
|
||||
max-width: 1000px;
|
||||
padding: 40px 60px;
|
||||
background: #fff;
|
||||
margin: 3em auto 3em;
|
||||
border: 1px solid #ddd;
|
||||
border-width: 0 1px;
|
||||
}
|
||||
|
||||
.pin-outline #write {
|
||||
max-width: 1000px;
|
||||
background: #fff;
|
||||
margin: 0 0 0;
|
||||
border: 0;
|
||||
padding-left: 60px;
|
||||
padding-right: 60px;
|
||||
}
|
||||
|
||||
footer {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1300px) {
|
||||
body.pin-outline,
|
||||
.pin-outline #footer-word-count-info,
|
||||
.pin-outline footer {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.pin-outline #write {
|
||||
max-width: 1000px;
|
||||
padding: 40px 60px;
|
||||
background: #fff;
|
||||
margin: 3em auto 3em;
|
||||
border: 1px solid #ddd;
|
||||
border-width: 0 1px;
|
||||
}
|
||||
|
||||
.pin-outline footer {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#footer-word-count-info {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 如果你的项目仅支持 IE9+ | Chrome | Firefox 等,推荐在 <html> 中添加 .borderbox 这个 class */
|
||||
html.borderbox *, html.borderbox *:before, html.borderbox *:after {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 内外边距通常让各个浏览器样式的表现位置不同 */
|
||||
body, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, menu, nav, section {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
|
||||
article, aside, details, figcaption, figure, footer, header, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* HTML5 媒体文件跟 img 保持一致 */
|
||||
audio, canvas, video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* 要注意表单元素并不继承父级 font 的问题 */
|
||||
body, button, input, select, textarea {
|
||||
font: 300 1em/1.8 "PingFang SC", "Lantinghei SC", "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "PingFang SC", "Lantinghei SC", "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "TimesNewRomanPS-ItalicMT", "PingFang SC", "Lantinghei SC", "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans;
|
||||
/*font-family: "PingFang SC", "Lantinghei SC", "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans;*/
|
||||
-webkit-font-smoothing: initial;
|
||||
font-weight: 100;
|
||||
color: var(--text-color);
|
||||
line-height: 1.35;
|
||||
font-variant-numeric: lining-nums;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
em {
|
||||
font-family: Georgia-Italic, STSongti-SC-Light, serif;
|
||||
}
|
||||
|
||||
strong em,
|
||||
em strong {
|
||||
font-family: Georgia-BoldItalic, STSongti-SC-Regular, serif;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* 去掉各Table cell 的边距并让其边重合 */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
/* 去除默认边框 */
|
||||
fieldset, img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* 块/段落引用 */
|
||||
blockquote {
|
||||
position: relative;
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
border-left: 1px solid #1abc9c;
|
||||
padding-left: 1em;
|
||||
margin: 1em 3em 1em 2em;
|
||||
}
|
||||
|
||||
@media only screen and ( max-width: 640px ) {
|
||||
blockquote {
|
||||
margin: 1em 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Firefox 以外,元素没有下划线,需添加 */
|
||||
acronym, abbr {
|
||||
border-bottom: 1px dotted;
|
||||
font-variant: normal;
|
||||
}
|
||||
|
||||
/* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */
|
||||
abbr {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
address, caption, cite, code, dfn, th, var {
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* 去掉列表前的标识, li 会继承,大部分网站通常用列表来很多内容,所以应该当去 */
|
||||
ul, ol {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* 对齐是排版最重要的因素, 别让什么都居中 */
|
||||
caption, th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
}
|
||||
|
||||
/* 统一上标和下标 */
|
||||
sub, sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:root sub, :root sup {
|
||||
vertical-align: baseline; /* for ie9 and other modern browsers */
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* 让链接在 hover 状态下显示下划线 */
|
||||
a {
|
||||
color: #1abc9c;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#write a {
|
||||
border-bottom: 1px solid #1abc9c;
|
||||
}
|
||||
|
||||
#write a:hover {
|
||||
border-bottom-color: #555;
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* 默认不显示下划线,保持页面简洁 */
|
||||
ins, a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* 标记,类似于手写的荧光笔的作用 */
|
||||
mark {
|
||||
background: #fffdd1;
|
||||
border-bottom: 1px solid #ffedce;
|
||||
padding: 2px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
/* 代码片断 */
|
||||
pre, code, pre tt {
|
||||
font-family: Courier, 'Courier New', monospace;
|
||||
}
|
||||
|
||||
#write .md-fences {
|
||||
border: 1px solid #ddd;
|
||||
padding: 1em 0.5em;
|
||||
display: block;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/* 一致化 horizontal rule */
|
||||
hr {
|
||||
border: none;
|
||||
border-bottom: 1px solid #cfcfcf;
|
||||
margin-bottom: 0.8em;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
#write strong {
|
||||
font-weight: bolder;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.code-tooltip.md-hover-tip strong {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 保证块/段落之间的空白隔行 */
|
||||
#write p, #write .md-fences, #write ul, #write ol, #write dl, #write form, #write hr, #write figure,
|
||||
#write-p, #write-pre, #write-ul, #write-ol, #write-dl, #write-form, #write-hr, #write-table, blockquote {
|
||||
margin-bottom: 1.2em
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: PingFang SC, Verdana, Helvetica Neue, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif;
|
||||
}
|
||||
|
||||
/* 标题应该更贴紧内容,并与其他块区分,margin 值要相应做优化 */
|
||||
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6,
|
||||
#write-h1, #write-h2, #write-h3, #write-h4, #write-h5, #write-h6 {
|
||||
margin-top: 1.2em;
|
||||
margin-bottom: 0.6em;
|
||||
line-height: 1.35;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#write h1, #write-h1 {
|
||||
font-size: 2.4em;
|
||||
padding-bottom: 1em;
|
||||
border-bottom: 3px double #eee;
|
||||
}
|
||||
|
||||
#write h2, #write-h2 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
#write h3, #write-h3 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
#write h4, #write-h4 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
#write h5, #write h6, #write-h5, #write-h6 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* 在文章中,应该还原 ul 和 ol 的样式 */
|
||||
#write ul, #write-ul {
|
||||
margin-left: 1.3em;
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
#write ol, #write-ol {
|
||||
list-style: decimal;
|
||||
margin-left: 1.9em;
|
||||
}
|
||||
|
||||
#write li ul, #write li ol, #write-ul ul, #write-ul ol, #write-ol ul, #write-ol ol {
|
||||
margin-bottom: 0.8em;
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
#write li ul, #write-ul ul, #write-ol ul {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
|
||||
#write table th, #write table td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 0.5em 1em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#write table .md-table-edit th {
|
||||
border: none;
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#write table th, #write-table th {
|
||||
background: #fbfbfb;
|
||||
}
|
||||
|
||||
#write table thead th, #write-table thead th {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
#write table caption {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#write em {
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
li>p {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/* Responsive images */
|
||||
#write img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
a.md-toc-inner {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.md-toc-h1:first-of-type:last-of-type{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.md-toc {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.md-toc-h1 .md-toc-inner {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.md-table-edit th {
|
||||
padding: 0 !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.mac-seamless-mode #write {
|
||||
min-height: calc(100vh - 6em - 20px);
|
||||
}
|
||||
|
||||
.typora-quick-open-item.active {
|
||||
color: var(--active-file-text-color);
|
||||
}
|
||||
|
||||
*.in-text-selection, ::selection {
|
||||
background: var(--active-file-bg-color);
|
||||
text-shadow: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #2d2d2d;
|
||||
border-color: #020202;
|
||||
}
|
||||
|
||||
.btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {
|
||||
background-color: #4e4c4e;
|
||||
border: #4e4c4e;
|
||||
}
|
||||
|
||||
#preference-dialog .modal-content{
|
||||
background: #6e757a;
|
||||
--bg-color: #6e757a;
|
||||
--text-color: #f1f1f1;
|
||||
color: #f1f1f1;
|
||||
}
|
||||
|
||||
#typora-source,
|
||||
.typora-sourceview-on {
|
||||
--bg-color: #eee;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .cm-header, .cm-s-typora-default .cm-property {
|
||||
color: #116098;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .cm-link {
|
||||
color: #11987d;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .cm-em {
|
||||
font-family: Georgia-Italic, STSongti-SC-Light, serif;
|
||||
color: #6f6400;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .cm-em{
|
||||
color: rgb(0, 22, 45);
|
||||
}
|
||||
|
||||
.CodeMirror.cm-s-typora-default div.CodeMirror-cursor{
|
||||
border-left: 3px solid #6e757a;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .CodeMirror-selectedtext,
|
||||
.typora-sourceview-on .CodeMirror-focused .CodeMirror-selected {
|
||||
background: #6e757a;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.file-node-icon.fa.fa-folder:before {
|
||||
color: rgba(32, 43, 51, 0.49);
|
||||
}
|
||||
|
||||
#preference-dialog .megamenu-menu-panel h1 {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
display: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*.file-node-icon.fa.fa-folder:before {
|
||||
content: "\f114";
|
||||
}
|
||||
|
||||
#typora-sidebar {
|
||||
|
||||
}*/
|
||||
|
||||
/*.cm-s-typora-default .cm-header, .cm-s-typora-default .cm-property {
|
||||
color: #fffff1;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .cm-link {
|
||||
color: #86f9e2;
|
||||
color: #e5f7eb;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .cm-comment, .cm-s-typora-default .cm-code {
|
||||
color: rgb(255, 199, 199);
|
||||
}
|
||||
|
||||
.cm-s-typora-default .cm-atom, .cm-s-typora-default .cm-number {
|
||||
color: #dec4c7;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .cm-em {
|
||||
font-family: Georgia-Italic, STSongti-SC-Light, serif;
|
||||
color: #f3ff7e;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .CodeMirror-cursor {
|
||||
border-left: 3px solid #ffffd6;
|
||||
}
|
||||
|
||||
.typora-sourceview-on #toggle-sourceview-btn {
|
||||
background: #505050;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-variable,
|
||||
.typora-sourceview-on .cm-s-inner .cm-operator,
|
||||
.typora-sourceview-on .cm-s-inner .cm-property {
|
||||
color: #b8bfc6;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-keyword {
|
||||
color: #C88FD0;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-tag {
|
||||
color: #7DF46A;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-attribute {
|
||||
color: #7575E4;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-string {
|
||||
color: #D26B6B;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-comment,
|
||||
.typora-sourceview-on .cm-s-inner.cm-comment {
|
||||
color: #DA924A;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-header,
|
||||
.typora-sourceview-on .cm-s-inner .cm-def,
|
||||
.typora-sourceview-on .cm-s-inner.cm-header,
|
||||
.typora-sourceview-on .cm-s-inner.cm-def {
|
||||
color: #8d8df0;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-quote,
|
||||
.typora-sourceview-on .cm-s-inner.cm-quote {
|
||||
color: #57ac57;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-hr {
|
||||
color: #d8d5d5;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-link {
|
||||
color: #d3d3ef;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-negative {
|
||||
color: #d95050;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-positive {
|
||||
color: #50e650;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-string-2 {
|
||||
color: #f50;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-meta,
|
||||
.typora-sourceview-on .cm-s-inner .cm-qualifier {
|
||||
color: #b7b3b3;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-builtin {
|
||||
color: #f3b3f8;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-bracket {
|
||||
color: #997;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-atom,
|
||||
.typora-sourceview-on .cm-s-inner.cm-atom {
|
||||
color: #84B6CB;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-number {
|
||||
color: #64AB8F;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-variable {
|
||||
color: #b8bfc6;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-variable-2 {
|
||||
color: #9FBAD5;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .cm-s-inner .cm-variable-3 {
|
||||
color: #1cc685;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .CodeMirror div.CodeMirror-cursor {
|
||||
border-left: 1px solid #b8bfc6;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.cm-s-typora-default .CodeMirror-selectedtext,
|
||||
.typora-sourceview-on .CodeMirror-focused .CodeMirror-selected {
|
||||
background: #212324;
|
||||
}
|
||||
|
||||
.typora-sourceview-on .CodeMirror-linenumber {
|
||||
color: rgb(255, 255, 255);
|
||||
}*/
|
2317
source/plugins/remixicon.css
Normal file
2317
source/plugins/remixicon.css
Normal file
File diff suppressed because it is too large
Load Diff
2317
source/plugins/remixicon/remixicon.css
Normal file
2317
source/plugins/remixicon/remixicon.css
Normal file
File diff suppressed because it is too large
Load Diff
BIN
source/plugins/remixicon/remixicon.eot
Normal file
BIN
source/plugins/remixicon/remixicon.eot
Normal file
Binary file not shown.
2319
source/plugins/remixicon/remixicon.less
Normal file
2319
source/plugins/remixicon/remixicon.less
Normal file
File diff suppressed because it is too large
Load Diff
6835
source/plugins/remixicon/remixicon.svg
Normal file
6835
source/plugins/remixicon/remixicon.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 1.1 MiB |
11356
source/plugins/remixicon/remixicon.symbol.svg
Normal file
11356
source/plugins/remixicon/remixicon.symbol.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 877 KiB |
BIN
source/plugins/remixicon/remixicon.ttf
Normal file
BIN
source/plugins/remixicon/remixicon.ttf
Normal file
Binary file not shown.
BIN
source/plugins/remixicon/remixicon.woff
Normal file
BIN
source/plugins/remixicon/remixicon.woff
Normal file
Binary file not shown.
BIN
source/plugins/remixicon/remixicon.woff2
Normal file
BIN
source/plugins/remixicon/remixicon.woff2
Normal file
Binary file not shown.
346
source/plugins/typo.css
Normal file
346
source/plugins/typo.css
Normal file
@ -0,0 +1,346 @@
|
||||
@charset "utf-8";
|
||||
|
||||
/* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
|
||||
html {
|
||||
color: #333;
|
||||
background: #fff;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
|
||||
/* 如果你的项目仅支持 IE9+ | Chrome | Firefox 等,推荐在 <html> 中添加 .borderbox 这个 class */
|
||||
html.borderbox *, html.borderbox *:before, html.borderbox *:after {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 内外边距通常让各个浏览器样式的表现位置不同 */
|
||||
body, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, menu, nav, section {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
|
||||
article, aside, details, figcaption, figure, footer, header, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* HTML5 媒体文件跟 img 保持一致 */
|
||||
audio, canvas, video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* 要注意表单元素并不继承父级 font 的问题 */
|
||||
body, button, input, select, textarea {
|
||||
font: 300 1em/1.8 PingFang SC, Lantinghei SC, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* 去掉各Table cell 的边距并让其边重合 */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
/* 去除默认边框 */
|
||||
fieldset, img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* 块/段落引用 */
|
||||
blockquote {
|
||||
position: relative;
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
border-left: 1px solid #1abc9c;
|
||||
padding-left: 1em;
|
||||
margin: 1em 3em 1em 2em;
|
||||
}
|
||||
|
||||
@media only screen and ( max-width: 640px ) {
|
||||
blockquote {
|
||||
margin: 1em 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Firefox 以外,元素没有下划线,需添加 */
|
||||
acronym, abbr {
|
||||
border-bottom: 1px dotted;
|
||||
font-variant: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */
|
||||
abbr {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* 一致的 del 样式 */
|
||||
del {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
address, caption, cite, code, dfn, em, th, var {
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* 去掉列表前的标识, li 会继承,大部分网站通常用列表来很多内容,所以应该当去 */
|
||||
ul, ol {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* 对齐是排版最重要的因素, 别让什么都居中 */
|
||||
caption, th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
}
|
||||
|
||||
/* 统一上标和下标 */
|
||||
sub, sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:root sub, :root sup {
|
||||
vertical-align: baseline; /* for ie9 and other modern browsers */
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* 让链接在 hover 状态下显示下划线 */
|
||||
a {
|
||||
color: #1abc9c;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.typo a {
|
||||
border-bottom: 1px solid #1abc9c;
|
||||
}
|
||||
|
||||
.typo a:hover {
|
||||
border-bottom-color: #555;
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* 默认不显示下划线,保持页面简洁 */
|
||||
ins, a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* 专名号:虽然 u 已经重回 html5 Draft,但在所有浏览器中都是可以使用的,
|
||||
* 要做到更好,向后兼容的话,添加 class="typo-u" 来显示专名号
|
||||
* 关于 <u> 标签:http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-u-element
|
||||
* 被放弃的是 4,之前一直搞错 http://www.w3.org/TR/html401/appendix/changes.html#idx-deprecated
|
||||
* 一篇关于 <u> 标签的很好文章:http://html5doctor.com/u-element/
|
||||
*/
|
||||
u, .typo-u {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 标记,类似于手写的荧光笔的作用 */
|
||||
mark {
|
||||
background: #fffdd1;
|
||||
border-bottom: 1px solid #ffedce;
|
||||
padding: 2px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
/* 代码片断 */
|
||||
pre, code, pre tt {
|
||||
font-family: Courier, 'Courier New', monospace;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #ddd;
|
||||
padding: 1em 1.5em;
|
||||
display: block;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/* 一致化 horizontal rule */
|
||||
hr {
|
||||
border: none;
|
||||
border-bottom: 1px solid #cfcfcf;
|
||||
margin-bottom: 0.8em;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
/* 底部印刷体、版本等标记 */
|
||||
small, .typo-small,
|
||||
/* 图片说明 */
|
||||
figcaption {
|
||||
font-size: 0.9em;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
strong, b {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* 可拖动文件添加拖动手势 */
|
||||
[draggable] {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.clearfix:before, .clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
/* 强制文本换行 */
|
||||
.textwrap, .textwrap td, .textwrap th {
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.textwrap-table {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
/* 提供 serif 版本的字体设置: iOS 下中文自动 fallback 到 sans-serif */
|
||||
.serif {
|
||||
font-family: Palatino, Optima, Georgia, serif;
|
||||
}
|
||||
|
||||
/* 保证块/段落之间的空白隔行 */
|
||||
.typo p, .typo pre, .typo ul, .typo ol, .typo dl, .typo form, .typo hr, .typo table,
|
||||
.typo-p, .typo-pre, .typo-ul, .typo-ol, .typo-dl, .typo-form, .typo-hr, .typo-table, blockquote {
|
||||
margin-bottom: 1.2em
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: PingFang SC, Verdana, Helvetica Neue, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif;
|
||||
font-weight: 400;
|
||||
color: #000;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
/* 标题应该更贴紧内容,并与其他块区分,margin 值要相应做优化 */
|
||||
.typo h1, .typo h2, .typo h3, .typo h4, .typo h5, .typo h6,
|
||||
.typo-h1, .typo-h2, .typo-h3, .typo-h4, .typo-h5, .typo-h6 {
|
||||
margin-top: 1.2em;
|
||||
margin-bottom: 0.6em;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.typo h1, .typo-h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.typo h2, .typo-h2 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
.typo h3, .typo-h3 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
.typo h4, .typo-h4 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.typo h5, .typo h6, .typo-h5, .typo-h6 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* 在文章中,应该还原 ul 和 ol 的样式 */
|
||||
.typo ul, .typo-ul {
|
||||
margin-left: 1.3em;
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
.typo ol, .typo-ol {
|
||||
list-style: decimal;
|
||||
margin-left: 1.9em;
|
||||
}
|
||||
|
||||
.typo li ul, .typo li ol, .typo-ul ul, .typo-ul ol, .typo-ol ul, .typo-ol ol {
|
||||
margin-bottom: 0.8em;
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.typo li ul, .typo-ul ul, .typo-ol ul {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
/* 同 ul/ol,在文章中应用 table 基本格式 */
|
||||
.typo table th, .typo table td, .typo-table th, .typo-table td, .typo table caption {
|
||||
border: 1px solid #ddd;
|
||||
padding: 0.5em 1em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.typo table th, .typo-table th {
|
||||
background: #fbfbfb;
|
||||
}
|
||||
|
||||
.typo table thead th, .typo-table thead th {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.typo table caption {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* 去除 webkit 中 input 和 textarea 的默认样式 */
|
||||
.typo-input, .typo-textarea {
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.typo-em, .typo em, legend, caption {
|
||||
color: #000;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/* 着重号,只能在少量(少于100个字符)且全是全角字符的情况下使用 */
|
||||
.typo-em {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.typo-em:after {
|
||||
position: absolute;
|
||||
top: 0.65em;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
content: "・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・";
|
||||
}
|
||||
|
||||
/* Responsive images */
|
||||
.typo img {
|
||||
max-width: 100%;
|
||||
}
|
Reference in New Issue
Block a user