diff --git a/examples/Interactive Widgets/Widget Styling.ipynb b/examples/Interactive Widgets/Widget Styling.ipynb index 14424cb..5dac916 100644 --- a/examples/Interactive Widgets/Widget Styling.ipynb +++ b/examples/Interactive Widgets/Widget Styling.ipynb @@ -17,7 +17,7 @@ "name": "python2" }, "name": "", - "signature": "sha256:aead3efdf2770e2764fcf617c9e9ba6d40343cf25b01642fbd2a3e66de2b0d7c" + "signature": "sha256:f6e8d46c3edeaf2371bf508730c093f8d1005cc9be13072aabf71dc3f49b2c3b" }, "nbformat": 3, "nbformat_minor": 0, @@ -634,131 +634,6 @@ } }, "source": [ - "Style classes" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "In addition to alignment classes, the classes defined by Bootstrap can also be used. This tutorial will only cover a few of the most common classes. For a full list of Bootstrap classes, please refer to [Bootstrap's website](http://getbootstrap.com/2.3.2/)." - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "ButtonWidgets" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# List of the bootstrap button styles\n", - "classes = [\n", - " 'btn', \n", - " 'btn-primary', \n", - " 'btn-info', \n", - " 'btn-success', \n", - " 'btn-warning', \n", - " 'btn-danger', \n", - " 'btn-inverse', \n", - " 'btn-link'\n", - "]\n", - "\n", - "# Display the buttons in a hbox\n", - "container = widgets.HBox(children=[widgets.Button(description=c) for c in classes])\n", - "display(container)\n", - "\n", - "# Apply classes after display\n", - "ret = [container.children[i].add_class(c) for i, c in enumerate(classes)]" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": { - "slideshow": { - "slide_type": "slide" - } - }, - "source": [ - "ContainerWidgets" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "def create_label(cls):\n", - " class_name = widgets.HTML(value=cls)\n", - " container = widgets.Box(children=[class_name])\n", - " display(container)\n", - " container.add_class(cls)\n", - "\n", - "ret = [create_label(c) for c in [\n", - " 'alert', \n", - " 'alert alert-error', \n", - " 'alert alert-success', \n", - " 'alert alert-info'\n", - "]]" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": { - "slideshow": { - "slide_type": "slide" - } - }, - "source": [ - "ProgressWidgets" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "classes = [\n", - " 'progress-info', \n", - " 'progress-success', \n", - " 'progress-warning', \n", - " 'progress-danger',\n", - " 'progress-info progress-striped', \n", - " 'progress-success progress-striped', \n", - " 'progress-warning progress-striped', \n", - " 'progress-danger progress-striped',\n", - " 'active progress-info progress-striped', \n", - " 'active progress-success progress-striped', \n", - " 'active progress-warning progress-striped', \n", - " 'active progress-danger progress-striped',\n", - "]\n", - "ws = [widgets.IntProgress(value=50, description=c) for c in classes]\n", - "ret = [display(w) for w in ws]\n", - "ret = [ws[i].add_class(c) for i, cs in enumerate(classes) for c in cs.split(' ')]" - ], - "language": "python", - "metadata": {}, - "outputs": [] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": { - "slideshow": { - "slide_type": "slide" - } - }, - "source": [ "Visibility" ] },