import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output

from app import app
from panels import main, workouts, ftp

import os

app.layout = html.Div([
    dcc.Location(id='url', refresh=False),
    dcc.Store(id='main-session-filters', storage_type='session'),
    dcc.Store(id='workouts-session-filters', storage_type='session'),
    html.Div(
        [
            html.Div(
                [
                    html.A(
                        html.Img(
                            src=app.get_asset_url("peloton-logo.png"),
                            id="peloton-image",
                            style={
                                "height": "60px",
                                "width": "auto",
                                "margin-bottom": "25px",
                            },
                        ),
                        href="/panels/main"
                    )
                ],
                className="one-third column",
            ),
            html.Div(
                [
                    html.Div(
                        [
                            html.H3(
                                f"{os.environ.get('PELOTON_DISPLAY_NAME')}'s Peloton Performance",
                                style={"margin-bottom": "0px", "text-align": "center"},
                            )
                        ]
                    )
                ],
                className="one-half column",
                id="title",
            ),
            html.Div(
                [
                    html.A(
                        html.Button("Main", id="main-panel"),
                        href="/panels/main",
                    ),
                    html.A(
                        html.Button("Workouts", id="workout-panel"),
                        href="/panels/workouts",
                    ),
                    html.A(
                        html.Button("FTP", id="ftp-panel"),
                        href="/panels/ftp",
                    )
                ],
                className="one-third column",
                id="panels",
                style={'text-align': 'right'}
            )
        ],
        id="header",
        className="row flex-display",
        style={"margin-bottom": "25px"},
    ),
    html.Div(id='page-content'),
])


@app.callback(
    [
        Output("page-content", "children")
    ],
    [Input("url", "pathname")],
)
def display_page(pathname):

    if pathname == "/panels/workouts":
        return workouts.layout
    elif pathname == '/panels/ftp':
        return ftp.layout
    else:
        return main.layout


if __name__ == "__main__":
    app.run_server(debug=False)

5e424a0bea5379f9f8d18ce5808d648b9ce53128
<mask token>


@app.callback([Output('page-content', 'children')], [Input('url', 'pathname')])
def display_page(pathname):
    if pathname == '/panels/workouts':
        return workouts.layout
    elif pathname == '/panels/ftp':
        return ftp.layout
    else:
        return main.layout


<mask token>

<mask token>


@app.callback([Output('page-content', 'children')], [Input('url', 'pathname')])
def display_page(pathname):
    if pathname == '/panels/workouts':
        return workouts.layout
    elif pathname == '/panels/ftp':
        return ftp.layout
    else:
        return main.layout


if __name__ == '__main__':
    app.run_server(debug=False)

<mask token>
app.layout = html.Div([dcc.Location(id='url', refresh=False), dcc.Store(id=
    'main-session-filters', storage_type='session'), dcc.Store(id=
    'workouts-session-filters', storage_type='session'), html.Div([html.Div
    ([html.A(html.Img(src=app.get_asset_url('peloton-logo.png'), id=
    'peloton-image', style={'height': '60px', 'width': 'auto',
    'margin-bottom': '25px'}), href='/panels/main')], className=
    'one-third column'), html.Div([html.Div([html.H3(
    f"{os.environ.get('PELOTON_DISPLAY_NAME')}'s Peloton Performance",
    style={'margin-bottom': '0px', 'text-align': 'center'})])], className=
    'one-half column', id='title'), html.Div([html.A(html.Button('Main', id
    ='main-panel'), href='/panels/main'), html.A(html.Button('Workouts', id
    ='workout-panel'), href='/panels/workouts'), html.A(html.Button('FTP',
    id='ftp-panel'), href='/panels/ftp')], className='one-third column', id
    ='panels', style={'text-align': 'right'})], id='header', className=
    'row flex-display', style={'margin-bottom': '25px'}), html.Div(id=
    'page-content')])


@app.callback([Output('page-content', 'children')], [Input('url', 'pathname')])
def display_page(pathname):
    if pathname == '/panels/workouts':
        return workouts.layout
    elif pathname == '/panels/ftp':
        return ftp.layout
    else:
        return main.layout


if __name__ == '__main__':
    app.run_server(debug=False)

import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from app import app
from panels import main, workouts, ftp
import os
app.layout = html.Div([dcc.Location(id='url', refresh=False), dcc.Store(id=
    'main-session-filters', storage_type='session'), dcc.Store(id=
    'workouts-session-filters', storage_type='session'), html.Div([html.Div
    ([html.A(html.Img(src=app.get_asset_url('peloton-logo.png'), id=
    'peloton-image', style={'height': '60px', 'width': 'auto',
    'margin-bottom': '25px'}), href='/panels/main')], className=
    'one-third column'), html.Div([html.Div([html.H3(
    f"{os.environ.get('PELOTON_DISPLAY_NAME')}'s Peloton Performance",
    style={'margin-bottom': '0px', 'text-align': 'center'})])], className=
    'one-half column', id='title'), html.Div([html.A(html.Button('Main', id
    ='main-panel'), href='/panels/main'), html.A(html.Button('Workouts', id
    ='workout-panel'), href='/panels/workouts'), html.A(html.Button('FTP',
    id='ftp-panel'), href='/panels/ftp')], className='one-third column', id
    ='panels', style={'text-align': 'right'})], id='header', className=
    'row flex-display', style={'margin-bottom': '25px'}), html.Div(id=
    'page-content')])


@app.callback([Output('page-content', 'children')], [Input('url', 'pathname')])
def display_page(pathname):
    if pathname == '/panels/workouts':
        return workouts.layout
    elif pathname == '/panels/ftp':
        return ftp.layout
    else:
        return main.layout


if __name__ == '__main__':
    app.run_server(debug=False)

import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output

from app import app
from panels import main, workouts, ftp

import os

app.layout = html.Div([
    dcc.Location(id='url', refresh=False),
    dcc.Store(id='main-session-filters', storage_type='session'),
    dcc.Store(id='workouts-session-filters', storage_type='session'),
    html.Div(
        [
            html.Div(
                [
                    html.A(
                        html.Img(
                            src=app.get_asset_url("peloton-logo.png"),
                            id="peloton-image",
                            style={
                                "height": "60px",
                                "width": "auto",
                                "margin-bottom": "25px",
                            },
                        ),
                        href="/panels/main"
                    )
                ],
                className="one-third column",
            ),
            html.Div(
                [
                    html.Div(
                        [
                            html.H3(
                                f"{os.environ.get('PELOTON_DISPLAY_NAME')}'s Peloton Performance",
                                style={"margin-bottom": "0px", "text-align": "center"},
                            )
                        ]
                    )
                ],
                className="one-half column",
                id="title",
            ),
            html.Div(
                [
                    html.A(
                        html.Button("Main", id="main-panel"),
                        href="/panels/main",
                    ),
                    html.A(
                        html.Button("Workouts", id="workout-panel"),
                        href="/panels/workouts",
                    ),
                    html.A(
                        html.Button("FTP", id="ftp-panel"),
                        href="/panels/ftp",
                    )
                ],
                className="one-third column",
                id="panels",
                style={'text-align': 'right'}
            )
        ],
        id="header",
        className="row flex-display",
        style={"margin-bottom": "25px"},
    ),
    html.Div(id='page-content'),
])


@app.callback(
    [
        Output("page-content", "children")
    ],
    [Input("url", "pathname")],
)
def display_page(pathname):

    if pathname == "/panels/workouts":
        return workouts.layout
    elif pathname == '/panels/ftp':
        return ftp.layout
    else:
        return main.layout


if __name__ == "__main__":
    app.run_server(debug=False)
