diff --git a/assets/css/app.css b/assets/css/app.css index 1d26055..79e4da8 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -2,6 +2,16 @@ @import "tailwindcss/components"; @import "tailwindcss/utilities"; +@layer utilities { + .text-shadow { + text-shadow: 2px 2px 4px #000; + } + + .text-outline { + text-shadow: 2px 2px 2px #801B71, -2px 2px 2px #801B71, 2px -2px 2px #801B71, -2px -2px 2px #801B71; + } +} + body { @apply overflow-hidden; } \ No newline at end of file diff --git a/assets/js/app.js b/assets/js/app.js index df0cdd9..062ef66 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -22,8 +22,18 @@ import {Socket} from "phoenix" import {LiveSocket} from "phoenix_live_view" import topbar from "../vendor/topbar" +let Hooks = {} +Hooks.ChickenEgg = { + mounted() { + this.el.addEventListener("touchstart", _e => { + this.pushEvent("boak", {}) + }) + } +} + + let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content") -let liveSocket = new LiveSocket("/live", Socket, {params: {_csrf_token: csrfToken}}) +let liveSocket = new LiveSocket("/live", Socket, {hooks: Hooks, params: {_csrf_token: csrfToken}}) // Show progress bar on live navigation and form submits topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"}) diff --git a/lib/chicken_egg_web/live/index_live.ex b/lib/chicken_egg_web/live/index_live.ex index 7b89da1..1c77a19 100644 --- a/lib/chicken_egg_web/live/index_live.ex +++ b/lib/chicken_egg_web/live/index_live.ex @@ -5,7 +5,17 @@ defmodule ChickenEggWeb.IndexLive do def render(assigns) do ~H""" -