Skip to content

Commit bd44787

Browse files
author
Mark Gibbs
committed
More demo template improvements
1 parent 44795fb commit bd44787

File tree

5 files changed

+42
-21
lines changed

5 files changed

+42
-21
lines changed

demo/demo/static/demo/demo.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
/* Extra CSS markup for demo pages */
22

33
.btnspace { margin-bottom: 10px; }
4+
5+
.dpd-example-wrapper { background-color: #e0e0e0; padding: 10px; }
6+
.dpd-example { background-color: white; }

demo/demo/templates/demo_four.html

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,28 @@
77

88
{%block content%}
99
<h1>Live Updating</h1>
10-
<div>
11-
WS Content here
12-
{%plotly_app slug="connected-2"%}
10+
<p>
11+
Live updating uses a websocket connection. The server pushes messages to the UI, and this is then translated into a
12+
callback through a dash component.
13+
</p>
14+
<div class="card bg-light border-dark">
15+
<div class="card-body">
16+
<p><span>{</span>% load plotly_dash %}</p>
17+
<p><span>{</span>% plotly_app slug="connected-2" %}</p>
18+
</div>
1319
</div>
14-
<div>
15-
WS Content here
16-
{%plotly_app slug="connected-2"%}
20+
<p>
21+
</p>
22+
<div class="card border-dark">
23+
<div class="card-body">
24+
{%plotly_app slug="connected-2"%}
25+
</div>
26+
</div>
27+
<p>
28+
</p>
29+
<div class="card border-dark">
30+
<div class="card-body">
31+
{%plotly_app slug="connected-2"%}
32+
</div>
1733
</div>
1834
{%endblock%}

demo/demo/templates/demo_one.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
{%block content%}
77
<h1>Simple App Embedding</h1>
8-
<div>
8+
<p>
99
This is a simple example of use of a dash application within a Django template. Use of
1010
the plotly_app template tag with the name of a dash application represents the simplest use of
1111
the django_plotly_dash framework.
12-
</div>
12+
</p>
1313
<div class="card bg-light border-dark">
1414
<div class="card-body">
1515
<p><span>{</span>% load plotly_dash %}</p>
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{%extends "base.html"%}
22
{%load plotly_dash%}
33

4-
{%block post_body%}{%plotly_message_pipe%}{%endblock%}
5-
64
{%block title%}Demo Three - Additional Callback Functionality{%endblock%}
75

86
{%block content%}
97
<h1>Enhanced Callback Functionality</h1>
10-
<div>
11-
{%plotly_app slug="connected-2"%}
12-
</div>
13-
<div>
14-
WS Content here
15-
{%plotly_app name="Connected"%}
8+
<p>
9+
</p>
10+
<div class="card bg-light border-dark">
11+
<div class="card-body">
12+
<p><span>{</span>% load plotly_dash %}</p>
13+
<p><span>{</span>% plotly_app slug="connected-2" %}</p>
14+
</div>
1615
</div>
17-
<div>
18-
WS Content here
19-
{%plotly_app slug="simpleexample-1"%}
16+
<p>
17+
</p>
18+
<div class="card border-dark">
19+
<div class="card-body">
20+
{%plotly_app slug="connected-2"%}
21+
</div>
2022
</div>
2123
{%endblock%}

demo/demo/templates/demo_two.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
{%block content%}
77
<h1>Initial State</h1>
8-
<div>
8+
<p>
99
Referring to an instance of a dash application, uniquely identified by a slug, will use the persisted
1010
representation of that app along with its initial state.
11-
</div>
11+
</p>
1212
<div class="card bg-light border-dark">
1313
<div class="card-body">
1414
<p><span>{</span>% load plotly_dash %}</p>

0 commit comments

Comments
 (0)