Skip to content

Commit bd8ea37

Browse files
authored
Merge pull request numpy#255 from numpy/bug/mobile-css
Improve mobile layout, hide logo in navbar on front page
2 parents 29a33a4 + 780ea5d commit bd8ea37

File tree

9 files changed

+24
-60
lines changed

9 files changed

+24
-60
lines changed

config.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ params:
5757
url: /case-studies/cricket-analytics
5858

5959
keyfeatures:
60-
title: KEY FEATURES
6160
features:
6261
- title: Powerful N-dimensional arrays
6362
text: Fast and versatile, the NumPy vectorization, indexing and broadcasting concepts are the de-facto standards of array computing today.

layouts/partials/keyfeatures.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{{- $keyfeatures := .Site.Params.keyfeatures }}
2-
{{- $title := index $keyfeatures "title" }}
32
{{- $features := index $keyfeatures "features" }}
43

54
<section class="keyfeatures">
65
<div class="container">
7-
<h1 class="keyfeatures-header">
8-
{{ $title }}
9-
</h1>
106
<div class="keyfeatures-box-container">
117
{{- range $features }}
128
<div class="keyfeatures-box-content keyfeatures-underline">

layouts/partials/navbar.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
<nav id="nav" class="navbar is-fresh is-transparent no-shadow" role="navigation" aria-label="main navigation">
99
<div class="container">
1010
<div class="navbar-brand">
11+
{{ if not .IsHome }}
1112
{{- if $navbarLogo}}
1213
<a id="navbar-item" class="navbar-item" href="{{ $navbarLogo.link }}">
1314
<img src="{{ printf "/images/%s" $navbarLogo.image | relURL }}" alt="Numpy logo. A three-dimensional blue cube with the letter 'N' highlighted in yellow." width="112" height="28" alt="Numpy logo. A three-dimensional blue cube with the letter 'N' highlighted in yellow.">
1415
</a>
1516
{{- end}}
16-
17+
{{ end }}
1718
{{- if $sidebarVisible }}
1819
<a id="navbar-item" class="navbar-item is-hidden-desktop is-hidden-tablet">
1920
<div id="menu-icon-wrapper" class="menu-icon-wrapper" style="visibility: visible;">

static/css/content.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
margin: 30px 0 0 0;
8282
}
8383

84-
@media only screen and (max-width: 1088px) {
84+
@media only screen and (max-width: 1090px) {
8585
.shortcuts-container {
8686
display: none;
8787
}

static/css/keyfeatures.css

+2-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
.keyfeatures {
2-
margin: 50px 0;
2+
margin: 30px 0;
33
}
44

55
.keyfeatures .container {
66
display: flex;
77
flex-direction: column;
88
}
99

10-
.keyfeatures-header {
11-
display: flex;
12-
flex-direction: column;
13-
width: 100%;
14-
align-items: center;
15-
letter-spacing: 1.5px;
16-
font-size: 27px;
17-
}
18-
1910
.keyfeatures-box-container {
2011
display: flex;
2112
flex-wrap: wrap;
@@ -26,7 +17,7 @@
2617
height: 175px;
2718
min-width: 275px;
2819
width: 325px;
29-
margin: 30px 30px 30px 0;
20+
margin: 30px auto;
3021
border-radius: 3px;
3122
}
3223

@@ -66,22 +57,12 @@
6657
}
6758
}
6859

69-
@media only screen and (max-width: 525px) {
70-
.keyfeatures-header {
71-
flex-direction: column;
72-
}
73-
}
74-
7560
@media only screen and (max-width: 425px) {
7661
.keyfeatures .container {
7762
align-items: center;
7863
justify-content: center;
7964
margin: 0 10%;
8065
}
81-
82-
.keyfeatures-box-content {
83-
margin: 30px;
84-
}
8566
}
8667

8768
.keyfeatures-underline {

static/css/news.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
}
3636
}
3737

38-
@media only screen and (max-width: 1087px) {
38+
@media only screen and (max-width: 1090px) {
3939
.news-container {
4040
flex-direction: column;
4141
padding: 30px;

static/css/section3.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
height: 450px;
2525
min-width: 275px;
2626
width: 350px;
27-
margin: 30px 30px 30px 0;
27+
margin: 30px auto;
2828
border-radius: 3px;
2929
}
3030

@@ -43,7 +43,7 @@
4343
font-size: 14px;
4444
}
4545

46-
@media only screen and (max-width: 1290px) {
46+
@media only screen and (max-width: 1300px) {
4747
.section3-box-container {
4848
justify-content: center;
4949
}

static/css/shell.css

+12-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@
2626
align-items: center;
2727
}
2828

29-
3029
.shell-content {
3130
display: flex;
3231
flex-direction: column;
33-
min-width: 500px;
3432
text-align: center;
3533
}
3634

@@ -57,6 +55,13 @@
5755
left: 40%;
5856
}
5957

58+
.shell-title-container {
59+
text-align: center;
60+
align-items: center;
61+
margin: 15px;
62+
min-width: 260px;
63+
}
64+
6065
.shell-title {
6166
font-size: 35px;
6267
font-weight: bold;
@@ -171,16 +176,19 @@
171176
font-size: 0.8em;
172177
}
173178

179+
.thebelab-input {
180+
height: 190px;
181+
}
182+
174183
#demo-output-parent {
175184
position: relative;
176185
}
177186

178187
#demo-output {
179188
position: absolute;
180-
top: 88px;
181189
}
182190

183-
@media only screen and (max-width: 1100px) {
191+
@media only screen and (max-width: 1090px) {
184192
.numpy-shell-container {
185193
flex-direction: column;
186194
justify-content: space-around;

static/css/styles.css

+4-25
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ em {
2626
justify-content: center;
2727
}
2828

29-
.shell-title-container {
30-
text-align: center;
31-
margin: 15px;
32-
}
33-
3429
.hero-content {
3530
display: flex;
3631
flex-direction: column;
@@ -54,7 +49,7 @@ em {
5449
display: flex;
5550
font-family: 'Lato', sans-serif;
5651
font-weight: 900;
57-
font-size: 100px;
52+
font-size: 6em;
5853
}
5954

6055
.hero-logo {
@@ -63,7 +58,7 @@ em {
6358
}
6459

6560
.hero-subtitle {
66-
font-size: 18px;
61+
font-size: 1em;
6762
max-width: 550px;
6863
}
6964

@@ -135,7 +130,7 @@ p {
135130
margin-left: 15px;
136131
}
137132

138-
@media only screen and (max-width: 1100px) {
133+
@media only screen and (max-width: 1090px) {
139134
.hero-content {
140135
flex-direction: column;
141136
padding: 0;
@@ -154,37 +149,21 @@ p {
154149
}
155150

156151
.hero-title {
157-
font-size: 80px;
152+
font-size: 4em;
158153
}
159154

160155
.hero-logo {
161156
max-height: 60px;
162157
}
163-
164-
.hero-subtitle {
165-
font-size: 16px;
166-
}
167158
}
168159

169160
@media only screen and (max-width: 400px) {
170-
.hero-title {
171-
font-size: 70px;
172-
}
173-
174161
.hero-logo {
175162
max-height: 50px;
176163
}
177-
178-
.hero-subtitle {
179-
font-size: 14px;
180-
}
181164
}
182165

183166
@media only screen and (max-width: 320px) {
184-
.hero-title {
185-
font-size: 60px;
186-
}
187-
188167
.hero-logo {
189168
max-height: 40px;
190169
}

0 commit comments

Comments
 (0)