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.
Home-AssistantConfig/config/www/onenote-launch.html

130 lines
3.5 KiB

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Open OneNote</title>
<style>
:root { color-scheme: light; }
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background: linear-gradient(180deg, #f5f7fb 0%, #e8eef8 100%);
color: #122033;
}
main {
max-width: 32rem;
margin: 0 auto;
min-height: 100vh;
padding: 2rem 1.25rem;
display: flex;
flex-direction: column;
justify-content: center;
gap: 1rem;
}
.card {
background: rgba(255, 255, 255, 0.94);
border: 1px solid rgba(18, 32, 51, 0.08);
border-radius: 18px;
box-shadow: 0 18px 40px rgba(18, 32, 51, 0.12);
padding: 1.25rem;
}
h1 {
margin: 0 0 0.5rem;
font-size: 1.35rem;
line-height: 1.2;
}
p {
margin: 0;
line-height: 1.5;
}
.title {
margin-top: 0.75rem;
font-size: 0.95rem;
color: #41556f;
word-break: break-word;
}
.actions {
display: flex;
flex-direction: column;
gap: 0.75rem;
margin-top: 1rem;
}
.button {
display: block;
text-decoration: none;
text-align: center;
padding: 0.9rem 1rem;
border-radius: 12px;
font-weight: 600;
}
.button.primary {
background: #166534;
color: #fff;
}
.button.secondary {
background: #fff;
color: #122033;
border: 1px solid rgba(18, 32, 51, 0.14);
}
.hint {
font-size: 0.88rem;
color: #5c708a;
}
</style>
</head>
<body>
<main>
<section class="card">
<h1>Opening OneNote</h1>
<p>Joanna is handing this note to the OneNote app now.</p>
<p id="note-title" class="title"></p>
<div class="actions">
<a id="app-link" class="button primary" href="#">Open in OneNote App</a>
<a id="web-link" class="button secondary" href="https://www.onenote.com/">Open Web Copy</a>
</div>
<p class="hint">If the app does not open automatically in a second or two, tap the OneNote button.</p>
</section>
</main>
<script>
(function () {
var params = new URLSearchParams(window.location.search);
var clientUrl = String(params.get('client') || '').trim();
var webUrl = String(params.get('web') || '').trim() || 'https://www.onenote.com/';
var title = String(params.get('title') || '').trim();
var appLink = document.getElementById('app-link');
var webLink = document.getElementById('web-link');
var titleNode = document.getElementById('note-title');
if (title) {
titleNode.textContent = title;
} else {
titleNode.textContent = 'OneNote note';
}
webLink.href = webUrl;
if (!/^onenote:/i.test(clientUrl)) {
appLink.style.display = 'none';
window.location.replace(webUrl);
return;
}
appLink.href = clientUrl;
var fallbackTimer = window.setTimeout(function () {
window.location.replace(webUrl);
}, 1400);
var cancelFallback = function () {
window.clearTimeout(fallbackTimer);
};
window.addEventListener('pagehide', cancelFallback, { once: true });
document.addEventListener('visibilitychange', function () {
if (document.visibilityState === 'hidden') {
cancelFallback();
}
}, { once: true });
window.location.href = clientUrl;
}());
</script>
</body>
</html>

Powered by TurnKey Linux.