This repository was archived by the owner on Oct 1, 2024. It is now read-only.
forked from discordjs/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppFooter.vue
More file actions
112 lines (95 loc) · 2.21 KB
/
Copy pathAppFooter.vue
File metadata and controls
112 lines (95 loc) · 2.21 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
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
<template>
<footer>
<container>
<strong><router-link to="/">GuildScript</router-link></strong>
<p>A simple to use discord.js like api wrapper for Guilded.gg.</p>
<stats />
<a href="" id="dark-mode-link" @click="toggleDarkMode">
<em class="fa" :class="darkMode ? 'fa-sun-o' : 'fa-moon-o'"></em>
Turn {{ darkMode ? 'on' : 'off' }} the lights
</a>
</container>
<div id="site-meta">
<div id="site-meta-label">π</div>
commit: {{ hash }}<br />
built at: {{ builtAt.toUTCString() }}
</div>
</footer>
</template>
<script>
import Stats from './Stats.vue';
export default {
name: 'djs-footer',
props: ['darkMode'],
components: {
Stats,
},
data() {
return {
hash: GIT_COMMIT_HASH, // eslint-disable-line no-undef
builtAt: new Date(BUILT_AT), // eslint-disable-line no-undef
};
},
methods: {
toggleDarkMode(event) {
this.$emit('toggleDarkMode');
event.preventDefault();
},
},
};
</script>
<style lang="scss">
@import '../styles/theming';
footer {
padding: 3rem;
background: $color-navbar-bg;
color: $color-footer-text;
a {
text-decoration: none;
color: $color-footer-text;
}
a:hover {
color: lighten($color-footer-text, 10%);
}
.container {
text-align: center;
}
.stats {
padding: 0;
list-style: none;
li {
display: inline-block;
padding-left: 0.3em;
&:not(:last-child):after {
content: ','
}
}
}
}
#dark-mode-link {
display: inline-block;
padding: 8px 6px;
border-radius: 4px;
background: $color-primary;
color: white;
font-size: 0.9rem;
&:hover {
background: lighten($color-primary, 10%);
}
}
#site-meta {
float: left;
width: 0.9em;
height: 1em;
overflow: hidden;
white-space: nowrap;
font-size: 0.7em;
color: darken($color-footer-text, 35%);
transition: all 0.6s;
&:hover {
width: 32em;
height: 3.2em;
color: darken($color-footer-text, 10%);
}
}
</style>