Author
|
zPlus <zplus@peers.community>
2022-07-31 10:41:41
|
Committer
|
zPlus <zplus@peers.community>
2022-07-31 10:41:41
|
Commit
|
9a1e874
(patch)
|
Tree
|
bc8898e
|
Parent(s)
|
|
Invert About and Explore pages in the homepage, making Explore the
default.
commits diff:
fa2bdf7..9a1e874
2 files changed,
12 insertions,
13 deletions
—
download
Diffstat
Diff options
+5/-5
M templates/index.html
7
|
7
|
|
{% block context %}
|
8
|
8
|
|
<ul class="menu">
|
9
|
9
|
|
<a
|
10
|
|
- |
href="{{ url('about') }}"
|
11
|
|
- |
class="{% block menu_about_class %}{% endblock %}"
|
12
|
|
- |
>About</a>
|
13
|
|
- |
|
14
|
|
- |
<a
|
15
|
10
|
|
href="{{ url('explore') }}"
|
16
|
11
|
|
class="{% block menu_explore_class %}{% endblock %}"
|
17
|
12
|
|
>Explore</a>
|
|
13
|
+ |
|
|
14
|
+ |
<a
|
|
15
|
+ |
href="{{ url('about') }}"
|
|
16
|
+ |
class="{% block menu_about_class %}{% endblock %}"
|
|
17
|
+ |
>About</a>
|
18
|
18
|
|
</ul>
|
19
|
19
|
|
{% endblock %}
|
+7/-8
M web.py
185
|
185
|
|
|
186
|
186
|
|
return bottle.static_file(filename, root='./static/')
|
187
|
187
|
|
|
188
|
|
- |
@bottle.get('/', name='about')
|
189
|
|
- |
def about():
|
|
188
|
+ |
@bottle.get('/', name='explore')
|
|
189
|
+ |
def explore():
|
190
|
190
|
|
"""
|
191
|
191
|
|
The home page displayed at https://domain/
|
192
|
192
|
|
"""
|
193
|
193
|
|
|
194
|
|
- |
return template('about.html', domain=INSTANCE_DOMAIN)
|
|
194
|
+ |
repositories = list_repositories()
|
|
195
|
+ |
return template('explore.html', repositories=repositories)
|
195
|
196
|
|
|
196
|
|
- |
@bottle.get('/explore', name='explore')
|
197
|
|
- |
def explore():
|
|
197
|
+ |
@bottle.get('/about', name='about')
|
|
198
|
+ |
def about():
|
198
|
199
|
|
"""
|
199
|
200
|
|
The home page displayed at https://domain/
|
200
|
201
|
|
"""
|
201
|
202
|
|
|
202
|
|
- |
repositories = list_repositories()
|
203
|
|
- |
|
204
|
|
- |
return template('explore.html', repositories=repositories)
|
|
203
|
+ |
return template('about.html', domain=INSTANCE_DOMAIN)
|
205
|
204
|
|
|
206
|
205
|
|
@bottle.get('/<repository:path>.git', name='overview')
|
207
|
206
|
|
def overview(repository):
|