Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Nov 13, 2023
1 parent 2d634b2 commit 29dc5b3
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 51 deletions.
18 changes: 11 additions & 7 deletions resources/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
}
}

hr {
@apply border-uh-border-color;
}

/*
* Components
*/
Expand All @@ -36,7 +40,7 @@

.btn {
@apply inline-flex items-center px-3 py-1.5;
@apply bg-stone-50 hover:bg-stone-200 active:bg-stone-50 text-gray-500 hover:text-gray-600 active:text-gray-500;
@apply bg-uh-bg-2 hover:bg-stone-200 active:bg-uh-bg-2 text-gray-500 hover:text-gray-600 active:text-gray-500;
@apply text-base font-normal leading-6 text-center no-underline align-middle tracking-wide;
@apply rounded disabled:opacity-25;
@apply cursor-pointer select-none;
Expand All @@ -54,18 +58,18 @@
}

&-secondary {
@apply border border-zinc-200;
@apply text-sky-800 hover:text-sky-900 active:text-sky-800 ;
@apply bg-stone-50 hover:bg-stone-200 active:bg-stone-50 ;
@apply border border-uh-border-color;
@apply text-[#1f2328] hover:text-sky-700 active:text-[#1f2328] ;
@apply bg-uh-bg-2 hover:bg-stone-200 active:bg-uh-bg-2 ;
}
}

.form-input {
@apply block w-full;
@apply border-slate-200 focus:ring-uh-blue-2 focus:border-uh-blue-2 rounded
@apply border-uh-border-color focus:ring-uh-blue-2 focus:border-uh-blue-2 rounded
}

.common-card-style {
@apply bg-white sm:rounded-lg sm:border sm:border-zinc-200;
@apply sm:shadow-[0_1px_2px_#e5e5e8];
@apply bg-white border-y sm:rounded-lg sm:border border-uh-border-color;
/* @apply sm:shadow-[0_1px_2px_#e5e5e8]; */
}
19 changes: 17 additions & 2 deletions resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ main {
}

.frontend, .backend, .auth {
@apply bg-uh-bg-1 font-sans text-gray-900 antialiased;
@apply bg-uh-bg-2 font-sans text-gray-900 antialiased;
}


.navbar {
@apply bg-uh-bg-2 text-uh-blue;
@apply bg-uh-bg-1 text-uh-blue;
@apply border-b border-uh-border-color;

&-brand {
@apply font-serif text-4xl font-bold;
Expand Down Expand Up @@ -41,6 +43,19 @@ main {
}
}


#power-grid-table-base {
table, th, td {
@apply border border-uh-border-color;
}

table {
thead {
@apply bg-uh-bg-2;
}
}
}

.power-grid {
.pg-header {
input {
Expand Down
16 changes: 7 additions & 9 deletions resources/views/backend/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="w-full md:w-8/12 lg:w-6/12 mt-5 md:mt-0 md:ml-4">
<form method="post" action="{{route('dashboard.su_edit.post', $url)}}">
@csrf
<div class="common-card-style sm:rounded-b-none px-4 py-5 sm:p-6">
<div class="common-card-style px-4 py-5 sm:p-6">
<div class="grid grid-cols-6 gap-6">
<div class="col-span-6 lg:col-span-4">
<label for="short-url" class="block font-medium text-sm text-slate-700">{{__('Short URL')}}</label>
Expand All @@ -42,14 +42,12 @@
required value="{{$url->destination}}" class="form-input">
</div>
</div>
</div>
<div class="common-card-style bg-bg-primary sm:bg-slate-50 sm:rounded-t-none
flex items-center justify-end px-4 py-3 sm:px-6
text-right border-t"
>
<button type="submit" class="btn btn-primary btn-sm">
{{__('Save Changes')}}
</button>

<div class="flex items-center justify-end mt-4 text-right">
<button type="submit" class="btn btn-primary btn-sm">
{{__('Save Changes')}}
</button>
</div>
</div>
</form>
</div>
Expand Down
16 changes: 7 additions & 9 deletions resources/views/backend/user/changepassword.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="w-full md:w-8/12 lg:w-6/12 mt-5 md:mt-0 md:ml-4">
<form method="post" action="{{route('user.change-password.post', $user)}}">
@csrf
<div class="common-card-style sm:rounded-b-none px-4 py-5 sm:p-6">
<div class="common-card-style px-4 py-5 sm:p-6">
<div class="grid grid-cols-6 gap-6" x-data="{show: true}">
<div class="col-span-6 lg:col-span-4">
<label for="current-password" class="block font-medium text-sm text-slate-700">{{__('Your Password')}}</label>
Expand Down Expand Up @@ -51,14 +51,12 @@ class="block font-medium text-sm text-slate-700">{{__('Confirmation')}}</label>
</div>
</div>
</div>
</div>
<div class="common-card-style bg-bg-primary sm:bg-slate-50 sm:rounded-t-none
flex items-center justify-end px-4 py-3 sm:px-6
text-right border-t"
>
<button type="submit" class="btn btn-primary btn-sm">
{{__('Change Password')}}
</button>

<div class="flex items-center justify-end mt-4 text-right">
<button type="submit" class="btn btn-primary btn-sm">
{{__('Change Password')}}
</button>
</div>
</div>
</form>
</div>
Expand Down
16 changes: 7 additions & 9 deletions resources/views/backend/user/profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="w-full md:w-8/12 lg:w-6/12 mt-5 md:mt-0 md:ml-4">
<form method="post" action="{{route('user.update', $user)}}">
@csrf
<div class="common-card-style sm:rounded-b-none px-4 py-5 sm:p-6">
<div class="common-card-style px-4 py-5 sm:p-6">
<div class="grid grid-cols-6 gap-6">
<div class="col-span-6 lg:col-span-4">
<label class="block font-medium text-sm text-slate-700">{{__('Username')}}</label>
Expand All @@ -30,14 +30,12 @@
<input type="email" name="email" value="{{$user->email}}" class="form-input mt-1">
</div>
</div>
</div>
<div class="common-card-style bg-bg-primary sm:bg-slate-50 sm:rounded-t-none
flex items-center justify-end px-4 py-3 sm:px-6
text-right border-t"
>
<button type="submit" class="btn btn-primary btn-sm">
{{__('Save')}}
</button>

<div class="flex items-center justify-end mt-4 text-right">
<button type="submit" class="btn btn-primary btn-sm">
{{__('Save')}}
</button>
</div>
</div>
</form>
</div>
Expand Down
6 changes: 4 additions & 2 deletions resources/views/frontend/homepage.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
<div class="mt-1 text-center">
<input type="text" name="long_url" value="{{ old('long_url') }}" placeholder="{{__('Shorten your link')}}"
class="w-full md:w-4/6 px-2 md:px-4 h-12 sm:h-14
text-xl outline-none border border-gray-200 focus:border-uh-indigo-300 rounded-t-md md:rounded-l-md md:rounded-r-none">
text-xl outline-none
border border-border-uh-border-color focus:border-uh-blue-2
rounded-t-md md:rounded-l-md md:rounded-r-none">
<button type="submit" id="actProcess"
class="w-full md:w-1/6 h-12 sm:h-14 align-top rounded-t-none md:rounded-l-none md:rounded-r-md
class="w-full md:w-1/6 h-12 sm:h-14 align-top rounded-t-none rounded-b md:rounded-l-none md:rounded-r-md
text-lg text-white bg-uh-blue-2 hover:bg-sky-700 focus:uh-blue-2"
>
{{__('Shorten')}}
Expand Down
8 changes: 4 additions & 4 deletions resources/views/frontend/short.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@
</div>
@endif
<div class="w-full md:w-3/4 mt-8 sm:mt-0">
<button title="{{__('Copy the shortened URL to clipboard')}}"
<button class="btn-clipboard btn btn-secondary btn-sm"
title="{{__('Copy the shortened URL to clipboard')}}"
data-clipboard-text="{{$url->short_url}}"
class="btn-clipboard btn btn-secondary btn-sm"
>
@svg('icon-clone') {{__('Copy')}}
</button>

@auth
@if (auth()->user()->hasRole('admin') || (auth()->user()->id === $url->user_id))
<button class="btn-clipboard btn btn-secondary btn-sm">
<button class="btn btn-secondary btn-sm">
<a href="{{route('dashboard.su_edit', $url)}}" title="{{__('Edit')}}">
@svg('icon-edit') {{__('Edit')}}
</a>
</button>

<button class="btn-clipboard btn btn-secondary btn-sm hover:text-red-600 active:text-red-700">
<button class="btn btn-secondary btn-sm hover:text-red-600 active:text-red-700">
<a href="{{route('su_delete', $url)}}" title="{{__('Delete')}}">
@svg('icon-trash') {{__('Delete')}}
</a>
Expand Down
18 changes: 9 additions & 9 deletions resources/views/partials/nav-header.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<header class="navbar shadow" x-data="{ open: false }">
<header class="navbar" x-data="{ open: false }">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<a class="navbar-brand" href="{{ url('/') }}">{{config('app.name')}}</a>
Expand Down Expand Up @@ -40,7 +40,7 @@ class="absolute z-50 mt-2 w-48 rounded-md shadow-lg origin-top-right right-0"
{{__('Dashboard')}}
</a>

<div class="border-t border-slate-100"></div>
<div class="border-t border-uh-border-color"></div>
@endif

<!-- Account Management -->
Expand All @@ -55,7 +55,7 @@ class="nav-item {{(request()->route()->getName() === 'user.edit') ? 'border-l-2
class="nav-item {{(request()->route()->getName() === 'user.change-password') ? 'border-l-2 border-uh-blue-2':''}}">
@svg('icon-key', 'mr-1') {{__('Change Password')}}</a>

<div class="border-t border-slate-100"></div>
<div class="border-t border-uh-border-color"></div>

<!-- Authentication -->
<form method="POST" action="{{route('logout')}}">
Expand Down Expand Up @@ -125,7 +125,7 @@ class="nav-item {{(request()->route()->getName() === 'dashboard.about') ? 'borde
</div>

<!-- Responsive Settings Options -->
<div class="pt-4 pb-1 border-t border-slate-200">
<div class="pt-4 pb-1 border-t border-uh-border-color">
<div class="flex items-center px-4">
<div>
<div class="nav-item-username">{{auth()->user()->name}}</div>
Expand Down Expand Up @@ -167,13 +167,13 @@ class="nav-item {{(request()->route()->getName() === 'user.change-password') ? '

{{-- It should only appear on the dashboard page only. --}}
@if (request()->is('admin*'))
<nav class="bg-uh-bg-2 border-t border-uh-border-color pt-1">
<nav class="bg-uh-bg-1 pt-1">
<div class="hidden sm:flex max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 croll-smooth hover:scroll-auto">
<a href="{{route('dashboard')}}"
class="mr-8 py-3 font-semibold hover:text-uh-blue-2 transition duration-100 ease-in-out border-b-2 border-transparent
{{(request()->route()->getName() === 'dashboard') ?
'text-uh-blue-2 border-uh-blue-2' :
'text-slate-500 hover:border-slate-300'}}"
'text-slate-600 hover:border-slate-300'}}"
>
@svg('icon-dashboard', 'mr-1')
<span class="">{{__('Dashboard')}}</span>
Expand All @@ -184,7 +184,7 @@ class="mr-8 py-3 font-semibold hover:text-uh-blue-2 transition duration-100 ease
class="mr-8 py-3 font-semibold hover:text-uh-blue-2 transition duration-100 ease-in-out border-b-2 border-transparent
{{(request()->route()->getName() === 'dashboard.allurl') ?
'text-uh-blue-2 border-uh-blue-2' :
'text-slate-500 hover:border-slate-300'}}"
'text-slate-600 hover:border-slate-300'}}"
>
@svg('icon-link', 'mr-1')
<span class="">{{__('URL List')}}</span>
Expand All @@ -193,7 +193,7 @@ class="mr-8 py-3 font-semibold hover:text-uh-blue-2 transition duration-100 ease
class="mr-8 py-3 font-semibold hover:text-uh-blue-2 transition duration-100 ease-in-out border-b-2 border-transparent
{{(request()->route()->getName() === 'user.index') ?
'text-uh-blue-2 border-uh-blue-2' :
'text-slate-500 hover:border-slate-300'}}"
'text-slate-600 hover:border-slate-300'}}"
>
@svg('icon-users', 'mr-1')
<span class="">{{__('User List')}}</span>
Expand All @@ -202,7 +202,7 @@ class="mr-8 py-3 font-semibold hover:text-uh-blue-2 transition duration-100 ease
class="mr-8 py-3 font-semibold hover:text-uh-blue-2 transition duration-100 ease-in-out border-b-2 border-transparent
{{(request()->route()->getName() === 'dashboard.about') ?
'text-uh-blue-2 border-uh-blue-2' :
'text-slate-500 hover:border-slate-300'}}"
'text-slate-600 hover:border-slate-300'}}"
>
@svg('icon-about-system', 'mr-1')
<span class="">{{__('About')}}</span>
Expand Down

0 comments on commit 29dc5b3

Please sign in to comment.