mirror of
https://github.com/team-alembic/ash_authentication_phoenix.git
synced 2024-09-20 21:43:44 +12:00
24 lines
1.1 KiB
Text
24 lines
1.1 KiB
Text
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<%= csrf_meta_tag() %>
|
|
<%= live_title_tag assigns[:page_title] || "Dev" %>
|
|
<script defer src="https://cdn.tailwindcss.com"></script>
|
|
<script type="module" crossorigin>
|
|
import 'https://cdn.jsdelivr.net/gh/phoenixframework/phoenix_html@v3.2.0/priv/static/phoenix_html.js';
|
|
import { Socket } from 'https://cdn.jsdelivr.net/gh/phoenixframework/phoenix@v1.6.14/priv/static/phoenix.mjs';
|
|
import { LiveSocket } from 'https://cdn.jsdelivr.net/gh/phoenixframework/phoenix_live_view@v0.18.2/priv/static/phoenix_live_view.esm.js';
|
|
|
|
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
|
let liveSocket = new LiveSocket("/live", Socket, { params: { _csrf_token: csrfToken } })
|
|
liveSocket.connect()
|
|
window.liveSocket = liveSocket
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<%= @inner_content %>
|
|
</body>
|
|
</html>
|