-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (76 loc) · 2.86 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Server Home Page</title>
<!-- this script sets up syle and allows for theme changes -->
<script src="./js/themeswitch.js"></script>
<!-- Vue.js -->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<!-- Axios -->
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<link rel="stylesheet" href="./css/additions.css" />
</head>
<body>
<div id="app">
<p class="text-center title-text-5">
Welcome to {{server.title}} Server
</p>
<div class="container">
<!--Row with two equal columns-->
<!--rows are 12 elements wide-->
<!--we will ignore this to make things simple-->
<div class="row row-flex">
<div
v-for="services in server.services"
:key="services.link"
class="col-md-4 col-sm-6 col-xs-12"
>
<a :href="services.link">
<div class="content bg-primary">
<img
class="center-block logo"
:src="services.img"
alt="services.imgAlt"
loading="lazy"
width="150"
/><br />
<p
class="text-center breaking-text"
>
{{services.linkText}}
</p>
</div>
</a>
</div>
</div>
<div id="themeSwitcher" class="floating-button">🌛</div>
</div>
</div>
<script>
var app = new Vue({
el: "#app",
data: {
server: {},
},
methods: {
getData() {
console.log("running");
this.searchText = false;
axios
.get(`./data/services.json`)
.then(
(response) =>
(this.server = response.data.server)
);
},
},
created() {
this.getData();
},
mounted() {},
});
</script>
</body>
</html>