2021-02-19 23:33:19 +08:00
|
|
|
<%
|
|
|
|
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 = '';
|
2021-02-22 13:19:21 +08:00
|
|
|
el += '<div class="l_cover' + scrollreveal() + '">';
|
2021-02-19 23:33:19 +08:00
|
|
|
el += '<article class="cover-wrap md">';
|
2021-02-24 00:32:07 +08:00
|
|
|
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 + '">';
|
2021-02-19 23:33:19 +08:00
|
|
|
} else {
|
2021-02-24 00:32:07 +08:00
|
|
|
el += '<img src="' + page.logo.src + '">';
|
2021-02-19 23:33:19 +08:00
|
|
|
}
|
|
|
|
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 cyan start" href="#start">' + __('btn.getting_started') + '</a>';
|
|
|
|
el += '</div>';
|
|
|
|
el += '</article>';
|
|
|
|
el += '</div>';
|
|
|
|
el += '<hr>';
|
|
|
|
return el;
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
<%- layoutWikiCover() %>
|