diff options
author | James Taylor <user234683@users.noreply.github.com> | 2020-10-20 15:38:00 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2020-10-20 15:38:00 -0700 |
commit | 125ddaa8da8dad8f3e8eeb54f79a775b865c58bf (patch) | |
tree | 5f5c19608333bda6a8d1bc15082fad6df4951886 /youtube/__init__.py | |
parent | c9d0f685a43d95d653db56a00efe520e3a04d0d2 (diff) | |
download | yt-local-125ddaa8da8dad8f3e8eeb54f79a775b865c58bf.tar.lz yt-local-125ddaa8da8dad8f3e8eeb54f79a775b865c58bf.tar.xz yt-local-125ddaa8da8dad8f3e8eeb54f79a775b865c58bf.zip |
Add setting to change font. Change default to arial
Closes #33
Diffstat (limited to 'youtube/__init__.py')
-rw-r--r-- | youtube/__init__.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/youtube/__init__.py b/youtube/__init__.py index 3c271f1..70ed5b2 100644 --- a/youtube/__init__.py +++ b/youtube/__init__.py @@ -66,3 +66,20 @@ def error_page(e): error_message += ' Exit node IP address: ' + exc_info()[1].ip return flask.render_template('error.html', error_message=error_message), 502 return flask.render_template('error.html', traceback=traceback.format_exc()), 500 + +font_choices = { + 0: 'initial', + 1: 'arial, "liberation sans", sans-serif', + 2: '"liberation serif", "times new roman", calibri, carlito, serif', + 3: 'verdana, sans-serif', + 4: 'tahoma, sans-serif', +} + +@yt_app.route('/shared.css') +def get_css(): + return flask.Response( + flask.render_template('shared.css', + font_family = font_choices[settings.font] + ), + mimetype='text/css', + ) |