Skip to content

Commit

Permalink
style(tooltip): by jQuery UI 提示框样式美化
Browse files Browse the repository at this point in the history
  • Loading branch information
MOxFIVE committed Jan 26, 2016
1 parent 561bd90 commit 6788c02
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
3 changes: 3 additions & 0 deletions _config.yml
Expand Up @@ -109,6 +109,9 @@ search_box: false
# Animation in Homepage and Loading avatar # Animation in Homepage and Loading avatar
animate: true animate: true


# Load jQuery UI to style tooltips
# 工具提示框样式美化
jquery_ui: false


# >>> Small features | 小功能设置 <<< # >>> Small features | 小功能设置 <<<


Expand Down
3 changes: 3 additions & 0 deletions layout/_partial/after-footer.ejs
Expand Up @@ -10,5 +10,8 @@
<% } %> <% } %>
<%- partial('scrolling-button') %> <%- partial('scrolling-button') %>
<%- partial('_partial/hide-labels') %> <%- partial('_partial/hide-labels') %>
<% if (theme.jquery_ui){ %>
<script src="//cdn.bootcss.com/jqueryui/1.10.4/jquery-ui.min.js"></script>
<% } %>
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"> <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script> </script>
5 changes: 4 additions & 1 deletion layout/_partial/head.ejs
Expand Up @@ -29,7 +29,10 @@
<link rel="icon" href="<%- theme.favicon %>"> <link rel="icon" href="<%- theme.favicon %>">
<% } %> <% } %>
<% if (theme.animate){ %> <% if (theme.animate){ %>
<%- css('//cdn.bootcss.com/animate.css/3.5.0/animate.min.css') %> <%- css('//cdn.bootcss.com/animate.css/3.5.0/animate.min.css') %>
<% } %>
<% if (theme.jquery_ui){ %>
<link href="//cdn.bootcss.com/jqueryui/1.10.4/css/jquery-ui.min.css" rel="stylesheet">
<% } %> <% } %>
<%- css('css/style') %> <%- css('css/style') %>
<link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
Expand Down
15 changes: 14 additions & 1 deletion source/css/_partial/main.styl
Expand Up @@ -477,4 +477,17 @@


if hexo-config("github_widget") if hexo-config("github_widget")
.article-entry .github-widget h3::after .article-entry .github-widget h3::after
content none content none

if hexo-config("jquery_ui")
.ui-tooltip
padding 6px
max-width 30em
box-shadow 0 0 .8em rgba(0, 0, 0, .6)
color white
font-family font-sans, font-chs
font-size .9em
background rgba(0, 0, 0, .65)

body .ui-tooltip
border 1px solid white
4 changes: 4 additions & 0 deletions source/js/pc.js
Expand Up @@ -106,4 +106,8 @@ define([], function(){
Tips.init(); Tips.init();
} }
} }
});

$(function() {
$(document).tooltip();
}); });

0 comments on commit 6788c02

Please sign in to comment.