diff options
author | Cqoicebordel <Cqoicebordel@users.noreply.github.com> | 2014-12-12 19:09:02 +0100 |
---|---|---|
committer | Cqoicebordel <Cqoicebordel@users.noreply.github.com> | 2014-12-12 19:09:02 +0100 |
commit | 0bfc793194f44cc3c0e6fdeb9dc9c00c448c0324 (patch) | |
tree | ff214a98ed246798fd04cd02a3b0c63bf31dbff5 /searx/webapp.py | |
parent | 41aca9a068cbaf4e630461b844a152e7f2444548 (diff) | |
download | searxng-0bfc793194f44cc3c0e6fdeb9dc9c00c448c0324.tar.gz searxng-0bfc793194f44cc3c0e6fdeb9dc9c00c448c0324.zip |
Add a variable with all the icons of the theme
Add for the template a list of available icons in the current theme.
Diffstat (limited to 'searx/webapp.py')
-rw-r--r-- | searx/webapp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 541975573..bb412df69 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -291,6 +291,11 @@ def index(): for engine in result['engines']: if engine in favicons: result['favicon'] = engine + + mypath = searx_dir+"/static/"+get_current_theme_name()+"/img/" + favs=[] + for (dirpath, dirnames, filenames) in os.walk(mypath): + favs.extend(filenames) # TODO, check if timezone is calculated right if 'publishedDate' in result: @@ -344,7 +349,8 @@ def index(): suggestions=search.suggestions, answers=search.answers, infoboxes=search.infoboxes, - theme=get_current_theme_name() + theme=get_current_theme_name(), + favicons=favs ) |