mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
1. 修復gitalk報path.startsWith is not a function的bug #66
2. 修復在屏幕縮放字體大小而導致menu變爲sidebar模式的bug #64 3. just-gallery增加上下邊距
This commit is contained in:
parent
da4a8d77d7
commit
a33e7e1d89
@ -99,7 +99,7 @@ if theme.algolia_search.enable
|
|||||||
if (theme.gitalk && theme.gitalk.enable)
|
if (theme.gitalk && theme.gitalk.enable)
|
||||||
link(rel="stylesheet" type="text/css" href=url_for(theme.CDN.gitalk_css))
|
link(rel="stylesheet" type="text/css" href=url_for(theme.CDN.gitalk_css))
|
||||||
script(src=url_for(theme.CDN.gitalk))
|
script(src=url_for(theme.CDN.gitalk))
|
||||||
script(src=url_for(theme.CDN.blueimp-md5))
|
script(src=url_for(theme.CDN.blueimp_md5))
|
||||||
|
|
||||||
if theme.baidu_analytics
|
if theme.baidu_analytics
|
||||||
link(rel="dns-prefetch" href="https://hm.baidu.com")
|
link(rel="dns-prefetch" href="https://hm.baidu.com")
|
||||||
|
|||||||
@ -204,6 +204,8 @@ img[src=""],img:not([src])
|
|||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
.justified-gallery
|
.justified-gallery
|
||||||
|
margin: 1rem 0
|
||||||
|
|
||||||
img
|
img
|
||||||
opacity 0
|
opacity 0
|
||||||
.fancybox
|
.fancybox
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
box-shadow: -0.25rem 0 0.25rem rgba(232, 237, 250, 0.6) inset
|
box-shadow: -0.25rem 0 0.25rem rgba(232, 237, 250, 0.6) inset
|
||||||
opacity: 0.9
|
opacity: 0.9
|
||||||
will-change: transform
|
will-change: transform
|
||||||
transition: transform .2s
|
transition: ease-in-out .2s
|
||||||
|
|
||||||
.sidebar-toc
|
.sidebar-toc
|
||||||
ol,
|
ol,
|
||||||
|
|||||||
@ -7,14 +7,13 @@ $(function () {
|
|||||||
*/
|
*/
|
||||||
const ph_width = $("#page-header").width()
|
const ph_width = $("#page-header").width()
|
||||||
const search_width = $('#search_button').outerWidth()
|
const search_width = $('#search_button').outerWidth()
|
||||||
|
const blogName_width = $('#blog_name').width()
|
||||||
var mw = 0;
|
var mw = 0;
|
||||||
for (var i = 0; i < $('#page-header .menus_item').length; i++) {
|
for (var i = 0; i < $('#page-header .menus_item').length; i++) {
|
||||||
mw = mw + $('#page-header .menus_item').eq(i).outerWidth()
|
mw = mw + $('#page-header .menus_item').eq(i).outerWidth()
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('#page-header').height() > 37 || window.innerWidth < 7) {
|
$('#page-header').height() > 45 ? header_adjust() : ''
|
||||||
header_adjust()
|
|
||||||
}
|
|
||||||
|
|
||||||
function header_adjust() {
|
function header_adjust() {
|
||||||
$("#page-header .toggle-menu").addClass("is_visible")
|
$("#page-header .toggle-menu").addClass("is_visible")
|
||||||
@ -34,11 +33,11 @@ $(function () {
|
|||||||
function is_adjust(n) {
|
function is_adjust(n) {
|
||||||
var t;
|
var t;
|
||||||
if (n == '1') {
|
if (n == '1') {
|
||||||
t = $('#blog_name').width() + search_width + mw > $("#page-header").width() - 300 ? true : false
|
t = blogName_width + search_width + mw > $("#page-header").width() - 300 ? true : false
|
||||||
} else if (n == '2') {
|
} else if (n == '2') {
|
||||||
t = $('#blog_name').width() + search_width + mw > $("#page-header").width() ? true : false
|
t = blogName_width + search_width + mw > $("#page-header").width() ? true : false
|
||||||
} else if (n == "3") {
|
} else if (n == "3") {
|
||||||
t = $('#blog_name').width() + search_width + mw > $("#page-header").width() ? true : false
|
t = blogName_width + search_width + mw > $("#page-header").width() ? true : false
|
||||||
}
|
}
|
||||||
if (t) {
|
if (t) {
|
||||||
header_adjust()
|
header_adjust()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user