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 #1935 #1936

Merged
merged 1 commit into from
Oct 11, 2017
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
9 changes: 8 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 6 additions & 2 deletions layout/_scripts/vendors.swig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}