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

feature:Implement the load bar at the top of the page #1689

Merged
merged 14 commits into from Jun 1, 2017
6 changes: 6 additions & 0 deletions _config.yml
Expand Up @@ -581,6 +581,10 @@ vendors:
# https://github.com/ethantw/Han
han:

# Internal version: 1.0.2
# https://github.com/HubSpot/pace/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and 2 direct links in comment on 1 and 2 CDN please.
For example:

# https://github.com/HubSpot/pace/
# pace: https://pace.min.js
# pace_css: https://pace-theme-flash.min.css

pace:
pace_css:


# Assets
Expand All @@ -590,3 +594,5 @@ images: images

# Theme version
version: 5.1.1

pace: true
18 changes: 18 additions & 0 deletions layout/_partials/head.swig
Expand Up @@ -3,6 +3,24 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>


{% if theme.pace %}
{% set pace_css_uri = url_for(theme.vendors._internal + '/pace/pace-theme-flash.min.css?v=1.0.2') %}

{% set pace_js_uri = url_for(theme.vendors._internal + '/pace/pace.min.js?v=1.0.2') %}
{% if theme.vendors.pace %}
{% set pace_js_uri = theme.vendors.pace %}
{% endif %}
{% if theme.vendors.pace_css %}
{% set pace_css_uri = theme.vendors.pace_css %}
{% endif %}

<script src="{{ pace_js_uri }}"></script>

<link href="{{ pace_css_uri }}" rel="stylesheet">

{% endif %}


{% if theme.han %}
{% set Han_uri = url_for(theme.vendors._internal + '/Han/dist/han.min.css?v=3.3') %}
{% if theme.vendors.Han %}
Expand Down
1 change: 1 addition & 0 deletions source/lib/pace/pace-theme-flash.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions source/lib/pace/pace.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.