Improve layout and design

This commit is contained in:
Skylar Grant 2024-09-12 16:46:26 -04:00
parent ab14d44900
commit a5799c2091

View File

@ -7,90 +7,96 @@
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
</head> </head>
<body class="bg-gray-100 font-sans leading-normal tracking-normal"> <body class="bg-gray-100 font-sans leading-normal tracking-normal">
<div class="max-w-lg mx-auto mt-10 bg-white p-8 rounded-lg shadow-lg"> <!-- Parent container to hold two columns -->
<div class="flex justify-center mb-6"> <div class="flex justify-center mt-10 space-x-4">
<img src="./itslogo_color.png" alt="ITS Logo" class="h-24 w-auto"> <!-- Left column containing the three original sections -->
</div> <div class="flex flex-col space-y-4 max-w-lg">
<h1 class="text-2xl font-bold text-center mb-4" style="color: #1F3C70;">ITS Thermal Printer Panel</h1> <!-- ITS Thermal Printer Panel -->
<p class="text-center text-gray-600 mb-6"> <div class="bg-white p-8 rounded-lg shadow-lg">
Provide the username and student ID in the fields below, then click the Print button. <div class="flex justify-center mb-6">
A pre-formatted receipt will print with the information from the thermal printer. <img src="./itslogo_color.png" alt="ITS Logo" class="h-24 w-auto">
</p>
<form id="printForm" class="space-y-4">
<div>
<label for="username" class="block text-sm font-medium text-gray-700">Username:</label>
<input type="text" id="username" name="username" required
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div> </div>
<h1 class="text-2xl font-bold text-center mb-4" style="color: #1F3C70;">ITS Thermal Printer Panel</h1>
<div> <p class="text-center text-gray-600 mb-6">
<label for="studentId" class="block text-sm font-medium text-gray-700">Student ID:</label> Provide the username and student ID in the fields below, then click the Generate button.<br>
<input type="text" id="studentId" name="studentId" required A pre-formatted receipt will generate with the information. Click Print at the bottom of the page to print it.
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> </p>
</div> <form id="printForm" class="space-y-4">
<div>
<div class="text-center"> <label for="username" class="block text-sm font-medium text-gray-700">Username:</label>
<button type="submit" <input type="text" id="username" name="username" required
style="background-color: #1F3C70;" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
class="w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50"> </div>
Generate Credentials <div>
</button> <label for="studentId" class="block text-sm font-medium text-gray-700">Student ID:</label>
</div> <input type="text" id="studentId" name="studentId" required
</form> class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div> </div>
<div class="text-center">
<div class="max-w-lg mx-auto mt-10 bg-white p-8 rounded-lg shadow-lg"> <button type="submit" style="background-color: #1F3C70;"
<h1 class="text-2xl font-bold text-center mb-4" style="color: #1F3C70;">Temporary Password Printer</h1> class="w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50">
<p class="text-center text-gray-600 mb-6"> Generate Receipt
Provide the temporary password in the field below, then click the Print button. </button>
A pre-formatted receipt will print with the information from the thermal printer. </div>
</p> </form>
<div>
<label for="password" class="block text-sm font-medium text-gray-700">Temp Password:</label>
<input type="text" id="password" name="password" required
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div> </div>
<div class="text-center"> <!-- Temporary Password Printer -->
<button type="submit" <div class="bg-white p-8 rounded-lg shadow-lg">
id="printTempPw" <h1 class="text-2xl font-bold text-center mb-4" style="color: #1F3C70;">Temporary Password Printer</h1>
class="w-full bg-gray-500 text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-2"> <p class="text-center text-gray-600 mb-6">
Generate Temp Password Provide the temporary password in the field below, then click the Generate button.<br>
A pre-formatted receipt will generate with the information. Click Print at the bottom of the page to print it.
</p>
<div>
<label for="password" class="block text-sm font-medium text-gray-700">Temp Password:</label>
<input type="text" id="password" name="password" required
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div>
<div class="text-center">
<button type="submit" id="printTempPw" style="background-color: #1F3C70;"
class="w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-4">
Generate Receipt
</button>
</div>
</div>
</div>
<!-- Right column containing the PDF Viewer -->
<div class="flex flex-col space-y-4 max-w-lg">
<div id="pdfContainer" class="max-w-lg bg-white p-8 rounded-lg shadow-lg text-center">
<h1 class="text-2xl font-bold mb-4" style="color: #1F3C70;">Receipt Preview</h1>
<!-- Refresh Button -->
<button id="refreshPdf"
class="bg-blue-200 hover:bg-blue-700 hover:text-white text-black font-bold py-2 px-4 rounded mb-4">
Refresh PDF
</button>
<!-- Print Button -->
<button id="print"
class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded mb-4">
Print Receipt
</button>
<!-- PDF Viewer -->
<div id="pdfViewer" class="border border-gray-300 p-4 rounded-md"></div>
</div>
<!-- Quick Prints -->
<div class="bg-white p-8 rounded-lg shadow-lg">
<h1 class="text-2xl font-bold text-center mb-4" style="color: #1F3C70;">Quick Prints</h1>
<p class="text-center text-gray-600 mb-6">
Click the button to generate the relevant receipt.<br>
Click Print at the bottom of the page to print it.
</p>
<button id="print-mcc" class="w-full bg-gray-200 text-black py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-2">
Contractor Information
</button> </button>
</div> </div>
</div> </div>
<div class="max-w-lg mx-auto mt-10 bg-white p-8 rounded-lg shadow-lg">
<h1 class="text-2xl font-bold text-center mb-4" style="color: #1F3C70;">Other Quick Prints</h1>
<button
id="print-mcc"
class="w-full bg-indigo-700 text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-2">
Generate MaineCC Contact
</button>
</div>
<div id="pdfContainer" class="max-w-lg mx-auto mt-10 bg-white p-8 rounded-lg shadow-lg text-center">
<h1 class="text-2xl font-bold mb-4" style="color: #1F3C70;">Last Generated PDF</h1>
<!-- Refresh Button -->
<button id="refreshPdf"
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mb-4">
Refresh PDF
</button>
<!-- PDF Viewer --> </div>
<div id="pdfViewer" class="border border-gray-300 p-4 rounded-md">
<!-- PDF content will be loaded here -->
</div>
<button
id="print"
class="w-full bg-indigo-700 text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-2">
Print Information
</button>
</div>