|
|
@@ -4,25 +4,22 @@
|
|
|
|
|
|
<div class="filters-container flex gap-4 items-center">
|
|
|
<div class="date-filter">
|
|
|
- <input type="date" id="date-filter"
|
|
|
- class="px-4 py-2 border rounded-lg bg-white shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
|
|
+ <input type="date" id="date-filter" class="px-4 py-2 border rounded-lg bg-white shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
|
|
</div>
|
|
|
|
|
|
<div class="search-container">
|
|
|
<input type="text" id="username-search" placeholder="Buscar por usuario..." class="search-input">
|
|
|
<button class="search-button">
|
|
|
<!-- icono lupa -->
|
|
|
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
|
|
- viewBox="0 0 16 16">
|
|
|
- <path
|
|
|
- d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z" />
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
|
|
+ <path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z" />
|
|
|
</svg>
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="users-container" id="users-container"></div>
|
|
|
+ <div class="users-container grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 max-w-screen-xl mx-auto px-4" id="users-container"></div>
|
|
|
<div id="modals-container"></div>
|
|
|
|
|
|
<div class="pagination-container">
|
|
|
@@ -31,7 +28,7 @@
|
|
|
<button id="next-page" class="pagination-button">Siguiente</button>
|
|
|
</div>
|
|
|
|
|
|
- <div class="overlay" id="overlay"></div>
|
|
|
+ <div class="overlay fixed inset-0 bg-black bg-opacity-50 z-50 hidden" id="overlay"></div>
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
@@ -81,12 +78,12 @@
|
|
|
function updateUsersData(usersData) {
|
|
|
console.log(usersData);
|
|
|
const cardsHTML = usersData.map((user, index) => `
|
|
|
- <div class="user-card" data-username="${user.username.toLowerCase()}">
|
|
|
- <header class="card-header">
|
|
|
- <div class="avatar">${user.username.charAt(0).toUpperCase()}</div>
|
|
|
- <div class="user-info">
|
|
|
- <h3 class="username">${user.username}</h3>
|
|
|
- <span class="ip-address">${user.ip}</span>
|
|
|
+ <div class="user-card w-full max-w-[320px] mx-auto rounded-lg shadow-md hover:shadow-lg transform hover:scale-105 transition duration-300 flex flex-col justify-between overflow-hidden" data-username="${user.username.toLowerCase()}">
|
|
|
+ <header class="card-header flex flex-col items-center p-4 bg-gradient-to-l from-[#00D2C8] to-[#1A8A9D] text-[#FAEAFF]">
|
|
|
+ <div class="avatar bg-[var(--primary-color)] text-white text-[1.9rem] font-bold w-[100px] h-[100px] rounded-full flex items-center justify-center border-[4px] border-white mb-0">${user.username.charAt(0).toUpperCase()}</div>
|
|
|
+ <div class="user-info text-center mt-0">
|
|
|
+ <h3 class="username font-semibold text-[1.2rem] text-[#FAEAFF] mb-0">${user.username}</h3>
|
|
|
+ <span class="ip-address text-[0.9rem] text-[#FAEAFF]">${user.ip}</span>
|
|
|
</div>
|
|
|
</header>
|
|
|
|
|
|
@@ -192,11 +189,14 @@
|
|
|
dateFilter.dispatchEvent(new Event("change"));
|
|
|
});
|
|
|
|
|
|
- function openLogsModal(index) {
|
|
|
- document.getElementById(`logs-modal-${index}`).classList.add("active");
|
|
|
- }
|
|
|
+function openLogsModal(index) {
|
|
|
+ document.getElementById(`logs-modal-${index}`).classList.add("active");
|
|
|
+ document.getElementById("overlay").classList.remove("hidden");
|
|
|
+}
|
|
|
+
|
|
|
+function closeLogsModal(index) {
|
|
|
+ document.getElementById(`logs-modal-${index}`).classList.remove("active");
|
|
|
+ document.getElementById("overlay").classList.add("hidden");
|
|
|
+}
|
|
|
|
|
|
- function closeLogsModal(index) {
|
|
|
- document.getElementById(`logs-modal-${index}`).classList.remove("active");
|
|
|
- }
|
|
|
</script>
|