Skip to content

Migrate to fix Ghost 1.x #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ body:not(.post-template) .post-title {
text column to break out. */
.post-content img {
display: block;
max-width: 126%;
max-width: 100%;
height: auto;
padding: 0.6em 0;
/* Centers an image by (1) pushing its left edge to the
Expand Down
6 changes: 3 additions & 3 deletions author.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{{! Everything inside the #author tags pulls data from the author }}
{{#author}}
<header class="main-header author-head {{#if cover}}" style="background-image: url({{cover}}){{else}}no-cover{{/if}}">
<header class="main-header author-head {{#if cover_image}}" style="background-image: url({{cover_image}}){{else}}no-cover{{/if}}">
<nav class="main-nav overlay clearfix">
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}}
{{#if @blog.navigation}}
Expand All @@ -15,9 +15,9 @@
</header>

<section class="author-profile inner">
{{#if image}}
{{#if profile_image}}
<figure class="author-image">
<div class="img" style="background-image: url({{image}})"><span class="hidden">{{name}}的头像</span></div>
<div class="img" style="background-image: url({{profile_image}})"><span class="hidden">{{name}}的头像</span></div>
</figure>
{{/if}}
<h1 class="author-title">{{name}}</h1>
Expand Down
2 changes: 1 addition & 1 deletion index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{! The tag above means - insert everything in this file into the {body} of the default.hbs template }}

{{! The big featured header }}
<header class="main-header {{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}">
<header class="main-header {{#if @blog.cover_image}}" style="background-image: url({{@blog.cover_image}}){{else}}no-cover{{/if}}">
<nav class="main-nav overlay clearfix">
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}}
{{#if @blog.navigation}}
Expand Down
4 changes: 2 additions & 2 deletions page.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{{! Everything inside the #post tags pulls data from the page }}
{{#post}}

<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}">
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix">
<header class="main-header post-head {{#if feature_image}}" style="background-image: url({{feature_image}}){{else}}no-cover{{/if}}">
<nav class="main-nav {{#if feature_image}}overlay{{/if}} clearfix">
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}}
{{#if @blog.navigation}}
<a class="menu-button icon-menu" href="#"><span class="word">菜单</span></a>
Expand Down
2 changes: 1 addition & 1 deletion partials/loop.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<p>{{excerpt characters="140"}} <a class="read-more" href="{{url}}">&raquo;</a></p>
</section>
<footer class="post-meta">
{{#if author.image}}<img class="author-thumb" src="{{author.image}}" alt="{{author.name}}" nopin="nopin" />{{/if}}
{{#if author.profile_image}}<img class="author-thumb" src="{{author.profile_image}}" alt="{{author.name}}" nopin="nopin" />{{/if}}
{{author}}
{{tags prefix=" 标签:"}}
<time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="YYYY年MM月DD日"}}</time>
Expand Down
20 changes: 6 additions & 14 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{{! Everything inside the #post tags pulls data from the post }}
{{#post}}

<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}">
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix">
<header class="main-header post-head {{#if feature_image}}" style="background-image: url({{feature_image}}){{else}}no-cover{{/if}}">
<nav class="main-nav {{#if feature_image}}overlay{{/if}} clearfix">
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}}
{{#if @blog.navigation}}
<a class="menu-button icon-menu" href="#"><span class="word">菜单</span></a>
Expand All @@ -34,9 +34,9 @@
{{! Everything inside the #author tags pulls data from the author }}
{{#author}}

{{#if image}}
{{#if profile_image}}
<figure class="author-image">
<a class="img" href="{{url}}" style="background-image: url({{image}})"><span class="hidden">{{name}}的头像</span></a>
<a class="img" href="{{url}}" style="background-image: url({{profile_image}})"><span class="hidden">{{name}}的头像</span></a>
</figure>
{{/if}}

Expand All @@ -56,30 +56,22 @@

{{/author}}

<section class="share">
<h4>分享此博文</h4>
{{! 以下代码使用的是百度分享(http://share.baidu.com/),如需自定义,请自行到百度分享上定制并将代码粘贴到这里。}}
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
{{! 百度分享代码结束}}
</section>

</footer>

</article>
</main>

<aside class="read-next">
{{#next_post}}
<a class="read-next-story {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}" href="{{url}}">
<a class="read-next-story {{#if feature_image}}" style="background-image: url({{feature_image}}){{else}}no-cover{{/if}}" href="{{url}}">
<section class="post">
<h2>{{title}}</h2>
<p>{{excerpt words="19"}}&hellip;</p>
</section>
</a>
{{/next_post}}
{{#prev_post}}
<a class="read-next-story prev {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}" href="{{url}}">
<a class="read-next-story prev {{#if feature_image}}" style="background-image: url({{feature_image}}){{else}}no-cover{{/if}}" href="{{url}}">
<section class="post">
<h2>{{title}}</h2>
<p>{{excerpt words="19"}}&hellip;</p>
Expand Down
2 changes: 1 addition & 1 deletion tag.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{! The tag above means - insert everything in this file into the {body} of the default.hbs template }}

{{! If we have a tag cover, display that - else blog cover - else nothing }}
<header class="main-header tag-head {{#if tag.image}}" style="background-image: url({{tag.image}}){{else}}{{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}{{/if}}">
<header class="main-header tag-head {{#if tag.feature_image}}" style="background-image: url({{tag.feature_image}}){{else}}{{#if @blog.cover_image}}" style="background-image: url({{@blog.cover_image}}){{else}}no-cover{{/if}}{{/if}}">
<nav class="main-nav overlay clearfix">
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}}
{{#if @blog.navigation}}
Expand Down