Skip to content

Commit 2721953

Browse files
authored
Merge pull request numpy#222 from numpy/feature/219-news-section
Adds a news section
2 parents 9d1a3ef + d051b98 commit 2721953

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ params:
3030
# Hero image (from static/images/___)
3131
image: logos/numpy.svg
3232
# Customizable navbar. For a dropdown, add a "sublinks" list.
33-
33+
news:
34+
title: NumPy News
3435
section3:
3536
title: CASE STUDIES
3637
features:

layouts/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{{ partial "hero.html" . }}
44
{{ end }}
55

6-
{{ if .Site.Params.section1 }}
7-
{{ partial "section1.html" . }}
6+
{{ if .Site.Params.news }}
7+
{{ partial "news.html" . }}
88
{{ end }}
99

1010
{{ if .Site.Params.section2 }}

layouts/partials/css.html

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
<link rel="stylesheet" type="text/css" href="{{ "css/shell.css" | relURL }}" />
2525
<link rel="stylesheet" type="text/css" href="{{ "css/tabs.css" | relURL }}" />
2626
<link rel="stylesheet" type="text/css" href="{{ "css/content.css" | relURL }}" />
27+
<link rel="stylesheet" type="text/css" href="{{ "css/news.css" | relURL }}" />
2728
<link rel="stylesheet" type="text/css" href="{{ "css/section2.css" | relURL }}" />
2829
<link rel="stylesheet" type="text/css" href="{{ "css/section3.css" | relURL }}" />

layouts/partials/news.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- $news := .Site.Params.news }}
2+
{{- $title := index $news "title" }}
3+
4+
<div class="news-container">
5+
<div class="news-title">{{ $title }}</div>
6+
<div class="news-content">NumPy News goes here</div>
7+
</div>

static/css/news.css

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.news-container {
2+
display: flex;
3+
flex-direction: column;
4+
align-items: center;
5+
width: 100vw;
6+
min-height: 100px;
7+
}
8+
9+
.news-title {
10+
display: flex;
11+
flex-direction: column;
12+
width: 100%;
13+
align-items: center;
14+
letter-spacing: 1.5px;
15+
font-size: 27px;
16+
}

0 commit comments

Comments
 (0)