migrate view helper components into core components
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
7
lib/memex_web/components/core_components/date.html.heex
Normal file
7
lib/memex_web/components/core_components/date.html.heex
Normal file
@ -0,0 +1,7 @@
|
||||
<time :if={@date} datetime={@date |> Date.to_iso8601(:extended)} x-data={~s<{
|
||||
date:
|
||||
Intl.DateTimeFormat([], {timeZone: 'Etc/UTC', dateStyle: 'short'})
|
||||
.format(new Date("#{Date.to_iso8601(@date, :extended)}"))
|
||||
}>} x-text="date">
|
||||
<%= @date |> Date.to_iso8601(:extended) %>
|
||||
</time>
|
@ -0,0 +1,7 @@
|
||||
<time :if={@datetime} datetime={cast_datetime(@datetime)} x-data={~s/{
|
||||
datetime:
|
||||
Intl.DateTimeFormat([], {dateStyle: 'short', timeStyle: 'long'})
|
||||
.format(new Date("#{cast_datetime(@datetime)}"))
|
||||
}/} x-text="datetime">
|
||||
<%= cast_datetime(@datetime) %>
|
||||
</time>
|
@ -0,0 +1,3 @@
|
||||
<a href={qr_code_image(@content)} download={@filename <> ".png"}>
|
||||
<img class={@image_class} alt={@filename} src={qr_code_image(@content)} />
|
||||
</a>
|
Reference in New Issue
Block a user