Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #181 and #333 Right margin bug in mobile style #534

Merged
merged 4 commits into from
Dec 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ menu_settings:
icons: true
badges: false


# ---------------------------------------------------------------
# Scheme Settings
# ---------------------------------------------------------------
Expand Down Expand Up @@ -252,13 +253,10 @@ sidebar:

# Sidebar offset from top menubar in pixels (only for Pisces | Gemini).
offset: 12

# Back to top in sidebar (only for Pisces | Gemini).
b2t: false

# Scroll percent label in b2t button.
scrollpercent: false

# Enable sidebar on narrow view (only for Muse | Mist).
onmobile: false

Expand Down Expand Up @@ -370,8 +368,8 @@ android_chrome_color: "#222"
# Custom Logo.
# Do not support Scheme Mist currently.
# Options:
# enabled: [true/false] - Replace with specific image
# image: url-of-image - Images's url
# enabled: If true, will enable custom logo
# image: Images's url, replace it with specific image
custom_logo:
enabled: false
image:
Expand Down Expand Up @@ -524,7 +522,6 @@ changyan:
appid:
appkey:


# Valine.
# You can get your appid and appkey from https://leancloud.cn
# more info please open https://valine.js.org
Expand Down Expand Up @@ -634,7 +631,7 @@ needmoreshare2:

# Application Insights
# See https://azure.microsoft.com/en-us/services/application-insights
# application_insights:
#application_insights:

# Post widgets & FB/VK comments settings.
# ---------------------------------------------------------------
Expand Down Expand Up @@ -706,14 +703,12 @@ busuanzi_count:
post_views: true
post_views_icon: eye


# Tencent analytics ID
#tencent_analytics:

# Tencent MTA ID
#tencent_mta:


# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO
baidu_push: false

Expand Down Expand Up @@ -877,9 +872,8 @@ canvas_lines: false
# canvas_sphere
canvas_sphere: false

# Only fit scheme Pisces
# Dependencies: https://github.com/theme-next/theme-next-canvas-ribbon
# Canvas-ribbon
# Dependencies: https://github.com/theme-next/theme-next-canvas-ribbon
# size: The width of the ribbon.
# alpha: The transparency of the ribbon.
# zIndex: The display level of the ribbon.
Expand Down Expand Up @@ -1040,15 +1034,15 @@ vendors:
# Internal version: 1.4.0
# See: https://github.com/gitalk/gitalk
# Example:
# gitalk_js: https://cdn.jsdelivr.net/npm/gitalk@1.4.0/dist/gitalk.min.js
# gitalk_css: https://cdn.jsdelivr.net/npm/gitalk@1.4.0/dist/gitalk.css
# gitalk_js: //cdn.jsdelivr.net/npm/gitalk@1.4.0/dist/gitalk.min.js
# gitalk_css: //cdn.jsdelivr.net/npm/gitalk@1.4.0/dist/gitalk.css
gitalk_js:
gitalk_css:

# Internal version: 0.7.3
# See: https://github.com/emn178/js-md5
# Example:
# md5: https://cdn.jsdelivr.net/npm/js-md5@0.7.3/src/md5.min.js
# md5: //cdn.jsdelivr.net/npm/js-md5@0.7.3/src/md5.min.js
md5:

# Assets
Expand Down
10 changes: 6 additions & 4 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,14 @@
{{ __('post.read_more') }} »
</a>
</div>
{% endif %}
{% endif %}
<!--/noindex-->
{% elif theme.auto_excerpt.enable %}
{% set content = post.content | striptags %}
{{ content.substring(0, theme.auto_excerpt.length) }}
{% if content.length > theme.auto_excerpt.length %}...{% endif %}
{% set content = post.content | replace('<td class="gutter">.*?</td>', "", "g") | striptags %}
<p>
{{ content.substring(0, theme.auto_excerpt.length) }}
{% if content.length > theme.auto_excerpt.length %}...{% endif %}
</p>
<!--noindex-->
{% if theme.read_more_btn %}
<div class="post-button text-center">
Expand Down
44 changes: 22 additions & 22 deletions layout/_scripts/vendors.swig
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,59 @@
</script>

{% set js_vendors = {} %}
{% set js_vendors.jquery = 'jquery/index.js?v=2.1.3' %}
{% set js_vendors.jquery = 'jquery/index.js?v=2.1.3' %}

{% if theme.fastclick %}
{% set js_vendors.fastclick = 'fastclick/lib/fastclick.min.js?v=1.0.6' %}
{% set js_vendors.fastclick = 'fastclick/lib/fastclick.min.js?v=1.0.6' %}
{% endif %}

{% if theme.lazyload %}
{% set js_vendors.lazyload = 'jquery_lazyload/jquery.lazyload.js?v=1.9.7' %}
{% set js_vendors.lazyload = 'jquery_lazyload/jquery.lazyload.js?v=1.9.7' %}
{% endif %}

{% set js_vendors.velocity = 'velocity/velocity.min.js?v=1.2.1' %}
{% set js_vendors.velocity = 'velocity/velocity.min.js?v=1.2.1' %}
{% set js_vendors.velocity_ui = 'velocity/velocity.ui.min.js?v=1.2.1' %}

{% if theme.fancybox %}
{% set js_vendors.fancybox = 'fancybox/source/jquery.fancybox.pack.js?v=2.1.5' %}
{% set js_vendors.fancybox = 'fancybox/source/jquery.fancybox.pack.js?v=2.1.5' %}
{% endif %}

{% if theme.canvas_nest.enable %}
{% if theme.canvas_nest.onmobile %}
{% set canvas_nest_uri = url_for(theme.vendors._internal + '/canvas-nest/canvas-nest.min.js')%}
{% if theme.vendors.canvas_nest %}
{% set canvas_nest_uri = theme.vendors.canvas_nest %}
{% endif %}
{% set canvas_nest_uri = url_for(theme.vendors._internal + '/canvas-nest/canvas-nest.min.js') %}
{% if theme.vendors.canvas_nest %}
{% set canvas_nest_uri = theme.vendors.canvas_nest %}
{% endif %}
{% else %}
{% set canvas_nest_uri = url_for(theme.vendors._internal + '/canvas-nest/canvas-nest-nomobile.min.js')%}
{% if theme.vendors.canvas_nest_nomobile %}
{% set canvas_nest_uri = theme.vendors.canvas_nest_nomobile %}
{% endif %}
{% set canvas_nest_uri = url_for(theme.vendors._internal + '/canvas-nest/canvas-nest-nomobile.min.js') %}
{% if theme.vendors.canvas_nest_nomobile %}
{% set canvas_nest_uri = theme.vendors.canvas_nest_nomobile %}
{% endif %}
{% endif %}
<script color='{{ theme.canvas_nest.color }}' opacity='{{ theme.canvas_nest.opacity }}' zIndex='{{ theme.canvas_nest.zIndex }}' count='{{ theme.canvas_nest.count }}' src="{{ canvas_nest_uri }}"></script>
{% endif %}

{% if theme.three_waves %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.three_waves = 'three/three-waves.min.js' %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.three_waves = 'three/three-waves.min.js' %}
{% endif %}

{% if theme.canvas_lines %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.canvas_lines = 'three/canvas_lines.min.js' %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.canvas_lines = 'three/canvas_lines.min.js' %}
{% endif %}

{% if theme.canvas_sphere %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.canvas_sphere = 'three/canvas_sphere.min.js' %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.canvas_sphere = 'three/canvas_sphere.min.js' %}
{% endif %}

{% if theme.canvas_ribbon.enable and theme.scheme === 'Pisces'%}
{% set js_vendors.canvas_ribbon = 'canvas-ribbon/canvas-ribbon.js' %}
{% if theme.canvas_ribbon.enable %}
{% set js_vendors.canvas_ribbon = 'canvas-ribbon/canvas-ribbon.js' %}
{% endif %}

{% if theme.reading_progress.enable %}
{% set js_vendors.reading_progress = 'reading_progress/reading_progress.js' %}
{% set js_vendors.reading_progress = 'reading_progress/reading_progress.js' %}
{% endif %}

{% for name, internal in js_vendors %}
Expand Down