<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=, initial-scale=1.0">
  <title>BotsCord |
    <% if (typeof title !="undefined" ) { %>
    <%= title %>
    <% } else { %>
    Home
    <% } %>
  </title>
  <link href="/css/style.css" rel="stylesheet">
  <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">
  <link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
  <link rel="manifest" href="/img/site.webmanifest">
  <!-- meta -->
  <meta name="description" content="BotsCord is a Discord bot that allows you to create your own Discord bot and have it run on your server.">
  <meta name="keywords" content="bots, bot, discord, botscord, botscord.xyz">
  <% if(typeof server !="undefined" ) { %>
  <meta property="og:title" content="BotsCord.xyz" />
  <meta property="og:url" content="http://botscord.xyz/server/<%=server.id %>" />
  <meta property="og:image" content="<%= serverr.icon ? 'https://cdn.discordapp.com/icons/'+server.id+'/'+serverr.icon+'.png?size=1024' : '/img/logo.png' %>" />
  <meta property="og:description" content="<%= server.description %>
  Â­
  ðŸŸ¢ <%= global.bsl.guilds.cache.get(server.id).members.cache.filter(a => a.presence?.status).size %> onlineá… á… á… á… âš« <%= global.bsl.guilds.cache.get(server.id).memberCount %> members">
  <% } else if(typeof bota !="undefined" ) { %>
  <meta property="og:url" content="http://botscord.xyz/server/<%=bota.id %>" />
  <meta property="og:image" content="<%= bota.id ? 'https://cdn.discordapp.com/avatars/'+bota.id+'/'+bota.avatar+'.png?size=1024' : '/img/logo.png' %>" />
  <meta property="og:description" content="<%= bot.description %>">
  <% }else{ %>
  <meta property="og:type" content="website" />
  <meta property="og:url" content="http://botscord.xyz" />
  <meta property="og:image" content="http://botscord.xyz/img/logo.png" />
  <meta property="og:description" content="Botscord is a place where you can promote and vote for your favorite bot/server!" />
  <% } %>
  <meta property="og:title" content="BotsCord.xyz" />

  <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>
  <!-- Google tag (gtag.js) -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-FPKK88G0FZ"></script>
  <script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
      dataLayer.push(arguments);
    }
    gtag('js', new Date());

    gtag('config', 'G-FPKK88G0FZ');
  </script>
</head>

<body class="bg-primary-color">
  <script>
    console.log("%cBotsCord", "color: #FF0000; font-size: 50px; font-weight: bold;");
    console.log("%cBotsCord is a Website that allows you to advertise your own Discord bot and have your users vote for it!.", "color: #FFFFF; font-size: 20px; font-weight: bold;");
    console.log("%cDont paste anything in here..", "color: #FF0000; font-size: 10px; font-weight: bold;");
  </script>
  <div class="p-2 pl-5 pr-5 bg-blue-color">
    <!-- navbar in tailwind with login buttons -->
    <nav class="block lg:flex  p-6 bg-blue-color text-white">
      <!-- logo -->
      <a href="/">
        <img class="mx-auto w-auto h-8" src="/img/logo.png" alt="logo">
      </a>
      <a href="/" class="font-semibold text-xl tracking-tight">&nbsp;BotsCord &nbsp;</a>
      <button data-collapse-toggle="navbar-solid-bg" type="button" class="float-right 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-0 hidden lg:block flex-grow lg:items-center lg:w-auto content-center items-center" id="navbar-solid-bg">
        <div class="lg: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 text-lg">
              <li class="fa fa-robot mr-1"></li>
              Bots
            </a>
            <a href="/servers" class="block lg:inline-block lg:mt-0 text-white hover:text-white mr-4 text-lg">
              <li class="fa fa-server mr-1"></li>
              Servers
            </a>
            <a href="#" class="block lg:inline-block lg:mt-0 text-white hover:text-white mr-4 text-lg" id="menu-button">
              <li class="fa fa-bars"></li> More

            </a>
            <div class="relative inline-block text-left">

              <div class="hidden origin-top-right absolute mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none items-stretch" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1" id="dropdown" style="z-index: 99 !important;">
                <div class="py-1" role="none">
                  <a href="/i/BSL" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-0"><i class="fas fa-user-plus"></i>Invite</a>
                  <a href="/i/BotsCord" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-1"><i class="fa-brands fa-discord"></i>Discord Server</a>
                </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="/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">
                  <a target=â€�_blankâ€� href="https://docs.botscord.xyz" 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-book"></i>Docs</a>
                </div>
              </div>
            </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 w-fit h-fit">Login</a>
          <% }else { %>
          <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>
      </div>
    </nav>
    <% 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>
    <% } %>
    <% 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");
      }
    });
    const dropdown = document.getElementById("menu-button");
    const dropdownMenu = document.getElementById("dropdown");
    dropdown.addEventListener("click", function() {
      if (dropdownMenu.classList.contains("hidden")) {
        dropdownMenu.classList.remove("hidden");
      } else {
        dropdownMenu.classList.add("hidden");
      }
    });
  </script>