-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
62 lines (58 loc) · 2.78 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
<head>
<link type="text/css" rel="stylesheet" href="http://unpkg.com/bootstrap/dist/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="http://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css"/>
<!-- Add this after vue.js -->
<link type="text/css" rel="stylesheet" href="./styles/index.css"/>
</head>
<div id="app">
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">{{ title }} </h1>
<p class="lead">{{ subtitle }}</p>
<a href="https://github.com/mrlynn/mongodb-stitch-vue-example">View GitHub Repo</a>
</p>
</div>
</div>
<div id="navigation">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="./github-api-example.html">GitHub</a></p>
<a class="btn btn-primary btn-small active" role="button" href="https://github.com/mrlynn/mongodb-stitch-vue-example/blob/master/github-api-example.html">source</a>
</li>
<li class="nav-item center">
<a class="nav-link" href="./mongodb-sdk-example.html">MongoDB Javascript SDK</a></p>
<a class="btn btn-primary btn-small active" role="button" href="https://github.com/mrlynn/mongodb-stitch-vue-example/blob/master/mongodb-sdk-example.html">source</a>
</li>
<li class="nav-item">
<a class="nav-link " href="./mongodb-stitch-service-example.html">MongoDB Stitch Service</a></p>
<a class="centered btn btn-primary btn-small active" role="button" href="https://github.com/mrlynn/mongodb-stitch-vue-example/blob/master/mongodb-stitch-service-example.html">source</a>
</li>
</ul>
</div>
</div>
<script src="https://s3.amazonaws.com/stitch-sdks/js/bundles/4.0.14/stitch.js"></script>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/babel-polyfill@latest/dist/polyfill.min.js"></script>
<script src="http://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js"></script>
<script>
const title = "MongoDB Stitch - Vue.JS Example";
const subtitle = "Welcome to this example application";
const client = stitch.Stitch.initializeDefaultAppClient('hacktoberfest2018-yxogw');
const db = client.getServiceClient(stitch.RemoteMongoClient.factory, 'mongodb-atlas').db('hacktoberfest');
const app = new Vue({
el:'#app',
data: {
entries: [],
title: title,
subtitle: subtitle
},
created () {
fetch('http://api.github.com/search/repositories?q=topic:mongodb+topic:stitch+topic:hacktoberfest')
.then(response => response.json())
.then(json => {
console.log(json.items);
this.entries = json.items;
})
}
})
</script>