Skip to content

Commit

Permalink
Add user list
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin Mors committed Feb 24, 2021
1 parent ecc75f3 commit ba9c5d3
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
10 changes: 10 additions & 0 deletions components/userCards.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="card h-100">
<img src="https://via.placeholder.com/200" class="card-img-top" alt="User image">
<div class="card-body">
<h5 class="card-title">John Smith</h5>
<p class="card-text">Premium user</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
2 changes: 1 addition & 1 deletion partials/_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a class="nav-link" href="list.php"><i class="far fa-newspaper"></i> Posts</a>
</li>
<li class="nav-item">
<a class="nav-link" href="list.php"><i class="far fa-file-alt"></i> Pages</a>
<a class="nav-link" href="users.php"><i class="fas fa-users"></i> Users</a>
</li>
<li class="nav-item">
<a class="nav-link" href="list.php"><i class="far fa-comment"></i> Comments</a>
Expand Down
51 changes: 51 additions & 0 deletions users.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
$page_name = "Posts List";
include "partials/_header.php";
include "partials/_menu.php";
?>

<main role="main" class="container">

<div class="row">
<div class="col-12">

<h2>Users</h2>

<hr>

<?php for ($i = 1; $i <= 3; $i++) : ?>
<div class="row row-cols-1 row-cols-md-2 g-4 mb-4">
<?php for ($y = 1; $y <= 5; $y++) : ?>
<div class="col">
<?php
include "components/userCards.php";
?>
</div>
<?php endfor; ?>
</div>
<?php endfor; ?>

<hr />

<nav aria-label="Page navigation example">
<ul class="pagination justify-content-end">
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Previous</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
</li>
</ul>
</nav>

</div>
</div>

</main><!-- /.container -->

<?php
include "partials/_footer.php";
?>

0 comments on commit ba9c5d3

Please sign in to comment.