ferdysetia_aan

TK3 - No.1 - create.blade.php

Jul 26th, 2025
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.69 KB | None | 0 0
  1. @extends('layouts.app')
  2.  
  3. @section('content')
  4.     <div class="container">
  5.         <div class="news-article">
  6.             <h1>Tambah Berita Baru</h1>
  7.             <form action="{{ route('berita.store') }}" method="POST">
  8.                 @csrf
  9.                 <div class="form-group">
  10.                     <label for="judul">Judul</label>
  11.                     <input type="text" name="judul" id="judul" class="form-control" required>
  12.                 </div>
  13.                 <div class="form-group">
  14.                     <label for="konten">Konten</label>
  15.                     <textarea name="konten" id="konten" class="form-control" required></textarea>
  16.                 </div>
  17.                 <button type="submit" class="btn btn-primary">Simpan</button>
  18.             </form>
  19.         </div>
  20.     </div>
  21. @endsection
  22.  
  23. @section('css')
  24.     <style>
  25.         .container {
  26.             width: 90%;
  27.             max-width: 960px; /* Increase max width for better space */
  28.             margin: 0 auto;
  29.         }
  30.  
  31.         .news-article {
  32.             background-color: #ffffff;
  33.            padding: 30px;
  34.             border-radius: 8px;
  35.             box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  36.             margin-bottom: 30px;
  37.         }
  38.  
  39.         h1 {
  40.             font-size: 2.5rem;
  41.             font-weight: bold;
  42.             margin-bottom: 15px;
  43.             color: #333;
  44.        }
  45.  
  46.         .form-group {
  47.             margin-bottom: 20px;
  48.         }
  49.  
  50.         label {
  51.             font-weight: bold;
  52.             margin-bottom: 8px;
  53.             color: #333;
  54.        }
  55.  
  56.         .form-control {
  57.             width: 100%;
  58.             padding: 12px;
  59.             border-radius: 5px;
  60.             border: 1px solid #ddd;
  61.            box-sizing: border-box;
  62.             font-size: 1rem;
  63.             color: #333;
  64.        }
  65.  
  66.         textarea.form-control {
  67.             resize: vertical;
  68.             height: 180px;
  69.         }
  70.  
  71.         button.btn {
  72.             padding: 12px 20px;
  73.             font-size: 16px;
  74.             text-align: center;
  75.             border-radius: 5px;
  76.             border: none;
  77.             background-color: #007bff;
  78.            color: white;
  79.             cursor: pointer;
  80.             margin-top: 20px;
  81.         }
  82.  
  83.         button.btn:hover {
  84.             background-color: #0056b3;
  85.        }
  86.  
  87.         /* Responsive Design */
  88.         @media (max-width: 768px) {
  89.             .news-article {
  90.                 padding: 20px;
  91.             }
  92.  
  93.             h1 {
  94.                 font-size: 2rem;
  95.             }
  96.  
  97.             .form-control {
  98.                 font-size: 0.95rem;
  99.             }
  100.  
  101.             button.btn {
  102.                 width: 100%;
  103.             }
  104.         }
  105.     </style>
  106. @endsection
  107.  
Advertisement
Add Comment
Please, Sign In to add comment