aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/home/index.php9
-rw-r--r--views/styles.css4
2 files changed, 11 insertions, 2 deletions
diff --git a/views/home/index.php b/views/home/index.php
index 4883a91..9938ddd 100644
--- a/views/home/index.php
+++ b/views/home/index.php
@@ -15,7 +15,7 @@
<h1>Most popular archives</h1>
<?php foreach(Database\Webpage::mostVisited(10) as $page): ?>
- <section class="card">
+ <section class="card" onclick="open_archive('<?php echo $page->URL ?>')">
<section class="quickinfo">
<a href="<?php echo $page->URL ?>"><?php echo $page->URL ?></a>
<span class="float-right"><?php echo $page->Date ?></span>
@@ -34,5 +34,10 @@
<div class="card-blank-afterspace"></div>
-<?php end_page(); ?>
+<script type="text/javascript">
+function open_archive(url) {
+ window.location.href = '/archive/index.php?page_url=' + url;
+}
+</script>
+<?php end_page(); ?>
diff --git a/views/styles.css b/views/styles.css
index bed3009..776f97b 100644
--- a/views/styles.css
+++ b/views/styles.css
@@ -185,6 +185,10 @@ hr.new-section {
transition-property: height;
}
+.card * {
+ pointer-events: none;
+}
+
.card:hover {
cursor: pointer;
height: calc(6.5em + var(--card-expand-with));