Skip to content

Commit 212dc35

Browse files
joelachancergommers
authored andcommitted
moves shell into partial and moves below key features. Adds numpy shel title
1 parent 2721953 commit 212dc35

File tree

5 files changed

+33
-23
lines changed

5 files changed

+33
-23
lines changed

config.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ params:
3232
# Customizable navbar. For a dropdown, add a "sublinks" list.
3333
news:
3434
title: NumPy News
35+
36+
shell:
37+
title: placeholder
3538
section3:
3639
title: CASE STUDIES
3740
features:

layouts/index.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
{{ partial "section2.html" . }}
1212
{{ end }}
1313

14+
{{ if .Site.Params.shell }}
15+
{{ partial "shell.html" . }}
16+
{{ end }}
17+
1418
{{ if .Site.Params.tabs }}
1519
{{ partial "tabs.html" . }}
1620
{{ end }}
@@ -37,4 +41,4 @@
3741
{{ if .Site.Params.sidebar }}
3842
{{ partial "sidebar.html" . }}
3943
{{ end }}
40-
{{ end }}
44+
{{ end }}

layouts/partials/hero-body.html

-20
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,5 @@
2222
</div>
2323
</div>
2424
</div>
25-
<div class="hero-right">
26-
<div class="numpy-shell-canvas">
27-
<div class="numpy-shell-container">
28-
{{ partial "shell-content.html" . }}
29-
<!-- Interactive Shell -->
30-
<div class="fake-shell" id="demo-code">
31-
<div class="demo-caret" aria-label="interactive shell prompt">&gt;</div>
32-
<button class="shell-enable-button shell-button" onclick="loadShell();" aria-label="Enables the interactive tutorial shell">
33-
Enable
34-
<div class="loader-container">
35-
<div id="shell-loader" class="loader"></div>
36-
</div>
37-
</button>
38-
</div>
39-
<div class="real-shell" id="numpy-shell" style="display: none;">
40-
<pre id="demo-code" data-executable="true" data-language="python" style="white-space: pre-line;">import numpy as np</pre>
41-
</div>
42-
</div>
43-
</div>
44-
</div>
4525
</div>
4626
</div>

layouts/partials/shell.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<div class="hero-right">
2+
<div class="numpy-shell-canvas">
3+
<div class="numpy-shell-container">
4+
<div class="flex-column shell-title-container">
5+
{{ partial "shell-content.html" . }}
6+
</div>
7+
<!-- Interactive Shell -->
8+
<div class="fake-shell" id="demo-code">
9+
<div class="demo-caret" aria-label="interactive shell prompt">&gt;</div>
10+
<button class="shell-enable-button shell-button" onclick="loadShell();" aria-label="Enables the interactive tutorial shell">
11+
Enable
12+
<div class="loader-container">
13+
<div id="shell-loader" class="loader"></div>
14+
</div>
15+
</button>
16+
</div>
17+
<div class="real-shell" id="numpy-shell" style="display: none;">
18+
<pre id="demo-code" data-executable="true" data-language="python" style="white-space: pre-line;">import numpy as np</pre>
19+
</div>
20+
</div>
21+
</div>
22+
</div>

static/css/styles.css

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ em {
2626
justify-content: center;
2727
}
2828

29-
.hero-container {
30-
min-height: 630px;
29+
.shell-title-container {
30+
text-align: center;
31+
margin: 15px;
3132
}
3233

3334
.hero-content {

0 commit comments

Comments
 (0)