Merge branch 'develop' of https://source.jalview.org/git/jalview.git into develop
[jalview.git] / examples / biojson-doc / templates / box.html
1 {{!
2  Copyright 2013 Laurent Bovet (laurent.bovet@windmaster.ch)
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 }}
16 {{#scope this}}
17  <div class="box">
18     <div class="box-header box-{{__boxId}}">
19         <div class="box-title" ref="{{__ref}}">
20             {{#name this}}<div class="box-name {{#if root}}title{{/if}}">{{__name}}</div>{{/name}}
21             <div class="box-description desc">{{desc this}}</div>
22             <div class="end"></div>
23         </div>
24     </div>
25      <div class="source-button button" title="Source">{}</div>
26     <div class="box-body">
27         <div class="expand-button button" title="Expand all">+</div>
28         {{#sub this}}
29         <div class="signature">
30             <div class="signature-header">
31                 <div class="signature-type">
32                     {{#primitive this}}
33                         {{signature this null this}}
34                     {{/primitive}}
35                     {{#equals type "array"}}
36                         {{signature this "array" items}}
37                     {{/equals}}
38                     {{#if allOf}}
39                         {{signature this "all of" allOf}}
40                     {{/if}}
41                     {{#if anyOf}}
42                         {{signature this "any of" anyOf}}
43                     {{/if}}
44                     {{#if oneOf}}
45                         {{signature this "one of" oneOf}}
46                     {{/if}}
47                     {{#if not}}
48                         {{signature this "not" not}}
49                     {{/if}}
50                 </div>
51             </div>
52             <div class="signature-box-container">
53                 {{#boxes}}
54                 <div class="box-container" boxid="{{__boxId}}">
55                     {{schema this}}
56                 </div>
57                 {{/boxes}}
58             </div>
59         </div>
60         {{/sub}}
61         {{#if properties}}
62             {{#each properties}}
63             <div class="signature">
64                 <div class="signature-header">
65                     <div class="property-name {{#contains ../required @key}}required{{/contains}}">{{@key}}</div>
66                     <div class="signature-type">
67                         {{#main this}}
68                             {{signature this null this}}
69                         {{/main}}
70                         {{#equals type "array"}}
71                             {{signature this "array" items}}
72                         {{/equals}}
73                         {{#if allOf}}
74                             {{signature this "all of" allOf}}
75                         {{/if}}
76                         {{#if anyOf}}
77                             {{signature this "any of" anyOf}}
78                         {{/if}}
79                         {{#if oneOf}}
80                             {{signature this "one of" oneOf}}
81                         {{/if}}
82                         {{#if additionalProperties}}
83                             {{signature this "map" additionalProperties}}
84                         {{/if}}
85                         {{#if not}}
86                             {{signature this "not" not}}
87                         {{/if}}
88                     </div>
89                     <div class="signature-description desc">{{desc this}}</div>
90                 </div>
91                 <div class="signature-box-container">
92                 {{#boxes}}
93                     <div class="box-container" boxid="{{__boxId}}">
94                         {{schema this}}
95                     </div>
96                 {{/boxes}}
97                 </div>
98             </div>
99             {{/each}}
100         {{/if}}
101
102         {{#if patternProperties}}
103             {{#each patternProperties}}
104             <div class="signature">
105                 <div class="signature-header">
106                     <div class="property-name type-pattern">{{@key}}</div>
107                     <div class="signature-type">
108                         {{#main this}}
109                         {{signature this null this}}
110                         {{/main}}
111                         {{#equals type "array"}}
112                         {{signature this "array" items}}
113                         {{/equals}}
114                         {{#if allOf}}
115                         {{signature this "all of" allOf}}
116                         {{/if}}
117                         {{#if anyOf}}
118                         {{signature this "any of" anyOf}}
119                         {{/if}}
120                         {{#if oneOf}}
121                         {{signature this "one of" oneOf}}
122                         {{/if}}
123                         {{#if not}}
124                         {{signature this "not" not}}
125                         {{/if}}
126                     </div>
127                     <div class="signature-description desc">{{desc this}}</div>
128                 </div>
129                 <div class="signature-box-container">
130                     {{#boxes}}
131                     <div class="box-container" boxid="{{__boxId}}">
132                         {{schema this}}
133                     </div>
134                     {{/boxes}}
135                 </div>
136             </div>
137             {{/each}}
138         {{/if}}
139
140         {{#if additionalProperties}}
141         <div class="signature">
142             <div class="signature-header">
143                 <div class="property-name type-pattern">additional</div>
144                 <div class="signature-type">
145                     {{schema ../additionalProperties}}
146                 </div>
147             </div>
148         </div>
149         {{/if}}
150     </div>
151     <div class="source">
152         <pre class="json-schema">
153 {{source this}}</pre>
154     </div>
155 </div>
156 <div class="end"/>
157 {{/scope}}