Added error messages, styled cards, add bot/add
This commit is contained in:
1 parent
0e9c13914b
commit
f788e4de59
11 files changed
+501
-81
No files matched your search
@@ -10,28 +10,16 @@
|
||||
<div class="w-full lg:w-1/2 px-4">
|
||||
<h3 class="text-white font-bold text-xl mb-2">Social</h3>
|
||||
<ul class="list-reset items-center text-center">
|
||||
<li class="inline-block mr-2">
|
||||
<a href="https://twitter.com/BotsCord" class="text-white hover:text-gray-900">
|
||||
<span class="sr-only">Twitter</span>
|
||||
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path fill-rule="evenodd" d="M24 4.557c-.883.392-1.832.656-2.828.775 1.4-.693 2.5-1.717 3.032-3.038-.951.564-2.005.979-3.127 1.068-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.542-.261-2.233-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.209 7.548 2.209 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li class="inline-block mr-2">
|
||||
<a href="https://discord.gg/BotsCord" class="text-white hover:text-gray-900">
|
||||
<span class="sr-only">Discord</span>
|
||||
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path fill-rule="evenodd" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5.1-4.71-.71-6-2.3-.64-.84-1.08-1.89-1.08-3.14 0-2.13 1.65-4.03 4.2-4.2 1.78 0 3.13 1.3 3.72 2.8H14.9c-.68-1.78-2.56-3.2-4.9-3.2-3.44 0-6 2.56-6 6 0 1.65.61 3.17 1.6 4.2.91 1 2.22 1.65 3.63 1.65 3.42 0 5.65-2.37 6-5.8h-2.07z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
<i class="fab fa-discord fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="inline-block mr-2">
|
||||
<a href="" class="text-white hover:text-gray-900">
|
||||
<a href="https://github.com/CorwinDev/BotsCord" class="text-white hover:text-gray-900">
|
||||
<span class="sr-only">GitHub</span>
|
||||
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path fill-rule="evenodd" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5.1-4.71-.71-6-2.3-.64-.84-1.08-1.89-1.08-3.14 0-2.13 1.65-4.03 4.2-4.2 1.78 0 3.13 1.3 3.72 2.8h-1.9c-.68-1.78-2.56-3.2-4.9-3.2-3.44 0-6 2.56-6 6 0 1.65.61 3.17 1.6 4.2.91 1 2.22 1.65 3.63 1.65 3.42 0 5.65-2.37 6-5.8h-2.07c-.05.33-.08.66-.08 1 0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
<i class="fab fa-github fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -40,7 +28,8 @@
|
||||
</div>
|
||||
<div class="text-white text-center">
|
||||
<p>
|
||||
© 2021 - 2022 BotsCord. All rights reserved.
|
||||
© 2021 - 2022 BotsCord. All rights reserved. <br>
|
||||
Made with <i class="fas fa-heart text-red-500"></i> by <a href="https://corwin.dev" class="text-blue-400 hover:text-white">Corwin</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -4,15 +4,21 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=, initial-scale=1.0">
|
||||
<title>BotsCord</title>
|
||||
<title>BotsCord |
|
||||
<% if (typeof title != "undefined") { %>
|
||||
<%= title %>
|
||||
<% } else { %>
|
||||
Home
|
||||
<% } %>
|
||||
</title>
|
||||
<link href="/css/style.css" rel="stylesheet">
|
||||
<link href=https://pro.fontawesome.com/releases/v5.13.1/css/all.css rel=stylesheet>
|
||||
</head>
|
||||
|
||||
<body class="bg-primary-color">
|
||||
<div class="p-2 pl-4 pr-4 bg-blue-color">
|
||||
<div class="p-2 pl-5 pr-5 bg-blue-color">
|
||||
<!-- navbar in tailwind with login buttons -->
|
||||
<nav class="flex items-center justify-between flex-wrap p-6 bg-blue-color">
|
||||
<nav class="flex items-center flex-wrap p-6 bg-blue-color">
|
||||
<div class="flex items-center flex-shrink-0 text-white mr-6">
|
||||
<!-- logo -->
|
||||
<a href="/">
|
||||
@@ -20,29 +26,56 @@
|
||||
</a>
|
||||
<span class="font-semibold text-xl tracking-tight"> BotsCord</span>
|
||||
</div>
|
||||
<div class="w-full block flex-grow lg:flex lg:items-center lg:w-auto">
|
||||
<div class="text-sm lg:flex-grow">
|
||||
<a href="/bots" class="block mt-4 lg:inline-block lg:mt-0 text-white hover:text-white mr-4">
|
||||
Bots
|
||||
</a>
|
||||
<a href="/servers" class="block mt-4 lg:inline-block lg:mt-0 text-white hover:text-white mr-4">
|
||||
Servers
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<% if (typeof user == "undefined") { %>
|
||||
<a href="/login" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 lg:mt-0">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-teal-500 hover:bg-white mt-4 lg:mt-0">Profile</a>
|
||||
<% } %>
|
||||
<button data-collapse-toggle="navbar-solid-bg" type="button" class="inline-flex justify-end items-end ml-3 text-gray-400 rounded-lg lg:hidden hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:text-gray-400 dark:hover:text-white dark:focus:ring-gray-500" aria-controls="navbar-solid-bg" aria-expanded="false" id="trigger">
|
||||
<span class="sr-only">Open main menu</span>
|
||||
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="w-full hidden lg:block flex-grow lg:items-center lg:w-auto" id="navbar-solid-bg">
|
||||
<div class="flex">
|
||||
<div class="text-sm lg:flex-grow">
|
||||
<a href="/bots" class="block lg:inline-block lg:mt-0 text-white hover:text-white mr-4">
|
||||
Bots
|
||||
</a>
|
||||
<a href="/servers" class="block lg:inline-block lg:mt-0 text-white hover:text-white mr-4">
|
||||
Servers
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<% 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">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">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">Logout</a>
|
||||
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!-- end navbar in tailwind -->
|
||||
<!-- show alert if variable message is available -->
|
||||
<% if (typeof message != "undefined") { %>
|
||||
<div class="alert alert-success" role="alert">
|
||||
<%= message %>
|
||||
<% if (typeof error != "undefined") { %>
|
||||
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative" role="alert">
|
||||
<strong class="font-bold">Holy Cows!</strong>
|
||||
<span class="block sm:inline"><br><%= error %></span>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% if (typeof message != "undefined") { %>
|
||||
<div class="bg-white border border-blue-400 text-blue-700 px-4 py-3 rounded relative" role="alert">
|
||||
<strong class="font-bold">Alert!</strong>
|
||||
<span class="block sm:inline"><br><%= message %></span>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<script>
|
||||
const targetEl = document.getElementById("navbar-solid-bg");
|
||||
const triggerEl = document.getElementById("trigger");
|
||||
triggerEl.addEventListener("click", function() {
|
||||
if (targetEl.classList.contains("hidden")) {
|
||||
targetEl.classList.remove("hidden");
|
||||
} else {
|
||||
targetEl.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in new issue
Block a user