common header, custom background color for loading screen

This commit is contained in:
j 2017-11-06 19:20:37 +02:00
parent db2d37e2bb
commit 7ab94267db
5 changed files with 24 additions and 46 deletions

View file

@ -3,19 +3,8 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>{{title}}</title> <title>{{title}}</title>
<link rel="icon" type="image/png" href="/static/png/icon.png" /> {% include "baseheader.html" %}
<meta name="application-name" content="{{settings.SITENAME}}"/>
<meta name="application-url" content="{{base_url}}"/>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" />
<link rel="alternate" type="application/atom+xml" title="{{settings.SITENAME}}" href="/atom.xml" /> <link rel="alternate" type="application/atom+xml" title="{{settings.SITENAME}}" href="/atom.xml" />
<script>
try {
if (localStorage && !localStorage['Ox.theme']) {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
}
} catch(e) {}
</script>
<script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script>
<meta name="title" content="{{title}}" /> <meta name="title" content="{{title}}" />
<meta name="description" content="{{settings.CONFIG.site.description}}"/> <meta name="description" content="{{settings.CONFIG.site.description}}"/>
<meta property="og:title" content="{{title}}"/> <meta property="og:title" content="{{title}}"/>
@ -24,7 +13,6 @@
<meta property="og:image" content="{{base_url}}static/png/icon.png"/> <meta property="og:image" content="{{base_url}}static/png/icon.png"/>
<meta property="og:site_name" content="{{settings.SITENAME}}"/> <meta property="og:site_name" content="{{settings.SITENAME}}"/>
<meta property="og:description" content="{{settings.CONFIG.site.description}}"/> <meta property="og:description" content="{{settings.CONFIG.site.description}}"/>
<meta name="google" value="notranslate"/>
</head> </head>
<body> <body>
<noscript> <noscript>

View file

@ -0,0 +1,14 @@
<link rel="icon" type="image/png" href="/static/png/icon.png" />
<meta name="application-name" content="{{settings.SITENAME}}"/>
<meta name="application-url" content="{{base_url}}"/>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" />
<script>
try {
if (localStorage && !localStorage['Ox.theme']) {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
}
} catch(e) {}
{% if settings.LOADING_BACKGROUND %}var backgroundColor="{{settings.LOADING_BACKGROUND}}";{%endif%}
</script>
<script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script>
<meta name="google" value="notranslate"/>

View file

@ -3,19 +3,8 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>{{title}}</title> <title>{{title}}</title>
<link rel="icon" type="image/png" href="/static/png/icon.png" />
<meta name="application-name" content="{{settings.SITENAME}}"/>
<meta name="application-url" content="{{base_url}}"/>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" />
<link rel="alternate" type="application/atom+xml" title="{{settings.SITENAME}}" href="/atom.xml" /> <link rel="alternate" type="application/atom+xml" title="{{settings.SITENAME}}" href="/atom.xml" />
<script> {% include "baseheader.html" %}
try {
if (localStorage && !localStorage['Ox.theme']) {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
}
} catch(e) {}
</script>
<script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script>
<meta name="title" content="{{title}}" /> <meta name="title" content="{{title}}" />
<meta name="description" content="{{settings.CONFIG.site.description}}"/> <meta name="description" content="{{settings.CONFIG.site.description}}"/>
<meta property="og:title" content="{{title}}"/> <meta property="og:title" content="{{title}}"/>
@ -24,7 +13,6 @@
<meta property="og:image" content="{{base_url}}static/png/icon.png"/> <meta property="og:image" content="{{base_url}}static/png/icon.png"/>
<meta property="og:site_name" content="{{settings.SITENAME}}"/> <meta property="og:site_name" content="{{settings.SITENAME}}"/>
<meta property="og:description" content="{{settings.CONFIG.site.description}}"/> <meta property="og:description" content="{{settings.CONFIG.site.description}}"/>
<meta name="google" value="notranslate"/>
</head> </head>
<body> <body>
<noscript> <noscript>

View file

@ -3,19 +3,8 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>{{head_title}}</title> <title>{{head_title}}</title>
<link rel="icon" type="image/png" href="/static/png/icon.png"/>
<meta name="application-name" content="{{settings.SITENAME}}"/>
<meta name="application-url" content="{{base_url}}"/>
<link rel="alternate" type="application/json+oembed" href="{{base_url}}oembed?url={{current_url|urlencode}}" title="oEmbed Profile"/> <link rel="alternate" type="application/json+oembed" href="{{base_url}}oembed?url={{current_url|urlencode}}" title="oEmbed Profile"/>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}"/> {% include "baseheader.html" %}
<script>
try {
if (localStorage && !localStorage['Ox.theme']) {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
}
} catch(e) {}
</script>
<script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script>
<meta name="title" content="{{title}}"/> <meta name="title" content="{{title}}"/>
{%if description %}<meta name="description" content="{{description}}"/> {%endif%} {%if description %}<meta name="description" content="{{description}}"/> {%endif%}
{%if keywords %}<meta name="keywords" content="{{keywords|safe}}"/> {%endif%} {%if keywords %}<meta name="keywords" content="{{keywords|safe}}"/> {%endif%}
@ -27,7 +16,6 @@
<meta property="og:image" content="{{url}}/256p.jpg"/> <meta property="og:image" content="{{url}}/256p.jpg"/>
<meta property="og:site_name" content="{{settings.SITENAME}}"/> <meta property="og:site_name" content="{{settings.SITENAME}}"/>
{%if description %}<meta property="og:description" content="{{description}}"/>{%endif%} {%if description %}<meta property="og:description" content="{{description}}"/>{%endif%}
<meta name="google" value="notranslate"/>
</head> </head>
<body> <body>
<noscript> <noscript>

View file

@ -158,8 +158,11 @@ appPanel
} }
function loadScreen(images) { function loadScreen(images) {
var gradient, loadingScreen,
var gradient, loadingScreen; gray = theme == 'oxlight' ? 224 : theme == 'oxmedium' ? 144 : 32,
color = window.backgroundColor ? window.backgroundColor : gray+', '+gray+', '+gray,
background = 'linear-gradient(top, rgba('+color+', 0.75), rgba('+color+', 1), rgba('+color+', 1))',
backgroundColor = 'rgb('+color+')';
if (!isMSIE) { if (!isMSIE) {
gradient = document.createElement('div'); gradient = document.createElement('div');
gradient.style.position = 'absolute'; gradient.style.position = 'absolute';
@ -172,9 +175,7 @@ appPanel
gradient.style.height = logoHeight + 2 + 'px'; gradient.style.height = logoHeight + 2 + 'px';
gradient.style.margin = 'auto'; gradient.style.margin = 'auto';
['-moz-', '-ms-', '-o-', '-webkit-', ''].forEach(function(prefix) { ['-moz-', '-ms-', '-o-', '-webkit-', ''].forEach(function(prefix) {
gradient.style.background = theme == 'oxlight' ? prefix + 'linear-gradient(top, rgba(224, 224, 224, 0.75), rgba(224, 224, 224, 1), rgba(224, 224, 224, 1))' gradient.style.background = prefix + background;
: theme == 'oxmedium' ? prefix + 'linear-gradient(top, rgba(144, 144, 144, 0.75), rgba(144, 144, 144, 1), rgba(144, 144, 144, 1))'
: prefix + 'linear-gradient(top, rgba(32, 32, 32, 0.75), rgba(32, 32, 32, 1), rgba(32, 32, 32, 1))';
}); });
} }
loadingScreen = document.createElement('div'); loadingScreen = document.createElement('div');
@ -183,8 +184,7 @@ appPanel
loadingScreen.style.position = 'absolute'; loadingScreen.style.position = 'absolute';
loadingScreen.style.width = '100%'; loadingScreen.style.width = '100%';
loadingScreen.style.height = '100%'; loadingScreen.style.height = '100%';
loadingScreen.style.backgroundColor = theme == 'oxlight' ? 'rgb(224, 224, 224)' loadingScreen.style.backgroundColor = backgroundColor;
: theme == 'oxmedium' ? 'rgb(144, 144, 144)' : 'rgb(32, 32, 32)';
loadingScreen.style.zIndex = '1002'; loadingScreen.style.zIndex = '1002';
loadingScreen.appendChild(images.logo); loadingScreen.appendChild(images.logo);
images.reflection && loadingScreen.appendChild(images.reflection); images.reflection && loadingScreen.appendChild(images.reflection);