Skip to content

Commit 5edc82f

Browse files
author
Xing Han Lu
authored
Merge pull request #663 from plotly/update-app-links
Add links to source code and enterprise demo Former-commit-id: 7cfdff7
2 parents 87874b6 + 23834b6 commit 5edc82f

File tree

16 files changed

+128
-20
lines changed

16 files changed

+128
-20
lines changed

apps/dash-financial-report/utils.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,24 @@ def get_header(app):
1111
[
1212
html.Div(
1313
[
14-
html.Img(
15-
src=app.get_asset_url("dash-financial-logo.png"),
16-
className="logo",
14+
html.A(
15+
html.Img(
16+
src=app.get_asset_url("dash-financial-logo.png"),
17+
className="logo",
18+
),
19+
href="https://plotly.com/dash",
20+
),
21+
html.A(
22+
html.Button(
23+
"Enterprise Demo",
24+
id="learn-more-button",
25+
style={"margin-left": "-10px"},
26+
),
27+
href="https://plotly.com/get-demo/",
1728
),
1829
html.A(
19-
html.Button("Learn More", id="learn-more-button"),
20-
href="https://plot.ly/dash/pricing/",
30+
html.Button("Source Code", id="learn-more-button"),
31+
href="https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-financial-report",
2132
),
2233
],
2334
className="row",

apps/dash-interest-rate/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def connect_read_sql(query, engine):
116116
app.layout = dbc.Container(
117117
fluid=True,
118118
children=[
119-
html.H1("Dash Interest Rate Modeling with Snowflake"),
119+
Header("Dash Interest Rate Modeling with Snowflake", app),
120120
html.Hr(),
121121
dbc.Row(
122122
[

apps/dash-interest-rate/utils.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44
import dash_bootstrap_components as dbc
55

66

7+
def Header(name, app):
8+
title = html.H2(name, style={"margin-top": 7})
9+
logo = html.Img(
10+
src=app.get_asset_url("dash-logo.png"), style={"float": "right", "height": 60}
11+
)
12+
link = html.A(logo, href="https://plotly.com/dash/")
13+
btn_style = {"margin-top": "13px", "float": "right", "margin-right": "10px"}
14+
demo_btn = html.A(
15+
dbc.Button("Enterprise Demo", style=btn_style, color="primary"),
16+
href="https://plotly.com/get-demo/",
17+
)
18+
code_btn = html.A(
19+
dbc.Button("Source Code", style=btn_style, color="secondary"),
20+
href="https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-interest-rate",
21+
)
22+
23+
return dbc.Row([dbc.Col(title, md=7), dbc.Col([link, demo_btn, code_btn], md=5)])
24+
25+
726
def OptionMenu(values, label, **kwargs):
827
options = [{"label": s.replace("_", " ").capitalize(), "value": s} for s in values]
928
kwargs["value"] = kwargs.get("value", values[0])

apps/dash-manufacture-spc-dashboard/app.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,17 @@ def build_banner():
4949
html.Div(
5050
id="banner-logo",
5151
children=[
52+
html.A(
53+
html.Button(children="ENTERPRISE DEMO"),
54+
href="https://plotly.com/get-demo/",
55+
),
5256
html.Button(
5357
id="learn-more-button", children="LEARN MORE", n_clicks=0
5458
),
55-
html.Img(id="logo", src=app.get_asset_url("dash-logo-new.png")),
59+
html.A(
60+
html.Img(id="logo", src=app.get_asset_url("dash-logo-new.png")),
61+
href="https://plotly.com/dash/",
62+
),
5663
],
5764
),
5865
],
@@ -261,6 +268,10 @@ def generate_modal():
261268
262269
Operators may stop measurement by clicking on `Stop` button, and edit specification parameters by clicking specification tab.
263270
271+
###### Source Code
272+
273+
You can find the source code of this app on our [Github repository](https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-manufacture-spc-dashboard).
274+
264275
"""
265276
)
266277
),
13.8 KB
Loading

apps/dash-opioid-epidemic/app.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,18 @@
9494
html.Div(
9595
id="header",
9696
children=[
97-
html.Img(id="logo", src=app.get_asset_url("dash-logo.png")),
97+
html.A(
98+
html.Img(id="logo", src=app.get_asset_url("dash-logo.png")),
99+
href="https://plotly.com/dash/",
100+
),
101+
html.A(
102+
html.Button("Enterprise Demo", className="link-button"),
103+
href="https://plotly.com/get-demo/",
104+
),
105+
html.A(
106+
html.Button("Source Code", className="link-button"),
107+
href="https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-opioid-epidemic",
108+
),
98109
html.H4(children="Rate of US Poison-Induced Deaths"),
99110
html.P(
100111
id="description",
13.8 KB
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.link-button {
2+
margin-top: 3px;
3+
margin-right: 10px;
4+
vertical-align: top;
5+
color: #7fafdf;
6+
float: right;
7+
border-color: #7fafdf;
8+
}
9+
10+
.link-button:hover {
11+
color: white;
12+
border-color: white;
13+
}

apps/dash-pivottable/app.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ def Header(name, app):
1616
html.H1(name, style={"margin": 10, "display": "inline"}),
1717
html.A(dash_logo, href="https://plotly.com/dash/"),
1818
html.A(ghub_logo, href="https://github.com/plotly/dash-pivottable"),
19+
html.A(
20+
html.Button(
21+
"Enterprise Demo",
22+
style={
23+
"float": "right",
24+
"margin-right": "10px",
25+
"margin-top": "5px",
26+
"padding": "5px 10px",
27+
"font-size": "15px",
28+
},
29+
),
30+
href="https://plotly.com/get-demo/",
31+
),
1932
html.Hr(),
2033
]
2134
)

apps/dash-uber-rides-demo/app.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@
6868
html.Div(
6969
className="four columns div-user-controls",
7070
children=[
71-
html.Img(
72-
className="logo", src=app.get_asset_url("dash-logo-new.png")
71+
html.A(
72+
html.Img(
73+
className="logo",
74+
src=app.get_asset_url("dash-logo-new.png"),
75+
),
76+
href="https://plotly.com/dash/",
7377
),
7478
html.H2("DASH - UBER DATA APP"),
7579
html.P(
@@ -132,9 +136,11 @@
132136
html.P(id="total-rides-selection"),
133137
html.P(id="date-value"),
134138
dcc.Markdown(
135-
children=[
136-
"Source: [FiveThirtyEight](https://github.com/fivethirtyeight/uber-tlc-foil-response/tree/master/uber-trip-data)"
137-
]
139+
"""
140+
Source: [FiveThirtyEight](https://github.com/fivethirtyeight/uber-tlc-foil-response/tree/master/uber-trip-data)
141+
142+
Links: [Source Code](https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-uber-rides-demo) | [Enterprise Demo](https://plotly.com/get-demo/)
143+
"""
138144
),
139145
],
140146
),

0 commit comments

Comments
 (0)