- <%- page.h1 || page.title %>
+
+ <%- layoutTitle() %>
<%- page.content %>
+ <%- partial('_partial/main/article/references') %>
<%- partial('_partial/main/article/read_next') %>
<%- partial('_partial/plugins/comments/layout') %>
<% } %>
diff --git a/scripts/helpers/scrollreveal.js b/scripts/helpers/scrollreveal.js
new file mode 100644
index 0000000..75afc39
--- /dev/null
+++ b/scripts/helpers/scrollreveal.js
@@ -0,0 +1,9 @@
+'use strict';
+
+hexo.extend.helper.register('scrollreveal', function(args){
+ const cfg = hexo.theme.config;
+ if (cfg.plugins.scrollreveal && cfg.plugins.scrollreveal.enable) {
+ return ' reveal';
+ }
+ return '';
+});
diff --git a/scripts/tags/image.js b/scripts/tags/image.js
index 4f21d1b..f0a2bc6 100644
--- a/scripts/tags/image.js
+++ b/scripts/tags/image.js
@@ -1,7 +1,7 @@
/**
* image.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
- *
+ *
* {% image src [alt] [width:400px] [bg:#eee] [download:true/false/url] %}
*/
@@ -18,9 +18,6 @@ hexo.extend.tag.register('image', function(args) {
if (args.height) {
style += 'height:' + args.height + ';';
}
- if (args.padding) {
- style += 'padding:' + args.padding + ';';
- }
function img(src, alt, style) {
let img = '';
img += '';
// bg
el += ' 0) {
- el += ' style="background:' + args.bg + '"';
+ if (args.bg || args.padding) {
+ el += ' style="';
+ if (args.bg && args.bg.length > 0) {
+ el += 'background:' + args.bg + ';';
+ }
+ if (args.padding) {
+ el += 'padding:' + args.padding + ';';
+ }
+ el += '"';
}
el += '>';
el += img(args.src, args.alt, style);
diff --git a/scripts/tags/inline-labels.js b/scripts/tags/inline-labels.js
new file mode 100644
index 0000000..d3fbf9d
--- /dev/null
+++ b/scripts/tags/inline-labels.js
@@ -0,0 +1,21 @@
+'use strict';
+
+
+hexo.extend.tag.register('u', function(args) {
+ return `
${args.join(' ')}`;
+});
+hexo.extend.tag.register('emp', function(args) {
+ return `
${args.join(' ')}`;
+});
+hexo.extend.tag.register('wavy', function(args) {
+ return `
${args.join(' ')}`;
+});
+hexo.extend.tag.register('del', function(args) {
+ return `
${args.join(' ')}`;
+});
+hexo.extend.tag.register('kbd', function(args) {
+ return `
${args.join(' ')}`;
+});
+hexo.extend.tag.register('psw', function(args) {
+ return `
${args.join(' ')}`;
+});
diff --git a/source/css/_layout/base.styl b/source/css/_layout/base.styl
index a586290..caf0b20 100644
--- a/source/css/_layout/base.styl
+++ b/source/css/_layout/base.styl
@@ -117,15 +117,15 @@ table:not([class])
max-width: 100%
vertical-align: text-top
th
- background: var(--hover-block)
+ background: var(--block)
td,th
- padding: 8px 16px
- border: 2px solid var(--hover-block)
+ padding: 0.5em 1em
+ border: 1px solid var(--hover-block)
line-height: 1.5
font-size: 90%
tr
word-break: keep-all
- background: var(--block)
+ white-space:nowrap
trans()
&:hover
- background: var(--hover-block)
+ background: var(--block)
diff --git a/source/css/_layout/pages/error.styl b/source/css/_layout/pages/error.styl
index fd48438..237b8f9 100644
--- a/source/css/_layout/pages/error.styl
+++ b/source/css/_layout/pages/error.styl
@@ -15,6 +15,10 @@ article.md.error-page
a#back
margin: 2rem 0
display: inline-block
+ background: #FDB62F
+ color: black
+ border-radius: 4px
+ border: 2px solid black
@media screen and (max-width: $device-tablet)
article.md.error-page
diff --git a/source/css/_layout/tag-plugins/checkbox.styl b/source/css/_layout/tag-plugins/checkbox.styl
index ad1ad53..c95ac1f 100644
--- a/source/css/_layout/tag-plugins/checkbox.styl
+++ b/source/css/_layout/tag-plugins/checkbox.styl
@@ -1,8 +1,9 @@
.md .checkbox
display: flex
align-items: center
- margin: 0
+ margin: 0.25em 0
font-size: $fs15
+ line-height: 1.2
input
-webkit-appearance: none
-moz-appearance: none