Added banner in api
This commit is contained in:
1 parent
c348212aa9
commit
b774ae1192
7 files changed
+1069
-10
No files matched your search
@@ -25,7 +25,7 @@
|
||||
<% 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="<%= server.icon %>" />
|
||||
<meta property="og:image" content="https://cdn.discordapp.com/avatars/<%=server.id %>/<%=global.bsl.guilds.cache.get(server.id).icon %>.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">
|
||||
@@ -88,9 +88,11 @@
|
||||
<li class="fa fa-server mr-1"></li>Edit server
|
||||
</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>
|
||||
<!-- dropdown menu with tailwindcss -->
|
||||
</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>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
</svg>
|
||||
</div>
|
||||
<input type="text" id="simple-search" class="bg-primary-color border border-gray-300 text-white text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:bg-primary-color dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Search" required>
|
||||
|
||||
<div id="search-results" class="hidden bg-primary-color border border-gray-300 text-white text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 w-full pl-10 p-2.5 dark:bg-primary-color dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"></div>
|
||||
</div>
|
||||
</form><br>
|
||||
@@ -35,14 +34,15 @@
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
var html = '';
|
||||
if(!data.serverArray.length) html = '<div class="text-center">No results found</div>';
|
||||
for (var i = 0; i < data.serverArray.length; i++) {
|
||||
if (i == 5) {
|
||||
break;
|
||||
}
|
||||
if (data.serverArray[i].type == 'server') {
|
||||
html += '<a href="/server/' + data.serverArray[i].id + '" class="flex items-center p-2 border-b border-gray-300 hover:bg-primary-color hover:text-white"><img title="botscord.site" class="mr-2" width="48" onError="this.src = ' + "'/img/logo.webp'" + '" style="border-radius: 8px;" src="' + data.serverArray[i].avatar + '" />' + data.serverArray[i].name + '</a>';
|
||||
html += '<a href="/server/' + data.serverArray[i].id + '" class="flex items-center p-2 border-b border-gray-300 hover:bg-primary-color hover:text-white"><img title="botscord.site" class="mr-2" width="48" onError="this.src = ' + "'/img/logo.webp'" + '" style="border-radius: 8px;" src="' + data.serverArray[i].avatar + '" />' + data.serverArray[i].name + ' | Server</a>';
|
||||
} else {
|
||||
html += '<a href="/bot/' + data.serverArray[i].id + '" class="flex items-center p-2 border-b border-gray-300 hover:bg-primary-color hover:text-white"><img title="botscord.site" class="mr-2" width="48" onError="this.src = ' + " '/img/logo.webp'" + '" style="border-radius: 8px;" src="' + data.serverArray[i].avatar + '" />' + data.serverArray[i].name + '</a>';
|
||||
html += '<a href="/bot/' + data.serverArray[i].id + '" class="flex items-center p-2 border-b border-gray-300 hover:bg-primary-color hover:text-white"><img title="botscord.site" class="mr-2" width="48" onError="this.src = ' + " '/img/logo.webp'" + '" style="border-radius: 8px;" src="' + data.serverArray[i].avatar + '" />' + data.serverArray[i].name + ' | Bot </a>';
|
||||
}
|
||||
}
|
||||
var searchr = document.getElementById('search-results');
|
||||
|
||||
Reference in new issue
Block a user