From 9a1e874a41ced8ab4bf100d83b03487e1d12236b Mon Sep 17 00:00:00 2001 From: zPlus Date: Sun, 31 Jul 2022 12:41:41 +0200 Subject: [PATCH] Invert About and Explore pages in the homepage, making Explore the default. --- templates/index.html | 10 +++++----- web.py | 15 +++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/templates/index.html b/templates/index.html index 3654fed..4db2635 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,14 +6,14 @@ {% block context %} {% endblock %} diff --git a/web.py b/web.py index 93c628a..eb81bac 100644 --- a/web.py +++ b/web.py @@ -185,23 +185,22 @@ def static(filename): return bottle.static_file(filename, root='./static/') -@bottle.get('/', name='about') -def about(): +@bottle.get('/', name='explore') +def explore(): """ The home page displayed at https://domain/ """ - return template('about.html', domain=INSTANCE_DOMAIN) + repositories = list_repositories() + return template('explore.html', repositories=repositories) -@bottle.get('/explore', name='explore') -def explore(): +@bottle.get('/about', name='about') +def about(): """ The home page displayed at https://domain/ """ - repositories = list_repositories() - - return template('explore.html', repositories=repositories) + return template('about.html', domain=INSTANCE_DOMAIN) @bottle.get('/.git', name='overview') def overview(repository):