sprites relative positioning
This commit is contained in:
@ -3,7 +3,7 @@ defmodule ChickenEggWeb.ChickenComponents do
|
||||
|
||||
def chicken(assigns) do
|
||||
~H"""
|
||||
<div class="w-32 h-32 absolute" style={"top: #{@y}px; left: #{@x}px;"}>
|
||||
<div class="z-0 max-w-[144px] h-auto absolute" style={"width: 12%; top: #{@y}%; left: #{@x}%;"}>
|
||||
<img src={~p"/images/chicken.svg"} />
|
||||
</div>
|
||||
"""
|
||||
@ -11,7 +11,7 @@ defmodule ChickenEggWeb.ChickenComponents do
|
||||
|
||||
def egg(assigns) do
|
||||
~H"""
|
||||
<div class="w-12 h-12 absolute" style={"top: #{@y}px; left: #{@x}px;"}>
|
||||
<div class="z-10 max-w-[48px] h-auto absolute" style={"width: 4%; top: #{@y}%; left: #{@x}%;"}>
|
||||
<img src={~p"/images/egg.svg"} />
|
||||
</div>
|
||||
"""
|
||||
|
@ -1,7 +1,5 @@
|
||||
<header class="px-4 sm:px-6 lg:px-8 p-0"></header>
|
||||
<main class="">
|
||||
<div class="">
|
||||
<.flash_group flash={@flash} />
|
||||
<%= @inner_content %>
|
||||
</div>
|
||||
<main>
|
||||
<.flash_group flash={@flash} />
|
||||
<%= @inner_content %>
|
||||
</main>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" style="scrollbar-gutter: stable;">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
Reference in New Issue
Block a user