delo na profilih
This commit is contained in:
@ -582,6 +582,14 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|||||||
height: 9rem;
|
height: 9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-12 {
|
||||||
|
height: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-24 {
|
||||||
|
height: 6rem;
|
||||||
|
}
|
||||||
|
|
||||||
.max-h-40 {
|
.max-h-40 {
|
||||||
max-height: 10rem;
|
max-height: 10rem;
|
||||||
}
|
}
|
||||||
@ -602,6 +610,14 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-12 {
|
||||||
|
width: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-24 {
|
||||||
|
width: 6rem;
|
||||||
|
}
|
||||||
|
|
||||||
.max-w-lg {
|
.max-w-lg {
|
||||||
max-width: 32rem;
|
max-width: 32rem;
|
||||||
}
|
}
|
||||||
|
@ -43,13 +43,22 @@ router.get('/settings', async function(req, res, next) {
|
|||||||
router.post('/settings', async function(req, res, next) {
|
router.post('/settings', async function(req, res, next) {
|
||||||
var sessionId = req.cookies.sessionid;
|
var sessionId = req.cookies.sessionid;
|
||||||
var auth = await lib.getAuthUser(sessionId);
|
var auth = await lib.getAuthUser(sessionId);
|
||||||
|
var newData = {};
|
||||||
|
if(req.body.bio != '') {
|
||||||
|
newData.bio = req.body.bio;
|
||||||
|
}
|
||||||
|
if(req.body.name != '') {
|
||||||
|
newData.name = req.body.name;
|
||||||
|
}
|
||||||
|
if(req.files) {
|
||||||
|
if(req.files.avatar.data) {
|
||||||
|
newData.avatar = req.files.avatar.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
if(auth) {
|
if(auth) {
|
||||||
console.log(req);
|
console.log(req);
|
||||||
console.log(req.files);
|
console.log(req.files);
|
||||||
await auth.update({
|
await auth.update(newData);
|
||||||
'bio': req.body.bio,
|
|
||||||
'avatar': req.files.avatar.data,
|
|
||||||
});
|
|
||||||
res.redirect('/user/settings');
|
res.redirect('/user/settings');
|
||||||
} else {
|
} else {
|
||||||
res.redirect('/login');
|
res.redirect('/login');
|
||||||
|
@ -32,38 +32,14 @@
|
|||||||
</form>
|
</form>
|
||||||
<div class="flex items-center justify-between mt-5">
|
<div class="flex items-center justify-between mt-5">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<img src="/images/avatar_48.png" alt="<%= auth.name %>" class="rounded-md mr-2">
|
<img src="/user/avatar/<%- auth.id %>" alt="<%= auth.name %>" class="rounded-md mr-2">
|
||||||
<div>
|
<div>
|
||||||
<div class="w-full font-bold text-sm"><%= auth.name %></div>
|
<div class="w-full font-bold text-sm"><%= auth.name %></div>
|
||||||
<div class="w-full text-sm text-gray-400"><%= auth.email %></div>
|
<div class="w-full text-sm text-gray-400"><%= auth.email %></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" data-dropdown-toggle="dropdown" id="profileDropdownButton" class="bg-gray-700 rounded-md mx-2 px-2 focus:text-blue-400 text-lg font-bold" aria-expanded="true" aria-haspopup="true"><i class="fa fa-angle-down"></i></button>
|
<%- include('partials/_user_dropdown.ejs') %>
|
||||||
|
|
||||||
<!-- This is an example component -->
|
|
||||||
<div class="max-w-lg mx-auto">
|
|
||||||
<!-- Dropdown menu -->
|
|
||||||
<div class="hidden dark:bg-gray-700 dark:text-white z-50 list-none divide-y divide-gray-100 rounded-md shadow my-4" id="dropdown">
|
|
||||||
<ul class="py-1" aria-labelledby="dropdown">
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Dashboard</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Settings</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Earnings</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Sign out</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="/scripts/flowbite.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
@ -85,7 +61,7 @@
|
|||||||
class="lg:flex-1 lg:mx-3 max-w-xl min-w-md dark:bg-gray-600 dark:text-white scrollbar-thin scrollbar-thumb-gray-900 scrollbar-track-gray-700 overflow-y-scroll">
|
class="lg:flex-1 lg:mx-3 max-w-xl min-w-md dark:bg-gray-600 dark:text-white scrollbar-thin scrollbar-thumb-gray-900 scrollbar-track-gray-700 overflow-y-scroll">
|
||||||
<div class="lg:h-screen">
|
<div class="lg:h-screen">
|
||||||
<div class="bg-gray-900 text-white p-4 flex justify-between w-full z-50"">
|
<div class="bg-gray-900 text-white p-4 flex justify-between w-full z-50"">
|
||||||
<div><i class=" fa fa-home mr-2"></i>Home</div>
|
<div><a href="/"><i class=" fa fa-home mr-2"></i>Home</a></div>
|
||||||
<div><i class="fa fa-sliders"></i></div>
|
<div><i class="fa fa-sliders"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-h-40 overflow-y-hidden align-bottom">
|
<div class="max-h-40 overflow-y-hidden align-bottom">
|
||||||
@ -93,7 +69,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div class="flex-shrink-0 max-h-10 relative -top-10 px-4">
|
<div class="flex-shrink-0 max-h-10 relative -top-10 px-4">
|
||||||
<img src="/images/avatar_94.png" alt="<%= auth.name %>" class="rounded-md overflow-visible">
|
<img src="/user/avatar/<%= auth.id %>" alt="<%= auth.name %>" class="rounded-md overflow-visible w-24 h-24">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center pt-3 px-2 mx-2">
|
<div class="flex items-center pt-3 px-2 mx-2">
|
||||||
<button class="bg-blue-600 py-2 px-5 rounded-md mr-3 focus:outline-none focus:shadow-outline"
|
<button class="bg-blue-600 py-2 px-5 rounded-md mr-3 focus:outline-none focus:shadow-outline"
|
||||||
|
@ -17,13 +17,13 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block" for="email">Email<label>
|
<label class="block" for="email">Email<label>
|
||||||
<input name="email" type="text" placeholder="Email"
|
<input name="email" type="text" placeholder="Email"
|
||||||
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label class="block">Password<label>
|
<label class="block">Password<label>
|
||||||
<input name="password" type="password" placeholder="Password"
|
<input name="password" type="password" placeholder="Password"
|
||||||
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-baseline justify-between">
|
<div class="flex items-baseline justify-between">
|
||||||
<button type="submit" class="px-6 py-2 mt-4 text-white bg-blue-600 rounded-lg hover:bg-blue-900">Login</button>
|
<button type="submit" class="px-6 py-2 mt-4 text-white bg-blue-600 rounded-lg hover:bg-blue-900">Login</button>
|
||||||
|
32
views/me.ejs
32
views/me.ejs
@ -32,38 +32,14 @@
|
|||||||
</form>
|
</form>
|
||||||
<div class="flex items-center justify-between mt-5">
|
<div class="flex items-center justify-between mt-5">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<img src="/images/avatar_48.png" alt="<%= auth.name %>" class="rounded-md mr-2">
|
<img src="/user/avatar/<%- auth.id %>" alt="<%= auth.name %>" class="rounded-md mr-2">
|
||||||
<div>
|
<div>
|
||||||
<div class="w-full font-bold text-sm"><%= auth.name %></div>
|
<div class="w-full font-bold text-sm"><%= auth.name %></div>
|
||||||
<div class="w-full text-sm text-gray-400"><%= auth.email %></div>
|
<div class="w-full text-sm text-gray-400"><%= auth.email %></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" data-dropdown-toggle="dropdown" id="profileDropdownButton" class="bg-gray-700 rounded-md mx-2 px-2 focus:text-blue-400 text-lg font-bold" aria-expanded="true" aria-haspopup="true"><i class="fa fa-angle-down"></i></button>
|
<%- include('partials/_user_dropdown.ejs') %>
|
||||||
|
|
||||||
<!-- This is an example component -->
|
|
||||||
<div class="max-w-lg mx-auto">
|
|
||||||
<!-- Dropdown menu -->
|
|
||||||
<div class="hidden dark:bg-gray-700 dark:text-white z-50 list-none divide-y divide-gray-100 rounded-md shadow my-4" id="dropdown">
|
|
||||||
<ul class="py-1" aria-labelledby="dropdown">
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Dashboard</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Settings</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Earnings</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Sign out</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="/scripts/flowbite.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
@ -85,7 +61,7 @@
|
|||||||
class="lg:flex-1 lg:mx-3 max-w-xl min-w-md dark:bg-gray-600 dark:text-white scrollbar-thin scrollbar-thumb-gray-900 scrollbar-track-gray-700 overflow-y-scroll">
|
class="lg:flex-1 lg:mx-3 max-w-xl min-w-md dark:bg-gray-600 dark:text-white scrollbar-thin scrollbar-thumb-gray-900 scrollbar-track-gray-700 overflow-y-scroll">
|
||||||
<div class="lg:h-screen">
|
<div class="lg:h-screen">
|
||||||
<div class="bg-gray-900 text-white p-4 flex justify-between w-full z-50"">
|
<div class="bg-gray-900 text-white p-4 flex justify-between w-full z-50"">
|
||||||
<div><i class=" fa fa-home mr-2"></i>Home</div>
|
<div><a href="/"><i class=" fa fa-home mr-2"></i>Home</a></div>
|
||||||
<div><i class="fa fa-sliders"></i></div>
|
<div><i class="fa fa-sliders"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-h-40 overflow-y-hidden align-bottom">
|
<div class="max-h-40 overflow-y-hidden align-bottom">
|
||||||
@ -93,7 +69,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div class="flex-shrink-0 max-h-10 relative -top-10 px-4">
|
<div class="flex-shrink-0 max-h-10 relative -top-10 px-4">
|
||||||
<img src="/images/avatar_94.png" alt="<%= auth.name %>" class="rounded-md overflow-visible">
|
<img src="/user/avatar/<%= auth.id %>" alt="<%= auth.name %>" class="rounded-md overflow-visible w-24 h-24">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center pt-3 px-2 mx-2">
|
<div class="flex items-center pt-3 px-2 mx-2">
|
||||||
<button class="bg-blue-600 py-2 px-5 rounded-md mr-3 focus:outline-none focus:shadow-outline"
|
<button class="bg-blue-600 py-2 px-5 rounded-md mr-3 focus:outline-none focus:shadow-outline"
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
<!-- _messages.ejs -->
|
||||||
<% for(var i = 0; i < messages.length; i++) {%>
|
<% for(var i = 0; i < messages.length; i++) {%>
|
||||||
|
|
||||||
<div class="dark:bg-gray-700 flex p-4 border-b border-b-gray-400">
|
<div class="dark:bg-gray-700 flex p-4 border-b border-b-gray-400">
|
||||||
<div class="mr-4 flex-shrink-0">
|
<div class="mr-4 flex-shrink-0">
|
||||||
<img src="/user/avatar/<%- messages[i].User.id %>" alt="<%= auth.name %>" class="rounded-md">
|
<img src="/user/avatar/<%- messages[i].User.id %>" alt="<%= auth.name %>" class="rounded-md w-12 h-12">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<h5 class="font-bold mb-4">
|
<h5 class="font-bold mb-4">
|
||||||
<%= messages[i].User.name %>
|
<a href="/user/profile/<%= messages[i].User.name %>"><%= messages[i].User.name %></a>
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<!-- _sidebar_menu.ejs -->
|
||||||
<div class="lg:w-72 lg:overflow-y-hidden">
|
<div class="lg:w-72 lg:overflow-y-hidden">
|
||||||
<ul class="p-5">
|
<ul class="p-5">
|
||||||
<li>
|
<li>
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
<!-- _toot.ejs -->
|
||||||
<% for(var i = 0; i < messages.length; i++) {%>
|
<% for(var i = 0; i < messages.length; i++) {%>
|
||||||
|
|
||||||
<div class="dark:bg-gray-700 flex p-4 border-b border-b-gray-400">
|
<div class="dark:bg-gray-700 flex p-4 border-b border-b-gray-400">
|
||||||
<div class="mr-4 flex-shrink-0">
|
<div class="mr-4 flex-shrink-0">
|
||||||
<img src="/images/avatar_48.png" alt="<%= auth.name %>" class="rounded-md">
|
<img src="/user/avatar/<%- auth.id %>" alt="<%= auth.name %>" class="rounded-md w-12 h-12">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<h5 class="font-bold mb-4">
|
<h5 class="font-bold mb-4">
|
||||||
<%= auth.name %>
|
<a href="/user/profile/<%= auth.name %>"><%= auth.name %></a>
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
27
views/partials/_user_dropdown.ejs
Normal file
27
views/partials/_user_dropdown.ejs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<!-- _user_dropdown.ejs -->
|
||||||
|
<button type="button" data-dropdown-toggle="dropdown" id="profileDropdownButton"
|
||||||
|
class="bg-gray-700 rounded-md mx-2 px-2 focus:text-blue-400 text-lg font-bold" aria-expanded="true"
|
||||||
|
aria-haspopup="true"><i class="fa fa-angle-down"></i></button>
|
||||||
|
|
||||||
|
<!-- This is an example component -->
|
||||||
|
<div class="max-w-lg mx-auto">
|
||||||
|
<!-- Dropdown menu -->
|
||||||
|
<div class="hidden dark:bg-gray-700 dark:text-white z-50 list-none divide-y divide-gray-100 rounded-md shadow my-4"
|
||||||
|
id="dropdown">
|
||||||
|
<ul class="py-1" aria-labelledby="dropdown">
|
||||||
|
<li>
|
||||||
|
<a href="/me" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Profile</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/user/settings" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Settings</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Earnings</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Sign out</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="/scripts/flowbite.js"></script>
|
@ -1,17 +1,20 @@
|
|||||||
|
<!-- _user_timeline.ejs -->
|
||||||
<% for(var i = 0; i < messages.length; i++) {%>
|
<% for(var i = 0; i < messages.length; i++) {%>
|
||||||
|
|
||||||
<div class="dark:bg-gray-700 flex p-4 border-b border-b-gray-400">
|
<div class="dark:bg-gray-700 flex p-4 border-b border-b-gray-400">
|
||||||
<div class="mr-4 flex-shrink-0">
|
<div class="mr-4 flex-shrink-0">
|
||||||
<img src="/user/avatar/<%- user.id %>" alt="<%= user.name %>" class="rounded-md">
|
<img src="/user/avatar/<%- user.id %>" alt="<%= user.name %>" class="rounded-md w-12 h-12">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<h5 class="font-bold mb-4">
|
<h5 class="font-bold mb-4">
|
||||||
<%= user.name %>
|
<a href="/user/profile/<%= user.name %>"><%= user.name %></a>
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<%= messages[i].body%>
|
<% messages[i].body.split('\n').forEach(line => { %>
|
||||||
|
<%= line %><br>
|
||||||
|
<% }) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xs text-gray-500 mt-3">Posted on: <%= messages[i].createdAt %>
|
<div class="text-xs text-gray-500 mt-3">Posted on: <%= messages[i].createdAt %>
|
||||||
|
@ -17,18 +17,18 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block" for="username">Name<label>
|
<label class="block" for="username">Name<label>
|
||||||
<input name="username" type="text" placeholder="Name"
|
<input name="username" type="text" placeholder="Name"
|
||||||
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label class="block" for="email">Email<label>
|
<label class="block" for="email">Email<label>
|
||||||
<input name="email" type="text" placeholder="Email"
|
<input name="email" type="text" placeholder="Email"
|
||||||
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label class="block">Password<label>
|
<label class="block">Password<label>
|
||||||
<input name="password" type="password" placeholder="Password"
|
<input name="password" type="password" placeholder="Password"
|
||||||
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
class="w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1 focus:ring-blue-600">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-baseline justify-between">
|
<div class="flex items-baseline justify-between">
|
||||||
<button type="submit" class="px-6 py-2 mt-4 text-white bg-blue-600 rounded-lg hover:bg-blue-900">Register</button>
|
<button type="submit" class="px-6 py-2 mt-4 text-white bg-blue-600 rounded-lg hover:bg-blue-900">Register</button>
|
||||||
|
@ -32,38 +32,14 @@
|
|||||||
</form>
|
</form>
|
||||||
<div class="flex items-center justify-between mt-5">
|
<div class="flex items-center justify-between mt-5">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<img src="/images/avatar_48.png" alt="<%= auth.name %>" class="rounded-md mr-2">
|
<img src="/user/avatar/<%- auth.id %>" alt="<%= auth.name %>" class="rounded-md mr-2">
|
||||||
<div>
|
<div>
|
||||||
<div class="w-full font-bold text-sm"><%= auth.name %></div>
|
<div class="w-full font-bold text-sm"><%= auth.name %></div>
|
||||||
<div class="w-full text-sm text-gray-400"><%= auth.email %></div>
|
<div class="w-full text-sm text-gray-400"><%= auth.email %></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" data-dropdown-toggle="dropdown" id="profileDropdownButton" class="bg-gray-700 rounded-md mx-2 px-2 focus:text-blue-400 text-lg font-bold" aria-expanded="true" aria-haspopup="true"><i class="fa fa-angle-down"></i></button>
|
<%- include('partials/_user_dropdown.ejs') %>
|
||||||
|
|
||||||
<!-- This is an example component -->
|
|
||||||
<div class="max-w-lg mx-auto">
|
|
||||||
<!-- Dropdown menu -->
|
|
||||||
<div class="hidden dark:bg-gray-700 dark:text-white z-50 list-none divide-y divide-gray-100 rounded-md shadow my-4" id="dropdown">
|
|
||||||
<ul class="py-1" aria-labelledby="dropdown">
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Dashboard</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Settings</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Earnings</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Sign out</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="/scripts/flowbite.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
@ -85,7 +61,7 @@
|
|||||||
class="lg:flex-1 lg:mx-3 max-w-xl min-w-md dark:bg-gray-600 dark:text-white scrollbar-thin scrollbar-thumb-gray-900 scrollbar-track-gray-700 overflow-y-scroll">
|
class="lg:flex-1 lg:mx-3 max-w-xl min-w-md dark:bg-gray-600 dark:text-white scrollbar-thin scrollbar-thumb-gray-900 scrollbar-track-gray-700 overflow-y-scroll">
|
||||||
<div class="lg:h-screen">
|
<div class="lg:h-screen">
|
||||||
<div class="bg-gray-900 text-white p-4 flex justify-between w-full z-50"">
|
<div class="bg-gray-900 text-white p-4 flex justify-between w-full z-50"">
|
||||||
<div><i class=" fa fa-home mr-2"></i>Home</div>
|
<div><a href="/"><i class=" fa fa-home mr-2"></i>Home</a></div>
|
||||||
<div><i class="fa fa-sliders"></i></div>
|
<div><i class="fa fa-sliders"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-h-40 overflow-y-hidden align-bottom">
|
<div class="max-h-40 overflow-y-hidden align-bottom">
|
||||||
@ -93,7 +69,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div class="flex-shrink-0 max-h-10 relative -top-10 px-4">
|
<div class="flex-shrink-0 max-h-10 relative -top-10 px-4">
|
||||||
<img src="/images/avatar_94.png" alt="<%= auth.name %>" class="rounded-md overflow-visible">
|
<img src="/user/avatar/<%= auth.id %>" alt="<%= auth.name %>" class="rounded-md overflow-visible w-24 h-24">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center pt-3 px-2 mx-2">
|
<div class="flex items-center pt-3 px-2 mx-2">
|
||||||
<button class="bg-blue-600 py-2 px-5 rounded-md mr-3 focus:outline-none focus:shadow-outline"
|
<button class="bg-blue-600 py-2 px-5 rounded-md mr-3 focus:outline-none focus:shadow-outline"
|
||||||
@ -121,14 +97,23 @@
|
|||||||
<!-- dodaj -->
|
<!-- dodaj -->
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<form action="/user/settings" method="POST" enctype="multipart/form-data">
|
<form action="/user/settings" method="POST" enctype="multipart/form-data">
|
||||||
<input type="file" name="avatar" id="">
|
<div class="my-4 w-full">
|
||||||
<br><br>
|
<label for="name">Name:</label>
|
||||||
<textarea
|
<input value="<%= auth.name %>" class="dark:text-white dark:bg-gray-900 focus:outline-none dark:focus:bg-white dark:focus:text-gray-900 text-sm" type="text" name="name" id="name">
|
||||||
class="w-full h-36 p-1 dark:text-white dark:bg-gray-900 focus:outline-none dark:focus:bg-white dark:focus:text-gray-900 text-sm"
|
</div>
|
||||||
name="bio" id="body" cols="20" placeholder="A little bit about me"><%= auth.bio%></textarea>
|
<div class="my-4">
|
||||||
<button
|
<input type="file" name="avatar" id="avatar" >
|
||||||
class="place-content-end bg-blue-600 py-2 px-5 rounded-md mr-3 focus:outline-none focus:shadow-outline font-bold"
|
</div>
|
||||||
type="submit">Save</button>
|
<div class="my-4">
|
||||||
|
<textarea
|
||||||
|
class="w-full h-36 p-1 dark:text-white dark:bg-gray-900 focus:outline-none dark:focus:bg-white dark:focus:text-gray-900 text-sm"
|
||||||
|
name="bio" id="body" cols="20" placeholder="A little bit about me"><%= auth.bio%></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="my-4">
|
||||||
|
<button
|
||||||
|
class="place-content-end bg-blue-600 py-2 px-5 rounded-md mr-3 focus:outline-none focus:shadow-outline font-bold"
|
||||||
|
type="submit">Save</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -32,38 +32,14 @@
|
|||||||
</form>
|
</form>
|
||||||
<div class="flex items-center justify-between mt-5">
|
<div class="flex items-center justify-between mt-5">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<img src="/images/avatar_48.png" alt="<%= auth.name %>" class="rounded-md mr-2">
|
<img src="/user/avatar/<%- auth.id %>" alt="<%= auth.name %>" class="rounded-md mr-2">
|
||||||
<div>
|
<div>
|
||||||
<div class="w-full font-bold text-sm"><%= auth.name %></div>
|
<div class="w-full font-bold text-sm"><%= auth.name %></div>
|
||||||
<div class="w-full text-sm text-gray-400"><%= auth.email %></div>
|
<div class="w-full text-sm text-gray-400"><%= auth.email %></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" data-dropdown-toggle="dropdown" id="profileDropdownButton" class="bg-gray-700 rounded-md mx-2 px-2 focus:text-blue-400 text-lg font-bold" aria-expanded="true" aria-haspopup="true"><i class="fa fa-angle-down"></i></button>
|
<%- include('partials/_user_dropdown.ejs') %>
|
||||||
|
|
||||||
<!-- This is an example component -->
|
|
||||||
<div class="max-w-lg mx-auto">
|
|
||||||
<!-- Dropdown menu -->
|
|
||||||
<div class="hidden dark:bg-gray-700 dark:text-white z-50 list-none divide-y divide-gray-100 rounded-md shadow my-4" id="dropdown">
|
|
||||||
<ul class="py-1" aria-labelledby="dropdown">
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Dashboard</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Settings</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Earnings</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Sign out</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="/scripts/flowbite.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
@ -85,7 +61,7 @@
|
|||||||
class="lg:flex-1 lg:mx-3 max-w-xl min-w-md dark:bg-gray-600 dark:text-white scrollbar-thin scrollbar-thumb-gray-900 scrollbar-track-gray-700 overflow-y-scroll">
|
class="lg:flex-1 lg:mx-3 max-w-xl min-w-md dark:bg-gray-600 dark:text-white scrollbar-thin scrollbar-thumb-gray-900 scrollbar-track-gray-700 overflow-y-scroll">
|
||||||
<div class="lg:h-screen">
|
<div class="lg:h-screen">
|
||||||
<div class="bg-gray-900 text-white p-4 flex justify-between w-full z-50"">
|
<div class="bg-gray-900 text-white p-4 flex justify-between w-full z-50"">
|
||||||
<div><i class=" fa fa-home mr-2"></i>Home</div>
|
<div><a href="/"><i class=" fa fa-home mr-2"></i>Home</a></div>
|
||||||
<div><i class="fa fa-sliders"></i></div>
|
<div><i class="fa fa-sliders"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-h-40 overflow-y-hidden align-bottom">
|
<div class="max-h-40 overflow-y-hidden align-bottom">
|
||||||
@ -93,7 +69,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div class="flex-shrink-0 max-h-10 relative -top-10 px-4">
|
<div class="flex-shrink-0 max-h-10 relative -top-10 px-4">
|
||||||
<img src="/images/avatar_94.png" alt="<%= user.name %>" class="rounded-md overflow-visible">
|
<img src="/user/avatar/<%= user.id %>" alt="<%= user.name %>" class="rounded-md overflow-visible w-24 h-24">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center pt-3 px-2 mx-2">
|
<div class="flex items-center pt-3 px-2 mx-2">
|
||||||
<a class="bg-blue-600
|
<a class="bg-blue-600
|
||||||
|
Reference in New Issue
Block a user