Skip to content

Commit

Permalink
Add mini nav bar header
Browse files Browse the repository at this point in the history
  • Loading branch information
mithi committed Apr 9, 2020
1 parent 47c8486 commit 1b7fa4a
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@
# --------------
# Navigation bar partial
# --------------

header = dcc.Markdown(
f"""
[👾][1] [☕][2] [🕷️][3] [🕷️](/kinematics) [🕷️](/leg-patterns) [🕷️](/)
[1]: https://github.com/mithi/hexapod-robot-simulator
[2]: https://ko-fi.com/minimithi
[3]: /inverse-kinematics
[4]: /kinematics
[5]: /leg-patterns
[6]: /
"""
)

div_nav = html.Div(
[
html.Br(),
dcc.Link("🕷️ Kinematics", href="/kinematics"),
html.Br(),
dcc.Link("🕷️ Inverse Kinematics", href="/inverse-kinematics"),
html.Br(),
dcc.Link("🕷️ Leg Patterns", href="/leg-patterns"),
html.Br(),
dcc.Link("🕷️ Root", href="/"),
html.Br(),
html.A(
"👾 Source Code",
Expand All @@ -29,16 +34,29 @@
),
html.Br(),
html.A(
"☕ Buy Mithi coffee", href="https://ko-fi.com/minimithi", target="_blank"
"☕ Buy Mithi coffee", href="https://ko-fi.com/minimithi", target="_blank",
),
html.Br(),
dcc.Link("🕷️ Root", href="/"),
html.Br(),
dcc.Link("🕷️ Inverse Kinematics", href="/inverse-kinematics"),
html.Br(),
dcc.Link("🕷️ Kinematics", href="/kinematics"),
html.Br(),
dcc.Link("🕷️ Leg Patterns", href="/leg-patterns"),
]
)

# --------------
# Layout
# --------------
app.layout = html.Div(
[dcc.Location(id="url", refresh=False), html.Div(id="page-content"), div_nav,]
[
header,
dcc.Location(id="url", refresh=False),
html.Div(id="page-content"),
div_nav,
],
)

# --------------
Expand Down

0 comments on commit 1b7fa4a

Please sign in to comment.