aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/__init__.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-09-06 14:23:20 -0700
committerJames Taylor <user234683@users.noreply.github.com>2019-09-06 14:23:20 -0700
commitca49ab170fb44a91c2017078765fd67692f17e9f (patch)
tree0107bdf9bd712eac85993d712bc9b35ba774e4b0 /youtube/__init__.py
parent0c22835dd214dc71e5cd085c5549ffe8dcf7f657 (diff)
parente9b16ef71fc25f12e26da79392fa91ae30aabe5d (diff)
downloadyt-local-ca49ab170fb44a91c2017078765fd67692f17e9f.tar.lz
yt-local-ca49ab170fb44a91c2017078765fd67692f17e9f.tar.xz
yt-local-ca49ab170fb44a91c2017078765fd67692f17e9f.zip
Merge branch 'layout'
Diffstat (limited to 'youtube/__init__.py')
-rw-r--r--youtube/__init__.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/youtube/__init__.py b/youtube/__init__.py
index e620827..38ff7d3 100644
--- a/youtube/__init__.py
+++ b/youtube/__init__.py
@@ -1,7 +1,22 @@
import flask
+import settings
yt_app = flask.Flask(__name__)
yt_app.url_map.strict_slashes = False
@yt_app.route('/')
def homepage():
- return flask.render_template('base.html', title="Youtube local")
+ return flask.render_template('home.html', title="Youtube local")
+
+
+theme_names = {
+ 0: 'light_theme',
+ 1: 'gray_theme',
+ 2: 'dark_theme',
+}
+
+@yt_app.context_processor
+def inject_theme_preference():
+ return {
+ 'theme_path': '/youtube.com/static/' + theme_names[settings.theme] + '.css',
+ }
+