fediparty/themes/starter/layout/_partial/heroheader.ejs

22 lines
717 B
Plaintext
Raw Normal View History

2018-03-12 19:31:14 +00:00
<%
let avatarPath ="";
if (page.avatar) {
avatarPath = page.avatar;
} else {
avatarPath = "default-avatar.png";
}
%>
<header class="hero-header" style="background: url('<% if (page.banner) { %> <%= page.banner %> <% } else { %> /img/knowledge-bg.jpg <% } %>') <% if (page.percent) { %> <%= page.percent %> <% } else { %> 50% 50% <% } %> no-repeat;">
2018-03-12 19:31:14 +00:00
<div class="heading">
<h1><%= page.title %></h1>
<h4 class="subheading"><%= page.subtitle || "" %></h4>
<% if (page.authors) { %>
<h4>Author: <% page.authors.map(function(author) { %><%= author %> <% }) %></h4>
<img class="heading__avatar" src="/img/authors/<%= avatarPath %>" alt="author">
<% } %>
2018-03-12 19:31:14 +00:00
</div>
</header>