-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
92 lines (87 loc) · 3.7 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>vue-github</title>
<link rel="stylesheet" type="text/css" href="semantic-ui/css/semantic.min.css" />
</head>
<body>
<a href="https://github.com/bigbluehat/vue-github">
<img style="position: absolute; z-index: 1; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/52760788cde945287fbb584134c4cbc2bc36f904/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png">
</a>
<div id="vue-github">
<div class="ui form">
<div class="inline fields">
<div class="ui header field">
<input type="text" placeholder="user or organization" v-model="user" v-on="change: project = ''" />
</div>
<div class="ui huge compact menu" v-component="github-repo-list" v-with="user: user, project: project">
<div class="ui inline dropdown item"
v-on="click: this.$el.firstElementChild.classList.toggle('visible')">
<strong v-if="project" class="text">{{project}}</strong>
<strong v-if="!project" class="text"><span style="color:#AAA">pick a repo</span></strong>
<i class="dropdown icon" v-class="disabled: !project"></i>
<div class="menu">
<div class="item" v-repeat="items" v-on="click: project = name"
v-class="active: project == name">{{name}}</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui segment">
<div class="ui compact menu" v-component="github-branch-list" v-with="user: user, project: project">
<div class="ui inline dropdown item" v-on="click: this.$el.firstElementChild.classList.toggle('visible')">
<strong class="text">{{branch}}</strong> <i class="dropdown icon"></i>
<div class="menu">
<div class="item" v-class="active: branch == 'master'" v-on="click: branch = 'master'">master</div>
<div class="item" v-repeat="items" v-on="click: branch = name"
v-class="active: branch == name">{{name}}</div>
</div>
</div>
</div>
<ul v-component="github-commit-list"
v-with="user: user, project: project, branch: branch">
</ul>
</div>
<div class="ui segment"
v-component="github-milestone-list"
v-with="user: user, project: project">
<h5 class="ui header">Milestones
<a v-if="htmlUrl" href="{{htmlUrl}}" target="_blank">
<i class="basic url icon"></i></a></h5>
<ul class="ui list">
<li class="item" v-if="!items">no milestones</li>
<li class="item" v-repeat="items">
<strong>{{title}}</strong>
<span class="ui label red">{{open_issues}}</span>
<span class="ui label">{{closed_issues}}</span>
</li>
</ul>
</div>
<div class="ui segment"
v-component="github-issue-list"
v-with="user: user, project: project">
<h5 class="ui header">Issues
<a v-if="htmlUrl" href="{{htmlUrl}}" target="_blank">
<i class="basic url icon"></i></a></h5>
<ul class="ui list">
<li class="item" v-if="!items">no issues</li>
<li class="item" v-repeat="items">
{{title}}
</li>
</ul>
</div>
</div>
<script src="dist/bundle.js"></script>
<script>
var app = new VueGithub({
el: '#vue-github',
data: {
user: 'hypothesis',
branch: 'master'
}
});
</script>
</body>
</html>