hexo
This commit is contained in:
9
themes/next/layout/_scripts/boostrap.swig
Normal file
9
themes/next/layout/_scripts/boostrap.swig
Normal file
@ -0,0 +1,9 @@
|
||||
{%
|
||||
set boot_scripts = [
|
||||
'src/bootstrap.js'
|
||||
]
|
||||
%}
|
||||
|
||||
{% for bs in boot_scripts %}
|
||||
<script type="text/javascript" src="{{ url_for(theme.js) }}/{{ bs }}?v={{ theme.version }}"></script>
|
||||
{% endfor %}
|
10
themes/next/layout/_scripts/commons.swig
Normal file
10
themes/next/layout/_scripts/commons.swig
Normal file
@ -0,0 +1,10 @@
|
||||
{%
|
||||
set js_commons = [
|
||||
'src/utils.js',
|
||||
'src/motion.js'
|
||||
]
|
||||
%}
|
||||
|
||||
{% for common in js_commons %}
|
||||
<script type="text/javascript" src="{{ url_for(theme.js) }}/{{ common }}?v={{ theme.version }}"></script>
|
||||
{% endfor %}
|
0
themes/next/layout/_scripts/lean-analytics.swig
Normal file
0
themes/next/layout/_scripts/lean-analytics.swig
Normal file
2
themes/next/layout/_scripts/pages/post-details.swig
Normal file
2
themes/next/layout/_scripts/pages/post-details.swig
Normal file
@ -0,0 +1,2 @@
|
||||
<script type="text/javascript" src="{{ url_for(theme.js) }}/src/scrollspy.js?v={{ theme.version }}"></script>
|
||||
<script type="text/javascript" src="{{ url_for(theme.js) }}/src/post-details.js?v={{ theme.version }}"></script>
|
10
themes/next/layout/_scripts/schemes/gemini.swig
Normal file
10
themes/next/layout/_scripts/schemes/gemini.swig
Normal file
@ -0,0 +1,10 @@
|
||||
{%
|
||||
set scripts = [
|
||||
'src/affix.js',
|
||||
'src/schemes/pisces.js'
|
||||
]
|
||||
%}
|
||||
|
||||
{% for script in scripts %}
|
||||
<script type="text/javascript" src="{{ url_for(theme.js) }}/{{ script }}?v={{ theme.version }}"></script>
|
||||
{% endfor %}
|
0
themes/next/layout/_scripts/schemes/mist.swig
Normal file
0
themes/next/layout/_scripts/schemes/mist.swig
Normal file
0
themes/next/layout/_scripts/schemes/muse.swig
Normal file
0
themes/next/layout/_scripts/schemes/muse.swig
Normal file
10
themes/next/layout/_scripts/schemes/pisces.swig
Normal file
10
themes/next/layout/_scripts/schemes/pisces.swig
Normal file
@ -0,0 +1,10 @@
|
||||
{%
|
||||
set scripts = [
|
||||
'src/affix.js',
|
||||
'src/schemes/pisces.js'
|
||||
]
|
||||
%}
|
||||
|
||||
{% for script in scripts %}
|
||||
<script type="text/javascript" src="{{ url_for(theme.js) }}/{{ script }}?v={{ theme.version }}"></script>
|
||||
{% endfor %}
|
49
themes/next/layout/_scripts/vendors.swig
Normal file
49
themes/next/layout/_scripts/vendors.swig
Normal file
@ -0,0 +1,49 @@
|
||||
{# Reset `window.Promise` when it was not a function. #}
|
||||
{# IE refers the element whose id is `Promise` as `window.Promise`, this causes Velocity throwing an exception #}
|
||||
<script type="text/javascript">
|
||||
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
|
||||
window.Promise = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
{% set js_vendors = {} %}
|
||||
{% set js_vendors.jquery = 'jquery/index.js?v=2.1.3' %}
|
||||
{% set js_vendors.fastclick = 'fastclick/lib/fastclick.min.js?v=1.0.6' %}
|
||||
{% set js_vendors.lazyload = 'jquery_lazyload/jquery.lazyload.js?v=1.9.7' %}
|
||||
{% 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' %}
|
||||
{% endif %}
|
||||
{% if theme.canvas_nest %}
|
||||
{% set js_vendors.canvas_nest = 'canvas-nest/canvas-nest.min.js' %}
|
||||
{% endif %}
|
||||
|
||||
{% if theme.three_waves %}
|
||||
{% 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' %}
|
||||
{% endif %}
|
||||
|
||||
{% if theme.canvas_sphere %}
|
||||
{% 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' %}
|
||||
{% endif %}
|
||||
|
||||
{% for name, internal in js_vendors %}
|
||||
{% set internal_script = url_for(theme.vendors._internal) + '/' + internal %}
|
||||
{% 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 %}
|
Reference in New Issue
Block a user