diff options
| author | Syndamia <kamen@syndamia.com> | 2025-01-19 19:45:52 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-01-19 19:45:52 +0200 |
| commit | bbd5142fcab37e34ae3d208c43e87d65e06feb71 (patch) | |
| tree | 10c4bbb8cf7779fdb3c5b1c84549aa340cce16d2 /views/home | |
| parent | 1c65183651962e7c91097d3ffd29cfb24b3a6bee (diff) | |
| download | nowayforward_human-bbd5142fcab37e34ae3d208c43e87d65e06feb71.tar nowayforward_human-bbd5142fcab37e34ae3d208c43e87d65e06feb71.tar.gz nowayforward_human-bbd5142fcab37e34ae3d208c43e87d65e06feb71.zip | |
feat(views/home): Implement clicking on cards
Diffstat (limited to 'views/home')
| -rw-r--r-- | views/home/index.php | 9 |
1 files changed, 7 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(); ?> |
