|
1 | 1 | --- |
2 | 2 | layout: default |
3 | 3 | --- |
4 | | -<article class="post" itemscope itemtype="http://schema.org/BlogPosting"> |
5 | 4 |
|
6 | | - <header class="post-header"> |
7 | | - <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1> |
8 | | - <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p> |
9 | | - </header> |
| 5 | +<!-- |
| 6 | +文章 左边大部分区域 |
| 7 | +目录 右上 |
| 8 | +相关文章 右下 |
| 9 | +--> |
10 | 10 |
|
11 | | - <div class="post-content" itemprop="articleBody"> |
12 | | - {{ content }} |
13 | | - </div> |
| 11 | +<div class="post-page"> |
| 12 | + <div class="post"> |
| 13 | + <h1>{{ page.title }}</h1> |
| 14 | + <p> |
| 15 | + <i class="fa fa-calendar"></i>{{ page.date | date: "%b %-d, %Y" }} |
| 16 | + {% if page.author %} • <i class="fa fa-user"></i>{{ page.author }} |
| 17 | + {% endif %}{% if page.meta %} • <i class="fa fa-key"></i>{{ page.meta }}{% endif %} |
| 18 | + <span class="cate"></span> |
| 19 | + <span class="tag"></span> |
| 20 | + </p> |
14 | 21 |
|
15 | | -</article> |
| 22 | + <article itemscope itemtype="http://schema.org/BlogPosting"> |
| 23 | + |
| 24 | + <!-- <header class="post-header"> |
| 25 | + <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1> |
| 26 | + <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p> |
| 27 | + </header> |
| 28 | +
|
| 29 | + <div class="post-content" itemprop="articleBody"> |
| 30 | + {{ content }} |
| 31 | + </div> --> |
| 32 | + |
| 33 | + {{ content }} |
| 34 | + |
| 35 | + </article> |
| 36 | + </div> |
| 37 | +<div class="content"></div> |
| 38 | +<div class="related-post"> |
| 39 | + {% assign hasSimilar = '' %} |
| 40 | +{% for post in site.related_posts %} |
| 41 | + {% assign postHasSimilar = false %} |
| 42 | + {% for tag in post.tags %} |
| 43 | + {% for thisTag in page.tags %} |
| 44 | + {% if postHasSimilar == false and hasSimilar.size < 6 and post != page and tag == thisTag %} |
| 45 | + {% if hasSimilar.size == 0 %} |
| 46 | + <h4>Similar Posts</h4> |
| 47 | + <ul> |
| 48 | + {% endif %} |
| 49 | + <li class="relatedPost"> |
| 50 | + <a href="{{ site.url }}{{ post.url }}">{{ post.title }} |
| 51 | + {% if post.series %} |
| 52 | + (Series: {{ post.series }}) |
| 53 | + {% endif %} |
| 54 | + </a> |
| 55 | + </li> |
| 56 | + {% capture hasSimilar %}{{ hasSimilar }}*{% endcapture %} |
| 57 | + {% assign postHasSimilar = true %} |
| 58 | + {% endif %} |
| 59 | + {% endfor %} |
| 60 | + {% endfor %} |
| 61 | +{% endfor %} |
| 62 | +{% if hasSimilar.size > 0 %} |
| 63 | + </ul> |
| 64 | +{% endif %} |
| 65 | +</div> |
| 66 | +</div> |
0 commit comments