/
clientlib.html
64 lines (61 loc) · 2.84 KB
/
clientlib.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!--/*
**
* This Sightly component overlays the default AEM 6 component located at
* /libs/granite/sightly/templates/clientlib.html and contains four updates.
*
* See: https://github.com/nateyolles/aem-clientlib-async
*
* 1) The addition of the "loading" expression option. This option accepts
* "async" and "defer" and only affects JavaScript output.
*
* 2) The addition of the "onload" expression option. This option only affects
* JavaScript output.
*
* 3) The addition of the "crossorigin" expression option. This option affects
* both stylesheet and JavaScript output.
*
* 4) Changing the data-sly-use value to use the overlayed Java class. If you
* want to add the Java class to your custom package, you only need to update
* this value.
*
* @author Nate Yolles <yolles@adobe.com>
* @version 2.0.0
* @since 2015-03-19
*/-->
<!--/*
Template used for including CSS client libraries
*/-->
<template data-sly-template.css="${@ categories='Client Library categories',
crossorigin='Accepts anonymous and use-credentials'}">
<section data-sly-test="${request.getResourceResolver}"
data-sly-use.clientlib="${'/apps/clientlib-async/sightly/templates/graniteClientLib.html'}"
data-sly-call="${clientlib.include @ categories=categories, mode='css', crossorigin=crossorigin}"
data-sly-unwrap>
</section>
</template>
<!--/*
Template used for including JS client libraries
*/-->
<template data-sly-template.js="${@ categories='Client Library categories',
loading='Accepts async and defer',
onload='JavaScript to run for async and defer',
crossorigin='Accepts anonymous and use-credentials'}">
<section data-sly-test="${request.getResourceResolver}"
data-sly-use.clientlib="${'/apps/clientlib-async/sightly/templates/graniteClientLib.html'}"
data-sly-call="${clientlib.include @ categories=categories, mode='js', loading=loading, onload=onload, crossorigin=crossorigin}"
data-sly-unwrap>
</section>
</template>
<!--/*
Template used for including ALL client libraries
*/-->
<template data-sly-template.all="${@ categories='Client Library categories',
loading='Accepts async and defer',
onload='JavaScript to run for async and defer',
crossorigin='Accepts anonymous and use-credentials'}">
<section data-sly-test="${request.getResourceResolver}"
data-sly-use.clientlib="${'/apps/clientlib-async/sightly/templates/graniteClientLib.html'}"
data-sly-call="${clientlib.include @ categories=categories, loading=loading, onload=onload, crossorigin=crossorigin}"
data-sly-unwrap>
</section>
</template>