81 lines
4.2 KiB
Plaintext
81 lines
4.2 KiB
Plaintext
<!DOCTYPE html>
|
|
<% rel_proj_root = "../../../.." %>
|
|
<html lang={@config["site"]["lang"]}>
|
|
<.html_head site_name={@config["site"]["name"]} site_author={@config["site"]["author"]} site_desc={@config["site"]["desc"]} />
|
|
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
|
<!-- <audio id="loaded" class="notifier" src={~p"/audio/page_load.mp3"}></audio> -->
|
|
<body id="default_body">
|
|
<noscript>
|
|
<div id="noscript_panel" class="panel">
|
|
<!-- @TODO change below button button to anchor elements for ALL HEEx pages -->
|
|
<a id="monologin_noscript" class="loginbutt" href={~p"/login"}>Log in</a>
|
|
<a id="monoregistration_noscript" class="registbutt">Register</a>
|
|
</div>
|
|
</noscript>
|
|
<template id="panel">
|
|
<!-- @TODO change below button button to anchor elements for ALL HEEx pages -->
|
|
<a id="monologin" class="loginbutt" href={~p"/login"}>Log in</a>
|
|
<a id="monoregistration" class="registbutt">Register</a>
|
|
<!-- <button id="monoregistration" type="button" class="registbutt">Register</button>
|
|
<button id="monologin" type="button" class="loginbutt">Log in</button> -->
|
|
</template>
|
|
<div id="banner">
|
|
<% # @TODO verify the below works %>
|
|
<%= raw File.read!(Path.expand("#{rel_proj_root}/priv/static/images/main.svg", __DIR__)) %>
|
|
<span class="frontmatter"><a id="home" href={~p"/"}><h1 id="site_title" class="title"><%= @config["site"]["name"] %></h1></a></span>
|
|
<nav id="site_nav">
|
|
<.navify page_links={@pages} />
|
|
<noscript>
|
|
<a href={~p"/login"}>Passage</a>
|
|
</noscript>
|
|
</nav>
|
|
</div>
|
|
<div id="doc">
|
|
<main id="content" class="page_content">
|
|
<span><p>You are already acting in your capacity as clergy. <br>Do you wish to return to laity?</p></span>
|
|
<form method="post" autocomplete="on">
|
|
<input type="hidden" name="logout" value="true">
|
|
<input type="hidden" name="_csrf_token" value={Phoenix.Controller.get_csrf_token()} />
|
|
<.submission btn_name={@button_choice} />
|
|
</form>
|
|
</main>
|
|
</div>
|
|
<div id="extra">
|
|
</div>
|
|
<.html_foot />
|
|
</body>
|
|
<script type="module">
|
|
// import { NotificationSounds } from "<%= ~p"/js/notifiers.js" %>";
|
|
import { Point, Line } from "<%= ~p"/js/space.js" %>";
|
|
import { Hitbox, Tracker, spatialTriggerY } from "<%= ~p"/js/triggers.js" %>";
|
|
import { reportPriority } from "<%= ~p"/js/err.js" %>";
|
|
reportPriority();
|
|
|
|
let sandbox = new Hitbox(document.body)
|
|
let sandbox_rect = sandbox.matter.getBoundingClientRect()
|
|
sandbox.y = sandbox_rect.y
|
|
let ceiling = new Point(0, Math.round(sandbox.y), 0)
|
|
let floor = new Point(0, Math.round(ceiling.y * (60 / sandbox.y)), 0)
|
|
let constraint = new Line(ceiling, floor)
|
|
window.addEventListener("resize", (e) => {
|
|
let sandbox_prev_y = sandbox.y
|
|
let sandbox_rect = sandbox.matter.getBoundingClientRect()
|
|
sandbox.y = sandbox_rect.y
|
|
ceiling.y = Math.round(sandbox.y)
|
|
floor.y = Math.round((ceiling.y * (60 / sandbox_prev_y)) + ((ceiling.y * (60 / sandbox_prev_y)) * (sandbox.y / sandbox_prev_y)))
|
|
constraint.point1 = ceiling
|
|
constraint.point2 = floor
|
|
constraint.reset()
|
|
console.log("Floor has changed to value %d", floor.y)
|
|
console.log(Math.round(ceiling.y * (sandbox.y / sandbox_prev_y)))
|
|
console.info("Logging \"top\" of %o on window resize as: %d", sandbox.matter, sandbox.y)
|
|
})
|
|
sandbox.matter.addEventListener("mousemove", (e) => {
|
|
let panel = document.getElementById("panel")
|
|
let tracker = new Tracker(e, panel)
|
|
tracker.y = tracker.event.clientY
|
|
// let yFloor = Math.round(panel.getBoundingClientRect().height)
|
|
spatialTriggerY(tracker, constraint, sandbox)
|
|
})
|
|
</script>
|
|
</html> |