Bootstrap 4.6 üzerine override olarak yaptığım stillendirmeler
.breadcrumb-container {
background-color:#e9ecef;
}
.breadcrumb {
padding-right: 0;
padding-left: 0;
margin-bottom: 0;
}
.grid-container {
display: grid;
grid-template-columns: repeat(3,minmax(0,1fr));
gap: 1rem;
}
<!-- {{RESOURCE_MODAL_TRIGGER}} -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#{{MODAL_ID}}">
{{BUTON_LABEL}}
</button>
<!-- {{RESOURCE_MODAL}} -->
<div class="modal fade" id="{{MODAL_ID}}" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<form method="post" action="{{ route('POST_ROUTE') }}">
@csrf
<div class="modal-header">
<h5 class="modal-title">{{TITLE}}</h5>
<button type="button" class="close" data-dismiss="modal">
<span>×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{CANCEL_BUTON}}</button>
<button type="submit" class="btn btn-primary">{{SAVE_BUTON}}</button>
</div>
</form>
</div>
</div>
</div>
Modal'ı Javascript ile açmak istersen
window.addEventListener('keydown', (e) => {
if (e.shiftKey && e.key == 'N') {
$('#MODAL_ID').modal('show')
}
})
Bootstrap doc - link
Modal açıldığında ayrıca belli bir field focuslansın istersen
$('#myModal').on('shown.bs.modal', function () {
$('#myModal #myInput').trigger('focus')
})
<div class="form-group">
<label for="{{FIELD_ID}}">{{FIELD_LABEL}}</label>
<input type="text|email|number|tel"
class="form-control"
id="{{FIELD_ID}}"
name="{{FIELD_NAME}}"
placeholder="ör. {{PLACEHOLDER_TEXT}}">
<small class="form-text text-muted">{{SMALL_TEXT}}</small>
</div>
<div class="form-group">
<label for="description">Açıklama</label>
<textarea class="form-control"
id="description"
name="description"
rows="3"></textarea>
</div>
public function store(Request $request)
{
...
return back()->with('message', '<strong>' . $request->title . '</strong> alanı başarıyla oluşturuldu.');
// veya
return redirect()->route('dashboard')->with('message', '<strong>' . $request->title . '</strong> alanı başarıyla oluşturuldu.');
}
@if (session('message'))
<div class="alert alert-warning alert-dismissible fade show" role="alert">
{!! session('message') !!}
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<nav class="breadcrumb-container">
<div class="container">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Panel</a></li>
<li class="breadcrumb-item"><a href="#">Alanlar</a></li>
<li class="breadcrumb-item active">{{ $project->title }}</li>
</ol>
</div>
</nav>
<div class="card">
<div class="card-body">
<h5 class="card-title">{{TITLE}}</h5>
<p class="card-text">{{DESCRIPTION}}</p>
</div>
</div>
<div class="card">
<div class="card-header">
Featured
</div>
<div class="card-body">
<h5 class="card-title">Special title treatment</h5>
<p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
<div class="list-group">
<a href="{{ route('ROUTE_LINK') }}"
class="list-group-item list-group-item-action">
{{ ROUTE_LABEL }}
</a>
</div>
<ul class="list-group">
@foreach($books as $book)
<li class="list-group-item d-flex justify-content-between align-items-center">
{{ $book->title }}
<span class="badge badge-primary badge-pill">{{ count($book->articles) }}</span>
</li>
@endforeach
</ul>
<div class="list-group">
@foreach($books as $book)
<a href="{{ route('booklink', $book) }}"
class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
{{ $book->title }}
<span class="badge badge-primary badge-pill">{{ count($book->articles) }}</span>
</a>
@endforeach
</div>
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active"
data-toggle="tab"
href="#{{TAB1_ID}}"
role="tab">{{TAB1_LABEL}}</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-toggle="tab"
href="#{{TAB2_ID}}"
role="tab">{{TAB2_LABEL}}</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane py-2 show active" id="{{TAB1_ID}}">
{{TAB1_CONTENT}}
</div>
<div class="tab-pane py-2" id="{{TAB2_ID}}">
{{TAB2_CONTENT}}
</div>
</div>
<div class="progress">
<div class="progress-bar {{bg-success|warning|danger`}}" role="progressbar" style="width: 25%">%25</div>
</div>
Bootstrap doc - link
Width'i küçültmek istersen
<div class="progress" style="height: 5px;">
<div class="progress-bar" style="width: 25%;"></div>
</div>
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
<div class="container">
<a class="navbar-brand" href="{{ url('/') }}">
{{ env('APP_NAME', 'DEFAULT APP NAME') }}
</a>
<button class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left Side Of Navbar -->
<ul class="navbar-nav mr-auto">
</ul>
<!-- Right Side Of Navbar -->
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a href="{{ route('ROUTE_NAME') }}" class="nav-link">
ROUTE
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">Fluid jumbotron</h1>
<p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
<a class="btn btn-primary" href="#" role="button">Learn more</a>
</div>
</div>
<span class="badge badge-primary|secondary|success|danger">Primary</span>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
@foreach($datapoints as $datapoint)
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
@endforeach
</tbody>
</table>
<thead class="thead-dark">
başlığı açık renkte yapmak için
<thead class="thead-light">
<table class="table table-striped">
<table class="table table-hover">
<table class="table table-sm">
<!-- On rows -->
<tr class="table-active">...</tr>
<tr class="table-primary">...</tr>
<tr class="table-secondary">...</tr>
<tr class="table-success">...</tr>
<tr class="table-danger">...</tr>
<tr class="table-warning">...</tr>
<tr class="table-info">...</tr>
<tr class="table-light">...</tr>
<tr class="table-dark">...</tr>
<!-- On cells (`td` or `th`) -->
<tr>
<td class="table-active">...</td>
<td class="table-primary">...</td>
<td class="table-secondary">...</td>
<td class="table-success">...</td>
<td class="table-danger">...</td>
<td class="table-warning">...</td>
<td class="table-info">...</td>
<td class="table-light">...</td>
<td class="table-dark">...</td>
</tr>
<div class="table-responsive">
<table class="table">
...
</table>
</div>