change headlines from menu to data

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
remotes/1690132257852795115/master
Toshaan Bharvani 2 years ago
parent 93933e4165
commit 5347c2a774

@ -192,9 +192,3 @@
pre = "fab fa-weixin" pre = "fab fa-weixin"
url = "http://weixin.qq.com/r/2DrD20PEWx4krQe492-K" url = "http://weixin.qq.com/r/2DrD20PEWx4krQe492-K"
weight = -1600 weight = -1600


### headlines
[[headlines]]
name = "OpenPOWER Summit 2022 Call-for-Presentations"
url = "https://cfp.openpower.foundation/openpowersummit2022/cfp"

@ -0,0 +1,3 @@
- title: OpenPOWER Summit 2022 Call-for-Presentations
url: https://cfp.openpower.foundation/openpowersummit2022/cfp
until: 2022-09-31

@ -298,9 +298,9 @@ body {
-moz-transform: translateX(100%); -moz-transform: translateX(100%);
-webkit-transform: translateX(100%); -webkit-transform: translateX(100%);
transform: translateX(100%); transform: translateX(100%);
-moz-animation: scroll-left 30s linear infinite; -moz-animation: scroll-left 1s linear infinite;
-webkit-animation: scroll-left 30s linear infinite; -webkit-animation: scroll-left 1s linear infinite;
animation: scroll-left 30s linear infinite; animation: scroll-left 45s linear infinite;
} }
.headline a { .headline a {
color: $white; color: $white;

@ -104,11 +104,20 @@
</div> </div>
</div> </div>
</div> </div>
{{ if .Site.Menus.headlines }} {{ if .Site.Data.headlines }}
{{ $now := now.Format "2006-01-02" }}
{{ $headlines := slice }}
{{ range .Site.Data.headlines }}
{{ if gt .until $now }}
{{ $headlines = $headlines | append . }}
{{ end }}
{{ end }}
{{ if gt (len $headlines) 0 }}
<div class="headline"><p> <div class="headline"><p>
{{ range .Site.Menus.headlines }} {{ range $headlines }}
&nbsp;&nbsp;<a href="{{ .URL }}">{{ .Name }}</a>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<a href="{{ .url }}">{{ .title }}</a>&nbsp;&nbsp;&nbsp;&nbsp;
{{ end }} {{ end }}
</p></div> </p></div>
{{ end }} {{ end }}
{{ end }}
</header> </header>

Loading…
Cancel
Save