diff --git a/Dashboard/assets/css/widget.css b/Dashboard/assets/css/widget.css new file mode 100644 index 0000000..0b89afe --- /dev/null +++ b/Dashboard/assets/css/widget.css @@ -0,0 +1,36 @@ +@import url("https://fonts.googleapis.com/css?family=Montserrat&display=swap"); +.center { + position: absolute; + top: 40%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} + +body { + font-family: 'Montserrat', sans-serif; + background: #252525; + color: white; +} + +ul { + list-style: none; +} + +a { + text-decoration: none; +} + +.lists { + position: absolute; + top: 40%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} + +.lists .topgg, +.lists .botlistspace { + padding: 1vh 2vw; +} +/*# sourceMappingURL=widget.css.map */ \ No newline at end of file diff --git a/Dashboard/assets/css/widget.css.map b/Dashboard/assets/css/widget.css.map new file mode 100644 index 0000000..38fa2ce --- /dev/null +++ b/Dashboard/assets/css/widget.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAuCA,OAAO,CAAC,sEAAI;AAEZ,AAAA,OAAO,CAAC;EAxCJ,QAAQ,EAAE,QAAQ;EAGd,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EACT,SAAS,EAAE,qBAAqB;CAqCvC;;AAED,AAAA,IAAI,CAAC;EACD,WAAW,EAAE,wBAAwB;EACrC,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,KAAK;CACf;;AAED,AAAA,EAAE,CAAC;EACC,UAAU,EAAE,IAAI;CACnB;;AAED,AAAA,CAAC,CAAC;EACE,eAAe,EAAE,IAAI;CACxB;;AAED,AAAA,MAAM,CAAC;EA1DH,QAAQ,EAAE,QAAQ;EAGd,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EACT,SAAS,EAAE,qBAAqB;CA6DvC;;AARD,AAII,MAJE,CAIF,MAAM;AAJV,MAAM,CAKF,aAAa,CAAC;EACV,OAAO,EAAE,OACb;CAAC", + "sources": [ + "widget.scss" + ], + "names": [], + "file": "widget.css" +} \ No newline at end of file diff --git a/Dashboard/assets/css/widget.scss b/Dashboard/assets/css/widget.scss new file mode 100644 index 0000000..f8dcf90 --- /dev/null +++ b/Dashboard/assets/css/widget.scss @@ -0,0 +1,68 @@ +@mixin centerer($horizontal: true, $vertical: true) { + position: absolute; + + @if ($horizontal and $vertical) { + top: 40%; + left: 50%; + transform: translate(-50%, -50%); + } + + @else if ($horizontal) { + left: 50%; + transform: translate(-50%, 0); + } + + @else if ($vertical) { + top: 50%; + transform: translate(0, -50%); + } +} + +@mixin Buttons { + font-family: 'Montserrat', sans-serif; + background-color: #ffffff; + /* Green */ + border: none; + /* border-radius: 1vh; */ + font-size: 3vw; + margin: .5vw; + text-align: center; + text-decoration: none; + display: inline-block; + font-weight: bold; + text-transform: uppercase; + + a { + color: rgb(0, 0, 0); + } +} + +@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap'); + +.center { + @include centerer; +} + +body { + font-family: 'Montserrat', sans-serif; + background: #252525; + color: white; +} + +ul { + list-style: none; +} + +a { + text-decoration: none; +} + +.lists { + + @include centerer(); + + .topgg, + .botlistspace { + padding: 1vh 2vw + } +} \ No newline at end of file diff --git a/Dashboard/server.js b/Dashboard/server.js index 457adf8..9084b41 100755 --- a/Dashboard/server.js +++ b/Dashboard/server.js @@ -1,5 +1,12 @@ const express = require('express'); -const { hostname, port, authorization, source, invite, type } = require('../config'); +const { + hostname, + port, + authorization, + source, + invite, + type +} = require('../config'); const db = require('quick.db'); const Backend = new db.table('backend'); const chalk = require('chalk'); @@ -78,13 +85,9 @@ module.exports = (client) => { }); app.get('/widgets', async (req, res) => { res.status(200).render('widgets', { - layout: 'main', - lists: { - topgg: ` - Thaldrin - `, - x: 'Not a real List' - } + layout: 'widgets', + title: 'Widgets', + subtitle: 'Thaldrin' }); }); /* app.get('/this', async (req, res) => { @@ -111,4 +114,4 @@ module.exports = (client) => { console.log(`Listening on ${port}`); }, 1000 * 3); }); -}; +}; \ No newline at end of file diff --git a/DiscordEvents/ready.js b/DiscordEvents/ready.js index bbc3cdb..f8cf4d1 100755 --- a/DiscordEvents/ready.js +++ b/DiscordEvents/ready.js @@ -1,50 +1,12 @@ -const { log } = require('../utils'); +const { + log, + status +} = require('../utils'); const config = require('../config'); const blapi = require('blapi'); //blapi.setLogging(true); -function randomStatus(client) { - const States = [ - { - activity: { - name: 'server fans whirr 💨', - type: 'LISTENING' - }, - status: 'online' - }, - { - activity: { - name: 'True Damage - GIANTS', - type: 'LISTENING' - }, - status: 'online' - }, - { - activity: { - name: `${client.guilds.size} Servers -w-`, - type: 'WATCHING' - }, - status: 'online' - }, - { - activity: { - name: 'Δ & ♫', - type: 'LISTENING' - }, - status: 'online' - }, - { - activity: { - name: `'help | thaldr.in`, - type: 'WATCHING' - }, - status: 'online' - } - // { game: { name: `over ${thal.users.get('318044130796109825').username}~`, type: 'WATCHING' }, status: 'dnd' } - ]; - let status = States[~~(Math.random() * States.length)]; - return client.user.setPresence(status); -} + module.exports = { name: 'ready', @@ -53,9 +15,9 @@ module.exports = { blapi.handle(client, config.apis); } log.hasStarted(); - randomStatus(client); + status.randomStatus(client) setInterval(() => { - randomStatus(client); + status.randomStatus(client); }, 60000); } -}; +}; \ No newline at end of file diff --git a/utils/src/statuses.js b/utils/src/statuses.js index a713cac..0df113a 100755 --- a/utils/src/statuses.js +++ b/utils/src/statuses.js @@ -1,6 +1,121 @@ +function randomStatus(client) { + const States = [{ + activity: { + name: 'server fans whirr 💨', + type: 'LISTENING' + }, + status: 'online' + }, + { + activity: { + name: 'True Damage - GIANTS', + type: 'LISTENING' + }, + status: 'online' + }, + { + activity: { + name: `${client.guilds.size} Servers -w-`, + type: 'WATCHING' + }, + status: 'online' + }, + { + activity: { + name: 'Δ & ♫', + type: 'LISTENING' + }, + status: 'online' + }, + { + activity: { + name: `'help | thaldr.in`, + type: 'WATCHING' + }, + status: 'online' + }, + { + activity: { + name: `Linux Servers`, + type: 'WATCHING' + }, + status: 'online' + }, + { + activity: { + name: `e621 Videos`, + type: 'WATCHING' + }, + status: 'online' + }, + { + activity: { + name: `WannaCry`, + type: 'WATCHING' + }, + status: 'online' + }, + { + activity: { + name: `the Blockchain!`, + type: 'WATCHING' + }, + status: 'online' + }, + { + activity: { + name: `something... ;3`, + type: 'WATCHING' + }, + status: 'online' + }, + { + activity: { + name: `Skynet`, + type: 'WATCHING' + }, + status: 'online' + }, + { + activity: { + name: `Half Life`, + type: 'PLAYING' + }, + status: 'online' + }, + { + activity: { + name: `Half Life 2`, + type: 'PLAYING' + }, + status: 'online' + }, + { + activity: { + name: `Portal`, + type: 'PLAYING' + }, + status: 'online' + }, + { + activity: { + name: `Portal 2`, + type: 'PLAYING' + }, + status: 'online' + } + // { game: { name: `over ${thal.users.get('318044130796109825').username}~`, type: 'WATCHING' }, status: 'dnd' } + ]; + let status = States[~~(Math.random() * States.length)]; + return client.user.setPresence(status); +} + + + module.exports = { playing: "PLAYING", watching: "WATCHING", listening: "LISTENING", - streaming: "STREAMING" -}; + streaming: "STREAMING", + randomStatus +}; \ No newline at end of file diff --git a/views/layouts/main.hbs b/views/layouts/main.hbs index 7845956..31794fb 100644 --- a/views/layouts/main.hbs +++ b/views/layouts/main.hbs @@ -5,31 +5,19 @@ {{title}} | {{subtitle}} - {{!-- --}} + {{!-- --}} - - - {{!-- - - --}} - - -{{!-- - --}} + - - - + + + diff --git a/views/layouts/widgets.hbs b/views/layouts/widgets.hbs new file mode 100644 index 0000000..8a92037 --- /dev/null +++ b/views/layouts/widgets.hbs @@ -0,0 +1,31 @@ + + + + + + + {{title}} | {{subtitle}} + {{!-- --}} + + + + + + + + + + + + + + + + + + + {{{body}}} + + + + \ No newline at end of file diff --git a/views/widgets.hbs b/views/widgets.hbs index e69de29..58b7d8d 100644 --- a/views/widgets.hbs +++ b/views/widgets.hbs @@ -0,0 +1,14 @@ + +
+
+ + Thaldrin +
+
+ + + +
+
+ \ No newline at end of file