75 lines
2.1 KiB
Text
75 lines
2.1 KiB
Text
<div class="head">
|
|
<h1>Anteckningar</h1>
|
|
<p>Blandade tankar, oftast på engelska. Replikerat på Mastodon.</p>
|
|
<!-- <p><a href="atom.xml">Prenumerera via Atom</a></p> -->
|
|
</div>
|
|
<div class="cards">
|
|
<%= for {date, links} <- @notes do %>
|
|
<section class="card" id={"d" <> date}>
|
|
<h2 class="bookmark-date">
|
|
<%= date
|
|
|> Date.from_iso8601!()
|
|
|> Calendar.strftime(
|
|
"%A, %d %B %Y",
|
|
month_names: fn m ->
|
|
Enum.at(
|
|
[
|
|
"januari",
|
|
"februari",
|
|
"mars",
|
|
"april",
|
|
"maj",
|
|
"juni",
|
|
"juli",
|
|
"augusti",
|
|
"september",
|
|
"oktober",
|
|
"november",
|
|
"december"
|
|
],
|
|
m - 1
|
|
)
|
|
end,
|
|
day_of_week_names: fn d ->
|
|
Enum.at(
|
|
[
|
|
"måndag",
|
|
"tisdag",
|
|
"onsdag",
|
|
"torsdag",
|
|
"fredag",
|
|
"lördag",
|
|
"söndag"
|
|
],
|
|
d - 1
|
|
)
|
|
end
|
|
)
|
|
|> String.replace(~r/ 0/, " ") %>
|
|
</h2>
|
|
<div class="notes">
|
|
<%= for link <- links do %>
|
|
<article vocab="https://schema.org/" typeof="WebContent Review" class="bookmark">
|
|
<h3 class="note">
|
|
<div property="reviewBody">
|
|
<%= link["contents"] |> Earmark.as_html!(breaks: true) |> raw %>
|
|
</div>
|
|
</h3>
|
|
<footer class="note">
|
|
<p>
|
|
Posted on
|
|
<a class="permalinks" href={"/notes/" <> to_string(link["id"])} title="Permalänk">
|
|
<%= fancy_timestamp(link["date_created"]) %>
|
|
</a>
|
|
at
|
|
<a href="https://www.openstreetmap.org/#map=15/50.82806/-0.12861">
|
|
pos
|
|
</a>
|
|
</p>
|
|
</footer>
|
|
</article>
|
|
<% end %>
|
|
</div>
|
|
</section>
|
|
<% end %>
|
|
</div>
|