|
@@ -34,6 +34,11 @@
|
|
|
<a href="/main-news/serve/">最新服務</a>
|
|
|
</button>
|
|
|
</li>
|
|
|
+ <li>
|
|
|
+ <button id="event">
|
|
|
+ <a href="/main-news/event/">活動公告</a>
|
|
|
+ </button>
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
|
|
|
{{ if eq (relURL .URL) ("/main-news/focus/") }}
|
|
@@ -90,6 +95,33 @@
|
|
|
</ul>
|
|
|
{{ end }}
|
|
|
|
|
|
+ {{ if eq (relURL .URL) ("/main-news/event/") }}
|
|
|
+ {{ $t := $.Site.GetPage "/main-news" }}
|
|
|
+ <ul class="list">
|
|
|
+ {{ range $index, $element := where $t.Pages "Params.categories" "活動公告" }}
|
|
|
+ {{ $t := $.Site.GetPage "/main-news" }}
|
|
|
+ <li>
|
|
|
+ <a href="{{ .RelPermalink }}">
|
|
|
+ <h2>{{ .Title }}</h2>
|
|
|
+ </a>
|
|
|
+ <hr>
|
|
|
+ <section class="d-flex justify-content-between">
|
|
|
+ <p class="news-category">{{ .Params.categories }}</p>
|
|
|
+ <p>{{ .PublishDate.Format "2006-01-02" }}</p>
|
|
|
+ </section>
|
|
|
+ <a href="{{ .RelPermalink }}" class="content">
|
|
|
+ <p>{{.Summary}}</p>
|
|
|
+ </a>
|
|
|
+ <div class="more-btn">
|
|
|
+ <a href="{{ .RelPermalink }}">
|
|
|
+ 閱讀文章
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ {{ end }}
|
|
|
+ </ul>
|
|
|
+ {{ end }}
|
|
|
+
|
|
|
{{ $paginator := .Paginate .Data.Pages }}
|
|
|
<ul class="list">
|
|
|
{{ range $paginator.Pages }}
|
|
@@ -136,6 +168,8 @@
|
|
|
$('.news-content #focus').addClass('active');
|
|
|
} else if (pathname.includes('serve')) {
|
|
|
$('.news-content #serve').addClass('active');
|
|
|
+ } else if (pathname.includes('event')) {
|
|
|
+ $('.news-content #event').addClass('active');
|
|
|
} else {
|
|
|
$('.news-content #all').addClass('active');
|
|
|
}
|