respuesta.blade.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Respuesta del Usuario</title>
  6. <style>
  7. @page {
  8. margin: 80px 40px;
  9. }
  10. body {
  11. font-family: 'Segoe UI', sans-serif;
  12. font-size: 13px;
  13. color: #2c3e50;
  14. margin: 0;
  15. }
  16. main {
  17. padding: 40px 0;
  18. }
  19. h1 {
  20. font-size: 20px;
  21. margin-bottom: 5px;
  22. }
  23. p {
  24. margin: 0 0 15px;
  25. }
  26. h2 {
  27. margin-top: 30px;
  28. font-size: 16px;
  29. color: #2c3e50;
  30. border-bottom: 2px solid #3498db;
  31. padding-bottom: 4px;
  32. }
  33. .campo {
  34. margin-bottom: 8px;
  35. }
  36. .campo span {
  37. display: inline-block;
  38. min-width: 200px;
  39. font-weight: bold;
  40. }
  41. footer {
  42. position: fixed;
  43. bottom: -40px;
  44. left: 0;
  45. right: 0;
  46. height: 30px;
  47. font-size: 11px;
  48. color: #999;
  49. text-align: center;
  50. }
  51. h2, .campo {
  52. page-break-inside: avoid;
  53. }
  54. </style>
  55. </head>
  56. <body>
  57. <footer>
  58. Documento generado automáticamente. Plataforma educativa - {{ date('Y') }}.
  59. </footer>
  60. <main>
  61. <h1>Formulario contestado por el usuario: {{ $usuario }}</h1>
  62. <p><strong>Fecha de respuesta:</strong> {{ \Carbon\Carbon::parse($fecha)->format('d/m/Y H:i') }}</p>
  63. @foreach ($respuesta as $titulo => $campos)
  64. <h2>{{ $titulo }}</h2>
  65. @foreach ($campos as $clave => $valor)
  66. <div class="campo">
  67. <span>{{ $clave }}:</span> {{ $valor }}
  68. </div>
  69. @endforeach
  70. @endforeach
  71. </main>
  72. </body>
  73. </html>