aboutsummaryrefslogtreecommitdiff
path: root/views/home/index.php
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-01-19 18:25:14 +0200
committerSyndamia <kamen@syndamia.com>2025-01-19 18:25:14 +0200
commit065174271d5b521b3bab54d48bb1c91569f8e56f (patch)
tree56cceee8ff8bc803979a7c3965c9c1a4b3ea6cd5 /views/home/index.php
parentba71a5ed4750c660ba5c0aa4743b8e7fd44e1ec9 (diff)
downloadnowayforward_human-065174271d5b521b3bab54d48bb1c91569f8e56f.tar
nowayforward_human-065174271d5b521b3bab54d48bb1c91569f8e56f.tar.gz
nowayforward_human-065174271d5b521b3bab54d48bb1c91569f8e56f.zip
feat: Implement the home page
Diffstat (limited to 'views/home/index.php')
-rw-r--r--views/home/index.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/views/home/index.php b/views/home/index.php
new file mode 100644
index 0000000..33f123d
--- /dev/null
+++ b/views/home/index.php
@@ -0,0 +1,38 @@
+<?php
+ include '../meta.php';
+?>
+
+<section class="highlight separate-margin">
+ <h2>Explore the archives or add a new page</h2>
+ <form action="/sample_archive/index.php" method="POST" class="font-125 flex-row width-100 center-margin">
+ <input type="text" name="page_url" placeholder="Enter a URL" class="flex-expand">
+ <input type="submit" name="archive_page_button" value="Search">
+ </form>
+</section>
+
+<hr class="new-section"/>
+
+<h1>Most popular archives</h1>
+
+<?php foreach(Database\Webpage::mostVisited(10) as $page): ?>
+ <section class="card">
+ <section class="quickinfo">
+ <a href="<?php echo $page->URL ?>"><?php echo $page->URL ?></a>
+ <span class="float-right"><?php echo $page->Date ?></span>
+ </section>
+ <section>
+ <span><!-- Favicon --></span>
+ <span><!-- Title --></span>
+ </section>
+ <section>
+ <strong>Visits: <?php echo $page->Visits ?></strong>
+ <strong><!-- Archives count --></strong>
+ </section>
+ </section>
+<?php endforeach; ?>
+<h1>...</h1>
+
+<div class="card-blank-afterspace"></div>
+
+<?php end_page(); ?>
+