{{!< default}}

{{! The comment above "< default" means - insert everything in this file into
    the {body} of the default.hbs template, which contains our header/footer. }}

{{! 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">
        <a class="back-button icon-arrow-left" href="{{@blog.url}}">首页</a>
        <a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/">订阅</a>
    </nav>
</header>

<main class="content" role="main">

    <article class="{{post_class}}">

        <header class="post-header">
            <h1 class="post-title">{{title}}</h1>
            <section class="post-meta">
                <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="YYYY年MM月DD日"}}</time> {{tags prefix=" on "}}
            </section>
        </header>

        <section class="post-content">
            {{content}}
        </section>

        <footer class="post-footer">

        {{! Everything inside the #author tags pulls data from the author }}
        {{#author}}

            {{#if image}}
            <figure class="author-image">
                <a class="img" href="{{url}}" style="background-image: url({{image}})"><span class="hidden">{{name}}'s Picture</span></a>
            </figure>
            {{/if}}

            <section class="author">
                <h4><a href="{{url}}">{{name}}</a></h4>

                {{#if bio}}
                    <p>{{bio}}</p>
                {{else}}
                    <p>阅读该作者<a href="{{url}}">所有文章</a></p>
                {{/if}}
                <div class="author-meta">
                    {{#if location}}<span class="author-location icon-location">{{location}}</span>{{/if}}
                    {{#if website}}<span class="author-link icon-link"><a href="{{website}}">{{website}}</a></span>{{/if}}
                </div>
            </section>

        {{/author}}

            <section class="share">
                <h4>分享本文</h4>
                <a  href="http://service.weibo.com/share/share.php?title={{excerpt characters="120"}}&url={{url absolute="true"}}&appkey=725218700&pic= {{#if image}}{{image}}{{/if}}"
                    target="_blank"
                    >
                    <i class="iconfont-24" >&#xe619;</i> 
                </a><!-- 微博 -->

                <a href="http://share.diancloud.com/?url={{url absolute="true"}}&t=weixin"
                    target="_blank"
                >
                    <i class="iconfont-24" >&#xe61a;</i> 
                </a><!-- 微信 -->


                <a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{url absolute="true"}}&title={{title}}&summary={{excerpt characters="120"}}&desc=这篇文章不错，推荐大家看看。&site=diancloud.com&pics={{#if image}}{{image}}{{/if}}" 
                     target="_blank"
                    >
                    <i class="iconfont-24" >&#xe604;</i> 
                </a><!-- QZone -->

                <a href="javascript:void(function(){var d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:'',r='http://www.douban.com/recommend/?url='+e(d.location.href)+'&title='+e(d.title)+'&sel='+e(s)+'&v=1',w=450,h=330,x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width='+w+',height='+h+',left='+(screen.width-w)/2+',top='+(screen.height-h)/2))location.href=r+'&r=1'};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()">
                    <i class="iconfont-24" >&#xf0002;</i> 
                </a><!-- 豆瓣 -->


                <a href="http://widget.renren.com/dialog/share?resourceUrl={{url absolute="true"}}&srcUrl={{url absolute="true"}}&pic={{#if image}}{{image}}{{/if}}&title={{title}}&description={{excerpt characters="120"}}&charset=UTF-8"
                    target="_blank"
                    <i class="iconfont-24" >&#xe636;</i> 
                </a><!-- 人人 -->
            </section>

        </footer>

    </article>

</main>

{{/post}}
