Skip to content

Commit 36e5985

Browse files
committed
Updated API ref
1 parent df53293 commit 36e5985

File tree

336 files changed

+503
-375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

336 files changed

+503
-375
lines changed

_includes/learnnav.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="row">
44
<div class="nine columns">
55
{%- if include.showmenu -%}
6-
<ul class="navmenu">
6+
<ul class="sidemenu">
77
<li><a href="/examples/animation/basic_tween" class="{% if page.url contains 'examples' %}bold{% endif %}">Examples </a></li>
88
<li><a href="/videos" class="{% if page.url contains 'videos' %}bold{% endif %}">Videos</a></li>
99
<li><a href="/tutorials" class="{% if page.url contains 'tutorials' %}bold{% endif %}">Tutorials</a></li>
@@ -12,7 +12,7 @@
1212
<li><a href="/faq/faq" class="{% if page.url contains 'faq' %}bold{% endif %}">FAQ</a></li>
1313
<li><a href="/codepad/" class="{% if page.url contains 'codepad' %}bold{% endif %}">Codepad</a></li>
1414
</ul>
15-
<select class="navdropdown" onchange="location = this.value;">
15+
<select class="dropdownmenu" onchange="location = this.value;">
1616
<option value="/examples/animation/basic_tween" {% if page.url contains 'examples' %}selected{% endif %}>Examples</option>
1717
<option value="/videos" {% if page.url contains 'videos' %}selected{% endif %}>Videos</option>
1818
<option value="/tutorials" {% if page.url contains 'tutorials' %}selected{% endif %}>Tutorials</option>
@@ -21,7 +21,7 @@
2121
<option value="/faq/faq" {% if page.url contains 'faq' %}selected{% endif %}>FAQ</option>
2222
<option value="/codepad" {% if page.url contains 'codepad' %}selected{% endif %}>Codepad</option>
2323
</select>
24-
<div class="right navdropdown compact">
24+
<div class="right dropdownmenu compact">
2525
<form action="/search">
2626
<input id="search" name="q" type="text" placeholder="Search..."/>
2727
</form>
@@ -31,7 +31,7 @@
3131
{%- endif -%}
3232
</div>
3333
<div class="three columns">
34-
<div class="right navmenu compact">
34+
<div class="right sidemenu compact">
3535
<form action="/search">
3636
<input id="search" name="q" type="text" placeholder="Search..."/>
3737
</form>

_includes/topnav.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="container">
33
<div class="row">
44
<div class="eight columns">
5-
<ul class="navmenu">
5+
<ul class="sidemenu">
66
<li><nobr>{% include octicon.html icon="octicons/home.svg" color="#FFF" zoom="1.25" text=" Defold" link="/" %}</nobr></li>
77
<li><a href="/product">Features</a></li>
88
<li><a href="/showcase">Showcase</a></li>
@@ -12,7 +12,7 @@
1212
<li><a href="//forum.defold.com">Forum</a></li>
1313
<li style="visibility: hidden">{% include octicon.html icon="octicons/desktop-download.svg" color="#FFF" zoom="1.75" %} Download</li>
1414
</ul>
15-
<select class="navdropdown dark-text" onchange="location = this.value;">
15+
<select class="dropdownmenu dark-text" onchange="location = this.value;">
1616
<option value="/">Home</option>
1717
<option value="/product" {% if page.url contains 'product' %}selected{% endif %}>Features</option>
1818
<option value="/showcase" {% if page.url contains 'showcase' %}selected{% endif %}>Showcase</option>
@@ -26,7 +26,7 @@
2626
</select>
2727
</div>
2828
<div class="four columns">
29-
<ul class="navmenu right">
29+
<ul class="sidemenu right">
3030
<li><nobr>{% include octicon.html icon="octicons/heart.svg" color="#FFF" zoom="1.25" text=" Donate" link="/donate" %}</nobr></li>
3131
<li><nobr>{% include octicon.html icon="octicons/arrow-down.svg" color="#FFF" zoom="1.35" text=" Download" link="/download" %}</nobr></li>
3232
<li><nobr>{% include octicon.html icon="octicons/mark-github.svg" color="#FFF" zoom="1.25" text=" GitHub" link="https://www.github.com/defold" target="_blank" %}</nobr></li>

_layouts/api.html

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
layout: base
3+
---
4+
{%- assign branch = page.branch -%}
5+
{%- assign unsortedindices = site.data.refindex | where: "branch", branch -%}
6+
{%- assign indices = unsortedindices | sort: "namespace" -%}
7+
{%- assign branches = site.data.branchindex -%}
8+
{%- assign types = indices | map: "type" | uniq -%}
9+
{%- if page.type == "extension" -%}
10+
{%- assign ref = site.data.extensions[page.ref] -%}
11+
{%- else -%}
12+
{%- assign ref = site.data.ref[page.branch][page.ref] -%}
13+
{%- endif -%}
14+
15+
{%- if page.url contains branch -%}
16+
{%- assign page_url = page.url | replace: branch, "BRANCH" -%}
17+
{%- else -%}
18+
{%- assign page_url = page.url | replace: "ref/", "ref/BRANCH/" -%}
19+
{%- endif -%}
20+
21+
<div id="page" style="position: relative;">
22+
<div id="pagecontent">
23+
<div class="apimenu sidemenu">
24+
<p><a href="/learn"><img src="/images/logo/defold/logo_with_text/logo-hor-classic-dark-160.png"/></a></p>
25+
<form action="/search">
26+
<input id="search" name="q" type="text" placeholder="Search..."/>
27+
</form>
28+
<hr>
29+
<ul class="nobullet">
30+
{%- for type in types -%}
31+
{%- assign refs = indices | where: "type", type -%}
32+
33+
{%- assign checked = "" -%}
34+
{%- for r in refs -%}
35+
{%- assign url = r.url -%}
36+
{%- if page.url contains url -%}
37+
{%- assign checked = "checked" -%}
38+
{%- endif -%}
39+
{%- endfor -%}
40+
41+
<input id="collapsible_{{ type }}" class="toggle" type="checkbox" {{ checked }}/>
42+
<label for="collapsible_{{ type }}" class="togglelabel">{{ type | capitalize }}</label>
43+
<ul class="nobullet">
44+
{%- for r in refs -%}
45+
{%- assign textstyle = "text-decoration: none;" -%}
46+
{%- if page.url contains r.url -%}
47+
{%- assign textstyle = "font-weight: bolder; font-style: italic; text-decoration: none;" -%}
48+
{%- endif -%}
49+
<li style="padding-bottom: 0px;"><a href="{{ r.url }}" style="{{ textstyle }}">{{ r.namespace }}</a></li>
50+
{%- endfor -%}
51+
</ul>
52+
{%- endfor -%}
53+
54+
<input id="branch" class="toggle" type="checkbox" checked/>
55+
<label for="branch" class="togglelabel">Version</label>
56+
<ul class="nobullet">
57+
{%- for b in branches -%}
58+
{%- assign textstyle = "text-decoration: none;" -%}
59+
{%- if page.branch == b -%}
60+
{%- assign textstyle = "font-weight: bolder; font-style: italic; text-decoration: none;" -%}
61+
{%- endif -%}
62+
<li style="padding-left: 2rem; padding-bottom: 0px;"><a href="{{ page_url | replace: 'BRANCH', b }}" style="{{ textstyle }}">{{ b }}</a></li>
63+
{%- endfor -%}
64+
</ul>
65+
</ul>
66+
67+
</div>
68+
69+
<div class="apicontent lightest">
70+
<div class="dropdownmenu">
71+
<p>
72+
<a href="/learn"><img src="/images/logo/defold/logo_with_text/logo-hor-classic-dark-160.png"/></a>
73+
</p>
74+
<form action="/search">
75+
<input id="search" name="q" type="text" placeholder="Search..."/>
76+
</form>
77+
</div>
78+
<select class="dropdownmenu" onchange="location = this.value;">
79+
{%- for r in indices -%}
80+
<option value="{{ r.url }}">{{ r.namespace }}</option>
81+
{%- endfor -%}
82+
</select>
83+
<select class="dropdownmenu" onchange="location = this.value;">
84+
{%- for b in branches -%}
85+
<option value="{{ page_url | replace: 'BRANCH', b }}">{{ b }}</option>
86+
{%- endfor -%}
87+
</select>
88+
{%- if ref.info.group == "DEFOLD SDK" -%}
89+
{%- include api_dmsdk.html ref=ref -%}
90+
{%- else -%}
91+
{%- include api.html ref=ref -%}
92+
{%- endif -%}
93+
</div>
94+
</div>
95+
</div>
96+
97+
{%- include marksearchhits.html div="ref" -%}

_layouts/asset.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
---
44
{%- assign asset = site.data.assets[page.asset] -%}
55
{%- if asset.images.hero contains "https" or asset.images.hero contains "http" -%}

_layouts/assetportal.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
title: Asset Portal
44
nav: floating
55
---

_layouts/author.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
nav: floating
44
---
55
{%- assign author = site.data.authors[page.author] -%}

_layouts/base.html

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@
44
{% include head.html %}
55
</head>
66
<body>
7-
<div id="page">
8-
<div id="pagecontent" {%- if page.background.size > 0 -%} style='background-image: url("{{ page.background }}");' {%- endif -%}>
9-
{% include topnav.html style=page.nav %}
10-
11-
{% include alerts.html %}
12-
{{ content }}
13-
</div>
14-
15-
{% include footer.html %}
16-
</div>
7+
{{ content }}
178
</body>
189
</html>

_layouts/example.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
---
44
{% include learnnav.html showmenu=true %}
55

@@ -8,7 +8,7 @@
88
<div class="row">
99
<div class="columns two">
1010
{% assign all_categories = site.data.examplesindex | map: "category" | uniq %}
11-
<div class="navmenu">
11+
<div class="sidemenu">
1212
{% for category in all_categories %}
1313
{%- assign examples = site.data.examplesindex | where: "category", category -%}
1414
{%- assign checked = "" -%}
@@ -28,8 +28,8 @@
2828
</ul>
2929
{% endfor %}
3030
</div>
31-
<div class="navdropdown">
32-
<select class="navdropdown" onchange="location = this.value;">
31+
<div class="dropdownmenu">
32+
<select class="dropdownmenu" onchange="location = this.value;">
3333
{% for category in all_categories %}
3434
<option value="">{{ category | capitalize }}</option>
3535
{% assign examples = site.data.examplesindex | where: "category", category %}

_layouts/faq.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
---
44
{% include learnnav.html showmenu=true %}
55

_layouts/hero_and_text.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
---
44

55
<div class="section narrow lightest-text">

_layouts/learn.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
title: Learn
44
---
55

_layouts/manual.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
---
44
{% include learnnav.html showmenu=true %}
55

@@ -16,7 +16,7 @@
1616
<div class="container">
1717
<div class="row">
1818
<div class="columns two">
19-
<div class="navmenu">
19+
<div class="sidemenu">
2020
{%- for section in site.data.learnindex.navigation.manuals -%}
2121
{%- assign checked = "" -%}
2222
{%- if current_section == section -%}
@@ -39,8 +39,8 @@
3939
</ul>
4040
{%- endfor -%}
4141
</div>
42-
<div class="navdropdown">
43-
<select class="navdropdown" onchange="location = this.value;">
42+
<div class="dropdownmenu">
43+
<select class="dropdownmenu" onchange="location = this.value;">
4444
{%- for section in site.data.learnindex.navigation.manuals -%}
4545
<option value="">{{ section.name | capitalize }}</option>
4646
{%- for manual in section.items -%}

_layouts/page.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: base
3+
---
4+
<div id="page">
5+
<div id="pagecontent" {%- if page.background.size > 0 -%} style='background-image: url("{{ page.background }}");' {%- endif -%}>
6+
{% include topnav.html style=page.nav %}
7+
8+
{% include alerts.html %}
9+
{{ content }}
10+
</div>
11+
12+
{% include footer.html %}
13+
</div>

_layouts/post.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
---
44
<div class="section lightest">
55
<div class="container">

_layouts/ref.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
---
44
{% include learnnav.html showmenu=true %}
55

@@ -25,7 +25,7 @@
2525
<div class="container">
2626
<div class="row">
2727
<div class="columns two">
28-
<ul id="navmenu" class="navmenu ref nobullet">
28+
<ul id="sidemenu" class="sidemenu ref nobullet scrollable">
2929
{%- for type in types -%}
3030
{%- assign refs = indices | where: "type", type -%}
3131

@@ -62,12 +62,12 @@
6262
{%- endfor -%}
6363
</ul>
6464
</ul>
65-
<select class="navdropdown" onchange="location = this.value;">
65+
<select class="dropdownmenu" onchange="location = this.value;">
6666
{%- for r in indices -%}
6767
<option value="{{ r.url }}">{{ r.namespace }}</option>
6868
{%- endfor -%}
6969
</select>
70-
<select class="navdropdown" onchange="location = this.value;">
70+
<select class="dropdownmenu" onchange="location = this.value;">
7171
{%- for b in branches -%}
7272
<option value="{{ page_url | replace: 'BRANCH', b }}">{{ b }}</option>
7373
{%- endfor -%}
@@ -87,8 +87,8 @@
8787

8888
{%- include marksearchhits.html div="ref" -%}
8989

90-
<script type="text/javascript">
91-
var menu = document.getElementById("navmenu");
90+
<!-- <script type="text/javascript">
91+
var menu = document.getElementById("sidemenu");
9292
if (menu != null) {
9393
var viewportOffset = menu.getBoundingClientRect();
9494
window.onscroll = function() {
@@ -100,4 +100,4 @@
100100
}
101101
};
102102
}
103-
</script>
103+
</script> -->

_layouts/text.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
---
44
<div class="section lightest">
55
<div class="container">

_layouts/tutorial.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
layout: base
2+
layout: page
33
---
44
{% include learnnav.html showmenu=true %}
55

66
<div class="section lightest">
77
<div class="container">
88
<div class="row">
99
<div class="columns two">
10-
<div class="navmenu">
10+
<div class="sidemenu">
1111
<ul class="nobullet">
1212
{% for tutorial in site.data.learnindex.navigation.tutorials %}
1313
{%- assign checked = "" -%}
@@ -20,8 +20,8 @@
2020
{% endfor %}
2121
</ul>
2222
</div>
23-
<div class="navdropdown">
24-
<select class="navdropdown" onchange="location = this.value;">
23+
<div class="dropdownmenu">
24+
<select class="dropdownmenu" onchange="location = this.value;">
2525
{% for tutorial in site.data.learnindex.navigation.tutorials %}
2626
<option value="{{ tutorial.path }}" {% if page.url contains tutorial.path %}selected{% endif %}> - {{ tutorial.name }}</option>
2727
{% endfor %}

authors.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: base
2+
layout: page
33
title: Authors
44
---
55
<div class="section">

0 commit comments

Comments
 (0)