parent
c9d0f685a4
commit
125ddaa8da
13
settings.py
13
settings.py
@ -153,6 +153,19 @@ For security reasons, enabling this is not recommended.''',
|
||||
],
|
||||
}),
|
||||
|
||||
('font', {
|
||||
'type': int,
|
||||
'default': 1,
|
||||
'comment': '',
|
||||
'options': [
|
||||
(0, 'Browser default'),
|
||||
(1, 'Arial'),
|
||||
(2, 'Liberation Serif'),
|
||||
(3, 'Verdana'),
|
||||
(4, 'Tahoma'),
|
||||
],
|
||||
}),
|
||||
|
||||
('autocheck_subscriptions', {
|
||||
'type': bool,
|
||||
'default': 0,
|
||||
|
@ -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',
|
||||
)
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'; media-src 'self' https://*.googlevideo.com;
|
||||
{{ "img-src 'self' https://*.googleusercontent.com https://*.ggpht.com https://*.ytimg.com;" if not settings.proxy_images else "" }}">
|
||||
<link href="{{ theme_path }}" type="text/css" rel="stylesheet">
|
||||
<link href="/youtube.com/static/shared.css" type="text/css" rel="stylesheet">
|
||||
<link href="/youtube.com/shared.css" type="text/css" rel="stylesheet">
|
||||
<link href="/youtube.com/static/comments.css" type="text/css" rel="stylesheet">
|
||||
<link href="/youtube.com/static/favicon.ico" type="image/x-icon" rel="icon">
|
||||
<link title="Youtube local" href="/youtube.com/opensearch.xml" rel="search" type="application/opensearchdescription+xml">
|
||||
|
@ -12,7 +12,7 @@ address{
|
||||
}
|
||||
|
||||
html{
|
||||
font-family: "liberation serif", "times new roman", calibri, carlito, serif;
|
||||
font-family: {{ font_family }};
|
||||
}
|
||||
|
||||
body{
|
Loading…
x
Reference in New Issue
Block a user