aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-10-06 19:34:35 +0000
committerMax Magorsch <arzano@gentoo.org>2020-10-06 19:34:35 +0000
commit478e182c1f5e6c3f4fd36c3cdb018efb0b0dcbbe (patch)
tree6c3503ff0746702df546d4de6817a72ba275866a /web/templates/index
parentMap bugs to package versions as well (diff)
downloadsoko-478e182c1f5e6c3f4fd36c3cdb018efb0b0dcbbe.tar.gz
soko-478e182c1f5e6c3f4fd36c3cdb018efb0b0dcbbe.tar.bz2
soko-478e182c1f5e6c3f4fd36c3cdb018efb0b0dcbbe.zip
Add the possibility to customize the web page
Different customization options have been added, so that it's possible to change the contents of the web page to the visitors needs. Cookies are currently used to store the preferences. Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'web/templates/index')
-rw-r--r--web/templates/index/show.tmpl15
1 files changed, 11 insertions, 4 deletions
diff --git a/web/templates/index/show.tmpl b/web/templates/index/show.tmpl
index 46b02a8..5f732e6 100644
--- a/web/templates/index/show.tmpl
+++ b/web/templates/index/show.tmpl
@@ -35,9 +35,11 @@
="font-size: 12px;">You can search by <a href="/packages/search?q=sys-kernel/gentoo-sources">atom</a>, <a href="/packages/search?q=sys-kernel">category</a>, <a href="/packages/search?q=gentoo-sources">name</a>, <a href="/packages/search?q=kernel@gentoo.org">maintainer</a> or <a href="/packages/search?q=x11-wm%20haskell@gentoo.org">combine</a> queries. Results similar to your query will be found as well.</small>
</div>
-
+ </div>
+ <div class="col-12">
<h3 class="mb-2"><span class="fa fa-fw fa-history"></span>
- <a class="text-dark" href="/packages/added">Added Packages</a></h3>
+ {{if eq .UserPreferences.General.LandingPageLayout "classic"}}<a class="text-dark" href="/packages/added">Added Packages</a>{{else}}<a class="text-dark">Search History</a>{{end}}
+ </h3>
<div class="card border-top-0 mb-4">
<div class="table-responsive rounded">
<table class="table table-striped rounded mb-0">
@@ -52,12 +54,17 @@
<td>{{(index .Versions 0).Description}}</td>
</tr>
{{end}}
+ {{if eq .UserPreferences.General.LandingPageLayout "full"}}
+ {{if eq (len .AddedPackages) 0}}
+ <tr><td class="text-center"><i>Visited packages will be displayed here in future</i></td></tr>
+ {{end}}
+ {{end}}
</tbody>
</table>
</div>
</div>
-
-
+ </div>
+ <div class="col-12">
<h3 class="pt-3 mb-2"><span class="fa fa-fw fa-asterisk"></span>
<a class="text-dark" href="/packages/updated">Updated Packages</a></h3>
<ul class="list-group">