feature/more page in nav bar completed
This commit is contained in:
1 parent
f7377f6844
commit
cfcfd7778d
5 files changed
+35
-10
No files matched your search
@@ -70,8 +70,18 @@ app.get('/login', (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.get('/aboutUs', (req, res) => {
|
app.get('/aboutUs', (req, res) => {
|
||||||
res.render('aboutUs');
|
if (!req.session.authenticated) {
|
||||||
|
res.render('aboutUs', {
|
||||||
|
geoData: undefined
|
||||||
|
});
|
||||||
return res.status(status.Ok);
|
return res.status(status.Ok);
|
||||||
|
} else {
|
||||||
|
res.render('aboutUs', {
|
||||||
|
user: req.session.user,
|
||||||
|
geoData: req.session.geoData
|
||||||
|
});
|
||||||
|
return res.status(status.Ok);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/forgotPassword', (req, res) => {
|
app.get('/forgotPassword', (req, res) => {
|
||||||
|
|||||||
+3
-1
@@ -80,7 +80,9 @@ module.exports = (middleware, users, plans, assets) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
res.render('dashboard', { user: req.session.user, geoData: req.session.geoData });
|
res.render('dashboard', {
|
||||||
|
user: req.session.user,
|
||||||
|
geoData: req.session.geoData });
|
||||||
|
|
||||||
return res.status(status.Ok);
|
return res.status(status.Ok);
|
||||||
});
|
});
|
||||||
|
|||||||
+14
-1
@@ -1,5 +1,10 @@
|
|||||||
<%- include("./partials/fileHeader") %>
|
<%- include("./partials/fileHeader") %>
|
||||||
<%- include("./partials/headerStart") %>
|
|
||||||
|
<% if (!geoData) { %>
|
||||||
|
<%- include("./partials/headerStart") %>
|
||||||
|
<% } else { %>
|
||||||
|
<%- include("./partials/header") %>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<section class="bg-white dark:bg-gray-900 py-12 md:py-20">
|
<section class="bg-white dark:bg-gray-900 py-12 md:py-20">
|
||||||
@@ -25,6 +30,8 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if (!geoData) { %>
|
||||||
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
|
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
|
||||||
<a href="/signup" class="inline-flex justify-center items-center mt-4 py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
|
<a href="/signup" class="inline-flex justify-center items-center mt-4 py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
|
||||||
Get started
|
Get started
|
||||||
@@ -33,7 +40,13 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<% } %>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<% if (!geoData) { %>
|
||||||
|
<% } else { %>
|
||||||
|
<%- include("./partials/navBar") %>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<%- include("./partials/footer") %>
|
<%- include("./partials/footer") %>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<nav class="bg-gray-800 border-b border-gray-700">
|
<nav class="bg-gray-800 border-b border-gray-700">
|
||||||
<div class="w-screen flex flex-wrap items-center justify-between p-4">
|
<div class="w-screen flex flex-wrap items-center justify-between p-4">
|
||||||
<a href="/home" class="flex items-center space-x-3 rtl:space-x-reverse">
|
<a href="/home" class="flex w-64 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" />
|
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png" class="h-8" alt="Flowbite Logo" />
|
||||||
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">RCalculator</span>
|
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">RCalculator</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: none;" class="flex items-center" id="currencyExchange">
|
<div style="display: none;" class="flex items-center" id="currencyExchange">
|
||||||
<div id="exFrom" class="shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg focus:ring-4 focus:outline-none focus:ring-gray-100 dark:bg-gray-700 dark:focus:ring-gray-700 dark:text-white dark:border-gray-600">
|
<div id="exFrom" class="shrink-0 z-10 inline-flex w-[115px] items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg focus:ring-4 focus:outline-none focus:ring-gray-100 dark:bg-gray-700 dark:focus:ring-gray-700 dark:text-white dark:border-gray-600">
|
||||||
<img src="" id="yourFlag" class="h-4 w-4 me-2" alt="">
|
<img src="" id="yourFlag" class="h-4 w-4 me-2" alt="">
|
||||||
<p id="flagTag"></p>
|
<p id="flagTag"></p>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div id="dropdown-country" class="overflow-y-auto h-40 z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-32 dark:bg-gray-700">
|
<div id="dropdown-country" class="overflow-y-auto w-[115px] h-40 z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-32 dark:bg-gray-700">
|
||||||
<ul id="dropdown" class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdown-country-button">
|
<ul id="dropdown" class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdown-country-button">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<p>error</p>
|
<p>error</p>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg focus:ring-4 focus:outline-none focus:ring-gray-100 dark:bg-gray-700 dark:focus:ring-gray-700 dark:text-white dark:border-gray-600">
|
<div class="shrink-0 z-10 w-[115px] inline-flex items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg focus:ring-4 focus:outline-none focus:ring-gray-100 dark:bg-gray-700 dark:focus:ring-gray-700 dark:text-white dark:border-gray-600">
|
||||||
<img src="/static/svgs/flags/<%= geoData.country %>.svg" id="yourFlag" class="h-4 w-4 me-2" alt="<%= geoData.country %>"> (<%= geoData.country %>)
|
<img src="/static/svgs/flags/<%= geoData.country %>.svg" id="yourFlag" class="h-4 w-4 me-2" alt="<%= geoData.country %>"> (<%= geoData.country %>)
|
||||||
<p id="flagTag"></p>
|
<p id="flagTag"></p>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
$1.00 = $<%= (1 * geoData.toCurrencyRates["USD"]).toFixed(2) %>
|
$1.00 = $<%= (1 * geoData.toCurrencyRates["USD"]).toFixed(2) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<button id="dropdown-country-button" value="" data-dropdown-toggle="dropdown-country" class="shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-e-lg hover:bg-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-700 dark:text-white dark:border-gray-600" type="button">
|
<button id="dropdown-country-button" value="" data-dropdown-toggle="dropdown-country" class="shrink-0 w-[115px] z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-e-lg hover:bg-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-700 dark:text-white dark:border-gray-600" type="button">
|
||||||
<img src="/static/svgs/flags/USD.svg" class="h-4 w-4 me-2" alt="USD"> (USD)
|
<img src="/static/svgs/flags/USD.svg" class="h-4 w-4 me-2" alt="USD"> (USD)
|
||||||
<svg class="w-2.5 h-2.5 ms-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
<svg class="w-2.5 h-2.5 ms-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
||||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
<div class="hidden w-full lg:block lg:w-auto" id="navbar-solid-bg">
|
<div class="hidden w-full lg:block lg:w-[320px]" id="navbar-solid-bg">
|
||||||
<ul class="flex flex-col font-medium mt-4 rounded-lg bg-gray-50 lg:space-x-8 rtl:space-x-reverse lg:flex-row lg:mt-0 lg:border-0 lg:bg-transparent dark:bg-gray-800 lg:dark:bg-transparent dark:border-gray-700">
|
<ul class="flex flex-col font-medium mt-4 rounded-lg bg-gray-50 lg:space-x-8 rtl:space-x-reverse lg:flex-row lg:mt-0 lg:border-0 lg:bg-transparent dark:bg-gray-800 lg:dark:bg-transparent dark:border-gray-700">
|
||||||
<li class="flex items-center justify-center">
|
<li class="flex items-center justify-center">
|
||||||
<a href="/home" class="block w-full text-center py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Dashboard</a>
|
<a href="/home" class="block w-full text-center py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Dashboard</a>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<header>
|
<header>
|
||||||
<nav class="bg-gray-800 border-b border-gray-700">
|
<nav class="bg-gray-800 border-b border-gray-700">
|
||||||
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
|
<div class="w-screen flex flex-wrap items-center justify-between p-4">
|
||||||
<a href="/" class="flex items-center space-x-3 rtl:space-x-reverse">
|
<a href="/" class="flex 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" />
|
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png" class="h-8" alt="Flowbite Logo" />
|
||||||
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">RCalculator</span>
|
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">RCalculator</span>
|
||||||
|
|||||||
Reference in new issue
Block a user