43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
<%
|
|
function layoutWikiCover() {
|
|
if (page.layout != 'wiki') {
|
|
return '';
|
|
}
|
|
if (page.cover == undefined || page.cover == false || page.cover == '[]') {
|
|
return '';
|
|
}
|
|
var cover = page.cover;
|
|
if (page.cover == true) {
|
|
cover = ['logo', 'title', 'description'];
|
|
}
|
|
var el = '';
|
|
el += '<div class="l_cover' + scrollreveal() + '">';
|
|
el += '<article class="cover-wrap md">';
|
|
if (page.logo && page.logo.src && cover.includes('logo')) {
|
|
el += '<div class="preview">';
|
|
if (page.logo.large) {
|
|
el += '<img src="' + page.logo.src + '" height="' + page.logo.large + '">';
|
|
} else {
|
|
el += '<img src="' + page.logo.src + '">';
|
|
}
|
|
el += '</div>';
|
|
}
|
|
if (page.title && cover.includes('title')) {
|
|
el += '<div class="cover-title">';
|
|
el += '<span>' + (page.wiki || page.title) + '</span>';
|
|
el += '</div>';
|
|
}
|
|
if (page.description && cover.includes('description')) {
|
|
el += '<div class="description">' + page.description + '</div>';
|
|
}
|
|
el += '<div class="start-wrap">';
|
|
el += '<a class="button theme start" href="#start">' + __('btn.getting_started') + '</a>';
|
|
el += '</div>';
|
|
el += '</article>';
|
|
el += '</div>';
|
|
el += '<hr>';
|
|
return el;
|
|
}
|
|
%>
|
|
<%- layoutWikiCover() %>
|