-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
67 lines (61 loc) · 2.28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<!-- index.html -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
<head>
{{ headContent() }}
{{ bootstrapLib() }}
{{ shinyjs::useShinyjs() }}
<title>Rex</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="/www/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/www/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/www/favicon-16x16.png">
<link rel="manifest" href="/www/site.webmanifest">
<link rel="mask-icon" href="/www/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="/www/styleIndex.css" type="text/css">
</head>
<body class="color-theme textButtonMode">
{{ textOutput("debug") }}
{{ shinyauthr::loginUI(id = "login", user_title = tags$span(HTML('<span lang="de">Benutzername</span><span lang="en">User name</span>')), pass_title = tags$span(HTML('<span lang="de">Passwort</span><span lang="en">Password</span>')), login_title = myButtonStyle("Einloggen", "Log in"), tags$img(id = "logoLogin", class="logo", src="/www/logo.svg")) }}
<div class="fullHLine"></div>
{{ htmlOutput("rexApp", inline=TRUE) }}
<footer>
<div id="copyright">
<small>
<div>© <script>document.write(new Date().getFullYear())</script> Sebastian Bachler</div>
</small>
</div>
</footer>
</body>
<script>
$('html').attr('lang', 'en');
$('html').attr('xml:lang', 'en');
$('[lang="de"]').hide();
$('[lang="en"]').show();
name = 'REX_JS_lang';
ca = document.cookie.split(';');
for(let i=0;i < ca.length;i++) {
let c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(name) == 0) {
let lang = c.substring(name.length + 1,c.length);
if (lang === 'en') {
$('html').attr('lang', 'en');
$('html').attr('xml:lang', 'en');
$('[lang="de"]').hide();
$('[lang="en"]').show();
} else {
$('html').attr('lang', 'de');
$('html').attr('xml:lang', 'de');
$('[lang="en"]').hide();
$('[lang="de"]').show();
}
}
}
delete name;
delete ca;
</script>
</html>