-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes#54 Fixes#33 build the root pages & Logout #56
Changes from 10 commits
2cd1fc5
77d0622
71190c1
66109da
09053e2
8ffa909
d945fe3
ba32d43
8671976
cfff01f
a4a6a46
1ce7464
a9ed4bc
e537274
45c4140
3b91472
34a0c26
859f07d
69dc7c6
60c3b3a
fbf01c3
0f1bf32
5b4a3aa
2b303f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
module HomeHelper | ||
module TimeTrackingsHelper | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
<h1>Dashboard#index</h1> | ||
<p>Find me in app/views/dashboard/index.html.erb</p> | ||
<div class="" id="root-page"> | ||
<%= render "partial/navbar" %> | ||
</div> | ||
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<nav class="bg-white shadow" x-data="{ isOpen: false}"> | ||
<div class="max-w-8xl mx-auto px-2 md:px-11"> | ||
<div class="relative flex justify-between h-16"> | ||
<div class="absolute inset-y-0 left-0 flex items-center md:hidden"> | ||
<!-- Mobile menu button --> | ||
<button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500" aria-controls="mobile-menu" aria-expanded="false" @click="isOpen = !isOpen" @keydown.escape="isOpen = false"> | ||
<span class="sr-only">Open main menu</span> | ||
<!-- | ||
Icon when menu is closed. | ||
|
||
Heroicon name: outline/menu | ||
|
||
Menu open: "hidden", Menu closed: "block" | ||
--> | ||
<div> | ||
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /> | ||
</svg> | ||
<!-- | ||
Icon when menu is open. | ||
|
||
Heroicon name: outline/x | ||
|
||
Menu open: "block", Menu closed: "hidden" | ||
--> | ||
<svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> | ||
</svg> | ||
</div> | ||
</button> | ||
</div> | ||
<div class="flex-1 flex items-center justify-center md:items-stretch md:justify-start"> | ||
|
||
<div class="flex-shrink-0 flex items-center"> | ||
<img class="block lg:hidden h-8 w-auto md:mr-12" src="app/javascript/images/miru-logo.svg" alt="miru web"> | ||
<img class="hidden lg:block h-8 w-auto lg:mr-32" src="app/javascript/images/miru-logo.svg" alt="miru web"> | ||
</div> | ||
|
||
<div class="hidden md:mx-3 md:flex md:space-x-2 lg:space-x-8"> | ||
<!-- Current: "border-indigo-500 text-gray-900", Default: "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700" --> | ||
<% if (current_user.admin?) %> | ||
<a href="#" class="border-transparent text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. <%= request.path == '/' ? '' : '' %> |
||
Dashboard | ||
</a> | ||
<% end %> | ||
<a href="#" class="text-miru-hanpurple-1000 inline-flex items-center px-1 pt-1 text-sm font-medium"> | ||
Time Tracking | ||
</a> | ||
<% if (current_user.admin?) %> | ||
<a href="#" class="border-transparent text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium"> | ||
Team | ||
</a> | ||
<% end %> | ||
<a href="#" class="border-transparent text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium"> | ||
Clients | ||
</a> | ||
<a href="#" class="border-transparent text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium"> | ||
Projects | ||
</a> | ||
<% if (current_user.admin?) %> | ||
<a href="#" class="border-transparent text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium"> | ||
Invoice | ||
</a> | ||
<% end %> | ||
<% if (current_user.admin?) %> | ||
<a href="#" class="border-transparent text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium"> | ||
Report | ||
</a> | ||
<% end %> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="absolute inset-y-0 right-0 flex items-center pr-2 md:static md:inset-auto md:ml-6 md:pr-0"> | ||
|
||
<button type="button" class="bg-white p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> | ||
<span class="sr-only">View notifications</span> | ||
<!-- Heroicon name: outline/bell --> | ||
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" /> | ||
</svg> | ||
</button> | ||
|
||
<!-- Profile dropdown --> | ||
<div class="ml-3 relative" x-data="{ isOpen: false}"> | ||
<div> | ||
<button type="button" class="bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true" @click="isOpen = !isOpen" @keydown.escape="isOpen = false"> | ||
<span class="sr-only">Open user menu</span> | ||
<img class="h-8 w-8 rounded-full" src="" alt="profile"> | ||
</button> | ||
</div> | ||
|
||
<!-- | ||
Dropdown menu, show/hide based on menu state. | ||
|
||
Entering: "transition ease-out duration-200" | ||
From: "transform opacity-0 scale-95" | ||
To: "transform opacity-100 scale-100" | ||
Leaving: "transition ease-in duration-75" | ||
From: "transform opacity-100 scale-100" | ||
To: "transform opacity-0 scale-95" | ||
--> | ||
<div x-show="isOpen" @click.away="isOpen = false"> | ||
<div class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1"> | ||
<!-- Active: "bg-gray-100", Not Active: "" --> | ||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a> | ||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a> | ||
<%= button_to "logout", destroy_user_session_path, method: :delete, class: "block px-4 py-2 text-sm text-gray-700", role: "menuitem", tabindex: "-1", id: "user-menu-item-2"%> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Mobile menu, show/hide based on menu state. --> | ||
<div class="flex"> | ||
<div class="md:hidden"> | ||
<div class="pt-2 pb-4 space-y-1" x-show="isOpen" @click.away="isOpen = false"> | ||
<!-- Current: "bg-indigo-50 border-indigo-500 text-indigo-700", Default: "border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700" --> | ||
<% if (current_user.admin?) %> | ||
<a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Dashboard</a> | ||
<% end %> | ||
<a href="#" class="bg-indigo-50 border-indigo-500 text-indigo-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Time Tracking</a> | ||
<% if (current_user.admin?) %> | ||
<a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Team</a> | ||
<% end %> | ||
<a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Clients</a> | ||
<a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Projects</a> | ||
<% if (current_user.admin?) %> | ||
<a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Invoice</a> | ||
<a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Report</a> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</nav> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<% if user_signed_in? %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this condition. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok |
||
<div class="" id="root-page"> | ||
<%= render "partial/navbar" %> | ||
</div> | ||
<% end %> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,11 +16,62 @@ module.exports = { | |||||
1000: "#303A4B", | ||||||
}, | ||||||
'miru-grey': { | ||||||
200: "#F5F4F4", | ||||||
400: "#C4C4C4", | ||||||
1000: "#CDD6DF", | ||||||
600: "#D7DEE5", | ||||||
400: "#E1E6EC", | ||||||
200: "#EBEFF2", | ||||||
100: "#F5F7F9", | ||||||
}, | ||||||
'miru-white': { | ||||||
400: "#FFFFFF", | ||||||
1000: "#FFFFFF", | ||||||
}, | ||||||
'miru-darkpurple': { | ||||||
1000: "#1D1A31", | ||||||
600: "#4A485A", | ||||||
400: "#777683", | ||||||
200: "#A5A3AD", | ||||||
100: "#D2D1D6" | ||||||
}, | ||||||
'miru-hanpurple': { | ||||||
1000: "#5B34EA", | ||||||
600: "#7C5DEE", | ||||||
400: "#9D85F2", | ||||||
200: "#BDAEF7", | ||||||
100: "#DED6FB", | ||||||
}, | ||||||
'miru-alertgreen': { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
@aniket-k-kaushik please follow the same pattern in other as well |
||||||
1000: "#564210", | ||||||
800: "#10562C", | ||||||
400: "#A9EFC5", | ||||||
}, | ||||||
'miru-alertpink': { | ||||||
400: "#EFA9A9" | ||||||
}, | ||||||
'miru-alertblue': { | ||||||
1000: "#104556", | ||||||
400: "#A9DEEF", | ||||||
}, | ||||||
'miru-alertyellow': { | ||||||
400: "#EFDBA9", | ||||||
}, | ||||||
'miru-alertred': { | ||||||
1000: "#561010", | ||||||
}, | ||||||
'miru-chartgreen':{ | ||||||
600: "#058C42", | ||||||
400: "#0DA163", | ||||||
}, | ||||||
'miru-chartblue': { | ||||||
600: "#0E79B2", | ||||||
}, | ||||||
'miru-chartpink': { | ||||||
600: "#BF1363", | ||||||
}, | ||||||
'miru-chartorange': { | ||||||
600: "#F39237", | ||||||
}, | ||||||
'miru-chartpurple': { | ||||||
600: "#7768AE", | ||||||
}, | ||||||
}, | ||||||
fontFamily :{ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a new empty line