| Total Complexity | 0 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import dash |
||
| 2 | import dash_core_components as dcc |
||
| 3 | import dash_html_components as html |
||
| 4 | import base64 |
||
| 5 | |||
| 6 | external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] |
||
| 7 | |||
| 8 | app = dash.Dash(__name__, external_stylesheets=external_stylesheets) |
||
| 9 | |||
| 10 | colors = { |
||
| 11 | 'background': '#F8F9F9', |
||
| 12 | 'text': '#000000' |
||
| 13 | } |
||
| 14 | |||
| 15 | image_filename = 'logo.png' # replace with your own image |
||
| 16 | encoded_image = base64.b64encode(open(image_filename, 'rb').read()).decode('ascii') |
||
| 17 | |||
| 18 | app.layout = html.Div(style={'backgroundColor': colors['background']}, children=[ |
||
| 19 | html.H1( |
||
| 20 | children='Voltcycle', |
||
| 21 | style={ |
||
| 22 | 'textAlign': 'center', |
||
| 23 | 'color': colors['text'] |
||
| 24 | } |
||
| 25 | ), |
||
| 26 | |||
| 27 | html.Div([ |
||
| 28 | html.Img(draggable=True, style={ |
||
| 29 | 'height': '20%', |
||
| 30 | 'width': '20%' |
||
| 31 | }, src='data:image/png;base64,{}'.format(encoded_image)) |
||
| 32 | ], style={'textAlign': 'center'}), |
||
| 33 | |||
| 34 | html.Div(children='A tool for analysis of cyclic voltammetry.', style={ |
||
| 35 | 'textAlign': 'center', |
||
| 36 | 'color': colors['text'] |
||
| 37 | }) |
||
| 38 | ]) |
||
| 39 | |||
| 40 | |||
| 41 | |||
| 42 | if __name__ == '__main__': |
||
| 43 | app.run_server(debug=True) |
||
| 44 |