-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
123 lines (110 loc) · 3.22 KB
/
Copy pathapp.py
File metadata and controls
123 lines (110 loc) · 3.22 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import dash
import dash_bootstrap_components as dbc
from dash import dcc, html
from page.content import layout as page_layout
app = dash.Dash(
__name__,
title="GitHub Study Guide",
external_stylesheets=[dbc.themes.BOOTSTRAP, dbc.icons.FONT_AWESOME],
)
server = app.server
# Navbar
navbar = dbc.Navbar(
dbc.Container(
[
html.A(
# logo -------------------------------------------------
dbc.Row(
[
dbc.Col(
html.I(
className=("fab fa-github navbar-icon-title"),
),
),
# title -------------------------------------------------
dbc.Col(
dbc.NavbarBrand(
"GitHub Study Guide",
className="navbar-title",
)
),
],
),
href="/",
style={"textDecoration": "none"},
),
],
fluid=True,
className="navbar",
),
# navbar style -------------------------------------------------
color="#415a77",
dark=True,
)
# main
content = html.Div(
className="page-content",
)
footer = html.Footer(
dbc.Container(
[
dbc.Row(
[
dbc.Col(
[
html.Div(
children=[
html.Span("Created by", className="me-2"),
html.A(
"Mayara Daher",
href="https://github.com/mayaradaher",
target="_blank",
),
],
)
],
md=6,
),
],
)
],
fluid=True,
),
className="footer mt-auto bg-light border-top",
)
# font-awesome and fonts -------------------------------------------------
app.index_string = """
<!DOCTYPE html>
<html>
<head>
{%metas%}
{%css%}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="icon" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/svgs/brands/github.svg" type="image/svg+xml"> </head>
<body>
{%app_entry%}
{%config%}
{%scripts%}
{%renderer%}
</body>
</html>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
</style>
"""
# layout
app.layout = html.Div(
children=[
dcc.Location(id="url"),
navbar,
html.Div(
children=[
content,
html.Div(page_layout, className="page-content"),
],
),
footer,
],
)
if __name__ == "__main__":
app.run(debug=True)