This commit is contained in:
2019-05-30 18:52:14 +08:00
commit aa360a22bf
341 changed files with 30369 additions and 0 deletions

View File

@ -0,0 +1,10 @@
{%
set js_commons = [
'utils.js',
'motion.js'
]
%}
{% for common in js_commons %}
<script src="{{ url_for(theme.js) }}/{{ common }}?v={{ version }}"></script>
{% endfor %}

View File

@ -0,0 +1,3 @@
{% if theme.exturl %}
<script src="{{ url_for(theme.js) }}/exturl.js?v={{ version }}"></script>
{% endif %}

View File

@ -0,0 +1,9 @@
{%
set boot_scripts = [
'next-boot.js'
]
%}
{% for bs in boot_scripts %}
<script src="{{ url_for(theme.js) }}/{{ bs }}?v={{ version }}"></script>
{% endfor %}

View File

@ -0,0 +1,24 @@
<noscript>
<style>
.use-motion .motion-element,
.use-motion .brand,
.use-motion .menu-item,
.sidebar-inner,
.use-motion .post-block,
.use-motion .pagination,
.use-motion .comments,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .collection-title { opacity: initial; }
.use-motion .logo,
.use-motion .site-title,
.use-motion .site-subtitle {
opacity: initial;
top: initial;
}
.use-motion .logo-line-before i { left: initial; }
.use-motion .logo-line-after i { right: initial; }
</style>
</noscript>

View File

@ -0,0 +1,2 @@
<script src="{{ url_for(theme.js) }}/scrollspy.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/post-details.js?v={{ version }}"></script>

View File

@ -0,0 +1 @@
{% include 'pisces.swig' %}

View File

@ -0,0 +1 @@
{% include 'muse.swig' %}

View File

@ -0,0 +1,9 @@
{%
set scripts = [
'schemes/muse.js'
]
%}
{% for script in scripts %}
<script src="{{ url_for(theme.js) }}/{{ script }}?v={{ version }}"></script>
{% endfor %}

View File

@ -0,0 +1,10 @@
{%
set scripts = [
'affix.js',
'schemes/pisces.js'
]
%}
{% for script in scripts %}
<script src="{{ url_for(theme.js) }}/{{ script }}?v={{ version }}"></script>
{% endfor %}

View File

@ -0,0 +1,4 @@
{% if theme.save_scroll %}
<script src="{{ url_for(theme.js) }}/js.cookie.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/scroll-cookie.js?v={{ version }}"></script>
{% endif %}

View File

@ -0,0 +1,72 @@
{# 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>
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' %}
{% if theme.fastclick %}
{% 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' %}
{% endif %}
{% 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' %}
{% 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 %}
{% 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 %}
{% 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' %}
{% 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 %}
{% set canvas_ribbon_uri = url_for(theme.vendors._internal + '/canvas-ribbon/canvas-ribbon.js') %}
{% if theme.vendors.canvas_ribbon %}
{% set canvas_ribbon_uri = theme.vendors.canvas_ribbon %}
{% endif %}
<script id="ribbon" size="{{ theme.canvas_ribbon.size }}" alpha="{{ theme.canvas_ribbon.alpha }}" zIndex="{{theme.canvas_ribbon.zIndex }}" src="{{ canvas_ribbon_uri }}"></script>
{% endif %}
{% if theme.reading_progress.enable %}
{% set js_vendors.reading_progress = 'reading_progress/reading_progress.js' %}
{% endif %}
{% for name, internal in js_vendors %}
{% set internal_script = url_for(theme.vendors._internal + '/' + internal) %}
<script src="{{ theme.vendors[name] | default(internal_script) }}"></script>
{% endfor %}