---
layout: default
---

<!-- Image to hack wechat -->
<!-- <img src="/img/icon_wechat.png" width="0" height="0"> -->
<!-- <img src="{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}" width="0" height="0"> -->

<!-- Post Header -->
<style type="text/css">
    header.intro-header{
        /*background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')*/
        height: 500px;
        overflow: hidden;
    }
    header iframe{
        width: 100%;
        height: 100%;
        border: 0;
    }
</style>
<header class="intro-header" >
    <iframe src="{{page.iframe}}"/>
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="post-heading">
                        <div class="tags">
                            {% for tag in page.tags %}
                            <a class="tag" href="/tags/#{{ tag }}" title="{{ tag }}">{{ tag }}</a>
                            {% endfor %}
                        </div>
                        <h1>{{ page.title }}</h1>
                        {% comment %}
                            always create a h2 for keeping the margin , Hux
                        {% endcomment %}
                        {% comment %} if page.subtitle {% endcomment %}
                        <h2 class="subheading">{{ page.subtitle }}</h2>
                        {% comment %} endif {% endcomment %}
                        <span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }}</span>
                    </div>
                </div>
            </div>
        </div>
    </iframe>
</header>

<!-- Post Content -->
<article>
    <div class="container">
        <div class="row">

            <!-- Post Container -->
            <div class="post-container
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1 ">

				{{ content }}

                <hr>

                {% if site.duoshuo_share && site.duoshuo_username %}
                <!-- 多说 Share start -->
                </style>
                <div class="ds-share"
                    style="text-align: right"
                    data-thread-key="{{page.id}}" data-title="{{page.title}}"
                    data-images="{{ site.url }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}"
                    data-content="{{ content | strip_html | truncate:80 }} | Hux Blog，@Hux黄玄 的个人博客"
                    data-url="{{site.url}}{{page.url}}">
                    <div class="ds-share-inline">
                      <ul  class="ds-share-icons-16">
                        <li data-toggle="ds-share-icons-more"><a class="ds-more" href="#">分享到：</a></li>
                        <li><a class="ds-wechat flat" href="javascript:void(0);" data-service="wechat">微信</a></li>
                        <li><a class="ds-weibo flat" href="javascript:void(0);" data-service="weibo">微博</a></li>
                        <li><a class="ds-douban flat" href="javascript:void(0);" data-service="douban">豆瓣</a></li>
                      </ul>
                      <div class="ds-share-icons-more">
                      </div>
                    </div>
                <hr>
                </div>
                <!-- 多少 Share end-->
                {% endif %}


                <ul class="pager">
                    {% if page.previous.url %}
                    <li class="previous">
                        <a href="{{ page.previous.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title}}">&larr; Previous Post</a>
                    </li>
                    {% endif %}
                    {% if page.next.url %}
                    <li class="next">
                        <a href="{{ page.next.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title}}">Next Post &rarr;</a>
                    </li>
                    {% endif %}
                </ul>


                {% if site.useDuoshuo %}
                <!-- 多说评论框 start -->
                <div class="comment">
                    <div class="ds-thread" data-thread-key="{{page.id}}" data-title="{{page.title}}" data-url="{{site.url}}{{page.url}}"></div>
                </div>
                <!-- 多说评论框 end -->
                {% endif %}
            </div>

            <!-- Sidebar Container -->
            <div class="sidebar-container
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1 ">

                <!-- Featured Tags -->
                {% if site.featured-tags %}
                <section>
                    <hr class="hidden-sm hidden-xs">
                    <h5><a href="/tags/">FEATURED TAGS</a></h5>
                    <div class="tags">
                        {% for tag in site.tags %}
                            {% if tag[1].size > {{site.featured-condition-size}} %}
                                <a href="/tags/#{{ tag[0] }}" title="{{ tag[0] }}" rel="{{ tag[1].size }}">
                                    {{ tag[0] }}
                                </a>
                            {% endif %}
                        {% endfor %}
                    </div>
                </section>
                {% endif %}

                <!-- Friends Blog -->
                {% if site.friends %}
                <hr>
                <h5>FRIENDS</h5>
                <ul class="list-inline">
                    {% for friend in site.friends %}
                        <li><a href="{{friend.href}}">{{friend.title}}</a></li>
                    {% endfor %}
                </ul>
                {% endif %}
            </div>
        </div>
    </div>
</article>

<!-- resize header to fullscreen keynotes -->
<script>
    var $header = document.getElementsByTagName("header")[0];
    function resize(){
        /*
         * leave 85px to both
         * - told/imply users that there has more content below
         * - let user can scroll in mobile device, seeing the keynote-view is unscrollable
         */
        $header.style.height = (window.innerHeight-85) + 'px';
    }
    document.addEventListener('DOMContentLoaded', function(){
        resize();
    })
    window.addEventListener('load', function(){
        resize();
    })
    window.addEventListener('resize', function(){
        resize();
    })
    resize();
</script>

{% if site.duoshuo_username %}
<!-- Duoshuo hacking -->
<input id="dsUser" type="hidden" value="{{site.duoshuo_username}}"  />

<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
    // dynamic User hacking by Hux
    var _user = document.getElementById('dsUser').value;
    // duoshuo comment query.
    var duoshuoQuery = {short_name: _user };
    (function() {
        var ds = document.createElement('script');
        ds.type = 'text/javascript';ds.async = true;
        ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
        ds.charset = 'UTF-8';
        (document.getElementsByTagName('head')[0]
         || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
</script>
<!-- 多说公共JS代码 end -->
{% endif %}


{% if site.anchorjs %}
<!-- async load function -->
<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>
<!-- anchor-js, Doc:http://bryanbraun.github.io/anchorjs/ -->
<script>
    async("http://cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js",function(){
        anchors.options = {
          visible: 'always',
          placement: 'right',
          icon: '#'
        };
        anchors.add().remove('.intro-header h1').remove('.subheading').remove('.sidebar-container h5');
    })
</script>
<style>
    /* place left on bigger screen */
    @media all and (min-width: 800px) {
        .anchorjs-link{
            position: absolute;
            left: -0.75em;
            font-size: 1.1em;
            margin-top : -0.1em;
        }
    }
</style>
{% endif %}
