Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1743d91c4 | ||
|
|
5d67f4f5ed | ||
|
|
505f0484bc | ||
|
|
cc63b83288 | ||
|
|
0eaa82b121 | ||
|
|
03b0dd8fa6 | ||
|
|
6faa951636 | ||
|
|
58a6e4724f | ||
|
|
692f195e27 |
No files matched your search
@@ -31,4 +31,40 @@ factSubmitButton.addEventListener("click", () => {
|
||||
console.error("Error fetching fact:", error);
|
||||
Swal.fire('Error fetching fact', 'Please try again later', 'error');
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const drawer = document.getElementById("drawer-navigation");
|
||||
const toggle = document.getElementById("drawer-toggle");
|
||||
|
||||
function openDrawer() {
|
||||
drawer.classList.remove("translate-x-full");
|
||||
|
||||
// Add backdrop
|
||||
const backdrop = document.createElement("div");
|
||||
backdrop.className = "fixed inset-0 bg-gray-900/50 z-30 drawer-backdrop";
|
||||
document.body.appendChild(backdrop);
|
||||
|
||||
// Optional: prevent scroll
|
||||
document.body.classList.add("overflow-hidden");
|
||||
|
||||
backdrop.addEventListener("click", closeDrawer);
|
||||
}
|
||||
|
||||
function closeDrawer() {
|
||||
drawer.classList.add("translate-x-full");
|
||||
|
||||
const backdrop = document.querySelector(".drawer-backdrop");
|
||||
if (backdrop) backdrop.remove();
|
||||
|
||||
document.body.classList.remove("overflow-hidden");
|
||||
}
|
||||
|
||||
toggle.addEventListener("click", openDrawer);
|
||||
|
||||
// Also close on X button if needed
|
||||
const closeBtn = drawer.querySelector("[data-drawer-hide]");
|
||||
if (closeBtn) {
|
||||
closeBtn.addEventListener("click", closeDrawer);
|
||||
}
|
||||
});
|
||||
+23
-23
@@ -1,27 +1,27 @@
|
||||
<%- include("./partials/fileHeader") %>
|
||||
<%- include("./partials/header") %>
|
||||
<%- include("./partials/header") %>
|
||||
|
||||
<main class="pt-24 pb-14">
|
||||
<!-- Buttons -->
|
||||
<div class="flex justify-end gap-4 px-5 py-6">
|
||||
<a href="/assets?popup"
|
||||
class="text-center cursor-pointer min-w-[150px] bg-green-600 px-4 py-2 text-white rounded hover:bg-green-800"
|
||||
type="button">Add Asset</a>
|
||||
<a href="/newPlan"
|
||||
class="text-center cursor-pointer min-w-[150px] bg-green-600 px-4 py-2 text-white rounded hover:bg-green-800"
|
||||
type="button">Create new plan </a>
|
||||
</div>
|
||||
<div class="flex justify-center">
|
||||
<div class="mb-12 grid gap-y-4 gap-x-6 md:grid-cols-2 mr-3 ml-3 ">
|
||||
<% plans.forEach(plan=> { %>
|
||||
<%- include('./partials/dashboardBox.ejs', {plan: plan}) %>
|
||||
<% }); %>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<main class="pt-24 pb-14">
|
||||
<!-- Buttons -->
|
||||
<div class="flex justify-end gap-4 px-5 py-6">
|
||||
<a href="/assets?popup"
|
||||
class="text-center cursor-pointer min-w-[150px] bg-green-600 px-4 py-2 text-white rounded hover:bg-green-800"
|
||||
type="button">Add Asset</a>
|
||||
<a href="/newPlan"
|
||||
class="text-center cursor-pointer min-w-[150px] bg-green-600 px-4 py-2 text-white rounded hover:bg-green-800"
|
||||
type="button">Create new plan </a>
|
||||
</div>
|
||||
<div class="flex justify-center sm:px-6 w-full ">
|
||||
<div class="mb-12 grid gap-y-4 gap-x-6 md:grid-cols-2 ">
|
||||
<% plans.forEach(plan=> { %>
|
||||
<%- include('./partials/dashboardBox.ejs', {plan: plan}) %>
|
||||
<% }); %>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="/static/scripts/dollarFormat.js"></script>
|
||||
<script src="/static/scripts/dollarFormat.js"></script>
|
||||
|
||||
<%- include("./partials/navBar") %>
|
||||
<%- include("./partials/scriptLoader") %>
|
||||
<%- include("./partials/footer") %>
|
||||
<%- include("./partials/navBar") %>
|
||||
<%- include("./partials/scriptLoader") %>
|
||||
<%- include("./partials/footer") %>
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="mt-12">
|
||||
<a href="/plans/<%=plan._id%>">
|
||||
<div class=" relative flex flex-col bg-clip-border rounded-xl bg-white text-gray-700 shadow-md w-full min-h-[150px] min-w-[380px]
|
||||
<div class=" relative flex flex-col bg-clip-border rounded-xl bg-white text-gray-700 shadow-md w-full min-h-[130px] min-w-[340px]
|
||||
md:min-h-[220px] md:min-w-[500px]">
|
||||
<!-- <div -->
|
||||
<!-- class="bg-clip-border mx-4 rounded-xl overflow-hidden bg-gradient-to-tr from-blue-600 to-blue-400 text-white shadow-blue-500/40 shadow-lg absolute mt-2 grid h-16 w-16 place-items-center"> -->
|
||||
@@ -15,9 +15,10 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="border-t border-blue-gray-50 p-10">
|
||||
<p class=" antialiased font-sans text-base leading-relaxed font-normal text-blue-gray-600">
|
||||
<div class="float-left font-bold">
|
||||
Status bar:
|
||||
<p class=" antialiased font-sans text-base leading-relaxed font-normal text-blue-gray-600">
|
||||
Status bar:
|
||||
</p>
|
||||
</div>
|
||||
<strong class="text-green-500">
|
||||
<div class="float-right mb-2">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
|
||||
<footer class="mt-16">
|
||||
<div class="fixed bottom-0 left-0 z-50 hidden lg:block w-full h-16 bg-gray-800 border-t border-gray-700 p-6 text-center text-gray-400 text-sm">
|
||||
<div class="fixed bottom-0 left-0 z-30 hidden lg:block w-full h-16 bg-gray-800 border-t border-gray-700 p-6 text-center text-gray-400 text-sm">
|
||||
<div class="container mx-auto">
|
||||
<p>© 2025 RCalculator. All rights reserved.</p>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<header>
|
||||
<nav class="fixed bg-gray-800 border-b border-gray-700 z-50">
|
||||
<nav class="fixed bg-gray-800 border-b border-gray-700 z-30">
|
||||
<div class="w-screen flex flex-col md:flex-row flex-wrap items-center justify-between p-3">
|
||||
<a href="/home" class="flex xl:w-[320px] items-center space-x-3 rtl:space-x-reverse">
|
||||
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png" class="h-8" alt="Flowbite Logo" />
|
||||
@@ -86,7 +86,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<div class="text-center">
|
||||
<button class="flex flex-row text-white hover:bg-blue-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-full text-sm focus:outline-none dark:focus:ring-blue-800" type="button" data-drawer-target="drawer-navigation" data-drawer-show="drawer-navigation" data-drawer-placement="right" aria-controls="drawer-navigation">
|
||||
<button class="flex flex-row text-white hover:bg-blue-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-full text-sm focus:outline-none dark:focus:ring-blue-800" type="button" id="drawer-toggle" data-drawer-target="drawer-navigation" data-drawer-placement="right" aria-controls="drawer-navigation">
|
||||
<svg class="w-[30px] h-[30px] text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path fill-rule="evenodd" d="M12 20a7.966 7.966 0 0 1-5.002-1.756l.002.001v-.683c0-1.794 1.492-3.25 3.333-3.25h3.334c1.84 0 3.333 1.456 3.333 3.25v.683A7.966 7.966 0 0 1 12 20ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.5-4.44 9.963-9.932 10h-.138C6.438 21.962 2 17.5 2 12Zm10-5c-1.84 0-3.333 1.455-3.333 3.25S10.159 13.5 12 13.5c1.84 0 3.333-1.455 3.333-3.25S13.841 7 12 7Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
@@ -101,49 +101,49 @@
|
||||
</div>
|
||||
|
||||
<!-- drawer component -->
|
||||
<div id="drawer-navigation" class="hidden lg:block fixed top-0 right-0 z-40 w-64 h-screen p-4 overflow-y-auto transition-transform translate-x-full bg-white dark:bg-gray-800" tabindex="-1" aria-labelledby="drawer-navigation-label">
|
||||
<h5 id="drawer-navigation-label" class="text-base font-semibold text-gray-500 uppercase dark:text-gray-400"><%= user.name %></h5>
|
||||
<button type="button" data-drawer-hide="drawer-navigation" aria-controls="drawer-navigation" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 end-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
|
||||
<span class="sr-only">Close menu</span>
|
||||
</button>
|
||||
<div class="">
|
||||
<div class="w-full pt-5 pl-2.5">
|
||||
<a href="/logout" class="text-white bg-blue-700 hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 font-medium rounded-full text-sm px-20 py-2.5 text-center me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||
Logout
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-4 overflow-y-auto">
|
||||
<ul class="space-y-2 font-medium">
|
||||
<li>
|
||||
<a href="/profile" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||
<svg class="w-5 h-5 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 21">
|
||||
<path fill-rule="evenodd" d="M12 20a7.966 7.966 0 0 1-5.002-1.756l.002.001v-.683c0-1.794 1.492-3.25 3.333-3.25h3.334c1.84 0 3.333 1.456 3.333 3.25v.683A7.966 7.966 0 0 1 12 20ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.5-4.44 9.963-9.932 10h-.138C6.438 21.962 2 17.5 2 12Zm10-5c-1.84 0-3.333 1.455-3.333 3.25S10.159 13.5 12 13.5c1.84 0 3.333-1.455 3.333-3.25S13.841 7 12 7Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
<span class="ms-3">Profile</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/settings" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||
<svg class="w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 21">
|
||||
<path d="M16.975 11H10V4.025a1 1 0 0 0-1.066-.998 8.5 8.5 0 1 0 9.039 9.039.999.999 0 0 0-1-1.066h.002Z"/>
|
||||
<path d="M12.5 0c-.157 0-.311.01-.565.027A1 1 0 0 0 11 1.02V10h8.975a1 1 0 0 0 1-.935c.013-.188.028-.374.028-.565A8.51 8.51 0 0 0 12.5 0Z"/>
|
||||
</svg>
|
||||
<span class="ms-3">Settings</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="aboutUs" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18">
|
||||
<path d="M14 2a3.963 3.963 0 0 0-1.4.267 6.439 6.439 0 0 1-1.331 6.638A4 4 0 1 0 14 2Zm1 9h-1.264A6.957 6.957 0 0 1 15 15v2a2.97 2.97 0 0 1-.184 1H19a1 1 0 0 0 1-1v-1a5.006 5.006 0 0 0-5-5ZM6.5 9a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9ZM8 10H5a5.006 5.006 0 0 0-5 5v2a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-2a5.006 5.006 0 0 0-5-5Z"/>
|
||||
</svg>
|
||||
<span class="flex-1 ms-3 whitespace-nowrap">About Us</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="drawer-navigation" class="lg:block fixed top-0 right-0 z-60 w-64 h-screen p-4 overflow-y-auto transition-transform translate-x-full bg-white dark:bg-gray-800" tabindex="-1" aria-labelledby="drawer-navigation-label">
|
||||
<h5 id="drawer-navigation-label" class="text-base font-semibold text-gray-500 uppercase dark:text-gray-400"><%= user.name %></h5>
|
||||
<button type="button" data-drawer-hide="drawer-navigation" aria-controls="drawer-navigation" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 end-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
|
||||
<span class="sr-only">Close menu</span>
|
||||
</button>
|
||||
<div class="">
|
||||
<div class="w-full pt-5 pl-2.5">
|
||||
<a href="/logout" class="text-white bg-blue-700 hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 font-medium rounded-full text-sm px-20 py-2.5 text-center me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||
Logout
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-4 overflow-y-auto">
|
||||
<ul class="space-y-2 font-medium">
|
||||
<li>
|
||||
<a href="/profile" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||
<svg class="w-5 h-5 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 21">
|
||||
<path fill-rule="evenodd" d="M12 20a7.966 7.966 0 0 1-5.002-1.756l.002.001v-.683c0-1.794 1.492-3.25 3.333-3.25h3.334c1.84 0 3.333 1.456 3.333 3.25v.683A7.966 7.966 0 0 1 12 20ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.5-4.44 9.963-9.932 10h-.138C6.438 21.962 2 17.5 2 12Zm10-5c-1.84 0-3.333 1.455-3.333 3.25S10.159 13.5 12 13.5c1.84 0 3.333-1.455 3.333-3.25S13.841 7 12 7Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
<span class="ms-3">Profile</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/settings" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||
<svg class="w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 21">
|
||||
<path d="M16.975 11H10V4.025a1 1 0 0 0-1.066-.998 8.5 8.5 0 1 0 9.039 9.039.999.999 0 0 0-1-1.066h.002Z"/>
|
||||
<path d="M12.5 0c-.157 0-.311.01-.565.027A1 1 0 0 0 11 1.02V10h8.975a1 1 0 0 0 1-.935c.013-.188.028-.374.028-.565A8.51 8.51 0 0 0 12.5 0Z"/>
|
||||
</svg>
|
||||
<span class="ms-3">Settings</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="aboutUs" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18">
|
||||
<path d="M14 2a3.963 3.963 0 0 0-1.4.267 6.439 6.439 0 0 1-1.331 6.638A4 4 0 1 0 14 2Zm1 9h-1.264A6.957 6.957 0 0 1 15 15v2a2.97 2.97 0 0 1-.184 1H19a1 1 0 0 0 1-1v-1a5.006 5.006 0 0 0-5-5ZM6.5 9a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9ZM8 10H5a5.006 5.006 0 0 0-5 5v2a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-2a5.006 5.006 0 0 0-5-5Z"/>
|
||||
</svg>
|
||||
<span class="flex-1 ms-3 whitespace-nowrap">About Us</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -1,7 +1,7 @@
|
||||
<%- include("./partials/fileHeader") %>
|
||||
<%- include("./partials/header") %>
|
||||
|
||||
<main class="container mx-auto p-4">
|
||||
<main class="container mx-auto p-4 p-28">
|
||||
<h2 class="text-xl text-white font-semibold mb-4">Welcome: <%= user.name %></h2>
|
||||
<div class="max-w-lg mx-auto bg-white p-6 sm:p-8 rounded-xl shadow-lg space-y-6 dark:bg-gray-800">
|
||||
|
||||
|
||||
Reference in new issue
Block a user