Skip to content

Commit 5b3a82d

Browse files
committed
Fix broken Markdown headings
1 parent 7bc6ba9 commit 5b3a82d

File tree

18 files changed

+84
-84
lines changed

18 files changed

+84
-84
lines changed

CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#Changelog
1+
# Changelog
22

3-
##2.0.0
3+
## 2.0.0
44

55
* lazysizes core:
66
* heavily improved performance (`requestIdleCallback`, better debouncing and a lot more).
77
* plugins:
88
* new plugin: [**object fit polyfill**](plugins/object-fit).
99
* improved new options for [parent-fit plugin](plugins/parent-fit).
1010

11-
##1.5.0
11+
## 1.5.0
1212
Breaking change:
1313
* the lazysizes.js and lazysizes.min.js files do not register as AMD modules anymore, if you need an AMD module use the new lazysizes-umd.js or lazysizes-umd.min.js file.
1414
* lazysizes core:
@@ -21,7 +21,7 @@ Breaking change:
2121
* unload plugin:
2222
unload plugin was broken since version 1.4.0 (thanks to @hokamoto)
2323

24-
##1.4.0
24+
## 1.4.0
2525
* lazysizes core:
2626
* improved lazyloading in background tabs.
2727
* improved avoiding layout thrashing
@@ -31,7 +31,7 @@ Breaking change:
3131
* rias (and bgset):
3232
* added support for height calculation (thx to @LRancez, [#213](https://github.com/aFarkas/lazysizes/pull/213))
3333

34-
##1.3.2
34+
## 1.3.2
3535

3636
* lazysizes core:
3737
* add `hFactor` option (see #181).
@@ -40,7 +40,7 @@ Breaking change:
4040
* bgset plugin:
4141
* add an empty alt to image (see #200).
4242

43-
##1.3.1 version
43+
## 1.3.1 version
4444

4545
* lazysizes core:
4646
* replace `setImmediate` with `setTimeout` (improved performance for IE/EDGE).

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ It may become also your number one tool to integrate responsive images. It can a
4040
```
4141

4242

43-
##[Demo with code examples](http://afarkas.github.io/lazysizes/#examples)
43+
## [Demo with code examples](http://afarkas.github.io/lazysizes/#examples)
4444
Can be seen [here](http://afarkas.github.io/lazysizes/#examples)
4545

4646
## Responsive image support (picture and/or srcset)
@@ -417,7 +417,7 @@ $(document).on('lazybeforesizes', function(e){
417417
```
418418

419419
#### JS API - methods
420-
#####``lazySizes.loader.unveil(DOMNode)``
420+
##### ``lazySizes.loader.unveil(DOMNode)``
421421

422422
In case a developer wants to show an image even if it is not inside the viewport the ``lazySizes.loader.unveil(DOMNode)`` can be called:
423423

@@ -427,19 +427,19 @@ lazySizes.loader.unveil(imgElem);
427427

428428
Note: As a more lazy alternative the ``lazypreload`` class can be set: ``$(imgElem).addClass('lazypreload');``.
429429

430-
#####``lazySizes.autoSizer.checkElems()``
430+
##### ``lazySizes.autoSizer.checkElems()``
431431

432432
In case one or more image elements with the attribute ``data-sizes="auto"`` have changed in size ``lazySizes.autoSizer.updateElems`` can be called (For example to implement element queries):
433433

434434
```js
435435
lazySizes.autoSizer.checkElems();
436436
```
437437

438-
#####``lazySizes.loader.checkElems()``
438+
##### ``lazySizes.loader.checkElems()``
439439

440440
Tests whether new elements has came into view. Normally this method only needs to be called, if ``lazySizesConfig.loadMode`` was set to ``0``.
441441

442-
#####``lazySizes.init()``
442+
##### ``lazySizes.init()``
443443

444444
LazySizes initializes itself automatically. In case you set ``lazySizesConfig.init`` to ``false`` you need to explicitly call ``lazySizes.init()``. Note: You can speed up initial loading of in view images if you call `lazySizesConfig.init()` explicitly after lazysizes and all plugins are loaded.
445445

plugins/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#lazysizes plugins/extensions/snippets
1+
# lazysizes plugins/extensions/snippets
22

33
**lazysizes** works out of the box with standard and responsive images (``src``, ``srcset`` and ``picture``) and iframes.
44

plugins/aspectratio/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#lazysizes aspectratio extension
1+
# lazysizes aspectratio extension
22

33
This plugin helps to pre-occupy the space needed for an image by calculating the height from the image width or the width from the height (This means the width or height has to be calculable before the image is loaded). This can serve as an alternative to the different CSS intrinsic ratio patterns.
44

55
Note: The CSS patterns are recommended, but especially in case of different ratio's for art directed images not so convenient.
66

7-
##Markup API:
7+
## Markup API:
88

99
The value of the ``data-aspectratio`` has to be defined as the *width* divided by the *height* of the image.
1010

@@ -47,7 +47,7 @@ Example values for an image with a width of 400 and a height of 200 (all mean th
4747
</picture>
4848
```
4949

50-
##JS API
50+
## JS API
5151

5252
In case new elements are added to the DOM the global ``imageRatio.processImages`` method can be used. The method takes either an element representing the container/wrapper of the new elements or a list of image elements:
5353

plugins/attrchange/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#lazysizes attribute change / re-initialization extension
1+
# lazysizes attribute change / re-initialization extension
22

33
In case you are changing the ``data-src``/``data-srcset`` attributes of already transformed lazyload elements dynamically, you normally also must re-add the ``lazyload`` class to the element.
44

plugins/bgset/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#lazysizes bgset extension - responsive background images
1+
# lazysizes bgset extension - responsive background images
22

33
This simple and small plugin allows you to define multiple background images with a width descriptor, similar to how ``img[srcset]`` works as also art directed images using media queries, similar to how ``picture`` works.
44

plugins/custommedia/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#lazysizes custommedia extension
1+
# lazysizes custommedia extension
22

33
lazySizes custommedia extension allows you to automatically sync and manage your breakpoints between your CSS and the ``media`` attributes of your ``"picture > source"`` elements using the ``customMedia`` option of lazySizes.
44

5-
##Configuration via CSS
5+
## Configuration via CSS
66

77
The following CSS...
88

plugins/include/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#lazysizes include plugin
1+
# lazysizes include plugin
22

33
**lazysizes** include extension/plugin asynchronously include non crucial content, styles or JS modules. Due to lazyloading, prioritized queuing and preload after load techniques lazySizes include extension scales much better than similar other solutions.
44

@@ -11,7 +11,7 @@ Typical use cases are:
1111
* clean and simple architecture for initialization/loading and/or destroying/unloading of (conditional) JS behaviors
1212
* deferred self-initializing of DOM behaviors
1313

14-
##Basic usage
14+
## Basic usage
1515

1616
Put a ``data-include`` attribute on your ``.lazyload`` element and reference the URL to load:
1717

@@ -30,7 +30,7 @@ The ``data-include`` can also consume a list of candidates represented by a URL
3030

3131
The condition is either a media query or the name of a configured condition rule. The condition rule can be configured through CSS or through JS via the ``include.conditions`` option.
3232

33-
###Condition configuration through CSS
33+
### Condition configuration through CSS
3434

3535
The Lazysizes include extension checks wether the condition name matches the CSS ``content`` value the of ``:after`` or ``:before`` pseudo elements from the ``html`` element (can be configured).
3636

@@ -59,7 +59,7 @@ html:after {
5959
</div>
6060
```
6161

62-
###Condition configuration through JS
62+
### Condition configuration through JS
6363

6464
A condition can also be configured through the ``lazySizesConfig.include.conditions`` option map. Each key is either a string representing a media query or a function:
6565

@@ -104,7 +104,7 @@ document.addEventListener('lazyincluded', function(e){
104104
</div>
105105
```
106106

107-
###Loading Styles or (AMD) Modules
107+
### Loading Styles or (AMD) Modules
108108

109109
The include feature can also load CSS, AMD or ES6 modules. To mark an URL as CSS put a ``css:``, to load an AMD module put a ``amd:`` or to load an ES6 module put a ``module:`` identifier in front of the URL:
110110

@@ -127,7 +127,7 @@ Content, Style and AMD includes can also be mixed and used with or without condi
127127

128128
In case content and a behavior include is used together lazySizes will load them in parallel but makes sure to first include the content and then initialize the behavior.
129129

130-
####AMD/ES6 module features
130+
#### AMD/ES6 module features
131131

132132
While you can write your AMD/ES6 module how you want lazysizes include extension will check wether your module provides the following methods:
133133

@@ -205,7 +205,7 @@ In case the content doesn't contain any mutable states, that need to be transfer
205205

206206
The data object is shared between the ``lazyunload``, ``lazytransform`` and ``lazyload`` so that a possible state can be transferred.
207207

208-
####Loading multiple styles and modules
208+
#### Loading multiple styles and modules
209209

210210
Multiple styles or AMD modules for one candidate can be configured by separating them with ``|,|`` signs:
211211

@@ -217,7 +217,7 @@ Multiple styles or AMD modules for one candidate can be configured by separating
217217
</div>
218218
```
219219

220-
###Scalability and queue priority
220+
### Scalability and queue priority
221221

222222
The include feature will always use a download queue to make sure, that multiple includes do not jam the browsers own request queue. In case of many non crucial includes mixed with some crucial includes on one page the ``data-lazyqueue`` attribute can be used to add a queue priority for the include extension:
223223

@@ -252,16 +252,16 @@ The include feature will always use a download queue to make sure, that multiple
252252
</div>
253253
```
254254

255-
###Events
255+
### Events
256256

257257
* ``lazyincludeload`` is a cancelable event fired at the element before the request is started. The ``event.detail`` object can be used to modify the XHR request.
258258
* ``lazyincludeloaded`` is a cancelable event fired at the element after the request is complete, but before the content is added. The ``event.detail.content`` property can be used to modify the content (for example to transform JSON to HTML).
259259
* ``lazyincluded`` is an event fired at the element right after the HTML was injected.
260260

261-
###Options
261+
### Options
262262
All include options are configurable through the ``lazySizesConfig.include`` option object:
263263

264-
####``contentElement`` (default: ``"html"``):
264+
#### ``contentElement`` (default: ``"html"``):
265265

266266
The selector of the element, which should be used to check for the CSS content value:
267267

@@ -274,7 +274,7 @@ window.lazySizesConfig = {
274274
};
275275
```
276276

277-
####``conditions`` option (default: ``{}``):
277+
#### ``conditions`` option (default: ``{}``):
278278
The conditions option can be used to create new custom conditions.
279279

280280
```js
@@ -291,7 +291,7 @@ window.lazySizesConfig = {
291291
};
292292
```
293293

294-
####``map`` option (default: ``{}``):
294+
#### ``map`` option (default: ``{}``):
295295

296296
The ``map`` option allows to map the value of the ``data-include`` attribute to another string. This does not only work for the hole value, but also for parsed parts.
297297

@@ -317,7 +317,7 @@ This option becomes useful to separate content from behavior.
317317

318318
The include feature works together with all normal lazySizes options (i.e.: ``addClasses`` for load indicators), events and methods.
319319

320-
##Reacting to user interaction
320+
## Reacting to user interaction
321321

322322
Of course it is also possible to react to a user interaction.
323323

@@ -366,7 +366,7 @@ $(document).on('click', '.load-include', function(){
366366
</script>
367367
```
368368

369-
##Sharing States between two modules
369+
## Sharing States between two modules
370370

371371

372372
```html

plugins/noscript/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#lazysizes noscript/progressive enhancement extension
1+
# lazysizes noscript/progressive enhancement extension
22

33
The noscript extension is the true ultimate progressive enhancement extension for lazySizes. It allows you to transform any HTML inside a ``noscript`` element as soon as it becomes visible.
44

5-
##Markup
5+
## Markup
66

77
The ``lazyload`` class has to be added to the parent element of the ``noscript`` element and this element has to also have a ``data-noscript`` attribute. As soon as it is near the viewport the content of the ``noscript`` element will replace the content of the ``.lazyload` element.
88

@@ -47,7 +47,7 @@ The ``lazyload`` class has to be added to the parent element of the ``noscript``
4747

4848
**Important note**: While you also can transform responsive images with this plugin, neither the ``data-sizes`` nor the ``customMedia`` features do work with the ``noscript`` extension. Also note: Android 2.x is not supported with this plugin.
4949

50-
##Troubleshooting: Escaped HTML entities
50+
## Troubleshooting: Escaped HTML entities
5151
Normally the content of a ``noscript`` must be retrieved as text. But in some cases for example, if the ``noscript`` element was created in a XML documented/context, it must be retrieved as HTML. This can't be automatically detected.
5252

5353
In case this happens, you can fix this either by making sure that ``noscript`` elements are always created in a *text/html* context or by overriding the ``getNoscriptContent`` option callback:
@@ -60,7 +60,7 @@ window.lazySizesConfig.getNoscriptContent = function(noScript){
6060
};
6161
```
6262

63-
##<a name="ie8"></a>Add IE8- support with conditional comments
63+
## <a name="ie8"></a>Add IE8- support with conditional comments
6464
The noscript extension can also be used in conjunction with conditional comments to add progressive enhancement support for IE8-:
6565

6666
```html

plugins/object-fit/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#lazySizes object fit extension
1+
# lazySizes object fit extension
22

33
This extension polyfills `object-fit`: `cover` and `contain` properties as also the `object-position` in non supporting browsers. Here you find a [simple demo](https://jsfiddle.net/trixta/x2p17f31/).
44

5-
##Usage
5+
## Usage
66

7-
###Include JS files:
7+
### Include JS files:
88
Include lazysizes and lazysizes object fit and optionally lazysizes parent-fit and lazysizes respimg plugin. Lazysizes object-fit and respimg plugin are only needed in browser that don't support object fit or responsive images. Lazysizes parent-fit is recommended if you use object fit responsive images in combination with `data-sizes="auto"`.
99

1010
```html
@@ -18,7 +18,7 @@ Include lazysizes and lazysizes object fit and optionally lazysizes parent-fit a
1818
<script src="../plugins/respimg/ls.respimg.min.js"></script>
1919
```
2020

21-
###Add markup
21+
### Add markup
2222
The object-fit plugin is not a full polyfill.
2323

2424
```html
@@ -39,7 +39,7 @@ The object-fit plugin is not a full polyfill.
3939
</div>
4040
```
4141

42-
###CSS
42+
### CSS
4343

4444
To init the plugin on an image simply use the `font-family` property directly on your image.
4545

plugins/optimumx/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#lazysizes optimumx plugin
1+
# lazysizes optimumx plugin
22

33
**lazysizes** optimumx plugin helps you to limit/constrain the maximum resolution in case the **w descriptor** is used. Simply add the attribute ``data-optimumx="1.6"`` to constrain the max resolution to 1.6.
44

@@ -21,7 +21,7 @@ This plugin depends on the ``data-sizes="auto"`` feature of **lazysizes**.
2121

2222
A **simple [demo can be seen here](http://afarkas.github.io/lazysizes/optimumx/)**. This extension also supports art-directed responsive images using the ``picture`` element.
2323

24-
##Usage
24+
## Usage
2525

2626
```html
2727
<!-- concat the following scripts into one and add them to your HTML -->
@@ -76,7 +76,7 @@ In case you want to use a CDN you can use the combohandler service provided by j
7676
<script src="http://cdn.jsdelivr.net/g/lazysizes(lazysizes.min.js+plugins/optimumx/ls.optimumx.min.js)" async=""></script>
7777
```
7878

79-
###The ``getOptimumX`` option callback
79+
### The ``getOptimumX`` option callback
8080

8181
Normally the image specific optimal pixel density should be added as a floating point number using the ``data-optimumx`` attribute. Additionally it is also possible to add the ``"auto"`` keyword as a value of the ``data-optimumx`` attribute. In that case the ``getOptimumX`` option callback is invoked with the element as the first argument.
8282

@@ -117,7 +117,7 @@ window.lazySizesConfig.config.getOptimumX = function(/*element*/){
117117
};
118118
```
119119

120-
##<a name="compressive-picture-pattern"></a>Background information: Compressive picture pattern
120+
## <a name="compressive-picture-pattern"></a>Background information: Compressive picture pattern
121121

122122
From a perceived performance vs. perceived quality standpoint the best way to deal with High DPI images is to serve higher compressed candidates to clients with high resolution displays.
123123

@@ -173,7 +173,7 @@ Unfortunately these techniques also double or even triple (think 1x: 65-85q, 2x:
173173

174174
But be aware each image has different characteristics: While some images look great on a HIGH DPI device even with a ``data-optimumx="1.2"`` other will need a much higher density for a good perceived quality.
175175

176-
##<a name="lying-sizes"></a>Background information: Lying sizes attribute
176+
## <a name="lying-sizes"></a>Background information: Lying sizes attribute
177177

178178
There is also another much more lightweight way to get a similar effect. Instead of parsing and constraining the ``srcset`` to meet the ``data-optimumx`` constraint, there is also the possibility to modify the ``sizes`` attribute instead.
179179

0 commit comments

Comments
 (0)