master
xaoxuu 4 years ago
parent 0d6149b252
commit f65bbd47a7
  1. 6
      _config.yml
  2. 7
      scripts/tags/tabs.js
  3. 2
      source/css/_tag-plugins/tabs.styl

@ -569,8 +569,8 @@ search:
############################### Theme Information ###############################
info:
name: Volantis # This is theme's name.
version: '2.6.4' # This is theme's version.
version: '2.6.5' # This is theme's version.
docs: https://volantis.js.org/ # This is theme's URL.
cdn:
css: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.6.4/css/style.css
js: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.6.4/js/app.js
# css: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.6.4/css/style.css
# js: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.6.4/js/app.js

@ -1,6 +1,5 @@
/**
* note.js
* transplant from hexo-theme-next
* tabs.js | https://theme-next.org/docs/tag-plugins/tabs
*/
'use strict';
@ -40,7 +39,9 @@ function postTabs(args, content) {
((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId);
var isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : '';
tabIcon.length > 0 && (tabIcon = `<i class="fa fa-${tabIcon.trim()}"${isOnlyicon}></i>`);
let icon = tabIcon.trim();
icon = icon.startsWith('fa') ? icon : 'fa fa-' + icon;
tabIcon.length > 0 && (tabIcon = `<i class="${icon}"${isOnlyicon}></i>`);
var isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';
tabNav += `<li class="tab${isActive}"><a href="#${tabHref}">${tabIcon + tabCaption.trim()}</a></li>`;

@ -44,6 +44,8 @@ div.tabs
border: 1px solid transparent
&:hover
color: $color-p
i
pointer-events: none
&.active a
cursor: default
color: $color-p

Loading…
Cancel
Save