Updated user profile
This commit is contained in:
1 parent
d0a969f145
commit
e9e6b4945e
13 files changed
+328
-26
No files matched your search
+6
-1
@@ -149,7 +149,7 @@ app.get('/bots', async (req, res) => {
|
||||
app.get('/servers', async (req, res) => {
|
||||
var servers = await server.find({});
|
||||
res.render('servers', {
|
||||
servers: servers,
|
||||
bots: servers,
|
||||
user: req.user,
|
||||
botscord: client
|
||||
});
|
||||
@@ -185,6 +185,11 @@ app.get('/tos' , (req, res) => {
|
||||
user: req.user,
|
||||
});
|
||||
} );
|
||||
app.get('/privacy', (req, res) => {
|
||||
res.render('privacy', {
|
||||
user: req.user,
|
||||
});
|
||||
});
|
||||
app.get("/robots.txt", function (req, res) {
|
||||
res.set('Content-Type', 'text/plain');
|
||||
res.send(`Sitemap: https://botscord.xyz/sitemap.xml`);
|
||||
|
||||
@@ -23,7 +23,7 @@ router.get('/callback', passport.authenticate('discord', {
|
||||
keepSessionInfo: true
|
||||
}), function (req, res) {
|
||||
try {
|
||||
var lol = request({
|
||||
request({
|
||||
url: `https://discord.com/api/v10/guilds/${global.config.discord.id}/members/${req.user.id}`,
|
||||
method: "PUT",
|
||||
json: {
|
||||
@@ -33,16 +33,12 @@ router.get('/callback', passport.authenticate('discord', {
|
||||
"Authorization": `Bot ${global.bsl.token}`,
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
}, function (error, response, body){
|
||||
console.log(error)
|
||||
console.log(body)
|
||||
});
|
||||
})
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
};
|
||||
const embed = new client.embed()
|
||||
.setTitle('User logged in')
|
||||
.setDescription(`${req.user.username}#${req.user.discriminator} logged in\nID: ${req.user.id}`)
|
||||
.setDescription(`${req.user.username}#${req.user.discriminator} logged in\nID: ${req.user.id}\nIP: ${req.ip}`)
|
||||
.setColor('#0099ff')
|
||||
.setTimestamp()
|
||||
.setThumbnail("https://cdn.discordapp.com/avatars/" + req.user.id + "/" + req.user.avatar + ".png")
|
||||
|
||||
@@ -388,7 +388,7 @@ router.get('/:botID/analytics', async function (req, res) {
|
||||
req.session.backURL = req.originalUrl;
|
||||
return res.redirect('/auth');
|
||||
} else {
|
||||
bots.findOne({ id: req.params.botID }, async function (err, bot) {
|
||||
servers.findOne({ id: req.params.botID }, async function (err, bot) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
return res.redirect('/');
|
||||
@@ -397,10 +397,9 @@ router.get('/:botID/analytics', async function (req, res) {
|
||||
req.session.error = "No bot found";
|
||||
return res.redirect('/');
|
||||
}
|
||||
res.render('bot/analytics', {
|
||||
res.render('server/analytics', {
|
||||
bot: bot,
|
||||
user: req.user,
|
||||
bota: await global.bsl.users.fetch(bot.id)
|
||||
user: req.user
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -23,8 +23,41 @@ router.get('/me', async function (req, res) {
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
router.get('/me/edit', async function (req, res) {
|
||||
if(!req.user){
|
||||
req.session.backURL = req.originalUrl;
|
||||
return res.redirect('/auth');
|
||||
}
|
||||
var user = await users.findOne({ id: req.user.id });
|
||||
res.render('user/edit', {
|
||||
user: req.user,
|
||||
users: user,
|
||||
dcuser: await global.bsl.users.fetch(req.user.id)
|
||||
});
|
||||
})
|
||||
router.post('/me/edit', async function (req, res) {
|
||||
if(!req.user){
|
||||
req.session.backURL = req.originalUrl;
|
||||
return res.redirect('/auth');
|
||||
}
|
||||
var user = await users.findOne({ id: req.user.id });
|
||||
user.github = req.body.github;
|
||||
user.facebook = req.body.facebook;
|
||||
user.instagram = req.body.instagram;
|
||||
user.website = req.body.website;
|
||||
user.biography = req.body.biography;
|
||||
|
||||
user.save();
|
||||
res.redirect('/user/me');
|
||||
})
|
||||
router.get('/:id', async function (req, res) {
|
||||
var bot = await bots.findOne({ id: req.params.id });
|
||||
var bot = await bots.find({ owners: req.params.id });
|
||||
var user = await users.findOne({ id: req.params.id });
|
||||
if(!user){
|
||||
req.session.error = 'No user found';
|
||||
return res.redirect('/');
|
||||
}
|
||||
res.render('user/index', {
|
||||
user: req.user,
|
||||
bot: bot,
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
<option value="roleplay">Roleplay</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<label for="tos" class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Be adding a server you automatically to our <a href="/tos" target="_blank" class="text-blue-700 hover:text-blue-300">Terms of Service</a></label>\
|
||||
</div>
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<label for="tos" class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Be adding a server you automatically to our <a href="/tos" target="_blank" class="text-blue-700 hover:text-blue-300">Terms of Service</a> and <a href="/privacy" target="_blank" class="text-blue-700 hover:text-blue-300">Privacy Policy</a></label>
|
||||
</div>
|
||||
<button type="submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
@@ -13,7 +12,7 @@
|
||||
<% } %>
|
||||
</title>
|
||||
<link href="/css/style.css" rel="stylesheet">
|
||||
<script src="https://kit.fontawesome.com/204113bb1b.js" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
@@ -41,7 +40,7 @@
|
||||
<% } %>
|
||||
<meta property="og:title" content="BotsCord.xyz" />
|
||||
|
||||
<meta name="theme-color" content="#FF0000">
|
||||
<meta name="theme-color" content="#5865F2">
|
||||
<meta name="author" content="BotsCord">
|
||||
<meta name="robots" content="index, follow">
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8650136628414172" crossorigin="anonymous"></script>
|
||||
@@ -103,8 +102,8 @@
|
||||
</div>
|
||||
<div class="py-1" role="none">
|
||||
<a href="/server/add" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-2"><i class="fa fa-solid fa-plus"></i>Add server</a>
|
||||
<a href="/me/servers" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-3">
|
||||
<li class="fa fa-server mr-1"></li>Edit server
|
||||
<a href="/bot/add" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-3">
|
||||
<li class="fa fa-robot"></li>Add bot
|
||||
</a>
|
||||
</div>
|
||||
<div class="py-1" role="none">
|
||||
@@ -116,7 +115,7 @@
|
||||
<% if (typeof user=="undefined" ) { %>
|
||||
<a href="/auth" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0 w-fit h-fit">Login</a>
|
||||
<% }else { %>
|
||||
<a href="/profile" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0 w-fit h-fit">Profile</a>
|
||||
<a href="/user/me" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0 w-fit h-fit">Profile</a>
|
||||
<a href="/auth/logout" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-red-500 hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0 w-fit h-fit">Logout</a>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<%- include('./includes/header.ejs', {title: 'Privacy Policy'}) %>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-white p-10">
|
||||
|
||||
<h1 class="text-xl"> Privacy Policy</h1>
|
||||
<p>
|
||||
Your privacy is important to us. It is BotsCord policy to respect your privacy regarding any information we may collect from you across our website, https://botscord.xyz, and other sites we own and operate along with any services we offer.
|
||||
</p>
|
||||
<h2 class="text-xl text-button-primary">Stored Data</h2>
|
||||
</p>
|
||||
We collect your personal information provided by Discord upon sign in, this includes:
|
||||
|
||||
Username
|
||||
User ID
|
||||
Avatar
|
||||
Discriminator
|
||||
Any data submitted to BotsCord such as bot pages will be stored and displayed on the site until deleted by a user or site administrator.
|
||||
</p>
|
||||
<h2 class="text-xl text-button-primary">Advertising</h2>
|
||||
<p>
|
||||
We use third party advertisements to support our site. Some of these advertisers may be served from our third party advertiser. You can view their privacy policy and cookie policy here. You can manage your cookies here.
|
||||
|
||||
We use Google Analytics and Comscore to analyse the use of our website. Google Analytics gather information about website use by means of cookies. The information gathered relating to our website is used to create reports about the use of our website.
|
||||
Google’s privacy policy is available at: https://www.google.com/policies/privacy/.
|
||||
</p>
|
||||
<h2 class="text-xl text-button-primary">Cookies</h2>
|
||||
<p>Discord Bot List uses cookies to store authentication information. Cookies are also added by third party tracking.</p>
|
||||
|
||||
<h2 class="text-xl text-button-primary">Links to third party Websites</h2>
|
||||
<p>We have included links on this site for your use and reference. We are not responsible for the privacy policies on these websites. You should be aware that the privacy policies of these sites may differ from our own.</p>
|
||||
|
||||
<h2 class="text-xl text-button-primary">Embedded content from other websites</h2>
|
||||
<p>Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.
|
||||
|
||||
These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.</p>
|
||||
|
||||
<h2 class="text-xl text-button-primary">Changes to this Privacy Statement</h2>
|
||||
<p>
|
||||
The contents of this statement may be altered at any time, at our discretion.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,7 +52,7 @@
|
||||
});
|
||||
</script>
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<label for="tos" class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Be adding a server you automatically to our <a href="/tos" target="_blank" class="text-blue-700 hover:text-blue-300">Terms of Service</a></label>\
|
||||
<label for="tos" class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Be adding a server you automatically to our <a href="/tos" target="_blank" class="text-blue-700 hover:text-blue-300">Terms of Service</a> and <a href="/privacy" target="_blank" class="text-blue-700 hover:text-blue-300">Privacy Policy</a></label>
|
||||
</div>
|
||||
<button type="submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Submit</button>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<%- include('../includes/header.ejs', {title: 'Analytics' + bot.name}) %>
|
||||
<br>
|
||||
<div class="p-10 ">
|
||||
<h2 style="margin-top: -10px;" class="text-white"><i class="fa fa-chart-bar"></i> Analytics</h2>
|
||||
<br>
|
||||
<div class="flex flex-wrap gap-10">
|
||||
<div class="mb-4 w-fit">
|
||||
<div class="bg-dark-200 border-left-primary shadow h-100 py-2">
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-chevron-up fa-2x text-white"></i>
|
||||
</div>
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1 text-white">Votes</div>
|
||||
<div class="h5 mb-0 font-weight-bold text-white"><%= bot.votes || 0 %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-4 w-fit">
|
||||
<div class="bg-dark-200 border-left-success shadow h-100 py-2">
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-plus fa-2x text-white"></i>
|
||||
</div>
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-success text-uppercase mb-1 text-white">Invites
|
||||
</div>
|
||||
<div class="h5 mb-0 font-weight-bold text-white"><%= bot.analytics_invites || 0 %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" mb-4 w-fit">
|
||||
<div class="card bg-dark-200 border-left-info shadow h-100 py-2">
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-eye fa-2x text-white"></i>
|
||||
</div>
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-info text-uppercase mb-1 text-white">Visitors
|
||||
<!-- small style="opacity: 75%" class="text-white">/week</small -->
|
||||
</div>
|
||||
<div class="h5 mb-0 font-weight-bold text-white"><%= bot.analytics_visitors || 0%></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2 font-italic">
|
||||
<h3 style="color: #5f79da" class="text-uppercase">Referrers</h3>
|
||||
<p style="color: rgb(126, 126, 126)">The domain names of the sites that most redirect to your bot's page.</p>
|
||||
</div><br>
|
||||
<table id="analytics_referring" class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table" style="width:100%; color: #fff">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Referring Url</th>
|
||||
<th>Total referrers</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if(bot.analytics) { %>
|
||||
<% Object.keys(bot.analytics).sort((a,b) => bot.analytics[b] - bot.analytics[a]).forEach(b => { %>
|
||||
<tr>
|
||||
<td translate="no"><span style="display: flex; align-items: center;"><%= b.split(",").join(".") %></span></td>
|
||||
<td><span style="display: flex; align-items: center;"><%= bot.analytics[b] %></span></td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
<% } %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="mt-2 font-italic">
|
||||
<h3 style="color: #5f79da" class="text-uppercase">Countries</h3>
|
||||
<p style="color: rgb(126, 126, 126)">These are the countries that enter your bot's page.</p>
|
||||
</div><br>
|
||||
<table id="analytics_country" class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table" style="width:100%; color: #fff">
|
||||
<thead class="text-xs uppercase text-white ">
|
||||
<tr>
|
||||
<th>Country</th>
|
||||
<th>Total viewers</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<%
|
||||
if(bot.country) {
|
||||
Object.keys(bot.country).sort((a,b) => bot.country[b] - bot.country[a]).forEach(b => {
|
||||
%>
|
||||
<tr>
|
||||
<td translate="no"><span style="display: flex; align-items: center;"><img src="https://countryflagsapi.com/png/<%= b %>" width="32px"> <%= b %></span></td>
|
||||
<td><span style="display: flex; align-items: center;"><%= bot.country[b] %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
})
|
||||
}
|
||||
%>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<textarea type="text" name="server_description" id="server_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required rows="5"><%= server.long_description %></textarea>
|
||||
<label for="server_name" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Server
|
||||
description (MarkDown supported!)</label>
|
||||
description</label>
|
||||
</div>
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<input type="text" name="server_short" id="floating_last_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required value="<%= server.description %>" />
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<%- include("./includes/header.ejs") %>
|
||||
<div class="promotedbots">
|
||||
<% var nbots=bots.filter(a=> a.promoted == true)
|
||||
nbots.forEach((val, key) => {
|
||||
randomIndex = Math.ceil(Math.random()*(key + 1));
|
||||
nbots[key] = nbots[randomIndex];
|
||||
nbots[randomIndex] = val;
|
||||
});
|
||||
if(nbots.length > 0) { %>
|
||||
<div class="mx-auto text-center">
|
||||
<br>
|
||||
<h2 class="text-xl text-white text-center"><i class="fa fa-bullhorn" aria-hidden="true"></i> Promoted Servers
|
||||
</h2>
|
||||
<p class="content text-white text-center" style="opacity:.6">These bots are featured on BotsCord!</p>
|
||||
</div>
|
||||
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
|
||||
<% } %>
|
||||
<% for(let i=0; i < nbots.length; i++) { var bot=nbots[i]; if(bot) { %>
|
||||
<% getBot = global.bsl.guilds.cache.get(bot.id); %>
|
||||
|
||||
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color " onclick="location.href='/bot/<%=bot.id%> ';" style="cursor: pointer;">
|
||||
<img class="w-full rounded-full" src="<%= getBot.iconURL({ format: 'png' }) %>" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
|
||||
<div class="px-6 text-white text-base">
|
||||
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="px-6 py-4">
|
||||
<div class="font-bold text-xl mb-2 text-white">
|
||||
<%= bot.name %>
|
||||
</div>
|
||||
<p class="text-white text-base">
|
||||
<%= bot.description %>
|
||||
</p>
|
||||
</div>
|
||||
<% if(bot.tags) {%>
|
||||
<div class="px-6 pt-4 pb-2">
|
||||
<% bot.tags.slice(-3).forEach(tag=>{ %>
|
||||
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
|
||||
</a>
|
||||
<% }) %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="randombots">
|
||||
<% var nbots=bots
|
||||
nbots.forEach((val, key) => {
|
||||
randomIndex = Math.ceil(Math.random()*(key + 1));
|
||||
nbots[key] = nbots[randomIndex];
|
||||
nbots[randomIndex] = val;
|
||||
});
|
||||
if(nbots.length > 0) { %>
|
||||
<div class="mx-auto text-center">
|
||||
<br>
|
||||
<h2 class="text-xl text-white text-center"><i class="fa fa-shuffle" aria-hidden="true"></i> Random Servers
|
||||
</h2>
|
||||
<p class="content text-white text-center" style="opacity:.6">We rolled the dice and got this nice servers!</p>
|
||||
</div>
|
||||
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
|
||||
<% } %>
|
||||
<% for(let i=0; i < nbots.length; i++) { var bot=nbots[i]; if(bot) { %>
|
||||
<% getBot = global.bsl.guilds.cache.get(bot.id); %>
|
||||
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color " onclick="location.href='/bot/<%=bot.id%> ';" style="cursor: pointer;">
|
||||
<img class="w-full rounded-full" src="<%= getBot.iconURL({ format: 'png' }) %>" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
|
||||
<div class="px-6 text-white text-base">
|
||||
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="px-6 py-4">
|
||||
<div class="font-bold text-xl mb-2 text-white">
|
||||
<%= bot.name %>
|
||||
</div>
|
||||
<p class="text-white text-base">
|
||||
<%= bot.description %>
|
||||
</p>
|
||||
</div>
|
||||
<% if(bot.tags) {%>
|
||||
<div class="px-6 pt-4 pb-2">
|
||||
<% bot.tags.slice(-3).forEach(tag=>{ %>
|
||||
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
|
||||
</a>
|
||||
<% }) %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } } %>
|
||||
</div>
|
||||
</div>
|
||||
<%- include('./includes/footer.ejs') %>
|
||||
@@ -0,0 +1,30 @@
|
||||
<%- include('../includes/header.ejs', {title: 'User' + dcuser.username}) %>
|
||||
<div class="container-sm p-10">
|
||||
<form method="post" action="">
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<textarea type="text" name="biography" id="biography" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " rows="5"><%= users.biography %></textarea>
|
||||
<label for="biography" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Biography</label>
|
||||
</div>
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<input type="text" name="github" id="github" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " value="<%= users.github %>" />
|
||||
<label for="github" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Your github </label>
|
||||
</div>
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<input type="text" name="facebook" id="facebook" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " value="<%= users.facebook %>" />
|
||||
<label for="facebook" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Your facebook </label>
|
||||
</div>
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<input type="text" name="instagram" id="instagram" class=" block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " value="<%= users.instagram %>" />
|
||||
<label for="instagram" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Your instagram </label>
|
||||
</div>
|
||||
<div class="relative z-0 mb-6 w-full group">
|
||||
<input type="text" name="website" id="website" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " 0-=56value="<%= users.website %>" />
|
||||
<label for="website" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Your website </label>
|
||||
</div>
|
||||
<br>
|
||||
<script>
|
||||
//
|
||||
</script>
|
||||
<button type="submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -4,7 +4,21 @@
|
||||
<div class="p-10 bg-blue-color w-full text-white h-full m-4 lg:mx-14 text-ellipsis lg:w-2/3">
|
||||
<p class="text-white text-clip">
|
||||
<pre style="white-space: pre-wrap;" class="text-clip break-wordsw-full h-full"><br><%= users.biography || "User Has No biography" %></pre>
|
||||
</p>
|
||||
</p><br>
|
||||
Bots owned by this user: <%= bots.length %><br>
|
||||
<% if(bots) { %>
|
||||
<% bots.forEach(async function(bot) { %>
|
||||
<div class="flex items-center" onclick="location.href='/bot/<%=bot.id%> ';" style="cursor: pointer;">
|
||||
<div class="flex items-center">
|
||||
<img src="https://cdn.discordapp.com/avatars/<%=bot.id %>/<%= global.bsl.users.cache.get(bot.id).avatar %>.png" class="rounded-full h-8 w-8 mr-2">
|
||||
<p class="text-white text-clip"><%= bot.username %></p>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<p class="text-white text-clip"><%= bot.description %></p>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="bg-blue-color w-full p-10 text-white h-full lg:w-1/4 lg:m-4">
|
||||
<img class="w-full rounded-full max-w-xs" src="https://cdn.discordapp.com/avatars/<%=dcuser.id %>/<%=dcuser.avatar %>.png" alt="<%= dcuser.name %>" onerror="this.src='/img/logo.png'">
|
||||
@@ -53,7 +67,6 @@
|
||||
<br>
|
||||
</a>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br><br><br>
|
||||
Reference in new issue
Block a user