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;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,2 @@
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Dummy Title</title>
|
||||
<link href="css/styles.css" type="text/css" rel="stylesheet">
|
||||
<script src="js/index.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
function get_article_cards() {
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user