Agregado input de tamanho de librillos y cosas de css

This commit is contained in:
Alejandro Tasistro 2021-11-27 13:25:15 -03:00
parent 7161404b4c
commit bbea85bbd4
4 changed files with 17 additions and 7 deletions

View File

@ -9,6 +9,7 @@ use Illuminate\Support\Facades\File;
class Librilladora extends Model { class Librilladora extends Model {
use HasFactory; use HasFactory;
public function prueba(string $fileName) { public function prueba(string $fileName) {
$mpdf = new \Mpdf\Mpdf(); $mpdf = new \Mpdf\Mpdf();
@ -21,7 +22,7 @@ class Librilladora extends Model {
// // Require composer autoload // // Require composer autoload
// require_once __DIR__ . '/vendor/autoload.php'; // require_once __DIR__ . '/vendor/autoload.php';
$file = 'uploads/'.$fileName; $file = 'uploads/'.$fileName;
$pagecount = $mpdf->SetSourceFile($file); $mpdf->SetSourceFile($file);
$tplId = $mpdf->importPage(1); $tplId = $mpdf->importPage(1);
$mpdf->useTemplate($tplId); $mpdf->useTemplate($tplId);
File::delete($file); File::delete($file);

View File

@ -1,8 +1,3 @@
#logo {
width:80%;
margin: auto;
}
div.p-6 { div.p-6 {
text-align: center; text-align: center;
} }
@ -16,8 +11,18 @@ button, input[type="submit"] {
} }
input.formulario { input.formulario {
margin: 0.5rem;
background-color: white; background-color: white;
border-radius: 5px; border-radius: 5px;
padding: 5px; padding: 5px;
} }
input.formulario.numero-input {
width: 3rem;
}
h1 {
margin-left: auto;
margin-right: auto;
}

0
resources/css/welcome.css vendored Normal file
View File

View File

@ -8,7 +8,7 @@
<!-- Fonts --> <!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
<link href='css/welcome.css' rel="stylesheet"> <link href='../css/welcome.css' rel="stylesheet">
<!-- Styles --> <!-- Styles -->
<style> <style>
@ -48,6 +48,10 @@
<form id="archivo" action="{{ route('file.upload.post') }}" method="POST" enctype="multipart/form-data"> <form id="archivo" action="{{ route('file.upload.post') }}" method="POST" enctype="multipart/form-data">
@csrf @csrf
<input required name="file" type="file" class="formulario"> <input required name="file" type="file" class="formulario">
<div class="labeled-input">
<label for="booklet-size">Tamaño de los librillos</label>
<input name="booklet-size" type="number" min=0 value=20 class="formulario numero-input">
</div>
<input type="submit" value="Cargar archivo"> <input type="submit" value="Cargar archivo">
</form> </form>
</div> </div>