Last active
June 8, 2020 21:23
-
-
Save LucianoCharlesdeSouza/bb3ba73e36b906b9bd71864ca0a27823 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="pr_br"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<?php | |
$cards = [ | |
['title' => 'titulo 01', 'text' => 'texto 01'], | |
['title' => 'titulo 02', 'text' => 'texto 02'], | |
['title' => 'titulo 03', 'text' => 'texto 03'], | |
['title' => 'titulo 04', 'text' => 'texto 04'], | |
['title' => 'titulo 05', 'text' => 'texto 05'], | |
['title' => 'titulo 06', 'text' => 'texto 06'], | |
['title' => 'titulo 07', 'text' => 'texto 07'], | |
['title' => 'titulo 08', 'text' => 'texto 08'], | |
]; | |
?> | |
<div class="container"> | |
<div class="row mb-4"> | |
<?php | |
foreach ($cards as $key => $card) { | |
if( $key % 3 === 0){ | |
echo '</div>'; | |
echo '<div class="row mb-4">'; | |
} | |
echo '<div class="col-4">'; | |
echo '<div class="card" style="width: 18rem;">'; | |
echo '<img class="card-img-top" src="..." alt="Card image cap">'; | |
echo '<div class="card-body">'; | |
echo '<h5 class="card-title">Card title '. $card["title"] .'</h5>'; | |
echo '<p class="card-text">Some quick example.</p>'; | |
echo '<a href="#" class="btn btn-primary">Go somewhere</a>'; | |
echo '</div>'; | |
echo '</div>'; | |
echo '</div>'; | |
} | |
?> | |
</div> | |
</body > | |
</html > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment