{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "parameters" ] }, "outputs": [], "source": [ "flex_author = \"built using jupyter-flex\"\n", "flex_source_link = \"https://github.com/danielfrg/jupyter-flex/blob/master/examples/layouts/sidebar-pages.ipynb\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Page 1" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "sidebar" ] }, "source": [ "## Sidebar" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### This is the sidebar of page 1" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "body" ] }, "source": [ "This sidebar only appears of page 1, page 2 doesn't have a sidebar, page 3 has a different one." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Since these are regular Cards we can even have plots here" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import plotly\n", "import plotly.express as px" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df = px.data.iris()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "body" ] }, "outputs": [], "source": [ "fig = px.scatter(df, x=\"sepal_width\", y=\"sepal_length\")\n", "fig.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Content section" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### This is the Page 1 content" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Page 2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### This page doesn't have a sidebar" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Page 3" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "sidebar" ] }, "source": [ "## Sidebar" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "size=800" ] }, "source": [ "### This is a different sidebar just for page 3" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "size=200" ] }, "source": [ "### This is another card" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "body" ] }, "source": [ "A note on the sidebar to show that `size=` tags are supported here too." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Content" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### This is the third page of this dashboard" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "body" ] }, "outputs": [], "source": [ "\"Page 3 code\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "celltoolbar": "Tags", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.6" } }, "nbformat": 4, "nbformat_minor": 4 }