fix: merge conflicts. remove import in quickstart

This commit is contained in:
Felix Dubrownik
2023-03-03 12:49:56 +01:00
105 changed files with 12072 additions and 28650 deletions

View File

@ -7,7 +7,6 @@
<meta name="theme-color" content="#042F4B">
<title>Hanko Web Component Example</title>
<link rel="stylesheet" href="static/css/index.css">
<script type="module" src="{{.HankoElementUrl}}"></script>
<link href="../static/img/Favicon_32x32.png" rel="shortcut icon" type="image/x-icon">
<link href="../static/img/Favicon_256x256.png" rel="apple-touch-icon">
</head>

View File

@ -14,7 +14,7 @@
<nav class="nav">
<ul class="nav__itemList">
<li class="nav__listItem">
<a class="nav__link" href="/logout">Logout</a>
<a href="#" class="nav__link" id="logout-link">Logout</a>
</li>
</ul>
</nav>
@ -37,9 +37,22 @@
<img alt="Powered by Hanko" src="static/img/poweredBy.svg"/>
</footer>
<script type="module">
import {register} from "{{.HankoElementUrl}}";
register({ shadow: false });
// TODO: Does this still work?
const hanko = new hankoFrontendSdk.Hanko("{{.HankoUrl}}")
document.getElementById("logout-link")
.addEventListener("click", (event) => {
event.preventDefault();
hanko.user.logout()
.then(() => { window.location.href = "/" })
.catch(console.error);
});
</script>
</body>