Skip to content

Commit ff620a2

Browse files
alteração no formato do layout
1 parent 0ca9a16 commit ff620a2

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

app/Http/Controllers/ContentController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ public function generatePdf(Request $request){
2626
$colorService = new Color();
2727
$rawText = $request->text;
2828

29-
$filename = trim($request->filename);
29+
$filename = $request->filename ?? 'downloadedFile.pdf';
30+
$filename = trim($filename);
3031
$nameInfo = pathinfo($filename);
3132
$nameInfo['extension'] = $nameInfo['extension'] ?? 'pdf';
3233
if($nameInfo['extension'] != 'pdf'){

resources/views/content/partials/parsed-content.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<section id="preview-container" class="p-4 sm:p-8 shadow sm:rounded-lg col-span-2">
1+
<section id="preview-container" class="p-4 sm:p-8 shadow sm:rounded-lg col-span-2 h-dvh overflow-y-auto">
22
<div id="htmlText" class="parsedown flex flex-col gap-y-2 sm:w-auto">
33
Formatted content will appear here
44
</div>

resources/views/content/partials/write-content.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<section class="col-span-2">
2-
<div class="space-y-6 grow-wrap dont-break-out">
2+
<div class="space-y-6 grow-wrap dont-break-out h-dvh overflow-y-hidden px-1">
33
<textarea id="text" name="text" type="text" rows="9" cols=""
44
class="p-4 sm:p-8 bg-white sm:rounded-lg border-none focus:border-gray-400 focus:ring-gray-400 shadow block w-full"
55
required autofocus autocomplete="text" placeholder="Type here"

resources/views/editor.blade.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
<x-app-layout>
2-
<div class="py-8">
3-
<div class=" mx-auto sm:px-6 lg:px-8 space-y-6">
4-
<form action="/generatePdf" method="post">
5-
@csrf
6-
<div class="lg:grid lg:grid-cols-5 lg:space-x-4 space-y-6 lg:space-y-0">
7-
@include('content.partials.style-editor')
2+
<div class=" mx-auto sm:px-6 lg:px-8 space-y-6">
3+
<form action="/generatePdf" method="post">
4+
@csrf
5+
<div class="lg:grid lg:grid-cols-5 lg:space-x-4 space-y-6 lg:space-y-0">
6+
@include('content.partials.style-editor')
87

9-
@include('content.partials.write-content')
8+
@include('content.partials.write-content')
109

11-
@include('content.partials.parsed-content')
12-
</div>
13-
</form>
14-
</div>
10+
@include('content.partials.parsed-content')
11+
</div>
12+
</form>
1513
</div>
1614
</x-app-layout>

resources/views/layouts/app.blade.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
<body class="font-sans antialiased">
2121
<div class="min-h-screen bg-gray-100">
2222

23-
@include('layouts.navigation')
24-
2523
<!-- Page Heading -->
2624
@isset($header)
2725
<header class="bg-white shadow">

0 commit comments

Comments
 (0)