getting started
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*
|
||||
* Given some article data, create a card or thumbnail of the article with the
|
||||
* following:
|
||||
* - A thumbnail image,
|
||||
* - The article heading,
|
||||
* - A brief description,
|
||||
* - A call to action button.
|
||||
*/
|
||||
function generate_article_card($data) {
|
||||
$article = '
|
||||
<div class="box shadow">
|
||||
<img class="shadow thumbnail" src="' . $data['thumbnail'] . '">
|
||||
<h3 class="card_heading">' . $data['heading'] . '</h3>
|
||||
<p class="">' . $data['description'] . '</p>
|
||||
<button href="' . $data['path'] . '">Read Article</button>
|
||||
</div>
|
||||
';
|
||||
|
||||
return $article;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user