-
Notifications
You must be signed in to change notification settings - Fork 14
/
image_html.ex
52 lines (49 loc) · 1.16 KB
/
image_html.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
defmodule OgImageWeb.ImageHTML do
use OgImageWeb, :html
@doc """
A logo and text on a light background.
"""
def light(assigns) do
~H"""
<body class="bg-[#F8F2E6] flex flex-col h-screen">
<div class="shrink-0 pt-24 px-20 text-gray-900">
<.savvycal_logo />
</div>
<div class="grow flex items-center px-20">
<h1 class="font-extrabold text-gray-900 text-[7rem] leading-[1.2]">
<%= @text %>
</h1>
</div>
</body>
"""
end
@doc """
A logo and text on a dark background.
"""
def dark(assigns) do
~H"""
<body class="bg-green-texture flex flex-col h-screen">
<div class="shrink-0 pt-24 px-20 text-white">
<.savvycal_logo />
</div>
<div class="grow flex items-center px-20">
<h1 class="font-extrabold text-[#D2FD88] text-[7rem] leading-[1.2]">
<%= @text %>
</h1>
</div>
</body>
"""
end
@doc """
A fallback image.
"""
def fallback(assigns) do
~H"""
<body class="bg-[#F8F2E6] flex items-center justify-center h-screen">
<div>
<.savvycal_logo height="148" />
</div>
</body>
"""
end
end