Skip to content

Commit 155c589

Browse files
author
xhlulu
committed
Add enterprise demo and source code buttons
1 parent e9a05f8 commit 155c589

File tree

1 file changed

+40
-8
lines changed
  • apps/dash-airfoil-design

1 file changed

+40
-8
lines changed

apps/dash-airfoil-design/app.py

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
)
2020
server = app.server
2121

22+
btn_style = {"margin-top": "13px"}
23+
2224
app.layout = dbc.Container(
2325
[
2426
dbc.Row(
@@ -29,21 +31,51 @@
2931
"""
3032
# Airfoil Analysis with [AeroSandbox](https://github.com/peterdsharpe/AeroSandbox) and [Dash](https://plotly.com/dash/)
3133
32-
By [Peter Sharpe](https://peterdsharpe.github.io/). Uses potential flow theory (viscous effects neglected, for now). [Source code here](https://github.com/peterdsharpe/Automotive-Airfoil-Design).
34+
By [Peter Sharpe](https://peterdsharpe.github.io/). Uses potential flow theory (viscous effects neglected, for now). [Original repository here](https://github.com/peterdsharpe/Automotive-Airfoil-Design).
3335
"""
3436
)
3537
],
36-
width=True,
38+
width=8,
3739
),
3840
dbc.Col(
3941
[
40-
html.Img(
41-
src="assets/MIT-logo-red-gray-72x38.svg",
42-
alt="MIT Logo",
43-
height="30px",
42+
html.Div(
43+
[
44+
html.A(
45+
dbc.Button(
46+
"Enterprise Demo",
47+
color="primary",
48+
size="md",
49+
className="mr-1",
50+
),
51+
href="https://plotly.com/get-demo/",
52+
target="_blank",
53+
style=btn_style,
54+
),
55+
html.A(
56+
dbc.Button(
57+
"Source Code",
58+
size="md",
59+
className="mr-1",
60+
color="secondary",
61+
),
62+
href="https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-airfoil-design",
63+
),
64+
html.Img(
65+
src="assets/MIT-logo-red-gray-72x38.svg",
66+
alt="MIT Logo",
67+
height="100%",
68+
style={"margin-left": "15px"},
69+
),
70+
],
71+
style={
72+
"float": "right",
73+
"height": "80px",
74+
"padding-bottom": "20px",
75+
},
4476
),
4577
],
46-
width=1,
78+
width=4,
4779
),
4880
],
4981
align="end",
@@ -319,4 +351,4 @@ def display_graph(
319351

320352

321353
if __name__ == "__main__":
322-
app.run_server(debug=False)
354+
app.run_server(debug=True)

0 commit comments

Comments
 (0)