Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @extends('layouts.app')
- @section('content')
- <div class="container">
- <div class="news-article">
- <h1>Tambah Berita Baru</h1>
- <form action="{{ route('berita.store') }}" method="POST">
- @csrf
- <div class="form-group">
- <label for="judul">Judul</label>
- <input type="text" name="judul" id="judul" class="form-control" required>
- </div>
- <div class="form-group">
- <label for="konten">Konten</label>
- <textarea name="konten" id="konten" class="form-control" required></textarea>
- </div>
- <button type="submit" class="btn btn-primary">Simpan</button>
- </form>
- </div>
- </div>
- @endsection
- @section('css')
- <style>
- .container {
- width: 90%;
- max-width: 960px; /* Increase max width for better space */
- margin: 0 auto;
- }
- .news-article {
- background-color: #ffffff;
- padding: 30px;
- border-radius: 8px;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
- margin-bottom: 30px;
- }
- h1 {
- font-size: 2.5rem;
- font-weight: bold;
- margin-bottom: 15px;
- color: #333;
- }
- .form-group {
- margin-bottom: 20px;
- }
- label {
- font-weight: bold;
- margin-bottom: 8px;
- color: #333;
- }
- .form-control {
- width: 100%;
- padding: 12px;
- border-radius: 5px;
- border: 1px solid #ddd;
- box-sizing: border-box;
- font-size: 1rem;
- color: #333;
- }
- textarea.form-control {
- resize: vertical;
- height: 180px;
- }
- button.btn {
- padding: 12px 20px;
- font-size: 16px;
- text-align: center;
- border-radius: 5px;
- border: none;
- background-color: #007bff;
- color: white;
- cursor: pointer;
- margin-top: 20px;
- }
- button.btn:hover {
- background-color: #0056b3;
- }
- /* Responsive Design */
- @media (max-width: 768px) {
- .news-article {
- padding: 20px;
- }
- h1 {
- font-size: 2rem;
- }
- .form-control {
- font-size: 0.95rem;
- }
- button.btn {
- width: 100%;
- }
- }
- </style>
- @endsection
Advertisement
Add Comment
Please, Sign In to add comment