25/lib/mse25_web/controllers/item_html/event.html.heex
Anders Englöf Ytterström 57e935ec00
Improve HTML for robot consumtion (#24)
* Fix icalendar validation errors

* Add RSS feed to documents

* Add stuff to meta: opengraph, canonical

* Add SEO robots meta elements

* Fix correct page titles

* Add more semantics to HTML

* Remove breadcrumbs from templates

* Render breadcrumbs in layout

Each controller should provide their own breadcrumb
trail as a list of tuples, where each tuple is the
pair of a slugified key and a human readable label.

Example:

[{"blog", "Webblogg"}]
[{"blog", "Webblogg"}, "2024", "2024"]

* Add CSS util class to show content only to screen readers

* Load interactive event map only on events page

* Decrease home logo size

* Use correct HTML element for time

* Improve Home page HTML semantics

* Add Person RFDa to footer

* Add RDFa to articles: annual, item, articles

* Enrich links semantics using RDFa

* Enrich Page semantics using RDFa

* Enrich Album semantics using RFDa

* Enrich Event semantics with RDFa
2024-10-16 15:40:53 +02:00

38 lines
1.2 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<article class="event" vocab="https://schema.org/" typeof="Event Review">
<h1 property="name"><%= @heading %></h1>
<ul>
<li property="description"><%= @lead %></li>
<li class="sr-only">
<span property="startDate"><%= @started_at %></span><span property="endDate"><%= @ended_at %></span>
</li>
<%= if opening_acts?(%{"bands" => @bands, "category" => @category}) do %>
<li>
Huvudakt:
<span property="performer">
<%= @bands |> List.first() |> Map.get("artists_id") |> Map.get("name") %>
</span>
</li>
<li>Förband: <%= @bands |> Enum.drop(1) |> rdfa_bandlist() |> raw %></li>
<% end %>
<%= if hilights?(%{"bands" => @bands, "category" => @category}) do %>
<li>Personliga höjdpunkter: <%= @bands |> rdfa_bandlist() |> raw %></li>
<% end %>
<%= if missed?(%{"mia" => @mia, "category" => @category}) do %>
<li>Band jag missade: <%= @mia |> bandlist() %></li>
<% end %>
</ul>
<div property="reviewBody">
<%= raw(@contents) %>
</div>
<%= if @poster do %>
<img
property="image"
src={"https://n.madr.se/assets/" <> @poster <> "?key=poster"}
alt="affisch"
loading="lazy"
/>
<% end %>
</article>