mirror of
https://github.com/cirosantilli/china-dictatorship.git
synced 2025-09-08 21:50:40 +02:00
16 lines
867 B
Plaintext
16 lines
867 B
Plaintext
<%#encoding:UTF-8%><div<%= @id && %( id="#{@id}") %> class="<%= ['imageblock',@style,role].compact * ' ' %>"<%
|
|
if (attr? :align) || (attr? :float)
|
|
%> style="<%= [("text-align: #{attr :align};" if attr? :align),("float: #{attr :float};" if attr? :float)].compact * ' ' %>"<%
|
|
end %>>
|
|
<div class="content"><%
|
|
if attr? :link %>
|
|
<a class="image" href="<%= attr :link %>"><img src="<%= image_uri(attr :target) %>" loading="lazy" alt="<%= attr :alt %>"<%= (attr? :width) ? %( width="#{attr :width}") : nil %><%= (attr? :height) ? %( height="#{attr :height}") : nil %>></a><%
|
|
else %>
|
|
<img src="<%= image_uri(attr :target) %>" loading="lazy" alt="<%= attr :alt %>"<%= (attr? :width) ? %( width="#{attr :width}") : nil %><%= (attr? :height) ? %( height="#{attr :height}") : nil %>><%
|
|
end %>
|
|
</div><%
|
|
if title? %>
|
|
<div class="title"><%= captioned_title %></div><%
|
|
end %>
|
|
</div>
|