Skip to content

Commit 6402a39

Browse files
authored
Added case studies section to front page (#159)
1 parent b01153b commit 6402a39

File tree

7 files changed

+112
-0
lines changed

7 files changed

+112
-0
lines changed

config.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@ params:
2626
image: logos/numpy.svg
2727
# Customizable navbar. For a dropdown, add a "sublinks" list.
2828

29+
section3:
30+
title: Case Studies
31+
features:
32+
- title: First Image of a Black Hole
33+
text: How NumPy, together with libraries like SciPy and Matplotlib that depend on NumPy, enabled the Event Horizon Telescope to produce the first ever image of a black hole
34+
img: images/content_images/case_studies/blackhole.png
35+
url: /case-studies/blackhole-image
36+
- title: Detection of Gravitational Waves
37+
text: One hundred years after they were predicted by Albert Einstein, NumPy was instrumental in the first observation of gravitational waves by LIGO in 2016.
38+
img: images/content_images/case_studies/gravitional.png
39+
url: /case-studies/gw-discov
40+
- title: Sports Analytics
41+
text: TODO!
42+
img: images/content_images/case_studies/sports.jpg
43+
url: /
2944
section2:
3045
title: KEY FEATURES
3146
features:

layouts/partials/css.html

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@
2626
<link rel="stylesheet" type="text/css" href="{{ "css/shell.css" | relURL }}" />
2727
<link rel="stylesheet" type="text/css" href="{{ "css/tabs.css" | relURL }}" />
2828
<link rel="stylesheet" type="text/css" href="{{ "css/content.css" | relURL }}" />
29+
<link rel="stylesheet" type="text/css" href="{{ "css/section2.css" | relURL }}" />
30+
<link rel="stylesheet" type="text/css" href="{{ "css/section3.css" | relURL }}" />

layouts/partials/section3.html

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- $section3 := .Site.Params.section3 }}
2+
{{- $title := index $section3 "title" }}
3+
{{- $features := index $section3 "features" }}
4+
<section class="section3">
5+
<div class="container">
6+
<h1 class="section3-title">{{ $title }}</h1>
7+
<div class="section3-box-container">
8+
{{- range $features }}
9+
<div class="section3-box-content section3-underline">
10+
<a href="{{ .url }}" class="section3-box-text">
11+
<p>
12+
<div class="section3-box-title">{{ .title }}</div>
13+
<img src="{{ .img }}">
14+
<div class="section3-box-text">{{ .text | markdownify }}</div>
15+
</p>
16+
</a>
17+
</div>
18+
{{- end }}
19+
</div>
20+
</div>
21+
</section>

static/css/section3.css

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.section3 {
2+
padding: 30px;
3+
margin: 35px 0 0 0;
4+
}
5+
6+
.section3-title {
7+
display: flex;
8+
justify-content: center;
9+
font-size: 30px;
10+
}
11+
12+
.section3-box-container {
13+
display: flex;
14+
flex-wrap: wrap;
15+
justify-content: center;
16+
}
17+
18+
.section3-box-content {
19+
height: 450px;
20+
width: 20vw;
21+
margin: 30px 15px 30px 15px;
22+
border-radius: 5px;
23+
}
24+
25+
.section3-box-title {
26+
margin: 15px;
27+
font-size: 16px;
28+
}
29+
30+
.section3-box-text {
31+
margin: 30px 15px;
32+
color: black;
33+
}
34+
35+
@media only screen and (max-width: 900px) {
36+
.section3-box-container {
37+
flex-direction: column;
38+
}
39+
40+
.section3-box-content {
41+
width: 80vw;
42+
}
43+
}
44+
45+
.section3-underline {
46+
display: inline-block;
47+
vertical-align: middle;
48+
-webkit-transform: perspective(1px) translateZ(0);
49+
transform: perspective(1px) translateZ(0);
50+
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
51+
position: relative;
52+
overflow: hidden;
53+
}
54+
55+
.section3-underline:before {
56+
content: "";
57+
position: absolute;
58+
z-index: -1;
59+
left: 0;
60+
right: 100%;
61+
bottom: 0;
62+
background: #013343;
63+
height: 4px;
64+
-webkit-transition-property: right;
65+
transition-property: right;
66+
-webkit-transition-duration: 0.3s;
67+
transition-duration: 0.3s;
68+
-webkit-transition-timing-function: ease-out;
69+
transition-timing-function: ease-out;
70+
}
71+
72+
.section3-underline:hover:before, .section3-underline:focus:before, .section3-underline:active:before {
73+
right: 0;
74+
}
Loading
Loading
Loading

0 commit comments

Comments
 (0)