diff options
Diffstat (limited to 'utab/rendering.py')
-rw-r--r-- | utab/rendering.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utab/rendering.py b/utab/rendering.py index 731524c..12507f2 100644 --- a/utab/rendering.py +++ b/utab/rendering.py @@ -9,7 +9,7 @@ def render_page(template: str, **kwargs): return page -def render_sites(sites: list, columns=8, rows=4): +def render_sites(sites: list, columns=8, rows=4, action="go"): top_sites = sorted(sites, key=lambda s: int(s[VISITS]), reverse=True)[ : (columns * rows) # top col*row sites, default=32 ] @@ -25,8 +25,8 @@ def render_sites(sites: list, columns=8, rows=4): if col is not None: html += ( '<div class="sites-item">' - f'<a class="site" href="/go/{urllib.parse.quote(col[URL], safe="")}">' - f'<img class="site-favicon" src="{col[FAVICON]}" /></a>' + f'<a class="site" href="/{action}/{urllib.parse.quote(col[URL], safe="")}">' + f'<img class="site-favicon" src="{col[FAVICON]}" title="{col[URL]}"/></a>' + f"<p>{col[TITLE]}</p>" + "</div>" ) |