Skip to content

Commit e3abecd

Browse files
committed
Updated the landing page template
Now includes information about the unstable releases.
1 parent dc50e0d commit e3abecd

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

docs/css/style.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ h2 a {
130130
}
131131
#follow {
132132
margin-bottom: 38px;
133-
margin-left: 109px;
133+
margin-left: 20px;
134134
}
135135
#follow ul {
136136
height: 26px;
@@ -253,3 +253,7 @@ h2 a {
253253
#wrap.homepage #install code, #wrap.homepage #example code {
254254
font-size: 13px;
255255
}
256+
257+
.unstable {
258+
padding-left: 180px;
259+
}

index.jade

+8-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,16 @@ html(lang='en')
3131
li
3232
iframe(class="github-btn", src="http://ghbtns.com/github-btn.html?user=learnboost&repo=mongoose&type=watch&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="100px", height="20px")
3333
li#version
34-
span Version #{package.version}
34+
span
35+
strong Stable:
36+
| Version #{package.version}
37+
strong Unstable:
38+
| Version #{package.unstable}
3539
li
3640
iframe(class="github-btn", src="http://ghbtns.com/github-btn.html?user=learnboost&repo=mongoose&type=fork&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="100px", height="20px")
41+
ul
42+
li.unstable
43+
a(href="https://github.com/LearnBoost/mongoose/wiki/Development-%28unstable%29-branch-details") Get Unstable Release
3744
#example
3845
:js
3946
var mongoose = require('mongoose');

website.js

+12
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ require('./docs/helpers/filters')(jade);
1212

1313
// use last release
1414
package.version = getVersion();
15+
package.unstable = getUnstable(package.version);
1516

1617
var filemap = require('./docs/source');
1718
var files = Object.keys(filemap);
@@ -58,3 +59,14 @@ function getVersion () {
5859
}
5960
throw new Error('no match found');
6061
}
62+
63+
function getUnstable(ver) {
64+
ver = ver.replace("-pre");
65+
var spl = ver.split('.');
66+
spl = spl.map(function (i) {
67+
return parseInt(i);
68+
});
69+
spl[1]++;
70+
spl[2] = "x";
71+
return spl.join('.');
72+
}

0 commit comments

Comments
 (0)