Skip to content

Commit

Permalink
🐛 Fix: serveral bugs
Browse files Browse the repository at this point in the history
* fix post页面标签显示bug

* fix 标题里code的大小

* 修复ipad下banner的显示bug

* Update head.pug

* Update _config.yml

* fix bug issues #188

* 独立search按钮

* Update nav.pug

* Update head.styl

* Update header.pug
  • Loading branch information
jerryc127 authored and Molunerfinn committed Jan 29, 2020
1 parent ecd9bac commit 30bfb34
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 14 deletions.
24 changes: 24 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,27 @@ google_adsense:
js: //pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
client: ca-pub-...........
enable_page_level_ads: true


# Google Webmaster tools verification setting
# See: https://www.google.com/webmasters/
google_site_verification:

# Bing Webmaster tools verification setting
# See: https://www.bing.com/webmaster/
bing_site_verification:

# Yandex Webmaster tools verification setting
# See: https://webmaster.yandex.ru/
#yandex_site_verification:

# Baidu Webmaster tools verification setting
# See: https://ziyuan.baidu.com/site/
baidu_site_verification:

# 360 Webmaster tools verification setting
# see http://zhanzhang.so.com/
qihu_site_verification:

# avoid baidu transformation
disable_baidu_transformation: true
3 changes: 2 additions & 1 deletion layout/includes/additional-js.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ if (theme.local_search && theme.local_search.enable)
if (theme.canvas_ribbon && theme.canvas_ribbon.enable)
include ./third-party/canvas-ribbon.pug
script.
if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
$('#nav').addClass('is-mobile')
$('footer').addClass('is-mobile')
$('#top-container').addClass('is-mobile')
}
22 changes: 18 additions & 4 deletions layout/includes/head.pug
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
link(rel="dns-prefetch" href="https://cdn.staticfile.org")
link(rel="dns-prefetch" href="https://cdn.bootcss.com")
link(rel="dns-prefetch" href="https://creativecommons.org")
meta(name="format-detection" content="telephone=no")
meta(http-equiv="x-dns-prefetch-control" content="on")
link(rel="dns-prefetch" href="https://cdn.jsdelivr.net")

if theme.algolia_search.enable
link(rel="dns-prefetch" href="https://cdn.jsdelivr.net")
link(rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.css")
script(src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js" defer)

Expand Down Expand Up @@ -76,3 +75,18 @@ if theme.tencent_analytics
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
if theme.google_site_verification
meta(name="google-site-verification" content=theme.google_site_verification)

if theme.bing_site_verification
meta(name="msvalidate.01" content=theme.bing_site_verification)

if theme.baidu_site_verification
meta(name="baidu-site-verification" content=theme.baidu_site_verification)

if theme.qihu_site_verification
meta(name="360-site-verification" content=theme.qihu_site_verification)

if theme.disable_baidu_transformation
meta(http-equiv="Cache-Control" content="no-transform")
meta(http-equiv="Cache-Control" content="no-siteapp")
9 changes: 6 additions & 3 deletions layout/includes/header.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
span.pull-left
a#site-name(href=url_for('/')) #[=config.title]
i.fa.fa-bars.toggle-menu.pull-right(aria-hidden="true")
span.pull-right.menus

span.pull-right.menus
each url, label in theme.menu
a.site-page(href=url)= label

span.pull-right
if (theme.algolia_search.enable || theme.local_search && theme.local_search.enable)
a.site-page.social-icon.search
i.fa.fa-search
span=' '+_p('search')
each url, label in theme.menu
a.site-page(href=url)= label
3 changes: 0 additions & 3 deletions layout/includes/nav.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ nav#nav(style=bg_img class=flag)
each url, icon in theme.social
a.social-icon(href=url target="_blank")
i(class="fa-" + icon)
if (theme.algolia_search.enable || theme.local_search && theme.local_search.enable)
a.social-icon.search
i.fa.fa-search
5 changes: 5 additions & 0 deletions source/css/_layout/head.styl
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,8 @@

&:hover
color: $light-blue
.search
right: 0.5rem

span
display: none
9 changes: 7 additions & 2 deletions source/css/_layout/post.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
headStyle(fontsize)
padding-left: unit(fontsize + 0.1, "rem")

code
font-size: unit(fontsize, "rem")

&:before
top: calc(50% - unit(fontsize / 2 - 0.05, "rem"))
Expand Down Expand Up @@ -95,8 +98,10 @@ headStyle(fontsize)
margin-bottom: 0.5rem

&__tags
margin-right: 0.4rem
padding: 0.2rem 0.6rem
display: inline-block
width: fit-content
margin: 0 0.4rem 0.2rem 0
padding: 0rem 0.6rem
border: 1px solid $light-blue
border-radius: 0.6rem
background: $white
Expand Down
2 changes: 1 addition & 1 deletion source/js/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(function () {
.velocity('transition.slideUpOut', { duration: 300 })
}
})
$(document).on('click', function (e) {
$(document).on('click touchstart', function (e) {
var flag = $('.menus')[0].contains(e.target) || $('.toggle-menu')[0].contains(e.target)
if (!flag && $('.toggle-menu').is(':visible')) {
$('.menus').velocity('stop')
Expand Down

0 comments on commit 30bfb34

Please sign in to comment.