abtmtr-comms/views/components/yesNoListView.ejs

31 lines
794 B
Text
Raw Permalink Normal View History

2024-10-06 07:20:01 +00:00
<section class="yesNoListView">
<img src="<%= image %>" alt="<%= alt %>" title="<%= alt %>" width="256" height="128"/>
<h2><%= title %></h2>
<p><%= description %></p>
<ul>
<% yes.forEach(([ summary, content ]) => { %>
<li class="yesNoListView_Yes">
<% if (content) { %>
<details>
<summary><%- summary %></summary>
<p><%- content %></p>
</details>
<% } else { %>
<span><%- summary %></span>
<% } %>
</li>
<% }) %>
<% no.forEach(([ summary, content ]) => { %>
<li class="yesNoListView_No">
<% if (content) { %>
<details>
<summary><%- summary %></summary>
<p><%- content %></p>
</details>
<% } else { %>
<span><%- summary %></span>
<% } %>
</li>
<% }) %>
</ul>
</section>