Skip to content

Commit 2c4e552

Browse files
committed
improve sidebar location for blog post
1 parent 383c4db commit 2c4e552

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

content/posts/170526-bar-charts-bokeh.markdown

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title: Building Responsive Bar Charts with Bokeh, Flask and Python 3
1+
title: Responsive Bar Charts with Bokeh, Flask and Python 3
22
slug: responsive-bar-charts-bokeh-flask-python-3
33
meta: How to build responsive bar charts with the Bokeh data visualization library, Flask and Pyton 3.
44
category: post
@@ -10,11 +10,15 @@ headeralt: Python, Flask and Bokeh logos.
1010

1111
[Bokeh](/bokeh.html) is a powerful open source Python library that allows
1212
developers to generate JavaScript data visualizations for their web
13-
applications *without writing any JavaScript*. With Bokeh we can create
14-
incredibly varied visualizations, or traditional ones like the following
15-
bar chart.
13+
applications *without writing any JavaScript*. While learning a
14+
JavaScript-based data visualization library like [d3.js](https://d3js.org/)
15+
can be useful, it's often far easier to knock out a few lines of Python
16+
code that get the job done.
1617

17-
<img src="/img/170526-bar-charts-bokeh-flask/bar-chart-64.png" width="100%" class="technical-diagram img-rounded" style="border:1px solid #aaa" alt="Responsive bar chart with 64 bars.">
18+
With Bokeh we can create incredibly detailed interactive visualizations,
19+
or just traditional ones like the following bar chart.
20+
21+
<img src="/img/170526-bar-charts-bokeh-flask/chart-example-64.png" width="100%" class="technical-diagram img-rounded" style="border:1px solid #ccc" alt="Responsive bar chart with 64 bars.">
1822

1923

2024
Let's use the
@@ -69,7 +73,7 @@ source barchart/bin/activate
6973

7074
The command prompt will change after activating the virtualenv:
7175

72-
<img src="/img/170526-bar-charts-bokeh-flask/activate-virtualenv.png" width="100%" class="technical-diagram img-rounded" style="border:1px solid #aaa" alt="Activating our Python virtual environment on the command line.">
76+
<img src="/img/170526-bar-charts-bokeh-flask/activate-virtualenv.png" width="100%" class="technical-diagram img-rounded" style="border:1px solid #ccc" alt="Activating our Python virtual environment on the command line.">
7377

7478
Keep in mind that you need to activate the virtualenv in every new terminal
7579
window that you want this virtualenv to be used for your project.

theme/templates/article.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{% block content %}
1919
{% if article %}
2020
<div class="row">
21-
<div class="col-md-9">
21+
<div class="col-md-12">
2222
<h1 style="font-size: 36px;">{{ article.title }}</h1>
2323
<div style="font-size:12px;color:#666;margin:0 0 10px">
2424
{% if article.modified != article.date %}
@@ -30,6 +30,10 @@ <h1 style="font-size: 36px;">{{ article.title }}</h1>
3030
{{ article.date.strftime('%B %d, %Y') }}.
3131
{% endif %}
3232
</div>
33+
</div>
34+
</div>
35+
<div class="row">
36+
<div class="col-md-9">
3337
{{ article.content }}
3438
<hr>
3539
{% include "email-for-book.html" %}

theme/templates/css/article.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
.logo-title a:hover{color:#808080}
4949
.logo-image{vertical-align:middle;border:none;height:52px;width:52px;padding:1px}
5050
.logo-header-section{margin:20px 0 15px 0}
51-
#sidebar{margin-top:30px}
5251
h3.panel-head{margin:5px 0 0 0;font-size:26px;color:#fff}
5352
.smaller-item{font:.8em 'Helvetica Neue',sans-serif;padding:5px 0 5px 10px}
5453
@media (max-width:1200px){h3.panel-head{font-size:22px}}@media (max-width:750px){.smaller-item{font-size:1em;padding:15px 0 15px 10px}}@media (max-width:720px){.logo-header-section{margin:20px 40px 0 0}}

theme/templates/email-for-book-sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h3 class="panel-head">Email Updates</h3>
99
<h5>Sign up to get a monthly email with Python tutorials and major updates to this site.</h5>
1010
<input type="email" value="" name="EMAIL" class="email form-control" id="mce-EMAIL" placeholder="email address" required>
1111
<div style="position: absolute; left: -5000px;"><input type="text" name="b_b7e774f0c4f05dcebbfee183d_b22335388d" tabindex="-1" value=""></div>
12-
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn btn-success" style="font-family: 'Helvetica Neue'; margin-top: 5px;">
12+
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn btn-success" style="font-family: 'Helvetica Neue'; margin: 5px 0 6px 0;">
1313
</div>
1414
</form>
1515
</div>

theme/templates/email-for-book.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h4>Sign up here to receive a monthly email with major updates to this site, tut
88
<div style="position: absolute; left: -5000px;"><input type="text" name="b_b7e774f0c4f05dcebbfee183d_b22335388d" tabindex="-1" value=""></div>
99
</div>
1010
<div class="col-md-3">
11-
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn btn-success" style="font-family: 'Helvetica Neue';"></div>
11+
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn btn-success" style="font-family: 'Helvetica Neue'; margin-bottom:6px"></div>
1212
</div>
1313
</div>
1414
</div>

0 commit comments

Comments
 (0)