widget page

This commit is contained in:
ry 2020-01-09 19:10:20 +01:00
parent 9500bc3a45
commit 5eb34f8a86
7 changed files with 175 additions and 26 deletions

View file

@ -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 */

View file

@ -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"
}

View file

@ -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
}
}

View file

@ -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: `<a href="https://top.gg/bot/434662676547764244" >
<img src="https://top.gg/api/widget/434662676547764244.svg" alt="Thaldrin" />
</a>`,
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);
});
};
};