Permalink
Browse files

Fix #1935

  • Loading branch information...
geekrainy committed Oct 11, 2017
1 parent 29fd034 commit beb238d521a5695abb6e43732ae8e0ac36e76732
Showing with 14 additions and 3 deletions.
  1. +8 −1 _config.yml
  2. +6 −2 layout/_scripts/vendors.swig
View
@@ -685,7 +685,14 @@ canvas_sphere: false
# Only fit scheme Pisces
# Canvas-ribbon
canvas_ribbon: false
# size: The width of the ribbon.
# alpha: The transparency of the ribbon.
# zIndex: The display level of the ribbon.
canvas_ribbon:
enable: false
size: 300
alpha: 0.6
zIndex: -1
# Script Vendors.
# Set a CDN address for the vendor you want to customize.
@@ -35,11 +35,15 @@
{% set js_vendors.canvas_sphere = 'three/canvas_sphere.min.js' %}
{% endif %}
{% if theme.canvas_ribbon and theme.scheme === 'Pisces'%}
{% if theme.canvas_ribbon.enable and theme.scheme === 'Pisces'%}
{% set js_vendors.canvas_ribbon = 'canvas-ribbon/canvas-ribbon.js' %}
{% endif %}
{% for name, internal in js_vendors %}
{% set internal_script = url_for(theme.vendors._internal) + '/' + internal %}
<script type="text/javascript" src="{{ theme.vendors[name] | default(internal_script) }}"></script>
{% if name == 'canvas_ribbon' %}
<script id="ribbon" type="text/javascript" size="{{ theme.canvas_ribbon.size }}" alpha="{{ theme.canvas_ribbon.alpha }}" zIndex="{{theme.canvas_ribbon.zIndex }}" src="{{ theme.vendors[name] | default(internal_script) }}"></script>
{% else %}
<script type="text/javascript" src="{{ theme.vendors[name] | default(internal_script) }}"></script>
{% endif %}
{% endfor %}

0 comments on commit beb238d

Please sign in to comment.