-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
59 lines (59 loc) · 2.32 KB
/
index.html
File metadata and controls
59 lines (59 loc) · 2.32 KB
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
<!DOCTYPE html>
<html>
<head>
<title>GitHub Search</title>
<link rel="stylesheet" href="css/spacelab.bootstrap.min.css" />
<link href="css/main.css" media="all" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
<script src="app.js"></script>
</head>
<body ng-app="githubsearch" ng-controller="SearchController as searchCtrl">
<div class="container">
<h1>GitHub search</h1>
<div class="alert alert-danger" role="alert" ng-repeat="error in errors">
{{ error.message }}
</div>
<form role="form" ng-submit="executeSearch()">
<div id="searchbox" class="input-group col-sm-3">
<input type="text" class="form-control" ng-model="query" />
<span class="input-group-btn">
<input type="submit" class="btn btn-primary" value="Search" ng-disabled="!query"/>
</span>
</div>
</form>
<div class="row">
<div id="repolist" class="col-sm-3">
<ul class="nav nav-pills nav-stacked" ng-repeat="repo in repos" ng-click="openRepo(repo.full_name)">
<li ng-class="{active: activeRepo.id === repo.id }"><a href="#" title="{{repo.description}}">{{ repo.full_name }}</a></li>
</ul>
</div>
<div id="activerepo" ng-show="activeRepo" class="col-sm-6">
<p><strong><a href="{{ activeRepo.html_url }}">{{ activeRepo.full_name }}</a></strong> <em>Watched by {{ activeRepo.watchers_count }} people.</em></p>
<p>{{ activeRepo.description }}</p>
<pre>{{ activeRepo.readme }}</pre>
</div>
<div id="user" class="col-sm-3" ng-show="activeRepo">
<div class="panel panel-default">
<div class="panel-heading">
<a href="{{ user.html_url }}">
<img ng-src="{{ user.avatar_url }}" height="20" width="20"/>
<strong>{{ user.login }}</strong>
</a>
</div>
<div class="panel-body">
<div class="repo" ng-repeat="repo in user.repos" ng-click="openRepo(repo.full_name)">
<strong><a href="{{ repo.html_url }}">{{ repo.name }}</a></strong>
<p>{{ repo.description }}</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p class="text-muted">Simple <a href="https://github.com/">GitHub</a> search made with <a href="https://angularjs.org/">AngularJS</a>.</p>
</div>
</div>
</body>
</html>