玩命加载中 . . .

为Matery主题加上Tags标签外挂


我想要标签外挂的功能很久了, 无奈matery主题没有这个功能,于是只好从其它主题移植了。

先在theme/matery/文件夹下建立一个scripts的文件夹,里面存放标签插件的JS代码。

Success Warn Danger标示

Success!
Warn!!
Danger!!!

写法:

{% g %}
Success!
{% endg %}
{% y %}
Warn!!
{% endy %}
{% r %}
Danger!!!
{% endr %}

JS代码block.js:

hexo.extend.tag.register('r', function(args, content){
  var className =  args.join(' ');
  return '<div class="uk-alert uk-alert-danger"><i class="fas fa-exclamation-triangle"></i> ' + content + '</div>';
}, {ends: true});

hexo.extend.tag.register('g', function(args, content){
  var className =  args.join(' ');
  return '<div class="uk-alert uk-alert-success"><i class="fa fa-check-circle"></i> ' + content + '</div>';
}, {ends: true});

hexo.extend.tag.register('y', function(args, content){
  var className =  args.join(' ');
  return '<div class="uk-alert uk-alert-warning"><i class="fa fa-exclamation-circle"></i> ' + content + '</div>';
}, {ends: true});

/*

Usage
{% r %}
红色
{% endr %}
{% g %}
绿色
{% endg %}
{%y%}
黃色
{% endy %}

*/

CSS代码(写入 my.css 即可):

.uk-alert {
	margin-bottom: 15px;
	padding: 10px;
	background: #ebf7fd;
	color: #2d7091;
	border: 1px solid rgba(45, 112, 145, 0.3);
	border-radius: 4px;
	text-shadow: 0 1px 0 #ffffff;
}
.uk-alert-success {
	background: #e8ece2;
	color: #659f13;
	border-left: 6px solid rgba(120, 199, 9);
	font-weight: 600;
}
.uk-alert-warning {
	background: #ffffff;
	color: rgb(248, 245, 6);
	border-left: 6px solid rgb(248, 245, 6, 0.5);
	font-weight: 600;
}
.uk-alert-danger {
	background: #f8f8f6;
	color: #eb360d;
	border-left: 6px solid #eb360d;
	font-weight: 600;
}

以下tags功能均移植于 Volantis

span

各种颜色的标签,包括:红色黄色绿色青色蓝色灰色

超大号文字:

A Theme with Material Design

写法:

各种颜色的标签,包括:{% span red::红色 %}、{% span yellow::黄色 %}、{% span green::绿色 %}、{% span cyan::青色 %}、{% span blue::蓝色 %}、{% span gray::灰色 %}。

超大号文字:

{% span center logo large::Matery %} {% span center small::A Theme with Material Design %}

JS:
下载

CSS:

[data-theme="dark"] span.p {
  filter: brightness(0.7);
}
p.p.subtitle {
  font-weight: bold;
  color: #2196f3;
  padding-top: 1rem;
}
p.p.subtitle:first-child {
  padding-top: 0.5rem;
}
span.p.code,
p.p.code {
  font-family: Menlo, Monaco, monospace, courier, sans-serif;
}

span.p.left,
p.p.left {
  display: block;
  text-align: left;
}

span.p.center,
p.p.center {
  display: block;
  text-align: center;
}

span.p.right,
p.p.right {
  display: block;
  text-align: right;
}

span.p.small,
p.p.small {
  font-size: 0.575rem;
}

span.p.large,
p.p.large {
  font-size: 2rem;
  line-height: 1.4;
}

span.p.huge,
p.p.huge {
  font-size: 4rem;
  line-height: 1.4;
}

span.p.ultra,
p.p.ultra {
  font-size: 6rem;
  line-height: 1.4;
}

span.p.small,
p.p.small,
span.p.large,
p.p.large,
span.p.huge,
p.p.huge,
span.p.ultra,
p.p.ultra {
  font-family: UbuntuMono, "PingFang SC", "Microsoft YaHei", Helvetica, Arial,
	Menlo, Monaco, monospace, sans-serif;
  margin: 0;
  padding: 0;
}

span.p.bold,
p.p.bold {
  font-weight: bold;
}

span.p.h1,
p.p.h1 {
  font-size: 1.625rem;
  color: #555;
  padding-top: 1rem;
}

span.p.h2,
p.p.h2 {
  font-size: 1.375rem;
  color: var(--font-color);
  padding-top: 1rem;
  border-bottom: 1px solid var(--hr-border);
}

span.p.h3,
p.p.h3 {
  font-size: 1.25rem;
  color: #2196f3;
  padding-top: 1rem;
}

span.p.h4,
p.p.h4 {
  font-size: 1.125rem;
  color: #555;
  padding-top: 1rem;
}

span.p.red,
p.p.red {
  color: #fe5f58;
  background-color: transparent !important;
}

span.p.yellow,
p.p.yellow {
  color: #ffbd2b;
  background-color: transparent !important;
}

span.p.green,
p.p.green {
  color: #3dc550;
  background-color: transparent !important;
}

span.p.cyan,
p.p.cyan {
  color: #1bcdfc;
  background-color: transparent !important;
}

span.p.blue,
p.p.blue {
  color: #2196f3;
  background-color: transparent !important;
}

span.p.gray,
p.p.gray {
  color: #666;
  background-color: transparent !important;
}

checkbox

复选框

纯文本测试

支持简单的 markdown 语法

支持自定义颜色

绿色 + 默认选中

黄色 + 默认选中

青色 + 默认选中

蓝色 + 默认选中

增加

减少

写法:

{% checkbox 纯文本测试 %}
{% checkbox checked, 支持简单的 [markdown](https://guides.github.com/features/mastering-markdown/) 语法 %}
{% checkbox red, 支持自定义颜色 %}
{% checkbox green checked, 绿色 + 默认选中 %}
{% checkbox yellow checked, 黄色 + 默认选中 %}
{% checkbox cyan checked, 青色 + 默认选中 %}
{% checkbox blue checked, 蓝色 + 默认选中 %}
{% checkbox plus green checked, 增加 %}
{% checkbox minus yellow checked, 减少 %}
{% checkbox times red checked, 叉 %}

单选框

纯文本测试

支持简单的 markdown 语法

支持自定义颜色

绿色

黄色

青色

蓝色

写法:

{% radio 纯文本测试 %}
{% radio checked, 支持简单的 [markdown](https://guides.github.com/features/mastering-markdown/) 语法 %}
{% radio red, 支持自定义颜色 %}
{% radio green, 绿色 %}
{% radio yellow, 黄色 %}
{% radio cyan, 青色 %}
{% radio blue, 蓝色 %}

JS:

下载 CSS:
[data-theme="dark"] .checkbox {
  filter: brightness(0.7);
}
.checkbox {
  display: flex;
  align-items: center;
  position: inherit !important;
  margin-top: 1em;
  margin-left: 1.3rem !important;
  margin-bottom: 1em;
  background-color: transparent !important;
}

.checkbox input {
  transform:translate(0,-1px);
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  -o-appearance: none;
  appearance: none;
  position: relative;
  height: 16px;
  width: 16px;
  transition: all 0.15s ease-out 0s;
  -moz-transition:all .15s ease-out 0s;
  -webkit-transition:all .15s ease-out 0s;
  -o-transition:all .15s ease-out 0s;
  cursor: pointer;
  display: inline-block !important;
  outline: none;
  border-radius: 2px;
  flex-shrink: 0;
  margin-right: 8px;
  opacity: unset !important;
}

.checkbox input[type="checkbox"]:before,
.checkbox input[type="checkbox"]:after {
  position: absolute;
  content: "";
  background: #fff !important;
}

.checkbox input[type="checkbox"]:before {
  left: 1px;
  top: 5px;
  width: 0px;
  height: 2px;
  transition: all 0.2s ease-in;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
}

.checkbox input[type="checkbox"]:after {
  right: 7px;
  bottom: 3px;
  width: 2px;
  height: 0;
  transition: all 0.2s ease-out;
  transform: rotate(40deg);
  -webkit-transform: rotate(40deg);
  -moz-transform: rotate(40deg);
  -ms-transform: rotate(40deg);
  -o-transform: rotate(40deg);
  transition-delay: 0.25s;
}

.checkbox input[type="checkbox"]:checked:before {
  left: 0px;
  top: 7px;
  width: 6px;
  height: 2px;
  opacity: unset !important;
}

.checkbox input[type="checkbox"]:checked:after {
  right: 3px;
  bottom: 1px;
  width: 2px;
  height: 10px;
  opacity: unset !important;
}

.checkbox.minus input[type="checkbox"]:before {
  transform: rotate(0);
  left: 1px;
  top: 5px;
  width: 0px;
  height: 2px;
}

.checkbox.minus input[type="checkbox"]:after {
  transform: rotate(0);
  left: 1px;
  top: 5px;
  width: 0px;
  height: 2px;
}

.checkbox.minus input[type="checkbox"]:checked:before {
  left: 1px;
  top: 5px;
  width: 10px;
  height: 2px;
}

.checkbox.minus input[type="checkbox"]:checked:after {
  left: 1px;
  top: 5px;
  width: 10px;
  height: 2px;
}

.checkbox.plus input[type="checkbox"]:before {
  transform: rotate(0);
  left: 1px;
  top: 5px;
  width: 0px;
  height: 2px;
}

.checkbox.plus input[type="checkbox"]:after {
  transform: rotate(0);
  left: 5px;
  top: 1px;
  width: 2px;
  height: 0px;
}

.checkbox.plus input[type="checkbox"]:checked:before {
  left: 1px;
  top: 5px;
  width: 10px;
  height: 2px;
}

.checkbox.plus input[type="checkbox"]:checked:after {
  left: 5px;
  top: 1px;
  width: 2px;
  height: 10px;
}

.checkbox.times input[type="checkbox"]:before {
  transform: rotate(45deg);
  left: 3px;
  top: 1px;
  width: 0px;
  height: 2px;
}

.checkbox.times input[type="checkbox"]:after {
  transform: rotate(135deg);
  right: 3px;
  top: 1px;
  width: 0px;
  height: 2px;
}

.checkbox.times input[type="checkbox"]:checked:before {
  left: 1px;
  top: 5px;
  width: 10px;
  height: 2px;
}

.checkbox.times input[type="checkbox"]:checked:after {
  right: 1px;
  top: 5px;
  width: 10px;
  height: 2px;
}

.checkbox input[type="radio"] {
  border-radius: 50%;
  position: abs !important;
  opacity: 1 !important;
  margin-left: -1.3rem;
  margin-right: .4rem;
  margin-top: -1px;
}

.checkbox input[type="radio"]:before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 2px;
  transform: scale(0);
  transition: all 0.25s ease-out;
}

.checkbox input[type="radio"]:checked:before {
  transform: scale(1);
}

.checkbox input {
  border: 2px solid #2196f3;
}

.checkbox input[type="checkbox"]:checked {
  background: #2196f3;
}

.checkbox input[type="radio"]:checked:before {
  background: #2196f3;
}

.checkbox.red input {
  border-color: #fe5f58;
}

.checkbox.red input[type="checkbox"]:checked {
  background: #fe5f58;
}

.checkbox.red input[type="radio"]:checked:before {
  background: #fe5f58;
}

.checkbox.green input {
  border-color: #3dc550;
}

.checkbox.green input[type="checkbox"]:checked {
  background: #3dc550;
}

.checkbox.green input[type="radio"]:checked:before {
  background: #3dc550;
}

.checkbox.yellow input {
  border-color: #ffbd2b;
}

.checkbox.yellow input[type="checkbox"]:checked {
  background: #ffbd2b;
}

.checkbox.yellow input[type="radio"]:checked:before {
  background: #ffbd2b;
}

.checkbox.cyan input {
  border-color: #1bcdfc;
}

.checkbox.cyan input[type="checkbox"]:checked {
  background: #1bcdfc;
}

.checkbox.cyan input[type="radio"]:checked:before {
  background: #1bcdfc;
}

.checkbox.blue input {
  border-color: #2196f3;
}

.checkbox.blue input[type="checkbox"]:checked {
  background: #2196f3;
}

.checkbox.blue input[type="radio"]:checked:before {
  background: #2196f3;
}

.checkbox p {
  display: inline-block;
  margin-top: 2px !important;
  margin-bottom: 0 !important;
}

button


不设置任何参数的 按钮 适合融入段落中。 regular 按钮适合独立于段落之外: 示例博客 large 按钮更具有强调作用,建议搭配 center 使用: 开始使用Matery

写法:

不设置任何参数的 {% btn 按钮, / %} 适合融入段落中。

regular 按钮适合独立于段落之外:

{% btn regular, 示例博客, /, fas fa-play-circle %}

large 按钮更具有强调作用,建议搭配 center 使用:

{% btn center large, 开始使用Matery, https://github.com/blinkfox/hexo-theme-matery, fas fa-download %}

{% btns rounded grid5 %}
{% cell 下载源码, https://github.com/blinkfox/hexo-theme-matery, fas fa-download %}
{% cell 查看文档, https://github.com/blinkfox/hexo-theme-matery, fas fa-book-open %}
{% endbtns %}

{% btns circle center grid5 %}
<a href='https://testingcf.jsdelivr.net/gh/volantis-x/hexo-theme-volantis@dev/scripts/tags/btn.js'>
  <i class='fa fa-download'></i>
  <b>JS</b>
  {% p red, 下载btn.js %}
  <i class="fab fa-js-square"></i>
</a>
<a href='https://testingcf.jsdelivr.net/gh/volantis-x/hexo-theme-volantis@dev/scripts/tags/btns.js'>
  <i class='fa fa-download'></i>
  <b>这个也要下载哦</b>
  {% p green, 下载btns.js %}
  <i class="fab fa-js-square"></i>
</a>
{% endbtns %}
JS:已经贴在了示例上

CSS

span.btn {
  display: inline;
  background-color: transparent !important;
  box-shadow: 0 0 0 px
}

span.btn > a {
  display: inline-block;
  background: #26a69a;
  color: #fff !important;
  padding: 4px 4px 2px 4px;
  margin: 2px;
  line-height: 1.1;
  border-radius: 5px;
  transition: all 0.28s ease;
  -moz-transition: all 0.28s ease;
  -webkit-transition: all 0.28s ease;
  -o-transition: all 0.28s ease;
}

span.btn > a i {
  margin-right: 2px;
}

span.btn > a:hover {
  color: #fff !important;
  background: #2bbbad;
}

span.btn > a:not([href]) {
  opacity: 0.5;
}

span.btn > a:not([href]):hover {
  cursor: not-allowed;
}

span.btn.regular > a {
  padding: 8px 12px 6px 12px;
}

span.btn.regular > a i {
  margin-right: 4px;
}

span.btn.large > a {
  padding: 5px 15px 5px 5px !important;
  box-shadow: 0 3px 3px 0 rgba(0,0,0,0.14),0 1px 7px 0 rgba(0,0,0,0.12),0 3px 1px -1px rgba(0,0,0,0.2);
}

span.btn.large > a i {
  margin-right: 8px;
  padding: 5px 15px 5px 5px !important;
}

span.btn.center {
  display: block;
  text-align: center;
  padding: 5px 15px 5px 5px !important;
  background-color: transparent !important;
  box-shadow: 0 0 0px
}

[data-theme="dark"] div.btns {
  filter: brightness(0.7);
}

[data-theme="dark"] div.btns a {
  background: 0 0;
}

div.btns {
  margin: 0 -8px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  overflow: visible;
  line-height: 1.8;
}

div.btns,
div.btns p,
div.btns a {
  font-size: 0.8125rem;
  color: #555;
}

div.btns b {
  font-size: 0.875rem;
}

div.btns.wide > a {
  padding-left: 32px;
  padding-right: 32px;
}

div.btns.fill > a {
  flex-grow: 1;
  width: auto;
}

div.btns.around {
  justify-content: space-around;
}

div.btns.center {
  justify-content: center;
}

div.btns.grid2 > a {
  width: calc(100% / 2 - 16px);
}

@media screen and (max-width: 1024px) {
  div.btns.grid2 > a {
	width: calc(100% / 2 - 16px);
  }
}

@media screen and (max-width: 768px) {
  div.btns.grid2 > a {
	width: calc(100% / 2 - 16px);
  }
}

@media screen and (max-width: 500px) {
  div.btns.grid2 > a {
	width: calc(100% / 1 - 16px);
  }
}

div.btns.grid3 > a {
  width: calc(100% / 3 - 16px);
}

@media screen and (max-width: 1024px) {
  div.btns.grid3 > a {
	width: calc(100% / 3 - 16px);
  }
}

@media screen and (max-width: 768px) {
  div.btns.grid3 > a {
	width: calc(100% / 3 - 16px);
  }
}

@media screen and (max-width: 500px) {
  div.btns.grid3 > a {
	width: calc(100% / 1 - 16px);
  }
}

div.btns.grid4 > a {
  width: calc(100% / 4 - 16px);
}

@media screen and (max-width: 1024px) {
  div.btns.grid4 > a {
	width: calc(100% / 3 - 16px);
  }
}

@media screen and (max-width: 768px) {
  div.btns.grid4 > a {
	width: calc(100% / 3 - 16px);
  }
}

@media screen and (max-width: 500px) {
  div.btns.grid4 > a {
	width: calc(100% / 2 - 16px);
  }
}

div.btns.grid5 > a {
  width: calc(100% / 5 - 16px);
}

@media screen and (max-width: 1024px) {
  div.btns.grid5 > a {
	width: calc(100% / 4 - 16px);
  }
}

@media screen and (max-width: 768px) {
  div.btns.grid5 > a {
	width: calc(100% / 3 - 16px);
  }
}

@media screen and (max-width: 500px) {
  div.btns.grid5 > a {
	width: calc(100% / 2 - 16px);
  }
}

div.btns a {
  transition: all 0.28s ease;
  -moz-transition: all 0.28s ease;
  -webkit-transition: all 0.28s ease;
  -o-transition: all 0.28s ease;
  margin: 8px;
  margin-top: calc(1.25 * 16px + 32px);
  min-width: 120px;
  font-weight: bold;
  display: flex;
  justify-content: flex-start;
  align-content: center;
  align-items: center;
  flex-direction: column;
  padding: 8px;
  text-align: center;
  background: #f6f6f6;
  border-radius: 4px;
}

div.btns a > img:first-child,
div.btns a > i:first-child {
  transition: all 0.28s ease;
  -moz-transition: all 0.28s ease;
  -webkit-transition: all 0.28s ease;
  -o-transition: all 0.28s ease;
  height: 64px;
  width: 64px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
  margin: 16px 8px 4px 8px;
  margin-top: calc(-1.25 * 16px - 32px);
  border: 2px solid #fff;
  background: #fff;
  line-height: 60px;
  font-size: 28px;
}

div.btns a > img:first-child.auto,
div.btns a > i:first-child.auto {
  width: auto;
}

div.btns a > i:first-child {
  color: #fff;
  background: #26a69a;
}

div.btns a p,
div.btns a b {
  margin: 0.25em;
  font-weight: normal;
  line-height: 1.25;
  word-wrap: break-word;
}

div.btns a b {
  font-weight: bold;
  line-height: 1.3;
}

div.btns a img {
  margin: 0.4em auto;
}

div.btns a:not([href]) {
  cursor: default;
  color: inherit;
}

div.btns a[href]:hover {
  background: rgba(255, 87, 34, 0.15);
}

div.btns a[href]:hover,
div.btns a[href]:hover b {
  color: #2bbbad;
}

div.btns a[href]:hover > img:first-child,
div.btns a[href]:hover > i:first-child {
  transform: scale(1.1) translateY(-8px);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
}

div.btns a[href]:hover > i:first-child {
  background: #2bbbad;
}

div.btns.circle a > img:first-child,
div.btns.circle a > i:first-child {
  border-radius: 32px;
}

div.btns.rounded a > img:first-child,
div.btns.rounded a > i:first-child {
  border-radius: 16px;
}

folding

查看图片测试

查看默认打开的折叠框

这是一个默认打开的折叠框。

查看代码测试

此功能存在问题,fixing…… :dove:

查看列表测试
  • haha
  • hehe
查看嵌套测试
查看嵌套测试2
查看嵌套测试3

hahaha

写法:

{% folding 查看图片测试 %}

![](https://testingcf.jsdelivr.net/gh/volantis-x/cdn-wallpaper/abstract/41F215B9-261F-48B4-80B5-4E86E165259E.jpeg)

{% endfolding %}

{% folding cyan open::查看默认打开的折叠框 %}

这是一个默认打开的折叠框。

{% endfolding %}

{% folding green::查看代码测试 %}

此功能存在问题,fixing……  :dove:

{% endfolding %}

{% folding yellow::查看列表测试 %}

- haha
- hehe

{% endfolding %}

{% folding red::查看嵌套测试 %}

{% folding blue::查看嵌套测试2 %}

{% folding 查看嵌套测试3 %}

hahaha <span><img src='https://testingcf.jsdelivr.net/gh/volantis-x/cdn-emoji/tieba/%E6%BB%91%E7%A8%BD.png' style='height:24px'></span>

{% endfolding %}

{% endfolding %}

{% endfolding %}

JS:

下载

CSS:

[data-theme="dark"] details {
  filter: brightness(0.7);
}

details {
  display: block;
  padding: 16px;
  margin: 0.5rem 0;
  border-radius: 4px;
  font-size: 0.7375rem;
  transition: all 0.28s ease;
  -moz-transition: all 0.28s ease;
  -webkit-transition: all 0.28s ease;
  -o-transition: all 0.28s ease;
  border: 1px solid #f6f6f6;
}

details summary {
  cursor: pointer;
  padding: 16px;
  margin: -16px;
  border-radius: 4px;
  color: rgba(85, 85, 85, 0.7);
  font-size: 0.7375rem;
  font-weight: bold;
  position: relative;
  line-height: normal;
}

details summary > p,
details summary > h1,
details summary > h2,
details summary > h3,
details summary > h4,
details summary > h5,
details summary > h6 {
  display: inline;
  border-bottom: none !important;
}

details summary:hover {
  color: #555;
}

details summary:hover:after {
  position: absolute;
  content: "+";
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  right: 16px;
}

details > summary {
  background: #f6f6f6;
}

details[blue] {
  border-color: #e8f4fd;
}

details[blue] > summary {
  background: #e8f4fd;
}

details[cyan] {
  border-color: #e8fafe;
}

details[cyan] > summary {
  background: #e8fafe;
}

details[green] {
  border-color: #ebf9ed;
}

details[green] > summary {
  background: #ebf9ed;
}

details[yellow] {
  border-color: #fff8e9;
}

details[yellow] > summary {
  background: #fff8e9;
}

details[red] {
  border-color: #feefee;
}

details[red] > summary {
  background: #feefee;
}

details[open] {
  border-color: rgba(85, 85, 85, 0.2);
}

details[open] > summary {
  border-bottom: 1px solid rgba(85, 85, 85, 0.2);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

details[open][blue] {
  border-color: rgba(33, 150, 243, 0.3);
}

details[open][blue] > summary {
  border-bottom-color: rgba(33, 150, 243, 0.3);
}

details[open][cyan] {
  border-color: rgba(27, 205, 252, 0.3);
}

details[open][cyan] > summary {
  border-bottom-color: rgba(27, 205, 252, 0.3);
}

details[open][green] {
  border-color: rgba(61, 197, 80, 0.3);
}

details[open][green] > summary {
  border-bottom-color: rgba(61, 197, 80, 0.3);
}

details[open][yellow] {
  border-color: rgba(255, 189, 43, 0.3);
}

details[open][yellow] > summary {
  border-bottom-color: rgba(255, 189, 43, 0.3);
}

details[open][red] {
  border-color: rgba(254, 95, 88, 0.3);
}

details[open][red] > summary {
  border-bottom-color: rgba(254, 95, 88, 0.3);
}

details[open] > summary {
  color: #555;
  margin-bottom: 0;
}

details[open] > summary:hover:after {
  content: "-";
}

details[open] > div.content {
  padding: 16px;
  margin: -16px;
  margin-top: 0;
}

details[open] > div.content p > a:hover {
  text-decoration: underline;
}

time line时间线

2020-11-27 1.3.2 -> 2.0.0

  • 新增了对 Hexo 5.0.0 的支持,并推荐升级使用 Hexo 5.0.0,去除了对 hexo-prism-plugin 插件的依赖,可直接使用自带的 prismjs 插件;
  • 新增了背景图功能;
  • 新增了畅言、腾讯兔小巢、哔哔、 Artitalk 等评论或说说功能;
  • 开始阅读部分行为修改;
  • 修改了 TOC 目录高度为自适应;
  • 修复了搜索的相关问题;
  • 其他小问题修改;

  • Added support for Hexo 5.0.0, and it is recommended to upgrade to Hexo 5.0.0, remove the dependency on the hexo-prism-plugin, you can directly use the built-in prismjs;
  • Added background image;
  • Added comment or talk support such as 畅言、腾讯兔小巢、哔哔、 Artitalk;
  • Modifications to “Start Reading”;
  • Modified TOC directory height to be adaptive;
  • Fixed search related bugs;
  • Fixed Other minor bugs;

2020-08-30 1.3.1 -> 1.3.2

  • 新增了繁体字的支持;
  • 新增了 404 页面;
  • 其他小问题修改;

  • Added support for traditional characters;
  • Added 404 page;
  • Fixed other minor issues;

写法:

{% timeline %}

{% timenode 2020-11-27 [1.3.2 -> 2.0.0](https://github.com/blinkfox/hexo-theme-matery/releases/tag/v2.0.0) %}

+ 新增了对 Hexo 5.0.0 的支持,并推荐升级使用 Hexo 5.0.0,去除了对 hexo-prism-plugin 插件的依赖,可直接使用自带的 prismjs 插件;
+ 新增了背景图功能;
+ 新增了畅言、腾讯兔小巢、哔哔、 Artitalk 等评论或说说功能;
+ 开始阅读部分行为修改;
+ 修改了 TOC 目录高度为自适应;
+ 修复了搜索的相关问题;
+ 其他小问题修改;

---

+ Added support for Hexo 5.0.0, and it is recommended to upgrade to Hexo 5.0.0, remove the dependency on the hexo-prism-plugin, you can directly use the built-in prismjs;
+ Added background image;
+ Added comment or talk support such as 畅言、腾讯兔小巢、哔哔、 Artitalk;
+ Modifications to "Start Reading";
+ Modified TOC directory height to be adaptive;
+ Fixed search related bugs;
+ Fixed Other minor bugs;

{% endtimenode %}

{% timenode 2020-08-30 [1.3.1 -> 1.3.2](https://github.com/blinkfox/hexo-theme-matery/releases/tag/v1.3.2) %}

+ 新增了繁体字的支持;
+ 新增了 404 页面;
+ 其他小问题修改;

---

+ Added support for traditional characters;
+ Added 404 page;
+ Fixed other minor issues;


{% endtimenode %}

{% endtimeline %}

JS:
下载
CSS:

div.timenode {
  position: relative;
}
div.timenode:before,
div.timenode:after {
  content: "";
  z-index: 1;
  position: absolute;
  background: rgba(68, 215, 182, 0.5);
  width: 2px;
  left: 7px;
}
div.timenode:before {
  top: 0;
  height: 6px;
}
div.timenode:after {
  top: 26px;
  height: calc(100% - 26px);
}
div.timenode:last-child:after {
  height: calc(100% - 26px - 16px);
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;
}
div.timenode .meta,
div.timenode .body {
  max-width: calc(100% - 24px);
}
div.timenode .meta {
  position: relative;
  color: var(--tab-botton-color);
  font-size: 0.375rem;
  line-height: 32px;
  height: 32px;
}
div.timenode .meta:before,
div.timenode .meta:after {
  content: "";
  position: absolute;
  top: 8px;
  z-index: 2;
}
div.timenode .meta:before {
  background: rgba(68, 215, 182, 0.5);
  width: 16px;
  height: 16px;
  border-radius: 8px;
}
div.timenode .meta:after {
  background: #44d7b6;
  margin-left: 2px;
  margin-top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 6px;
  transform: scale(0.5);
}
div.timenode .meta p {
  font-weight: bold !important;
  margin: 0 0 0 24px !important;
}
div.timenode .body {
  margin: 4px 0 10px 24px;
  padding: 10px;
  border-radius: 12px;
  background: #efeded;
  display: inline-block;
}
div.timenode .body p:first-child {
  margin-top: 0 !important;
}
div.timenode .body p:last-child {
  margin-bottom: 0 !important;
}
div.timenode .body .highlight {
  background: #fff7ea;
  filter: grayscale(0%);
}
div.timenode .body .highlight figcaption {
  background: #ffeed2;
}
div.timenode .body .highlight .gutter {
  background: #ffedd0;
}
div.timenode:hover .meta {
  color: #444;
}
div.timenode:hover .meta:before {
  background: rgba(255, 87, 34, 0.5);
}
div.timenode:hover .meta:after {
  background: #ff5722;
  transform: scale(1);
}

[data-theme="dark"] div.timenode .body {
  background: #2c2c2c;
}

[data-theme="dark"] div.timenode:hover .meta {
  color: #ccd0d7;
}

[data-theme="dark"] div.timenode .meta {
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] div.timeline p.p.h2 {
  color: rgba(255, 255, 255, 0.6);
}

写法:

{% link Matery, https://github.com/blinkfox/hexo-theme-matery, https://z3.ax1x.com/2021/08/31/haASr8.jpg %}

JS:
下载
CSS:

#artDetail a.link-card {
  margin: 0.25rem auto;
  background: #6fbf94;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-align: center;
  min-width: 200px;
  max-width: 361px;
  color: white !important;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 3px 3px 0 rgba(0,0,0,0.14),0 1px 7px 0 rgba(0,0,0,0.12),0 3px 1px -1px rgba(0,0,0,0.2) !important;
}
@media screen and (max-width: 425px) {
  #artDetail a.link-card {
	max-width: 100%;
  }
}
@media screen and (max-width: 375px) {
  #artDetail a.link-card {
	width: 100%;
  }
}
#artDetail a.link-card:hover {
  box-shadow: 0 6px 12px 0 rgba(0, 0, 0, 0.65) !important;
}
#artDetail a.link-card div.left,
#artDetail a.link-card div.right {
  pointer-events: none;
}
#artDetail a.link-card div.left {
  width: 48px;
  height: 48px;
  margin: 12px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 0px !important;
}
#artDetail a.link-card div.left i {
  font-size: 32px;
  line-height: 48px;
  margin-left: 4px;
}
#artDetail a.link-card div.left img {
  display: block;
  position: absolute;
  border-radius: 8px / 4;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
}
#artDetail a.link-card div.right {
  overflow: hidden;
  margin-right: 12px;
}
#artDetail a.link-card p {
  margin: 0;
}
#artDetail a.link-card p.text {
  font-weight: bold;
}
#artDetail a.link-card p.url {
  flex-shrink: 0;
  color: rgba(68, 68, 68, 0.65);
  font-size: 13px;
}

[data-theme="dark"] #artDetail a.link-card img {
  filter: brightness(1);
}

[data-theme="dark"] #artDetail a.link-card {
  filter: brightness(0.7);
}

后续有时间再补充 :dove:


文章作者: BlueSky01st
版权声明: 本博客所有文章除特別声明外,均采用 CC BY-NC-ND 4.0 许可协议。转载请注明来源 BlueSky01st !
评论
评论
  目录