UI Changes

This commit is contained in:
yash 2024-07-18 18:31:31 +05:30
parent 00f5ec6cf9
commit 7ad8d86e7f
3 changed files with 30 additions and 46 deletions

View File

@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<title>Google-Form-Clone</title> <title>Google-Form-Clone</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet" /> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href={{ asset('css/app.css') }} /> <link rel="stylesheet" href={{ asset('css/app.css') }} />
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
@ -15,45 +16,27 @@
</head> </head>
<body> <body>
<div class="form_header"> <nav class="bg-white p-4 shadow-lg">
<div class="form_header_left"> <div class="container mx-auto flex justify-between items-center">
<img src={{ asset('images/google-form.png') }} class="form_header_icon" height="45px" width="40px" /> <a href="{{ url('/') }}" style="color: rgb(103,58,183)"
<input type="text" name="title" id="form-title-nav" placeholder="Untitled Form" class="form_name" /> class="text-3xl font-bold font-sans">LaraForms</a>
<img src={{ asset('images/folder.png') }} alt="" class="form_header_icon" height="20px" <div class="relative dropdown">
width="20px" /> <button id="profileMenuButton" class="flex items-center focus:outline-none">
<img src={{ asset('images/star.svg') }} alt="" class="form_header_icon" /> <img src="{{ asset('images/user.png') }}" alt="Profile"
</div> class="w-10 h-10 rounded-full border-2 border-white">
<div class="form_header_right"> </button>
<span><img src={{ asset('images/palette-svgrepo-com.svg') }} alt="pallette" height="20px" <div id="profileMenu"
width="20px" /></span> class="dropdown-menu hidden absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-2">
<span><img src={{ asset('images/view.png') }} alt="eye" height="20px" width="20px" <form method="POST" action="{{ route('logout') }}">
onclick="previewForm()" /></span> @csrf
<span><img src={{ asset('images/undo.png') }} alt="" height="20px" width="20px" /></span> <button type="submit" class="block px-4 py-2 text-gray-700 hover:bg-gray-200 w-full text-left">
<span><img src={{ asset('images/forward.png') }} alt="" height="20px" width="20px" /></span> Logout
<button class="btn">Send</button> </button>
<span><img src={{ asset('images/menu.png') }} alt="menu" height="30px" width="30px" /></span> </form>
<span><img src={{ asset('images/user.png') }} alt="" height="30px" width="30px" /></span>
</div> </div>
</div> </div>
<div class="container">
<div class="box">
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab1" checked />
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab2" />
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab3" />
<ul class="tab-list">
<li class="tab-item">
<label class="tab-trigger" for="tab1"><b>Questions</b></label>
</li>
<li class="tab-item">
<label class="tab-trigger" for="tab2"><b>Responses</b></label>
</li>
<li class="tab-item">
<label class="tab-trigger" for="tab3"><b>Settings</b></label>
</li>
</ul>
</div>
</div> </div>
</nav>
<div style="background-color: #f0ebf8; max-width: 100%" class="question_form p-4 rounded"> <div style="background-color: #f0ebf8; max-width: 100%" class="question_form p-4 rounded">
<div class="section"> <div class="section">
<div class="question_title_section mb-1"> <div class="question_title_section mb-1">

View File

@ -182,10 +182,10 @@
const newPosition = offsetTop + lastQuestion.offsetHeight; const newPosition = offsetTop + lastQuestion.offsetHeight;
if (newPosition + sidebarHeight <= containerHeight) { if (newPosition + sidebarHeight <= containerHeight) {
sidebar.style.transform = `translateY(${newPosition}px)`; sidebar.style.transform = `translateY(${newPosition + 75}px)`;
console.log(`Moving sidebar to: ${newPosition}px`); console.log(`Moving sidebar to: ${newPosition + 75}px`);
} else { } else {
sidebar.style.transform = `translateY(${containerHeight - sidebarHeight}px)`; sidebar.style.transform = `translateY(${containerHeight - sidebarHeight + 75}px)`;
console.log(`Moving sidebar to bottom of container`); console.log(`Moving sidebar to bottom of container`);
} }
} else { } else {

View File

@ -16,9 +16,6 @@
<!-- Header --> <!-- Header -->
<div class="bg-white shadow-md px-6 py-4 flex justify-between items-center"> <div class="bg-white shadow-md px-6 py-4 flex justify-between items-center">
<div class="flex items-center"> <div class="flex items-center">
<a href="/forms" class="mr-4">
<img src="{{ asset('images/google-form.png') }}" alt="Google Forms" class="h-12 w-auto">
</a>
<h1 class="text-2xl font-semibold text-purple-900">{{ $form->title }} - Responses</h1> <h1 class="text-2xl font-semibold text-purple-900">{{ $form->title }} - Responses</h1>
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
@ -72,7 +69,8 @@
<thead class="bg-gray-200 text-black text-sm leading-normal"> <thead class="bg-gray-200 text-black text-sm leading-normal">
<tr> <tr>
<th class="py-3 px-6 text-left">User</th> <th class="py-3 px-6 text-left">User</th>
<th class="py-3 px-6 text-left">Submitted At</th> <th class="py-3 px-6 text-left">Email ID</th>
<th class="py-3 px-6 text-left">Submitted</th>
<th class="py-3 px-6 text-left">Actions</th> <th class="py-3 px-6 text-left">Actions</th>
</tr> </tr>
</thead> </thead>
@ -82,6 +80,9 @@
<td class="py-3 px-6 text-left"> <td class="py-3 px-6 text-left">
{{ $responseGroup->first()->user->name ?? 'Anonymous' }} {{ $responseGroup->first()->user->name ?? 'Anonymous' }}
</td> </td>
<td class="py-3 px-6 text-left">
{{ $responseGroup->first()->user->email ?? 'NA'}}
</td>
<td class="py-3 px-6 text-left"> <td class="py-3 px-6 text-left">
{{ $responseGroup->first()->created_at->diffForHumans()}} {{ $responseGroup->first()->created_at->diffForHumans()}}
</td> </td>
@ -182,7 +183,7 @@
data: { data: {
labels: labels, labels: labels,
datasets: [{ datasets: [{
label: '# of Responses', label: 'Responses',
data: data, data: data,
backgroundColor: backgroundColors, backgroundColor: backgroundColors,
borderColor: backgroundColors.map(color => color.replace('0.5', '1')), borderColor: backgroundColors.map(color => color.replace('0.5', '1')),