fediparty/themes/starter/layout/_partial/heroheader.ejs
2018-06-04 17:30:53 +03:00

22 lines
717 B
Plaintext

<%
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;">
<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">
<% } %>
</div>
</header>