aboutsummaryrefslogtreecommitdiff
path: root/app/views/index.view.php
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2019-03-25 21:27:46 -0400
committerThedro Neely <thedroneely@gmail.com>2019-03-25 21:27:46 -0400
commit6f768d766358ac7de862af3082b325e814e0ba45 (patch)
treeddaaff83a4071cfd7d13024cc1565a9de49ef76b /app/views/index.view.php
parentc383d5f68134e49ccdb9448611c8ba3b73977add (diff)
downloadthedroneely.com-6f768d766358ac7de862af3082b325e814e0ba45.tar.gz
thedroneely.com-6f768d766358ac7de862af3082b325e814e0ba45.tar.bz2
thedroneely.com-6f768d766358ac7de862af3082b325e814e0ba45.zip
app/model/HTMLExtract: Add HMTL Extractor
Extract posts and projects and add to home page
Diffstat (limited to 'app/views/index.view.php')
-rw-r--r--app/views/index.view.php66
1 files changed, 28 insertions, 38 deletions
diff --git a/app/views/index.view.php b/app/views/index.view.php
index bff5b9c..6c6fb59 100644
--- a/app/views/index.view.php
+++ b/app/views/index.view.php
@@ -40,53 +40,43 @@
</div>
- <div class="columns">
+ <div class="recent__article">
- <div class="column has-text-centered has-text-left-mobile">
- <div class="front__textbox has-text-left is-inline-block">
+ <h1 class="title has-text-weight-normal">Recent Posts</h1>
- <h3 class="has-text-dark is-marginless is-size-5">
- Recent Posts
- </h3>
+ <?php
+ $recentPosts = new DOMExtract();
+ $recentPosts->setSource($_SERVER['DOCUMENT_ROOT'] . '/post/index.html');
+ echo $recentPosts->getInnerHTML('recent-article');
+ ?>
- <?php
- $recent_posts = file($_SERVER['DOCUMENT_ROOT'] . '/post/index.html');
- foreach (range(count($recent_posts) - 32, count($recent_posts) - 24) as $line) {
- echo $recent_posts[$line];
- }
- ?>
+ <a href="/post/"
+ class="front__more is-block has-text-right has-text-centered-mobile">
+ See All Posts
+ <?php echo file_get_contents($_SERVER['DOCUMENT_ROOT']
+ . '/..' . '/public/css/fonts/feather-icons/chevron-right.svg') ?>
+ </a>
- <br>
- <br>
-
- <a class="front__frame is-inline-block" href="post/">More posts <span class="icon">➤</span></a>
-
- </div>
- </div>
-
- <div class="column has-text-centered has-text-left-mobile">
- <div class="front__textbox has-text-left is-inline-block">
-
- <h3 class="has-text-dark is-marginless is-size-5">
- Recent Projects
- </h3>
+ <br>
- <?php
- $recent_projects = file($_SERVER['DOCUMENT_ROOT'] . '/post/index.html');
- foreach (range(count($recent_projects) - 15, count($recent_projects) - 7) as $line) {
- echo $recent_projects[$line];
- }
- ?>
+ <h1 class="title has-text-weight-normal">Recent Projects</h1>
- <br>
- <br>
+ <?php
+ $recentProjects = new DOMExtract();
+ $recentProjects->setSource($_SERVER['DOCUMENT_ROOT'] . '/project/index.html');
+ echo $recentProjects->getInnerHTML('recent-article');
+ ?>
+ </div>
- <a class="front__frame is-inline-block" href="project/">More projects <span class="icon">➤</span></a>
+ <a href="/project/"
+ class="front__more is-block has-text-right has-text-centered-mobile">
+ See All Projects
+ <?php echo file_get_contents($_SERVER['DOCUMENT_ROOT']
+ . '/..' . '/public/css/fonts/feather-icons/chevron-right.svg') ?>
+ </a>
- </div>
- </div>
+ <br>
- </div>
</div>
</div>
</div>