update
This commit is contained in:
@ -1,270 +1,162 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- views/home.ejs -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible"
|
||||
content="IE=edge">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,
|
||||
initial-scale=1.0">
|
||||
<title>GeeksForGeeks</title>
|
||||
<link rel="stylesheet"
|
||||
href="style.css">
|
||||
<link rel="stylesheet"
|
||||
href="responsive.css">
|
||||
,
|
||||
</head>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<body>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Home</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Arial', sans-serif;
|
||||
}
|
||||
|
||||
<header>
|
||||
#sidebar {
|
||||
height: 100%;
|
||||
width: 250px;
|
||||
position: fixed;
|
||||
background-color: #333;
|
||||
padding-top: 60px;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
<div class="logosec">
|
||||
<div class="logo">Eco Saver</div>
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210182541/Untitled-design-(30).png"
|
||||
class="icn menuicn"
|
||||
id="menuicn"
|
||||
alt="menu-icon">
|
||||
</div>
|
||||
#sidebar img {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
<div class="searchbar">
|
||||
<input type="text"
|
||||
placeholder="Search">
|
||||
<div class="searchbtn">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210180758/Untitled-design-(28).png"
|
||||
class="icn srchicn"
|
||||
alt="search-icon">
|
||||
</div>
|
||||
</div>
|
||||
#sidebar a {
|
||||
padding: 10px 15px;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
color: white;
|
||||
display: block;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
<div class="message">
|
||||
<div class="circle"></div>
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210183322/8.png"
|
||||
class="icn"
|
||||
alt="">
|
||||
<div class="dp">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210180014/profile-removebg-preview.png"
|
||||
class="dpicn"
|
||||
alt="dp">
|
||||
</div>
|
||||
</div>
|
||||
#sidebar a:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
</header>
|
||||
#content {
|
||||
margin-left: 250px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
<div class="main-container">
|
||||
<div class="navcontainer">
|
||||
<nav class="nav">
|
||||
<div class="nav-upper-options">
|
||||
<div class="nav-option option1">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210182148/Untitled-design-(29).png"
|
||||
class="nav-img"
|
||||
alt="dashboard">
|
||||
<h3> Dashboard</h3>
|
||||
</div>
|
||||
@media screen and (max-width: 600px) {
|
||||
#sidebar {
|
||||
width: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
<div class="option2 nav-option">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210183322/9.png"
|
||||
class="nav-img"
|
||||
alt="articles">
|
||||
<h3> Articles</h3>
|
||||
</div>
|
||||
#content {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
<div class="nav-option option3">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210183320/5.png"
|
||||
class="nav-img"
|
||||
alt="report">
|
||||
<h3> Report</h3>
|
||||
</div>
|
||||
#sidebarCollapse {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
<div class="nav-option option4">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210183321/6.png"
|
||||
class="nav-img"
|
||||
alt="institution">
|
||||
<h3> Institution</h3>
|
||||
</div>
|
||||
#sidebarCollapse span {
|
||||
display: block;
|
||||
background: white;
|
||||
height: 5px;
|
||||
width: 30px;
|
||||
margin: 6px auto;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
<div class="nav-option option5">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210183323/10.png"
|
||||
class="nav-img"
|
||||
alt="blog">
|
||||
<h3> Profile</h3>
|
||||
</div>
|
||||
#sidebarCollapse:hover span:nth-child(1) {
|
||||
transform: rotate(-45deg) translate(-5px, 6px);
|
||||
}
|
||||
|
||||
<div class="nav-option option6">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210183320/4.png"
|
||||
class="nav-img"
|
||||
alt="settings">
|
||||
<h3> Settings</h3>
|
||||
</div>
|
||||
#sidebarCollapse:hover span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
<div class="nav-option logout">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210183321/7.png"
|
||||
class="nav-img"
|
||||
alt="logout">
|
||||
<h3>Logout</h3>
|
||||
</div>
|
||||
#sidebarCollapse:hover span:nth-child(3) {
|
||||
transform: rotate(45deg) translate(-5px, -6px);
|
||||
}
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="main">
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 80%;
|
||||
margin: 20px 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
<div class="searchbar2">
|
||||
<input type="text"
|
||||
name=""
|
||||
id=""
|
||||
placeholder="Search">
|
||||
<div class="searchbtn">
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210180758/Untitled-design-(28).png"
|
||||
class="icn srchicn"
|
||||
alt="search-button">
|
||||
</div>
|
||||
</div>
|
||||
th, td {
|
||||
border: 1px solid #dddddd;
|
||||
text-align: left;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
<div class="box-container">
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
<div class="box box1">
|
||||
<div class="text">
|
||||
<h2 class="topic-heading">60.5k</h2>
|
||||
<h2 class="topic">Article Views</h2>
|
||||
</div>
|
||||
tr:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210184645/Untitled-design-(31).png"
|
||||
alt="Views">
|
||||
</div>
|
||||
td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<div class="box box2">
|
||||
<div class="text">
|
||||
<h2 class="topic-heading">150</h2>
|
||||
<h2 class="topic">Likes</h2>
|
||||
</div>
|
||||
<body>
|
||||
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210185030/14.png"
|
||||
alt="likes">
|
||||
</div>
|
||||
<div id="sidebar">
|
||||
<img src="LOGO.PNG" alt="Custom Image">
|
||||
<div id="sidebarCollapse">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
<a href="/inusers">In-House Users</a>
|
||||
<a href="#">Users</a>
|
||||
<a href="#">Data Analysis</a>
|
||||
<a href="#">Logout</a>
|
||||
</div>
|
||||
|
||||
<div class="box box3">
|
||||
<div class="text">
|
||||
<h2 class="topic-heading">320</h2>
|
||||
<h2 class="topic">Comments</h2>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h2>Welcome to the Home Page, <%= username %>!</h2>
|
||||
<h3>Last 10 Logins:</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<th>Last Login Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% loginLogs.forEach(log => { %>
|
||||
<tr>
|
||||
<td><%= log.username %></td>
|
||||
<td><%= new Date(log.lastLogin).toLocaleString('en-US', { timeZone: 'Asia/Singapore' }) %></td>
|
||||
</tr>
|
||||
<% }); %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210184645/Untitled-design-(32).png"
|
||||
alt="comments">
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('sidebarCollapse').addEventListener('click', function () {
|
||||
document.getElementById('sidebar').style.width = (document.getElementById('sidebar').style.width === '250px') ? '0' : '250px';
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="box box4">
|
||||
<div class="text">
|
||||
<h2 class="topic-heading">70</h2>
|
||||
<h2 class="topic">Published</h2>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<img src=
|
||||
"https://media.geeksforgeeks.org/wp-content/uploads/20221210185029/13.png" alt="published">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="report-container">
|
||||
<div class="report-header">
|
||||
<h1 class="recent-Articles">Recent Articles</h1>
|
||||
<button class="view">View All</button>
|
||||
</div>
|
||||
|
||||
<div class="report-body">
|
||||
<div class="report-topic-heading">
|
||||
<h3 class="t-op">Article</h3>
|
||||
<h3 class="t-op">Views</h3>
|
||||
<h3 class="t-op">Comments</h3>
|
||||
<h3 class="t-op">Status</h3>
|
||||
</div>
|
||||
|
||||
<div class="items">
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 73</h3>
|
||||
<h3 class="t-op-nextlvl">2.9k</h3>
|
||||
<h3 class="t-op-nextlvl">210</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 72</h3>
|
||||
<h3 class="t-op-nextlvl">1.5k</h3>
|
||||
<h3 class="t-op-nextlvl">360</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 71</h3>
|
||||
<h3 class="t-op-nextlvl">1.1k</h3>
|
||||
<h3 class="t-op-nextlvl">150</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 70</h3>
|
||||
<h3 class="t-op-nextlvl">1.2k</h3>
|
||||
<h3 class="t-op-nextlvl">420</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 69</h3>
|
||||
<h3 class="t-op-nextlvl">2.6k</h3>
|
||||
<h3 class="t-op-nextlvl">190</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 68</h3>
|
||||
<h3 class="t-op-nextlvl">1.9k</h3>
|
||||
<h3 class="t-op-nextlvl">390</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 67</h3>
|
||||
<h3 class="t-op-nextlvl">1.2k</h3>
|
||||
<h3 class="t-op-nextlvl">580</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 66</h3>
|
||||
<h3 class="t-op-nextlvl">3.6k</h3>
|
||||
<h3 class="t-op-nextlvl">160</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
<div class="item1">
|
||||
<h3 class="t-op-nextlvl">Article 65</h3>
|
||||
<h3 class="t-op-nextlvl">1.3k</h3>
|
||||
<h3 class="t-op-nextlvl">220</h3>
|
||||
<h3 class="t-op-nextlvl label-tag">Published</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user