Extract hexo-next-three to plugins

This commit is contained in:
Mimi 2020-07-06 20:54:38 +08:00
parent 79bb4c9ebe
commit 31298d003e
3 changed files with 0 additions and 36 deletions

View File

@ -25,7 +25,6 @@ jobs:
run: npm install
- uses: actions/checkout@v2
with:
repository: next-theme/hexo-theme-next
path: themes/next
- uses: actions/checkout@v2
with:

View File

@ -833,14 +833,6 @@ pace:
# corner-indicator | fill-left | flat-top | flash | loading-bar | mac-osx | material | minimal
theme: minimal
# JavaScript 3D library.
# Dependencies: https://github.com/next-theme/theme-next-three
three:
enable: false
three_waves: false
canvas_lines: false
canvas_sphere: false
# Canvas ribbon
# For more information: https://github.com/hustcc/ribbon.js
canvas_ribbon:
@ -973,16 +965,6 @@ vendors:
pace:
pace_css:
# JavaScript 3D library
# three: //unpkg.com/three@0/build/three.min.js
# three_waves: //cdn.jsdelivr.net/gh/next-theme/theme-next-three@1/three-waves.min.js
# canvas_lines: //cdn.jsdelivr.net/gh/next-theme/theme-next-three@1/canvas_lines.min.js
# canvas_sphere: //cdn.jsdelivr.net/gh/next-theme/theme-next-three@1/canvas_sphere.min.js
three:
three_waves:
canvas_lines:
canvas_sphere:
# Canvas ribbon
# canvas_ribbon: //unpkg.com/ribbon.js@1/dist/ribbon.min.js
canvas_ribbon:

View File

@ -1,20 +1,3 @@
{%- if theme.three.enable %}
{%- set three_uri = theme.vendors.three or '//cdn.jsdelivr.net/npm/three@0/build/three.min.js' %}
<script defer src="{{ three_uri }}"></script>
{%- if theme.three.three_waves %}
{%- set waves_uri = theme.vendors.three_waves or url_for('lib/three/three-waves.min.js') %}
<script defer src="{{ waves_uri }}"></script>
{%- endif %}
{%- if theme.three.canvas_lines %}
{%- set lines_uri = theme.vendors.canvas_lines or url_for('lib/three/canvas_lines.min.js') %}
<script defer src="{{ lines_uri }}"></script>
{%- endif %}
{%- if theme.three.canvas_sphere %}
{%- set sphere_uri = theme.vendors.canvas_sphere or url_for('lib/three/canvas_sphere.min.js') %}
<script defer src="{{ sphere_uri }}"></script>
{%- endif %}
{%- endif %}
{%- if theme.canvas_ribbon.enable %}
{%- set canvas_ribbon_uri = theme.vendors.canvas_ribbon or '//cdn.jsdelivr.net/npm/ribbon.js@1/dist/ribbon.min.js' %}
<script size="{{ theme.canvas_ribbon.size }}" alpha="{{ theme.canvas_ribbon.alpha }}" zIndex="{{ theme.canvas_ribbon.zIndex }}" src="{{ canvas_ribbon_uri }}"></script>