Edited: vehicle list styled
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 13s
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 13s
This commit is contained in:
parent
fc163431f8
commit
c5955010cb
@ -3,17 +3,21 @@
|
|||||||
<?php if (empty($this->get('vehicles'))): ?>
|
<?php if (empty($this->get('vehicles'))): ?>
|
||||||
<p>No vehicles yet. <a href="/vehicles/create">Add your first vehicle</a>.</p>
|
<p>No vehicles yet. <a href="/vehicles/create">Add your first vehicle</a>.</p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
<div class="btn-wrapper">
|
||||||
|
<a href="/vehicles/create" class="btn-green">Add new vehicle!</a>
|
||||||
|
</div>
|
||||||
<div class="vehicle-wrapper">
|
<div class="vehicle-wrapper">
|
||||||
<?php foreach ($this->get('vehicles') as $vehicle): ?>
|
<?php foreach ($this->get('vehicles') as $vehicle): ?>
|
||||||
<div class="vehicle bordered">
|
<div class="vehicle bordered">
|
||||||
<b><?= htmlspecialchars($vehicle['name']) ?></b>
|
<b><?= htmlspecialchars($vehicle['name']) ?></b>
|
||||||
<a href="/vehicles/edit?id=<?= $vehicle['id'] ?>">Edit</a> |
|
<p><?= htmlspecialchars($vehicle['registration_plate']) ?></p>
|
||||||
|
<p><?= htmlspecialchars($vehicle['note'] ?? "") ?></p>
|
||||||
|
<div class="actions">
|
||||||
|
<a href="/vehicles/edit?id=<?= $vehicle['id'] ?>">Edit</a>
|
||||||
<a href="/vehicles/delete?id=<?= $vehicle['id'] ?>" onclick="return confirm('Are you sure you want to delete this habit?')">Delete</a>
|
<a href="/vehicles/delete?id=<?= $vehicle['id'] ?>" onclick="return confirm('Are you sure you want to delete this habit?')">Delete</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
|
||||||
<a href="/vehicles/create" class="btn-green">Add new vehicle!</a>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</section>
|
</section>
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
.habits-wrapper {
|
|
||||||
display: flex;
|
|
||||||
gap: 1rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.habits .bordered {
|
|
||||||
border-radius: var(--border-radious);
|
|
||||||
border: var(--borderWidth-thin) solid var(--clr-border);
|
|
||||||
width: 17rem;
|
|
||||||
padding: 1rem;
|
|
||||||
margin-top: 1rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
29
public/css/vehicles.css
Normal file
29
public/css/vehicles.css
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
.vehicle-wrapper {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 1rem;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vehicle {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: var(--clr-secondary);
|
||||||
|
border-radius: var(--border-radious);
|
||||||
|
border: var(--borderWidth-thin) solid var(--clr-border);
|
||||||
|
width: 17rem;
|
||||||
|
padding: 1rem;
|
||||||
|
margin-top: 1rem;
|
||||||
|
text-align: center;
|
||||||
|
min-height: 8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user