|
1 | 1 | {% capture support_key %}{{ support[0] }}{% endcapture %} |
2 | | - |
3 | 2 | {% capture anysupport %} |
4 | 3 | {% for sw in type.software %} |
5 | 4 | {% if sw.support contains support_key or sw.partial contains support_key %} |
|
9 | 8 | {% endcapture %} |
10 | 9 |
|
11 | 10 | {% if anysupport contains "Y" %} |
12 | | -{% if hide_support_name %}{% else %} |
13 | | -#### {% if support_name %}{{ support_name }}{% else %}{{ support[1].name }} Support{% endif %} |
14 | | -{% endif %} |
15 | 11 |
|
16 | 12 | {% if support[1].note %}{{ support[1].note | markdownify }}{% endif %} |
17 | | -{% assign sw_max = -1 %} |
18 | | -{% assign sw_index = 0 %} |
19 | | -{% assign sw_index_body = 0 %} |
20 | | -{% assign sw_count = 0 %} |
21 | | -{% assign max_sw_per_table = 9 %} |
22 | | -{% assign min_fullwidth_display = 8 %} |
23 | 13 |
|
24 | | -{% for abcxyz in (1..9999) %}<!-- we expect to break out of this loop in all cases, so this is fine --> |
25 | | -{% assign sw_count = 0 %} |
26 | | -{% capture sw_len_cols %}{% for sw in type.software offset:sw_index %}{% assign sw_count = sw_count | plus: 1 %}^{% if sw_count == max_sw_per_table %}{% break %}{% elsif forloop.last %}{% break %}{% endif %}{% endfor %}{% endcapture %} |
27 | | -<div class="sw-table t-{{ support[1].name | slugify }}{% if min_fullwidth_display <= sw_len_cols.size %} fullwidth{% endif %}"><table> |
28 | | - <colgroup> |
29 | | - <col class="name" /> |
30 | | - <col class="software" span="{{ sw_len_cols | size }}" /> |
31 | | - </colgroup> |
| 14 | +{% assign popup_above_after = type.software | size | minus: 3 %} |
| 15 | +{% if popup_above_after < 3 %} |
| 16 | + {% assign popup_above_after = 3 %} |
| 17 | +{% endif %} |
| 18 | + |
| 19 | +<div class="support-table {{ include.swtype }}"><table> |
32 | 20 | <thead> |
33 | 21 | <tr> |
34 | | - <th>Feature</th> |
35 | | - {% assign sw_count = 0 %} |
36 | | - {% assign sw_index_body = sw_index %} |
37 | | - {% for sw in type.software offset:sw_index %} |
38 | | - {% if sw_max == -1 %}{% assign sw_max = forloop.length %}{% endif %} |
39 | | - {% assign sw_index = sw_index | plus: 1 %} |
40 | | - {% assign sw_count = sw_count | plus: 1 %} |
41 | | - <th class="support-head"> |
| 22 | + <th> |
| 23 | + <!-- Software --> |
| 24 | + </th> |
| 25 | + {% for ext in support[1].specs %}{% if ext[1].deprecated %}{% else %} |
| 26 | + {% capture ext_name %}{{ ext[0] }}{% endcapture %} |
| 27 | + |
| 28 | + {% capture should_show_spec %} |
| 29 | + {% for sw in type.software %} |
| 30 | + {% if ext[1].hide-on-servers and type.name contains "Servers" %} |
| 31 | + |
| 32 | + {% elsif ext[1].hide-if-no-support %} |
| 33 | + {% if sw.support[support_key] contains ext_name or sw.partial[support_key] contains ext_name %} |
| 34 | + Y |
| 35 | + {% endif %} |
| 36 | + {% elsif ext[1].draft %} |
| 37 | + {% if sw.support[support_key] contains ext_name or sw.partial[support_key] contains ext_name or sw.na[support_key] contains ext_name %} |
| 38 | + Y |
| 39 | + {% endif %} |
| 40 | + {% else %} |
| 41 | + Y |
| 42 | + {% endif %} |
| 43 | + {% endfor %} |
| 44 | + {% endcapture %} |
| 45 | + |
| 46 | + {% if should_show_spec contains "Y" %} |
| 47 | + <th class="{% if ext[1].required %}required{% elsif ext[1].draft %}draft{% else %}optional{% endif %}"><a class="spec-name" title="{{ ext[1].description }}" href="{% if ext[1].ext_link %}{{ ext[1].ext_link }}{% else %}{{ site.baseurl }}{{ ext[1].link }}{% endif %}">{{ ext[1].name }}</a></th> |
| 48 | + {% endif %} |
| 49 | + {% endif %}{% endfor %} |
| 50 | + </tr> |
| 51 | + </thead> |
| 52 | + <tbody> |
| 53 | + {% assign sw_index = 0 %} |
| 54 | + {% for sw in type.software %} |
| 55 | + {% assign sw_index = sw_index | plus: 1 %} |
| 56 | + {% if sw_index < popup_above_after %} |
| 57 | + {% assign popup_above = false %} |
| 58 | + {% else %} |
| 59 | + {% assign popup_above = true %} |
| 60 | + {% endif %} |
| 61 | + |
| 62 | + <tr class="popup-{% if popup_above %}above{% else %}below{% endif %}"> |
| 63 | + <td> |
42 | 64 | {% if sw.link %}<a{% if sw.ircd-ver || sw.net-address %} class="bold"{% endif %} href="{{ sw.link }}">{{ sw.name }}</a>{% else %}{{ sw.name }}{% endif %} |
43 | 65 | {% if sw.ircd-ver %}<span class="ircd-ver">{{ sw.ircd-ver }}</span>{% endif %} |
44 | 66 | {% if sw.net-address %}<a class="net-address" href="{{ sw.net-address.link }}">{{ sw.net-address.display }}</a>{% endif %} |
|
63 | 85 | {% endfor %} |
64 | 86 | </div> |
65 | 87 | {% endif %} |
66 | | - </th> |
67 | | - {% if sw_count == max_sw_per_table %}{% break %}{% elsif forloop.last %}{% break %}{% endif %} |
68 | | - {% endfor %} |
69 | | - </tr> |
70 | | - </thead> |
71 | | - <tbody> |
72 | | - {% capture length_of_specs %}{% for ext in support[1].specs %}{% if ext[1].deprecated %}{% else %}{% capture ext_name %}{{ ext[0] }}{% endcapture %}{% capture any_draft_support %}{% for sw in type.software %}{% if sw.support[support_key] contains ext_name or sw.partial[support_key] contains ext_name or sw.na[support_key] contains ext_name %}Y{% endif %}{% endfor %}{% endcapture %}{% if any_draft_support contains "Y" %}Y{% endif %}{% endif %}{% endfor %}{% endcapture %} |
73 | | - |
74 | | - {% for ext in support[1].specs %}{% if ext[1].deprecated %}{% else %} |
75 | | - |
76 | | - {% capture ext_name %}{{ ext[0] }}{% endcapture %} |
77 | | - |
| 88 | + </td> |
| 89 | + {% for ext in support[1].specs %}{% if ext[1].deprecated %}{% else %} |
| 90 | + {% capture ext_name %}{{ ext[0] }}{% endcapture %} |
78 | 91 |
|
79 | | - {% assign comment = "decide whether to put the popup above or beneath the name. yes, really." %} |
80 | | - |
81 | | - {% assign real_index = 0 %} |
82 | | - {% for ext2 in support[1].specs %}{% if ext2[1].deprecated %}{% else %} |
83 | | - {% capture ext2_name %}{{ ext2[0] }}{% endcapture %} |
84 | | - {% capture any_ext_support %} |
| 92 | + {% capture should_show_spec %} |
85 | 93 | {% for sw in type.software %} |
86 | | - {% if ext[1].draft %} |
87 | | - {% if sw.support[support_key] contains ext2_name or sw.partial[support_key] contains ext2_name or sw.na[support_key] contains ext2_name %} |
| 94 | + {% if ext[1].hide-on-servers and type.name contains "Servers" %} |
| 95 | + |
| 96 | + {% elsif ext[1].hide-if-no-support %} |
| 97 | + {% if sw.support[support_key] contains ext_name or sw.partial[support_key] contains ext_name %} |
| 98 | + Y |
| 99 | + {% endif %} |
| 100 | + {% elsif ext[1].draft %} |
| 101 | + {% if sw.support[support_key] contains ext_name or sw.partial[support_key] contains ext_name or sw.na[support_key] contains ext_name %} |
88 | 102 | Y |
89 | 103 | {% endif %} |
90 | 104 | {% else %} |
91 | 105 | Y |
92 | 106 | {% endif %} |
93 | 107 | {% endfor %} |
94 | 108 | {% endcapture %} |
95 | | - {% if any_ext_support contains "Y" %} |
96 | | - {% assign real_index = real_index | plus: 1 %} |
97 | | - {% if ext2_name == ext_name %} |
98 | | - {% break %} |
99 | | - {% endif %} |
100 | | - {% endif %} |
101 | | - {% endif %}{% endfor %} |
102 | | - |
103 | | - {% assign forlooplen = length_of_specs.size | minus: 2 %} |
104 | 109 |
|
105 | | - {% if real_index < forlooplen %} |
106 | | - {% assign popup_above = false %} |
107 | | - {% else %} |
108 | | - {% assign popup_above = true %} |
109 | | - {% endif %} |
110 | | - |
111 | | - {% capture should_show_spec %} |
112 | | - {% for sw in type.software %} |
113 | | - {% if ext[1].hide-on-servers and type.name contains "Servers" %} |
114 | | - |
115 | | - {% elsif ext[1].hide-if-no-support %} |
116 | | - {% if sw.support[support_key] contains ext_name or sw.partial[support_key] contains ext_name %} |
117 | | - Y |
118 | | - {% endif %} |
119 | | - {% elsif ext[1].draft %} |
120 | | - {% if sw.support[support_key] contains ext_name or sw.partial[support_key] contains ext_name or sw.na[support_key] contains ext_name %} |
121 | | - Y |
122 | | - {% endif %} |
123 | | - {% else %} |
124 | | - Y |
125 | | - {% endif %} |
126 | | - {% endfor %} |
127 | | - {% endcapture %} |
128 | | - |
129 | | - {% if should_show_spec contains "Y" %} |
130 | | - |
131 | | - <tr class="{% if ext[1].required %}required{% elsif ext[1].draft %}draft{% else %}optional{% endif %} popup-{% if popup_above %}above{% else %}below{% endif %}"> |
132 | | - <td><span><a class="spec-name" title="{{ ext[1].description }}" href="{% if ext[1].ext_link %}{{ ext[1].ext_link }}{% else %}{{ site.baseurl }}{{ ext[1].link }}{% endif %}">{{ ext[1].name }}</a></span></td> |
133 | | - |
134 | | - {% assign sw_count = 0 %} |
135 | | - {% for sw in type.software offset:sw_index_body %} |
136 | | - {% assign sw_count = sw_count | plus: 1 %} |
137 | | - {% if ext[1].deprecated %}{% else %} |
138 | | - <td class="support {% if sw.support[support_key] contains ext_name %}supported{% elsif sw.partial[support_key] contains ext_name %}partial{% elsif sw.na[support_key] contains ext_name %}na{% else %}unsupported{% endif %}"> |
139 | | - {% assign show_cap = true %} |
140 | | - {% if sw.support[support_key] contains ext_name %} |
141 | | - {% assign capab = sw.support[support_key][ext_name] %} |
142 | | - {% assign default = 'Yes' %} |
143 | | - {% elsif sw.partial[support_key] contains ext_name %} |
144 | | - {% assign capab = sw.partial[support_key][ext_name] %} |
145 | | - {% assign default = 'Partial' %} |
146 | | - {% elsif sw.na[support_key] contains ext_name %} |
147 | | - {% assign capab = sw.na[support_key][ext_name] %} |
148 | | - {% assign default = 'N/A' %} |
149 | | - {% else %} |
150 | | - {% assign show_cap = false %} |
151 | | - {% endif %} |
152 | | - |
153 | | - {% if popup_above %}{% else %} |
154 | | - {% if show_cap %} |
155 | | - {% include show_capability.html %} |
| 110 | + {% if should_show_spec contains "Y" %} |
| 111 | + <td data-capname="{{ support[1].specs[ext_name].name }}" class="{% if ext[1].required %}required{% elsif ext[1].draft %}draft{% else %}optional{% endif %} support {% if sw.support[support_key] contains ext_name %}supported{% elsif sw.partial[support_key] contains ext_name %}partial{% elsif sw.na[support_key] contains ext_name %}na{% else %}unsupported{% endif %}"> |
| 112 | + {% assign show_cap = true %} |
| 113 | + {% if sw.support[support_key] contains ext_name %} |
| 114 | + {% assign capab = sw.support[support_key][ext_name] %} |
| 115 | + {% assign default = 'Yes' %} |
| 116 | + {% elsif sw.partial[support_key] contains ext_name %} |
| 117 | + {% assign capab = sw.partial[support_key][ext_name] %} |
| 118 | + {% assign default = 'Partial' %} |
| 119 | + {% elsif sw.na[support_key] contains ext_name %} |
| 120 | + {% assign capab = sw.na[support_key][ext_name] %} |
| 121 | + {% assign default = 'N/A' %} |
156 | 122 | {% else %} |
157 | | - No |
| 123 | + {% assign show_cap = false %} |
158 | 124 | {% endif %} |
159 | | - {% endif %} |
160 | 125 |
|
161 | | - {% if length_of_specs.size >= 5 %} |
162 | | - <div class="hover-popup"><div> |
163 | | - <p class="bold">{{ sw.name }}</p> |
164 | | - <p>{{ ext[1].name }}</p> |
165 | | - {% if info %} |
166 | | - <p class="note">{{ info }}</p> |
| 126 | + {% if popup_above %}{% else %} |
| 127 | + {% if show_cap %} |
| 128 | + {% include show_capability.html %} |
| 129 | + {% else %} |
| 130 | + No |
| 131 | + {% endif %} |
167 | 132 | {% endif %} |
168 | | - </div></div> |
169 | | - {% endif %} |
170 | 133 |
|
171 | | - {% if popup_above %} |
172 | | - {% if show_cap %} |
173 | | - {% include show_capability.html %} |
174 | | - {% else %} |
175 | | - No |
| 134 | + <div class="hover-popup"><div> |
| 135 | + <p class="bold">{{ sw.name }}</p> |
| 136 | + <p>{{ ext[1].name }}</p> |
| 137 | + {% if info %} |
| 138 | + <p class="note">{{ info }}</p> |
| 139 | + {% endif %} |
| 140 | + </div></div> |
| 141 | + |
| 142 | + {% if popup_above %} |
| 143 | + {% if show_cap %} |
| 144 | + {% include show_capability.html %} |
| 145 | + {% else %} |
| 146 | + No |
| 147 | + {% endif %} |
176 | 148 | {% endif %} |
177 | | - {% endif %} |
178 | 149 |
|
179 | | - {% assign info = nil %} |
180 | | - </td> |
| 150 | + {% assign info = nil %} |
| 151 | + </td> |
181 | 152 | {% endif %} |
182 | | - {% if sw_count == max_sw_per_table %}{% break %}{% elsif forloop.last %}{% break %}{% endif %} |
183 | | - {% endfor %} |
| 153 | + {% endif %}{% endfor %} |
184 | 154 | </tr> |
185 | | - {% endif %}{% endif %}{% endfor %} |
| 155 | + {% endfor %} |
186 | 156 | </tbody> |
187 | 157 | </table></div> |
188 | | -{% if sw_index == sw_max %}{% break %}{% endif %} |
189 | | -{% endfor %} |
190 | 158 |
|
191 | 159 | {% endif %} |
0 commit comments