forked from JetBrains/kotlin-web-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.html
79 lines (70 loc) · 3.31 KB
/
api.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{% extends 'base.html' %}
{% set docsNavBack={
"url": "/docs/home.html",
"text": "Kotlin Docs"
} %}
{% set newDocsLink = site.data["core"].get(request.path) %}
{% if not newDocsLink %}{% set newDocsLink="/api/core/"%}{% endif %}
{% block scripts %}
<script src="{{ url_for('static', filename='api.js')|autoversion }}"></script>
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ url_for('static', filename='api.css')|autoversion }}">
{% endblock %}
{% block top_banner %}
<p class="api-docs-to-core">
<a class="api-docs-to-core__link" href="{{ newDocsLink }}" target="_blank">
<span class="api-docs-to-core__text">Try the revamped Kotlin docs design →</span>
</a>
<button type="button" class="api-docs-to-core__close api-docs-to-core-close">
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.61589 23.0428L14.0137 15.6461L21.4115 23.0428L23.0554 21.399L15.6576 14.0023L23.0554 6.60444L21.4115 4.96061L14.0137 12.3584L6.61589 4.95947L4.97205 6.6033L12.3699 14.0023L4.97322 21.399L6.61589 23.0428Z" fill="white"/>
</svg>
</button>
</p>
<div class="api-docs-to-core-mobile">
<p class="api-docs-to-core-mobile__text">Try the revamped Kotlin docs design!</p>
<div class="api-docs-to-core-mobile__controls">
<a class="api-docs-to-core-mobile__link" href="{{ newDocsLink }}" target="_blank">Let’s go</a>
<button type="button" class="api-docs-to-core-mobile__close api-docs-to-core-close">No thanks</button>
</div>
</div>
<script>
(function() {
document.querySelectorAll('.api-docs-to-core').forEach(function(node) {
node.addEventListener('mouseover', function(e) {
e.currentTarget.classList.add('api-docs-to-core_hover');
})
});
document.querySelectorAll('.api-docs-to-core-close').forEach(function(node) {
node.addEventListener('click', function(e) {
var node = e.currentTarget;
while (node && !(node.classList.contains('api-docs-to-core') || node.classList.contains('api-docs-to-core-mobile'))) {
node = node.parentNode;
}
if (node) {
node.classList.add('api-docs-to-core-closed');
window.localStorage.setItem('api-docs-to-core', 'yes');
}
});
});
if(window.localStorage.getItem('api-docs-to-core') === 'yes') document
.querySelectorAll('.api-docs-to-core,.api-docs-to-core-mobile').forEach(function(node) {
node.classList.add('api-docs-to-core-closed');
});
})();
</script>
{% endblock %}
{% block content %}
<div class="g-grid">
<div class="api-layout">
<div class="api-layout_button-box">
<a class="scroll-button-back" href="/docs/home.html">← Docs</a>
<button class="scroll-button-top"></button>
</div>
<article role="main" class="page-content g-9">
{{ page.content | safe }}
</article>
</div>
</div>
{% endblock %}