ppoffice / hexo-theme-icarus

A simple, delicate, and modern theme for the static site generator Hexo.
https://ppoffice.github.io/hexo-theme-icarus/
MIT License
6.36k stars 1.55k forks source link

Added message tag, tabs tag. #1026

Closed xfqwdsj closed 2 years ago

xfqwdsj commented 2 years ago

添加了两个标签(从示例网站中得到灵感)

用法:

message:

{% message color:danger icon:info-circle 'title:Very danger!' size:small %}
    **You are in danger.**
{% endmessage %}

{% message color:danger 'title:Very danger!' size:small %}
    **You are in danger.**
{% endmessage %}

{% message color:primary icon:info-circle %}
    **You are not in danger.**
{% endmessage %}

{% message color:primary %}
    **You are not in danger.**
{% endmessage %}

tabs:

{% tabs behavior:centered style:toggle-rounded %}
    <!-- item aadd1 'AADD' -->This is AADD.<!-- enditem -->
    <!-- activeitem info1 info 'Info' -->This is Info.<!-- enditem -->
{% endtabs %}

{% tabs behavior:fullwidth size:small style:boxed %}
    <!-- item aadd2 'AADD' -->
        - assdf
          - asd
        - aege
          - sasd
    <!-- enditem -->
    <!-- activeitem info2 info 'Info' -->
        [sad]()
    <!-- enditem -->
    <!-- item sb 'hl' -->
            asd
            sdf
    <!-- enditem -->
    <!-- item qwr 'asd' -->
    - aa
        - ff
        <!-- enditem -->
{% endtabs %}

效果: https://xfqwdsj.github.io/tags-preview/

ppoffice commented 2 years ago
  1. 请参照 https://github.com/ppoffice/hexo-component-inferno/blob/1.0.2/src/hexo/helper/page.js 将代码放在module.exports = function (hexo) {}中么?然后在 https://github.com/ppoffice/hexo-theme-icarus/blob/5.0.0-rc.1/include/register.js 中注册。
  2. 请按照上面的提示修改代码的格式问题。
xfqwdsj commented 2 years ago
  1. 请参照 https://github.com/ppoffice/hexo-component-inferno/blob/1.0.2/src/hexo/helper/page.js 将代码放在module.exports = function (hexo) {}中么?然后在 https://github.com/ppoffice/hexo-theme-icarus/blob/5.0.0-rc.1/include/register.js 中注册。
  2. 请按照上面的提示修改代码的格式问题。

请问我是需要将脚本文件放在 module.exports = function (hexo) {} 中,修改 Check 中的问题,然后在 hexo-theme-icarus/include/register.js 中注册对吗? 请指导

xfqwdsj commented 2 years ago

(暂时先不用启动 workflows )

xfqwdsj commented 2 years ago

Lint 通过了,我现在将它放到自己的站点中测试是否有问题

xfqwdsj commented 2 years ago

修改完毕,请检查,谢谢!