-
Notifications
You must be signed in to change notification settings - Fork 25
/
about.py
81 lines (68 loc) · 2.33 KB
/
about.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
from dash import Dash, html, dcc
import dash_bootstrap_components as dbc
app = Dash(__name__, external_stylesheets=[dbc.themes.SPACELAB, dbc.icons.FONT_AWESOME])
book_img = "https://user-images.githubusercontent.com/72614349/185497519-733bdfc3-5731-4419-9a68-44c1cad04a78.png"
nostarch = "https://nostarch.com/book-dash"
github = "fa-brands fa-github"
youtube = "fa-brands fa-youtube"
info = "fa-solid fa-circle-info"
plotly = "https://plotly.com/python/"
dash_url = "https://dash.plotly.com/"
plotly_logo = "https://user-images.githubusercontent.com/72614349/182969599-5ae4f531-ea01-4504-ac88-ee1c962c366d.png"
plotly_logo_dark = "https://user-images.githubusercontent.com/72614349/182967824-c73218d8-acbf-4aab-b1ad-7eb35669b781.png"
book_github = "https://github.com/DashBookProject/Plotly-Dash"
amw = "https://github.com/AnnMarieW"
adam = "https://www.youtube.com/c/CharmingData/featured"
chris = "https://finxter.com/"
def make_link(text, icon, link):
return html.Span(html.A([html.I(className=icon + " ps-2"), text], href=link))
button = dbc.Button(
"order", color="primary", href=nostarch, size="sm", className="mt-2 ms-1"
)
cover_img = html.A(
dbc.CardImg(
src=book_img,
className="img-fluid rounded-start",
),
href=nostarch,
)
text = dcc.Markdown(
"Learn how to make this app in _The Book of Dash_ , a step-by-step"
f" guide to making dashboards with Python, [Plotly and Dash.]({dash_url})",
className="ps-2",
)
see_github = html.Span(
[
html.A([html.I(className=github + " p-1"), "GitHub"], href=book_github),
],
className="lh-lg align-bottom",
)
authors = html.P(
[
"By ",
make_link("Adam Schroeder ", youtube, adam),
make_link("Christian Mayer", info, chris),
make_link("Ann Marie Ward", github, amw),
],
className="card-text p-2",
)
card = dbc.Card(
[
dbc.Row(
[
dbc.Col(cover_img, width=2),
dbc.Col(
[text, button, see_github],
width=10,
),
],
className="g-0 d-flex align-items-center",
),
dbc.Row(dbc.Col(authors)),
],
className="my-5 small shadow",
style={"maxWidth": "32rem"},
)
app.layout = dbc.Container(card, fluid=True)
if __name__ == "__main__":
app.run_server(debug=True)