-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
359 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
layout/_partial/templates/friends-link.ejs → layout/_template/friends-link.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<% | ||
const page_title = page?.title?.toLowerCase() | ||
const use_page_template = page?.use_template !== false | ||
const { links: links_data, photos: photos_data, tools: tools_data } = theme?.source_data | ||
let current_page_data = null | ||
let current_page_template = null | ||
if (page_title === 'links' || page_title === 'link') { | ||
current_page_data = links_data | ||
current_page_template = 'friends-link' | ||
} | ||
if (page_title === 'photos' || page_title === 'photo') { | ||
current_page_data = photos_data | ||
current_page_template = 'photo-album' | ||
} | ||
if (page_title === 'tools' || page_title === 'tool') { | ||
current_page_data = tools_data | ||
current_page_template = 'tools-nav' | ||
} | ||
const max_content = page_title === 'tools' ? 'max-content' : '' | ||
%> | ||
<div class="fade-in-down-animation"> | ||
<div class="page-template-container border-box"> | ||
<% if (page?.page_cover) { %> | ||
<div class="page-template-top border-box" | ||
style="height: <%= page?.page_cover_height ? page?.page_cover_height + 'px' : '200px' %>" | ||
> | ||
<img class="page-cover" src="<%- url_for(page.page_cover) %>" | ||
onerror="this.style.display = 'none'" | ||
> | ||
</div> | ||
<% } %> | ||
<div class="page-template-bottom border-box"> | ||
<!-- use page template --> | ||
<% if (use_page_template && current_page_data && current_page_template) { %> | ||
<%- partial(current_page_template) %> | ||
<% } %> | ||
<!-- page content --> | ||
<div class="page-content border-box keep-markdown-body"> | ||
<% if (page?.content || current_page_data) { %> | ||
<%- page.content %> | ||
<% } else { %> | ||
<h1><%= page_title.toUpperCase() %></h1> | ||
<% } %> | ||
</div> | ||
<!-- comment plugin --> | ||
<% if (page?.comment === true) { %> | ||
<%- partial('_partial/comment/comment') %> | ||
<% } %> | ||
</div> | ||
</div> | ||
</div> |
2 changes: 1 addition & 1 deletion
2
layout/_partial/templates/photo-album.ejs → layout/_template/photo-album.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="tools-nav-box border-box"> | ||
Tools Nav | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.