Skip to content

Commit efced0f

Browse files
committed
Build: Handle pre-releases for UI
Fixes jquerygh-11
1 parent 6275794 commit efced0f

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

templates/index.hbs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,19 @@
3535
<a href="/ui/">See all versions of jQuery UI</a>.
3636
</p>
3737

38-
{{#with ui.[0]}}
39-
{{include "ui-latest"}}
40-
{{/with}}
41-
38+
{{#if ui.[0].latestStable}}
39+
{{#with ui.[0]}}
40+
{{include "ui-latest"}}
41+
{{/with}}
42+
{{/if}}
4243
{{#with ui.[1]}}
4344
{{include "ui-latest"}}
4445
{{/with}}
45-
46+
{{#unless ui.[0].latestStable}}
47+
{{#with ui.[2]}}
48+
{{include "ui-latest"}}
49+
{{/with}}
50+
{{/unless}}
4651
{{#with mobile.latestStable}}
4752
<h2>jQuery Mobile</h2>
4853
<p>

templates/ui.hbs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
66

77
{{#each ui}}
88
<h2>jQuery UI {{major}}</h2>
9-
{{release "jQuery UI" latestStable}}
10-
<h3>Themes</h3>
11-
{{#each latestStable.themes}}
12-
<a href="/ui/{{../latestStable/version}}/themes/{{this}}/jquery-ui.css">{{this}}</a>
13-
{{/each}}
9+
{{#if latestStable}}
10+
{{release "jQuery UI" latestStable}}
11+
<h3>Themes</h3>
12+
{{#each latestStable.themes}}
13+
<a href="/ui/{{../latestStable/version}}/themes/{{this}}/jquery-ui.css">{{this}}</a>
14+
{{/each}}
15+
{{/if}}
1416
{{#if all.length}}
15-
<h3>Previous Releases</h3>
17+
{{#if latestStable}}
18+
<h3>Previous Releases</h3>
19+
{{else}}
20+
<h3>Pre-Releases</h3>
21+
{{/if}}
1622
<ul>
1723
{{#each all}}
1824
<li>

0 commit comments

Comments
 (0)