|
| 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" -%} |
0 commit comments