mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Merge branch 'master' into chore/setup-gemini-test-environment
This commit is contained in:
commit
b04c3d1354
16
.github/ISSUE_TEMPLATE.md
vendored
16
.github/ISSUE_TEMPLATE.md
vendored
@ -18,11 +18,17 @@
|
||||
|
||||
### Package versions
|
||||
|
||||
- Python: `python --version`
|
||||
- MkDocs: `mkdocs --version`
|
||||
- Material: `pip show mkdocs-material | grep -E ^Version`
|
||||
* Python: `python --version`
|
||||
* MkDocs: `mkdocs --version`
|
||||
* Material: `pip show mkdocs-material | grep -E ^Version`
|
||||
|
||||
### Project configuration
|
||||
|
||||
``` yaml
|
||||
The contents of your mkdocs.yml
|
||||
```
|
||||
|
||||
### System information
|
||||
|
||||
- OS: [The operating system you're running]
|
||||
- Browser: [The browser used, if relevant]
|
||||
* OS: [The operating system you're running]
|
||||
* Browser: [The browser used, if relevant]
|
||||
|
@ -1,6 +1,12 @@
|
||||
mkdocs-material-1.0.3 (2017-01-22)
|
||||
|
||||
* Fixed #117: Table of contents items don't blur on fast scrolling
|
||||
* Refactored sidebar positioning logic
|
||||
* Further reduction of repaints
|
||||
|
||||
mkdocs-material-1.0.2 (2017-01-15)
|
||||
|
||||
* Fixed horizontal scrollbar in content area
|
||||
* Fixed #108: Horizontal scrollbar in content area
|
||||
|
||||
mkdocs-material-1.0.1 (2017-01-14)
|
||||
|
||||
|
@ -12,14 +12,24 @@ To determine the currently installed version, use the following command:
|
||||
|
||||
``` sh
|
||||
pip show mkdocs-material | grep -E ^Version
|
||||
# Version 1.0.0
|
||||
# Version 1.0.3
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
### 1.0.3 <small> _ January 22, 2017</small>
|
||||
|
||||
* Fixed [#117][117]: Table of contents items don't blur on fast scrolling
|
||||
* Refactored sidebar positioning logic
|
||||
* Further reduction of repaints
|
||||
|
||||
[117]: https://github.com/squidfunk/mkdocs-material/issues/117
|
||||
|
||||
### 1.0.2 <small> _ January 15, 2017</small>
|
||||
|
||||
* Fixed horizontal scrollbar in content area
|
||||
* Fixed [#108][108]: Horizontal scrollbar in content area
|
||||
|
||||
[108]: https://github.com/squidfunk/mkdocs-material/issues/108
|
||||
|
||||
### 1.0.1 <small> _ January 14, 2017</small>
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -19,7 +19,7 @@
|
||||
{% else %}
|
||||
<link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.ico">
|
||||
{% endif %}
|
||||
<meta name="generator" content="mkdocs+mkdocs-material#1.0.2">
|
||||
<meta name="generator" content="mkdocs+mkdocs-material#1.0.3">
|
||||
{% endblock %}
|
||||
{% block htmltitle %}
|
||||
{% if page.title %}
|
||||
@ -31,7 +31,7 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block libs %}
|
||||
<script src="{{ base_url }}/assets/javascripts/modernizr-0d3dc73294.js"></script>
|
||||
<script src="{{ base_url }}/assets/javascripts/modernizr-facb31f4a3.js"></script>
|
||||
{% endblock %}
|
||||
{% block fonts %}
|
||||
{% if config.extra.font != "none" %}
|
||||
@ -124,7 +124,7 @@
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<script src="{{ base_url }}/assets/javascripts/application-16f434a21a.js"></script>
|
||||
<script src="{{ base_url }}/assets/javascripts/application-2afe21e0b2.js"></script>
|
||||
<script>var config={url:{base:"{{ base_url }}"}},app=new Application(config);app.initialize()</script>
|
||||
{% for path in extra_javascript %}
|
||||
<script src="{{ path }}"></script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mkdocs-material",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "A Material Design theme for MkDocs",
|
||||
"keywords": [
|
||||
"mkdocs",
|
||||
@ -37,7 +37,7 @@
|
||||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-plugin-transform-react-jsx": "^6.8.0",
|
||||
"babel-polyfill": "^6.20.0",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"babel-preset-es2015": "^6.22.0",
|
||||
"babel-register": "^6.18.0",
|
||||
"babel-root-import": "^4.1.5",
|
||||
"chai": "^3.5.0",
|
||||
@ -45,7 +45,7 @@
|
||||
"css-mqpacker": "^5.0.1",
|
||||
"custom-event-polyfill": "^0.3.0",
|
||||
"del": "^2.2.2",
|
||||
"eslint": "^3.13.1",
|
||||
"eslint": "^3.14.0",
|
||||
"eslint-plugin-mocha": "^4.8.0",
|
||||
"fastclick": "^1.0.6",
|
||||
"gemini": "^4.14.3",
|
||||
|
@ -41,6 +41,9 @@ export default class Blur {
|
||||
this.index_ = 0
|
||||
this.offset_ = window.pageYOffset
|
||||
|
||||
/* Necessary state to correctly reset the index */
|
||||
this.dir_ = false
|
||||
|
||||
/* Index anchor node offsets for fast lookup */
|
||||
this.anchors_ = [].map.call(this.els_, el => {
|
||||
return document.getElementById(el.hash.substring(1))
|
||||
@ -62,6 +65,14 @@ export default class Blur {
|
||||
*/
|
||||
update() {
|
||||
const offset = window.pageYOffset
|
||||
const dir = this.offset_ - offset < 0
|
||||
|
||||
/* Hack: reset index if direction changed, to catch very fast scrolling,
|
||||
because otherwise we would have to register a timer and that sucks */
|
||||
if (this.dir_ !== dir)
|
||||
this.index_ = dir
|
||||
? this.index_ = 0
|
||||
: this.index_ = this.els_.length - 1
|
||||
|
||||
/* Exit when there are no anchors */
|
||||
if (this.anchors_.length === 0)
|
||||
@ -92,8 +103,9 @@ export default class Blur {
|
||||
}
|
||||
}
|
||||
|
||||
/* Remember current offset for next iteration */
|
||||
/* Remember current offset and direction for next iteration */
|
||||
this.offset_ = offset
|
||||
this.dir_ = dir
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user