-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
227 lines (202 loc) · 9.32 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html ng-app="repository">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular-resource.min.js"></script>
<script src="https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.2.0.js"></script>
<!--<script src="https://google-code-prettify.googlecode.com/svn/loader/prettify.js"></script>-->
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<style type="text/css">
.footer {
border-top: 1px solid #E5E5E5;
margin-top: 10px;
padding: 20px 0;
text-align: center;
}
.artifact {
color: #ccc;
padding-right: 10px;
}
.com { color: #93a1a1; }
.lit { color: #195f91; }
.pun, .opn, .clo { color: #93a1a1; }
.fun { color: #dc322f; }
.str, .atv { color: #D14; }
.kwd, .prettyprint .tag { color: #1e347b; }
.typ, .atn, .dec, .var { color: teal; }
.pln { color: #48484c; }
.prettyprint {
padding: 10px !important;
background-color: #f7f7f9;
border: 1px solid #e1e1e8 !important;
}
.prettyprint.linenums {
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin: 0 0 0 33px; /* IE indents via margin-left */
}
ol.linenums li {
padding-left: 12px;
color: #bebec5;
line-height: 20px;
text-shadow: 0 1px 0 #fff;
}
</style>
<link href="index.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css" rel="stylesheet">
<link rel="icon" href="favicon.png" type="image/png" />
<script>
<!-- Register AngularUI Bootstrap library -->
angular.module('repository', ['ui.bootstrap']);
<!-- Artifact search controller -->
function SearchCtrl($scope, $http, $document) {
$http.get('artifacts.json').success(function(data) {
$scope.artifacts = data;
});
}
<!-- Repository data controller -->
function RepositoryCtrl($window, $scope, $http, $location) {
$http.get('repository.json').success(function(data) {
$scope.repository = data;
$scope.repository.url = $location.absUrl();
$window.document.title = data.name + " - " + data.description;
});
}
var PomViewCtrl = function ($scope, $http) {
$scope.open = function () {
$scope.shouldBeOpen = true;
};
$scope.close = function () {
$scope.shouldBeOpen = false;
};
$http.get($scope.artifact.files.pom.path).success(function(data) {
$scope.pom = data.trim();
});
$scope.opts = {
backdropFade: true,
dialogFade:true
};
};
</script>
</head>
<body>
<!-- Begin page content -->
<div class="container" style="padding-top:20px;">
<div class="row">
<!-- Left side of page, repository info -->
<span ng-controller="RepositoryCtrl" class="span6">
<!-- welcome block -->
<div class="hidden-phone hero-unit">
<h1>{{repository.name}}</h1>
<p>{{repository.description}}</p>
<p><a class="btn btn-medium" href="{{repository.projectUrl}}">Learn more</a></p>
<p class="hidden-tablet">This Maven 2-compatible repository may be used by your preferred build tool to retrieve {{repository.name}} artifacts.</p>
</div>
<!-- build tool snippets -->
<tabs class="hidden-phone">
<pane heading="Moxie">
<pre class="prettyprint lang-yaml">registeredRepositories:
- {
id: '{{repository.id}}'
url: '{{repository.url}}'
affinity: [ '{{repository.affinity}}' ]
}
repositories: 'central', '{{repository.id}}'</pre>
</pane>
<pane heading="Maven">
<pre class="prettyprint lang-xml"><repository>
<id>{{repository.id}}</id>
<name>{{repository.name}}</name>
<url>{{repository.url}}</url>
<layout>default</layout>
</repository></pre>
</pane>
<pane heading="Gradle">
<pre class="prettyprint lang-yaml">repositories {
maven {
url "{{repository.url}}"
}
}</pre>
</pane>
<pane heading="Grape"><pre class="prettyprint lang-java">@GrabResolver(
name='{{repository.id}}',
root='{{repository.url}}')</pre></pane>
<pane heading="Ivy"><pre class="prettyprint lang-xml"><resolvers>
<ibiblio name="{{repository.id}}" m2compatible="true"
root="{{repository.url}}" />
</resolvers></pre></pane>
</tabs>
</span>
<!-- Right side of page, artifact search -->
<span class="span6">
<div ng-controller="SearchCtrl">
<input ng-model="query" type="text" autofocus="true"
placeholder="search on name, description, groupId, artifactId, or version" class="span6 search-query">
<div id="searchResults" ng-show="query.length" style="clear:both;padding-top:10px;">
<p class="lead">Matches for "{{query}}"</p>
<table class="table table-condensed">
<tr ng-repeat="artifact in artifacts | filter:query | orderBy:'-version'">
<td>
<b>{{artifact.name}}</b>
<small>
<p class="muted">
{{artifact.groupId}}:{{artifact.artifactId}}:{{artifact.version}}<br/>
{{artifact.description}}
</p>
<p class="muted">
<span class="artifact" ng-show="artifact.files.package.path.length">
<a href="{{artifact.files.package.path}}">package</a> <small>({{artifact.files.package.size}})</small>
</span>
<span class="artifact" ng-show="artifact.files.sources.path.length">
<a href="{{artifact.files.sources.path}}">sources</a> <small>({{artifact.files.sources.size}})</small>
</span>
<span class="artifact" ng-show="artifact.files.javadoc.path.length">
<a href="{{artifact.files.javadoc.path}}">javadoc</a> <small>({{artifact.files.javadoc.size}})</small>
</span>
</p>
</small>
</td>
<td style="text-align:right;">
<b>{{artifact.version}}</b><br/>
<small>
<em>{{artifact.date}}</em>
</small>
<div ng-controller="PomViewCtrl">
<button class="btn btn-mini" ng-click="open()">View Pom</button>
<div modal="shouldBeOpen" close="close()" options="opts">
<div class="modal-header">
<h4>{{artifact.groupId}}:{{artifact.artifactId}}:{{artifact.version}}</h4>
</div>
<div class="modal-body">
<pre class="prettyprint lang-xml">{{pom}}</pre>
</div>
<div class="modal-footer">
<a class="btn btn-small" href="{{artifact.files.pom.path}}">Download</a>
<button class="btn btn-small btn-primary cancel" ng-click="close()">Close</button>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</span>
</div>
</div>
<footer class="hidden-tablet hidden-phone footer">
<div class="container">
<p class="muted credit">Repository built by the <a href="http://moxie.gitblit.com">Moxie Build Toolkit</a>.</p>
</div>
</footer>
</body>
</html>