-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
116 lines (87 loc) · 3.14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
layout: default
---
<div class="home" ng-app="galleries">
<div class="themes-gallery">
<nav class="crumbs"><a id="projects"></a> Community projects | <a href="/guidelines">Brand Design Guidelines</a></nav>
<ul class="gallery" ng-controller="themesGallery">
<li ng-repeat="p in projects | filterV1" class="block-linked [[p.specialClass]]">
<div>
<h4><a href="[[p.html_url]]">[[p.name]]</a></h4>
<h5>[[p.description]]</h5>
<nav>
<a href="[[p.git_url]]" class="clone"><i class="fa fa-github-alt"></i></a>
<a href="[[p.html_url]]/graphs/contributors"><i class="fa fa-users"></i></a>
<var class="fork"><i class="fa fa-code-fork"></i> <strong>[[p.forks]]</strong></var>
<var class="love"><i class="fa fa-heartbeat"></i> <strong>[[p.forks_count + p.watchers_count + p.stargazers_count]]</strong></var>
<var class="bug"><i class="fa fa-bug"></i> <strong>[[p.open_issues_count]]</strong></var>
<var class="lang"><strong>[[p.language]]</strong></var>
</nav>
</div>
</li>
</ul>
</div>
</div>
<script>
var
app = angular.module(
'galleries',
[],
function($interpolateProvider, $compileProvider) {
/* NOTE: We need to change the Angular template braces as this is rendered via Jekyll
* Using [[]] instead of {{}}
*/
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
/* Allow GIT URLs */
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|git):/);
});
/* Filter the projects:
*/
app.filter('filterV1', function() {
return function (items) {
if (typeof items === 'undefined') return;
var filtered = [];
l = items.length;
for (var i = 0; i < l; i++) {
var item = items[i];
if ( item.name.match(/(?:^ls[-]|lemonstand.github.com)/) ) {
console.log("Skipping", item.name);
} else {
if ( item.name.match(/^omnipay.*/) ) {
item.specialClass = 'omni';
} else if ( item.name.match(/(?:opsworks|amazon)/) ) {
item.specialClass = 'aws';
} else if ( item.name.match(/(?:^lscloud|^ls2-theme)/)) {
item.specialClass = 'theme';
} else if ( item.name == 'tyrion') {
item.specialClass = 'slackbot';
} else {
item.specialClass = 'zuperproject';
}
filtered.push(item);
}
}
var projectsSort = function(a, b) {
if (a.specialClass > b.specialClass) return -1;
else if (a.specialClass < b.specialClass) return 1;
else return 0;
}
filtered.sort(projectsSort);
return filtered;
};
});
/* Set up the colour display */
themeGalleries = app.controller('themesGallery',
function($scope, $http) {
$http({
url: 'lemonstand-repos.json',
method: 'GET',
}).success(function(d, s, h, c) {
$scope.projects = d;
}).error(function(d, s, h, c) {
console.log('Failed to load repos JSON');
$scope.status = s;
});
});
</script>