You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
3.9 KiB
104 lines
3.9 KiB
{% autoescape None %}
|
|
<!doctype html>
|
|
<html class="{{ 'dark' if Env.setting('dark_theme') else '' }}">
|
|
<head>
|
|
<title>CouchPotato</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="msapplication-tap-highlight" content="no" />
|
|
|
|
{% set icon_path = Env.get('static_path') + 'images/icons/' %}
|
|
{% set themed_icon_path = icon_path + ('dark/' if Env.setting('dark_theme') else '') %}
|
|
|
|
<!-- IOS -->
|
|
<link rel="apple-touch-icon-precomposed" href="{{ themed_icon_path }}ios.png" />
|
|
|
|
<!-- Android -->
|
|
<link rel="icon" type="image/png" href="{{ themed_icon_path }}android.png" sizes="192x192">
|
|
|
|
<!-- Windows 8 -->
|
|
<meta name="msapplication-TileColor" content="{{ '#f85c22' if Env.setting('dark_theme') else '#ac0000' }}">
|
|
<meta name="msapplication-TileImage" content="{{ icon_path }}windows.png">
|
|
<meta name="msapplication-square70x70logo" content="{{ icon_path }}windows.png">
|
|
<meta name="msapplication-square150x150logo" content="{{ icon_path }}windows.png">
|
|
<meta name="msapplication-square310x310logo" content="{{ icon_path }}windows.png">
|
|
|
|
<link href="{{ icon_path }}favicon.ico" rel="icon" type="image/x-icon" />
|
|
|
|
{% for url in fireEvent('clientscript.get_scripts', single = True) %}
|
|
<script type="text/javascript" src="{{ Env.get('web_base') }}{{ url }}"></script>{% end %}
|
|
|
|
{% if Env.get('dev') %}
|
|
<script src="//localhost:35729/livereload.js?snipver=1" async></script>
|
|
{% end %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
window.addEvent('domready', function() {
|
|
|
|
new Uniform();
|
|
|
|
Api.setup({
|
|
'url': {{ json_encode(Env.get('api_base')) }},
|
|
'path_sep': {{ json_encode(sep) }},
|
|
'is_remote': false
|
|
});
|
|
|
|
$(document.body).set('data-api', window.location.protocol + '//' + window.location.host + Api.createUrl().replace('/default/', '/'));
|
|
|
|
// Catch errors
|
|
var dev = {{ json_encode(Env.get('dev')) }};
|
|
if(!dev){
|
|
window.onerror = function(message, file, line){
|
|
|
|
p(message, file, line);
|
|
|
|
Api.request('logging.log', {
|
|
'data': {
|
|
'type': 'error',
|
|
'message': Browser.name + ' ' + Browser.version + ': \n' + message,
|
|
'page': window.location.href.replace(window.location.host, 'HOST'),
|
|
'file': file.replace(window.location.host, 'HOST'),
|
|
'line': line
|
|
}
|
|
});
|
|
|
|
return true;
|
|
}
|
|
}
|
|
|
|
Quality.setup({
|
|
'profiles': {{ json_encode(fireEvent('profile.all', single = True)) }},
|
|
'qualities': {{ json_encode(fireEvent('quality.all', single = True)) }}
|
|
});
|
|
|
|
CategoryList.setup({{ json_encode(fireEvent('category.all', single = True)) }});
|
|
|
|
App.setup({
|
|
'dev': dev,
|
|
'base_url': {{ json_encode(Env.get('web_base')) }},
|
|
'dereferer': {{ json_encode(Env.setting('dereferer')) }},
|
|
'args': {{ json_encode(Env.get('args', unicode = True)) }},
|
|
'options': {{ json_encode(('%s' % Env.get('options'))) }},
|
|
'app_dir': {{ json_encode(Env.get('app_dir', unicode = True)) }},
|
|
'data_dir': {{ json_encode(Env.get('data_dir', unicode = True)) }},
|
|
'pid': {{ json_encode(Env.getPid()) }},
|
|
'userscript_version': {{ json_encode(fireEvent('userscript.get_version', single = True)) }},
|
|
'hide_about_dirs' : {{ json_encode( Env.setting('hide_about_dirs', default=False, section = 'core', type='bool') ) }}
|
|
});
|
|
})
|
|
|
|
{% if Env.setting('show_wizard') %}
|
|
if(!window.location.href.contains('wizard'))
|
|
window.location = '{{ Env.get('web_base') }}wizard/'
|
|
{% end %}
|
|
|
|
</script>
|
|
|
|
{% for url in fireEvent('clientscript.get_styles', single = True) %}
|
|
<link data-url="{{ url }}" rel="stylesheet" href="{{ Env.get('web_base') }}{{ url }}" type="text/css">{% end %}
|
|
</head>
|
|
<body></body>
|
|
</html>
|
|
|