Packages
A simple Phoenix/Liveview client for [Altex](https://github.com/iboard/altex). Use it as a scaffold.
Current section
Files
Jump to
Current section
Files
lib/web_client_web/templates/blog/index.html.heex
<div class="hero">
<center>
<h1 class="title"><%= gettext "The Craftsman's Blog" %></h1>
<p class="text-sm"><%= gettext "Andi Altendorfer, e-Matrix Innovations" %></p>
</center>
</div>
<div id="posts" class="mt-10 mx-10 lg:mx-40">
<%= for post <- @posts do %>
<%= if !post.draft || WebClientWeb.SessionView.admin?(@conn) || !post.draft do %>
<div class="post mb-10" id={ "post-#{post.id}" }>
<div class="my-1 text-2xl text-gray-600">
<%= link(post.title, to: "/posts/#{post.id}" ) %>
<%= if post.draft do %>
<div class="inline p-1 text-sm rounded bg-yellow-300">draft</div>
<% end %>
</div>
<div class="mt-0 text-sm text-gray-400"><%= post.author %>, <%= post.date %></div>
<div class="markdown w-prose">
<%= for iframe <- post.iframes |> Enum.take(1) do %>
<div class="my-4 max-w-full"><%= raw Floki.raw_html(iframe) %></div>
<% end %>
<%= for image <- post.images |> Enum.take(1) do %>
<.image_preview image={ image } />
<% end %>
<span class="font-bold" /><%= raw post.preview %>
</div>
<div class="text-gray-400 italic"><%= link gettext("read more..."), to: "/posts/#{post.id}" %></div>
</div>
<% end %>
<% end %>
</div>
<div class="float-right mb-0 mr-10 text-xs"><%= gettext "The End" %> #</div>
<div class="clear-both m-0 p-0"></div>