mix format
This commit is contained in:
parent
7d8cb33405
commit
4fb1e200f1
12 changed files with 221 additions and 69 deletions
|
@ -1,8 +1,14 @@
|
|||
<main class="grid grid-cols-[25%_50%_25%]">
|
||||
<div class="flex flex-col items-center mt-5 gap-5">
|
||||
<input placeholder="Search" class="border border-gray-300 px-4 py-3 rounded-xl outline-none w-[90%]"/>
|
||||
<input
|
||||
placeholder="Search"
|
||||
class="border border-gray-300 px-4 py-3 rounded-xl outline-none w-[90%]"
|
||||
/>
|
||||
<div class="text-sm rounded-xl border border-gray-300 p-2 w-[90%]">
|
||||
<textarea placeholder="What's on your mind?" class="h-[150px] w-full resize-none border-none focus:ring-0"></textarea>
|
||||
<textarea
|
||||
placeholder="What's on your mind?"
|
||||
class="h-[150px] w-full resize-none border-none focus:ring-0"
|
||||
></textarea>
|
||||
<div>
|
||||
<button class="text-white bg-black px-3 py-1 rounded-xl">Post</button>
|
||||
</div>
|
||||
|
@ -12,8 +18,13 @@
|
|||
<div class="relative w-full aspect-[3/1]">
|
||||
<img src={"/files/#{@user.banner}"} class="w-full h-full object-cover" />
|
||||
<div class="absolute inset-0 flex items-end justify-between px-4 pb-2 pointer-events-none">
|
||||
<img src={"/files/#{@user.avatar}"} class="translate-y-1/2 rounded-full border-4 border-white w-[8.33vw] h-[8.33vw] min-w-[80px] min-h-[80px] max-w-[160px] max-h-[160px] pointer-events-auto"/>
|
||||
<button class="px-8 py-2 rounded-full text-sm font-semibold border transition bg-black text-white border-black hover:bg-gray-900 pointer-events-auto">Follow</button>
|
||||
<img
|
||||
src={"/files/#{@user.avatar}"}
|
||||
class="translate-y-1/2 rounded-full border-4 border-white w-[8.33vw] h-[8.33vw] min-w-[80px] min-h-[80px] max-w-[160px] max-h-[160px] pointer-events-auto"
|
||||
/>
|
||||
<button class="px-8 py-2 rounded-full text-sm font-semibold border transition bg-black text-white border-black hover:bg-gray-900 pointer-events-auto">
|
||||
Follow
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-[4.5vw] px-4 flex flex-col">
|
||||
|
@ -27,28 +38,28 @@
|
|||
<dt class="flex items-center gap-2">
|
||||
<.icon name="hero-map-pin" class="mt-0.5 h-5 w-5 flex-none" />
|
||||
</dt>
|
||||
<dd><%= @user.location %></dd>
|
||||
<dd>{@user.location}</dd>
|
||||
<% end %>
|
||||
<%= if @user.birthday do %>
|
||||
<dt class="flex items-center gap-2">
|
||||
<.icon name="hero-cake" class="mt-0.5 h-5 w-5 flex-none" />
|
||||
</dt>
|
||||
<dd><%= format_birthdate(@user.birthday) %></dd>
|
||||
<dd>{format_birthdate(@user.birthday)}</dd>
|
||||
<% end %>
|
||||
<dt class="flex items-center gap-2">
|
||||
<.icon name="hero-calendar" class="mt-0.5 h-5 w-5 flex-none" />
|
||||
</dt>
|
||||
<dd><%= format_registration_date(@user.inserted_at) %></dd>
|
||||
<dd>{format_registration_date(@user.inserted_at)}</dd>
|
||||
</dl>
|
||||
<%= if @user.fields do %>
|
||||
<dl class="mt-5 grid grid-cols-[max-content,1fr] gap-x-5 gap-y-2 items-center">
|
||||
<%= for {key, value} <- @user.fields do %>
|
||||
<dt><%= key %></dt>
|
||||
<dt>{key}</dt>
|
||||
<dd>
|
||||
<%= if Regex.match?(~r{://}, value) do %>
|
||||
<a href={value} class="text-[#1D9BF0]"><%= Regex.replace(~r{^\w+://}, value, "") %></a>
|
||||
<a href={value} class="text-[#1D9BF0]">{Regex.replace(~r{^\w+://}, value, "")}</a>
|
||||
<% else %>
|
||||
<%= value %>
|
||||
{value}
|
||||
<% end %>
|
||||
</dd>
|
||||
<% end %>
|
||||
|
@ -70,15 +81,15 @@
|
|||
<%= for note <- @notes do %>
|
||||
<div class="p-4 border-b border-gray-300">
|
||||
<div class="flex items-start space-x-4">
|
||||
<img src={"/files/#{@user.avatar}"} class="rounded-full w-[58px] h-[58px]"/>
|
||||
<img src={"/files/#{@user.avatar}"} class="rounded-full w-[58px] h-[58px]" />
|
||||
<div class="flex-1">
|
||||
<div class="flex justify-between items-start">
|
||||
<div class="flex items-center space-x-2">
|
||||
<span class="font-semibold text-gray-900 text-sm">
|
||||
<%= @user.realname %>
|
||||
{@user.realname}
|
||||
</span>
|
||||
<span class="text-gray-500 text-sm">
|
||||
@<%= @user.username %>@<%= @domain %>
|
||||
@{@user.username}@{@domain}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-2 text-sm text-gray-500">
|
||||
|
@ -92,11 +103,11 @@
|
|||
<% :private -> %>
|
||||
<.icon name="hero-at-symbol" class="h-5 w-5" />
|
||||
<% end %>
|
||||
<span><%= format_note_datetime_diff(note.inserted_at) %></span>
|
||||
<span>{format_note_datetime_diff(note.inserted_at)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-gray-800">
|
||||
<p><%= note.content %></p>
|
||||
<p>{note.content}</p>
|
||||
</div>
|
||||
<div class="flex gap-10 mt-4">
|
||||
<button><.icon name="hero-chat-bubble-left" class="h-5 w-5" /></button>
|
||||
|
@ -110,8 +121,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col items-center mt-5 gap-5">
|
||||
<div class="text-sm rounded-xl border border-gray-300 p-4 w-[90%] h-[300px]">
|
||||
|
||||
</div>
|
||||
<div class="text-sm rounded-xl border border-gray-300 p-4 w-[90%] h-[300px]"></div>
|
||||
</div>
|
||||
</main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue