提交 ca9d870f 编写于 作者: F freesky-edward

bug-fixing: events and news show the same content

上级 a17b1bd3
...@@ -3,20 +3,22 @@ ...@@ -3,20 +3,22 @@
<div class="events active"> <div class="events active">
<h2> <h2>
Upcoming Events Upcoming Events
<a href="#"> <a href="/events.html">
<p>more ></p> <p>more ></p>
</a> </a>
</h2> </h2>
<ul> <ul>
{{ $posts := .Paginate (where .Data.Pages "Type" "events") }} {{ $events := .Paginate (where .Data.Pages "Type" "events") }}
{{ range first 4 $posts.Pages }} {{ range first 2 $events.Pages }}
<li> <li>
<h6> <h6>
<span>EVENTS</span> <i>|</i> <span>{{ .Date.Format .Site.Params.date_format }}</span> <span>EVENTS</span> <i>|</i> <span>{{ .Date.Format .Site.Params.date_format }}</span>
</h6> </h6>
<p>{{ .Title }}</p> <a href="{{ .URL }}">
<p>{{ .Title }}</p>
</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
</h2> </h2>
<ul> <ul>
{{ $posts := .Paginate (where .Data.Pages "Type" "news") }} {{ $posts := where .Data.Pages "Type" "news" }}
{{ range first 4 $posts.Pages }} {{ range first 4 $posts }}
<li> <li>
<h6> <h6>
...@@ -26,4 +26,4 @@ ...@@ -26,4 +26,4 @@
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册