Skip to content

Commit f90d195

Browse files
committed
Make News bar on front page link to the full news page.
1 parent 567ca37 commit f90d195

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ params:
3232
# Customizable navbar. For a dropdown, add a "sublinks" list.
3333
news:
3434
title: NumPy v1.18.0
35-
content: The C-API for numpy.random defined and documented - Basic infrastructure for linking with 64-bit BLAS and LAPACK - Improved documentation
35+
content: A new C-API for numpy.random - Basic infrastructure for linking with 64-bit BLAS and LAPACK
36+
url: /news
3637

3738
shell:
3839
title: placeholder

layouts/partials/news.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{{- $news := .Site.Params.news }}
22
{{- $title := index $news "title" }}
33
{{- $content := index $news "content" }}
4+
{{- $url := index $news "url" }}
45

56
<div class="news-container">
6-
<div class="news-title">{{ $title }}</div>
7-
<div class="news-content">{{ $content }}</div>
8-
</div>
7+
<div class="news-title"> <a href="{{ $url}}"> {{ $title }} </a></div>
8+
<div class="news-content"> <a href="{{ $url}}"> {{ $content }} </a></div>
9+
</div>

static/css/news.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
white-space: nowrap;
1010
}
1111

12+
.news-container a {
13+
color: white;
14+
}
15+
16+
.news-container a:hover {
17+
color: white;
18+
}
19+
1220
.news-title {
1321
display: flex;
1422
letter-spacing: 1.5px;

0 commit comments

Comments
 (0)