Skip to content

Commit

Permalink
新增作者模板
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Oct 26, 2018
1 parent ce27102 commit 51b9605
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 55 deletions.
54 changes: 0 additions & 54 deletions author.ftl

This file was deleted.

6 changes: 6 additions & 0 deletions module/options.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
</label>
</div>
</div>
<div class="form-group">
<label for="casperGeneralLocation" class="col-sm-4 control-label">所在地:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="casperGeneralLocation" name="casper_general_location" value="${options.casper_general_location?if_exists}" >
</div>
</div>
</div>
<div class="box-footer">
<button type="button" class="btn btn-primary btn-sm pull-right" onclick="saveThemeOptions('casperGeneralOptions')">保存设置</button>
Expand Down
2 changes: 1 addition & 1 deletion page.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ into the {body} of the default.hbs template -->
<main id="site-main" class="site-main outer">
<div class="inner">

<article class="post-full post page {{#unless feature_image}}no-image{{/unless}}">
<article class="post-full post page <#if !post.postThumbnail??>no-image</#if>">

<header class="post-full-header">
<h1 class="post-full-title">${post.postTitle}</h1>
Expand Down
61 changes: 61 additions & 0 deletions page_author.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<#include "default.ftl">
<@default title="${post.postTitle?if_exists} | ${options.blog_title}" keyword="${options.seo_keywords?if_exists}" desc="${options.seo_desc?if_exists}" canonical="${options.blog_url}/p/${post.postUrl?if_exists}" body_class="page-template">
<#-- The tag above means - insert everything in this file into the {body} of the default.hbs template -->
<#-- Everything inside the #author tags pulls data from the author -->
<header class="site-header outer <#if options.casper_general_cover?default('/${themeName}/assets/images/blog-cover.jpg') != ''>" style="background-image: url(${options.casper_general_cover?default('/${themeName}/assets/images/blog-cover.jpg')})<#else>no-cover</#if>">
<div class="inner">
<#include "partials/site-nav.ftl">
<div class="site-header-content">
<img class="author-profile-image" src="${user.userAvatar?if_exists}" alt="${user.userDisplayName?if_exists}" />
<h1 class="site-title">${user.userDisplayName?if_exists}</h1>
<#if user.userDesc??>
<h2 class="author-bio">${user.userDesc?if_exists}</h2>
</#if>
<div class="author-meta">
<#if options.casper_general_location??>
<div class="author-location">${options.casper_general_location} <span class="bull">&bull;</span></div>
</#if>
<div class="author-stats">
<@articleTag method="postsCount">${postsCount}</@articleTag> 篇文章 <span class="bull">&bull;</span>
</div>
<a class="social-link social-link-rss" href="/atom.xml" target="_blank" rel="noopener"><#include "partials/icons/rss.ftl"></a>
</div>
</div>
</div>
</header>


<#-- The main content area -->
<main id="site-main" class="site-main outer">
<div class="inner">

<article class="post-full post page no-image">

<header class="post-full-header">
<h1 class="post-full-title">${post.postTitle}</h1>
</header>

<section class="post-full-content">
<div class="post-content">
${post.postContent}
</div>
</section>

<section class="post-full-comments">
<#-- If you want to embed comments, this is a good place to do it! -->
<#include "module/comment.ftl">
</section>

</article>

</div>
</main>
</@default>
<@scripts>
<script>
$(function() {
var $postContent = $(".post-full-content");
$postContent.fitVids();
});
</script>
</@scripts>

0 comments on commit 51b9605

Please sign in to comment.