ash_authentication_phoenix/dev/dev_web/templates/layout/root.html.heex

25 lines
1.1 KiB
Text
Raw Normal View History

2022-10-25 11:23:05 +13:00
<!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>