diff --git a/tailwind.config.js b/tailwind.config.js
index 1e6635b..6ce7df1 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,7 +1,7 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
- "./website/**/*.{html,js,css}",
+ "./website/**/*.{html,css}",
"./website/views/*.ejs",
"./website/views/**/*.ejs",
],
@@ -11,7 +11,13 @@ module.exports = {
"primary-color": "#1E2023;",
"secondary-color": "#F5F5F5",
"blue-color": "#18191C",
- "footer": "#27282D"
+ "footer": "#27282D",
+ "button-primary": "5865F2"
+ },
+ fontFamily: {
+ sans: ["QuickSand", "sans-serif"],
+ serif: ["Georgia", "serif"],
+ mono: ["Menlo", "monospace"]
},
}
},
diff --git a/website/index.js b/website/index.js
index 464171f..6777093 100644
--- a/website/index.js
+++ b/website/index.js
@@ -25,7 +25,11 @@ app.use(session({
// set up view engine
app.set('view engine', 'ejs');
app.set('views', path.join(__dirname, '/views'));
-
+// use passport for authentication
+app.use(passport.initialize());
+app.use(passport.session());
+// set up static files
+app.use(express.static(path.join(__dirname, 'public')));
// Import routers
app.use('/bot', bot);
app.use('/admin', admin);
@@ -55,16 +59,34 @@ passport.use(new DiscordStrategy({
}
});
}));
-// use passport for authentication
-app.use(passport.initialize());
-app.use(passport.session());
-// set up static files
-app.use(express.static(path.join(__dirname, 'public')));
// set up routes
app.get('/', (req, res) => {
- res.render('index.ejs');
+ var message = req.session.message;
+ req.session.message = null;
+ if (message) {
+ res.render('index', {
+ message: message
+ });
+ } else {
+ res.render('index.ejs');
+ }
+});
+
+app.get("/robots.txt", function (req, res) {
+ res.set('Content-Type', 'text/plain');
+ res.send(`Sitemap: https://botscord.site/sitemap.xml`);
+});
+app.get("/sitemap.xml", async function (req, res) {
+ let link = "https://botscord.site/";
+ let botdataforxml = await botsdata.find()
+ botdataforxml.forEach(bot => {
+ link += "\nhttps://botscord.site/bot/" + bot.botID + "";
+ })
+ res.set('Content-Type', 'text/xml');
+ res.send(`${link}`);
});
app.listen(port, () => {
+
console.log('Your app is listening on port ' + port);
});
\ No newline at end of file
diff --git a/website/public/css/style.css b/website/public/css/style.css
index 7cdfdd4..3b96e8b 100644
--- a/website/public/css/style.css
+++ b/website/public/css/style.css
@@ -32,7 +32,7 @@ html {
-moz-tab-size: 4; /* 3 */
-o-tab-size: 4;
tab-size: 4; /* 3 */
- font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
+ font-family: QuickSand, sans-serif; /* 4 */
}
/*
@@ -107,7 +107,7 @@ code,
kbd,
samp,
pre {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
+ font-family: Menlo, monospace; /* 1 */
font-size: 1em; /* 2 */
}
@@ -552,6 +552,9 @@ video {
white-space: nowrap;
border-width: 0;
}
+.pointer-events-none {
+ pointer-events: none;
+}
.visible {
visibility: visible;
}
@@ -567,6 +570,19 @@ video {
.relative {
position: relative;
}
+.inset-y-0 {
+ top: 0px;
+ bottom: 0px;
+}
+.right-0 {
+ right: 0px;
+}
+.right-full {
+ right: 100%;
+}
+.left-0 {
+ left: 0px;
+}
.order-3 {
order: 3;
}
@@ -598,6 +614,18 @@ video {
.mr-2 {
margin-right: 0.5rem;
}
+.mr-3 {
+ margin-right: 0.75rem;
+}
+.mb-5 {
+ margin-bottom: 1.25rem;
+}
+.mb-3 {
+ margin-bottom: 0.75rem;
+}
+.ml-2 {
+ margin-left: 0.5rem;
+}
.block {
display: block;
}
@@ -619,6 +647,21 @@ video {
.h-6 {
height: 1.5rem;
}
+.h-32 {
+ height: 8rem;
+}
+.h-8 {
+ height: 2rem;
+}
+.h-5 {
+ height: 1.25rem;
+}
+.h-20 {
+ height: 5rem;
+}
+.h-4 {
+ height: 1rem;
+}
.w-full {
width: 100%;
}
@@ -631,9 +674,30 @@ video {
.w-1 {
width: 0.25rem;
}
+.w-screen {
+ width: 100vw;
+}
+.w-52 {
+ width: 13rem;
+}
+.w-2 {
+ width: 0.5rem;
+}
+.w-5 {
+ width: 1.25rem;
+}
+.w-10 {
+ width: 2.5rem;
+}
.max-w-7xl {
max-width: 80rem;
}
+.max-w-xs {
+ max-width: 20rem;
+}
+.max-w-sm {
+ max-width: 24rem;
+}
.flex-shrink-0 {
flex-shrink: 0;
}
@@ -655,25 +719,90 @@ video {
.resize {
resize: both;
}
+.appearance-none {
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+}
+.flex-col {
+ flex-direction: column;
+}
.flex-wrap {
flex-wrap: wrap;
}
.items-center {
align-items: center;
}
+.justify-center {
+ justify-content: center;
+}
.justify-between {
justify-content: space-between;
}
+.overflow-hidden {
+ overflow: hidden;
+}
+.break-words {
+ overflow-wrap: break-word;
+}
.rounded {
border-radius: 0.25rem;
}
+.rounded-lg {
+ border-radius: 0.5rem;
+}
+.rounded-full {
+ border-radius: 9999px;
+}
+.rounded-t-lg {
+ border-top-left-radius: 0.5rem;
+ border-top-right-radius: 0.5rem;
+}
.border {
border-width: 1px;
}
+.border-4 {
+ border-width: 4px;
+}
+.border-b {
+ border-bottom-width: 1px;
+}
+.border-solid {
+ border-style: solid;
+}
+.border-none {
+ border-style: none;
+}
.border-white {
--tw-border-opacity: 1;
border-color: rgb(255 255 255 / var(--tw-border-opacity));
}
+.border-teal-500 {
+ --tw-border-opacity: 1;
+ border-color: rgb(20 184 166 / var(--tw-border-opacity));
+}
+.border-transparent {
+ border-color: transparent;
+}
+.border-button-primary {
+ border-color: 5865F2;
+}
+.border-gray-300 {
+ --tw-border-opacity: 1;
+ border-color: rgb(209 213 219 / var(--tw-border-opacity));
+}
+.border-blue-700 {
+ --tw-border-opacity: 1;
+ border-color: rgb(29 78 216 / var(--tw-border-opacity));
+}
+.border-gray-600 {
+ --tw-border-opacity: 1;
+ border-color: rgb(75 85 99 / var(--tw-border-opacity));
+}
+.border-blue-color {
+ --tw-border-opacity: 1;
+ border-color: rgb(24 25 28 / var(--tw-border-opacity));
+}
.bg-transparent {
background-color: transparent;
}
@@ -692,9 +821,52 @@ video {
--tw-bg-opacity: 1;
background-color: rgb(39 40 45 / var(--tw-bg-opacity));
}
+.bg-button-primary {
+ background-color: 5865F2;
+}
+.bg-gray-50 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(249 250 251 / var(--tw-bg-opacity));
+}
+.bg-blue-700 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(29 78 216 / var(--tw-bg-opacity));
+}
+.bg-gray-700 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(55 65 81 / var(--tw-bg-opacity));
+}
+.bg-blue-600 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(37 99 235 / var(--tw-bg-opacity));
+}
+.bg-white {
+ --tw-bg-opacity: 1;
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
+}
+.bg-gray-100 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(243 244 246 / var(--tw-bg-opacity));
+}
+.bg-gray-200 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(229 231 235 / var(--tw-bg-opacity));
+}
+.bg-right-top {
+ background-position: right top;
+}
.p-6 {
padding: 1.5rem;
}
+.p-2 {
+ padding: 0.5rem;
+}
+.p-5 {
+ padding: 1.25rem;
+}
+.p-2\.5 {
+ padding: 0.625rem;
+}
.px-3 {
padding-left: 0.75rem;
padding-right: 0.75rem;
@@ -715,6 +887,37 @@ video {
padding-top: 1rem;
padding-bottom: 1rem;
}
+.py-1 {
+ padding-top: 0.25rem;
+ padding-bottom: 0.25rem;
+}
+.px-2 {
+ padding-left: 0.5rem;
+ padding-right: 0.5rem;
+}
+.px-5 {
+ padding-left: 1.25rem;
+ padding-right: 1.25rem;
+}
+.px-6 {
+ padding-left: 1.5rem;
+ padding-right: 1.5rem;
+}
+.pt-2 {
+ padding-top: 0.5rem;
+}
+.pl-3 {
+ padding-left: 0.75rem;
+}
+.pl-10 {
+ padding-left: 2.5rem;
+}
+.pt-4 {
+ padding-top: 1rem;
+}
+.pb-2 {
+ padding-bottom: 0.5rem;
+}
.text-center {
text-align: center;
}
@@ -734,12 +937,23 @@ video {
font-size: 1rem;
line-height: 1.5rem;
}
+.text-lg {
+ font-size: 1.125rem;
+ line-height: 1.75rem;
+}
+.text-xs {
+ font-size: 0.75rem;
+ line-height: 1rem;
+}
.font-bold {
font-weight: 700;
}
.font-semibold {
font-weight: 600;
}
+.font-medium {
+ font-weight: 500;
+}
.uppercase {
text-transform: uppercase;
}
@@ -749,6 +963,9 @@ video {
.leading-none {
line-height: 1;
}
+.leading-tight {
+ line-height: 1.25;
+}
.tracking-tight {
letter-spacing: -0.025em;
}
@@ -776,17 +993,62 @@ video {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity));
}
+.text-gray-700 {
+ --tw-text-opacity: 1;
+ color: rgb(55 65 81 / var(--tw-text-opacity));
+}
+.text-teal-500 {
+ --tw-text-opacity: 1;
+ color: rgb(20 184 166 / var(--tw-text-opacity));
+}
+.text-gray-400 {
+ --tw-text-opacity: 1;
+ color: rgb(156 163 175 / var(--tw-text-opacity));
+}
+.text-primary-color {
+ color: #1E2023;;
+}
.underline {
-webkit-text-decoration-line: underline;
text-decoration-line: underline;
}
+.no-underline {
+ -webkit-text-decoration-line: none;
+ text-decoration-line: none;
+}
.antialiased {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
+.shadow-lg {
+ --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
+ --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
+}
+.shadow-md {
+ --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
+ --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
+}
+.outline-none {
+ outline: 2px solid transparent;
+ outline-offset: 2px;
+}
.outline {
outline-style: solid;
}
+.ring-4 {
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
+}
+.ring-blue-300 {
+ --tw-ring-opacity: 1;
+ --tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity));
+}
+.ring-button-primary {
+ --tw-ring-color: 5865F2;
+}
.drop-shadow {
--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
@@ -810,6 +1072,39 @@ body {
font-family: 'Quicksand', sans-serif;
}
+@font-face {
+ font-family: 'Quicksand';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(https://fonts.gstatic.com/s/quicksand/v30/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkP8o58m-wi40.woff2) format('woff2');
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+@font-face {
+ font-family: 'Quicksand';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(https://fonts.gstatic.com/s/quicksand/v30/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkP8o58i-wi40.woff2) format('woff2');
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+@font-face {
+ font-family: 'Quicksand';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(https://fonts.gstatic.com/s/quicksand/v30/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkP8o58a-wg.woff2) format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+.botscord-button {
+ @extend .bg-button-primary;
+ @extend .hover:bg-button-primary
+}
+
+
/*
:root {
--bg: #18191C;
@@ -856,30 +1151,137 @@ body {
--tooltip-text: #fff;
}*/
+
.hover\:border-transparent:hover {
border-color: transparent;
}
+
+.hover\:bg-button-primary:hover {
+ background-color: 5865F2;
+}
+
+
.hover\:bg-white:hover {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
+
.hover\:text-gray-900:hover {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity));
}
+
.hover\:text-white:hover {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}
+
.hover\:text-teal-500:hover {
--tw-text-opacity: 1;
color: rgb(20 184 166 / var(--tw-text-opacity));
}
+
+.hover\:no-underline:hover {
+ -webkit-text-decoration-line: none;
+ text-decoration-line: none;
+}
+
+
+.focus\:border-blue-500:focus {
+ --tw-border-opacity: 1;
+ border-color: rgb(59 130 246 / var(--tw-border-opacity));
+}
+
+
+.focus\:outline-none:focus {
+ outline: 2px solid transparent;
+ outline-offset: 2px;
+}
+
+
+.focus\:ring-4:focus {
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
+}
+
+
+.focus\:ring-blue-500:focus {
+ --tw-ring-opacity: 1;
+ --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));
+}
+
+
+.focus\:ring-blue-300:focus {
+ --tw-ring-opacity: 1;
+ --tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity));
+}
+
+
+@media (prefers-color-scheme: dark) {
+
+ .dark\:border-gray-600 {
+ --tw-border-opacity: 1;
+ border-color: rgb(75 85 99 / var(--tw-border-opacity));
+ }
+
+ .dark\:bg-primary-color {
+ background-color: #1E2023;;
+ }
+
+ .dark\:bg-button-primary {
+ background-color: 5865F2;
+ }
+
+ .dark\:text-primary-color {
+ color: #1E2023;;
+ }
+
+ .dark\:text-white {
+ --tw-text-opacity: 1;
+ color: rgb(255 255 255 / var(--tw-text-opacity));
+ }
+
+ .dark\:placeholder-gray-400::-moz-placeholder {
+ --tw-placeholder-opacity: 1;
+ color: rgb(156 163 175 / var(--tw-placeholder-opacity));
+ }
+
+ .dark\:placeholder-gray-400::placeholder {
+ --tw-placeholder-opacity: 1;
+ color: rgb(156 163 175 / var(--tw-placeholder-opacity));
+ }
+
+ .dark\:hover\:bg-button-primary:hover {
+ background-color: 5865F2;
+ }
+
+ .dark\:focus\:border-blue-500:focus {
+ --tw-border-opacity: 1;
+ border-color: rgb(59 130 246 / var(--tw-border-opacity));
+ }
+
+ .dark\:focus\:ring-blue-500:focus {
+ --tw-ring-opacity: 1;
+ --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));
+ }
+
+ .dark\:focus\:ring-blue-800:focus {
+ --tw-ring-opacity: 1;
+ --tw-ring-color: rgb(30 64 175 / var(--tw-ring-opacity));
+ }
+
+ .dark\:focus\:ring-button-primary:focus {
+ --tw-ring-color: 5865F2;
+ }
+}
+
+
@media (min-width: 1024px) {
.lg\:mt-0 {
diff --git a/website/public/css/tailwind.css b/website/public/css/tailwind.css
index 824c708..f8e8b94 100644
--- a/website/public/css/tailwind.css
+++ b/website/public/css/tailwind.css
@@ -6,6 +6,41 @@ body {
font-family: 'Quicksand', sans-serif;
}
+@font-face {
+ font-family: 'Quicksand';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(https://fonts.gstatic.com/s/quicksand/v30/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkP8o58m-wi40.woff2) format('woff2');
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+@font-face {
+ font-family: 'Quicksand';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(https://fonts.gstatic.com/s/quicksand/v30/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkP8o58i-wi40.woff2) format('woff2');
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+@font-face {
+ font-family: 'Quicksand';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(https://fonts.gstatic.com/s/quicksand/v30/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkP8o58a-wg.woff2) format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+
+ .botscord-button {
+ @apply .bg-button-primary;
+ @apply .hover: bg-button-primary
+ }
+
+
+
/*
:root {
--bg: #18191C;
diff --git a/website/public/img/logo.png b/website/public/img/logo.png
index df3e31e..3247b8f 100644
Binary files a/website/public/img/logo.png and b/website/public/img/logo.png differ
diff --git a/website/routers/auth/index.js b/website/routers/auth/index.js
index 1d1e044..96a19b0 100644
--- a/website/routers/auth/index.js
+++ b/website/routers/auth/index.js
@@ -1,6 +1,6 @@
var express = require('express'),
- router = express.Router();
- passport = require('passport');
+ router = express.Router(),
+ passport = require('passport');
router.get('/', passport.authenticate('discord'));
@@ -9,4 +9,11 @@ router.get('/callback', passport.authenticate('discord', {
}), function (req, res) {
res.redirect('/secretstuff') // Successful auth
});
+router.get('/logout', function (req, res) {
+ req.logout(function (err) {
+ if (err) { return next(err); }
+ req.session.message = 'You have been logged out';
+ res.redirect('/');
+ });
+});
module.exports = router;
\ No newline at end of file
diff --git a/website/views/includes/header.ejs b/website/views/includes/header.ejs
index 5fb8c7d..25f92fb 100644
--- a/website/views/includes/header.ejs
+++ b/website/views/includes/header.ejs
@@ -6,13 +6,18 @@
BotsCord
+
-