Skip to content

Commit

Permalink
Merge pull request #4780 from ellisonbg/uiexample
Browse files Browse the repository at this point in the history
Updating CSS for UI example.
  • Loading branch information
ellisonbg committed Jan 11, 2014
2 parents 5923544 + 8f5dba8 commit 1642e85
Showing 1 changed file with 37 additions and 13 deletions.
50 changes: 37 additions & 13 deletions examples/notebooks/User Interface.ipynb
Expand Up @@ -163,7 +163,7 @@
"outputs": [
{
"html": [
"<div class=\"hbox\"><div class=\"box-flex0\"><div class=\"quickhelp\"><span class=\"shortcut_key\">esc</span><span class=\"shortcut_descr\"> : command mode</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">ctrl+m</span><span class=\"shortcut_descr\"> : command mode</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">shift+enter</span><span class=\"shortcut_descr\"> : run cell</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">ctrl+enter</span><span class=\"shortcut_descr\"> : run cell, select below</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">alt+enter</span><span class=\"shortcut_descr\"> : run cell, insert below</span></div></div><div class=\"box-flex0\"><div class=\"quickhelp\"><span class=\"shortcut_key\">up</span><span class=\"shortcut_descr\"> : select previous cell</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">down</span><span class=\"shortcut_descr\"> : select next cell</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">alt+-</span><span class=\"shortcut_descr\"> : split cell</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">meta+s</span><span class=\"shortcut_descr\"> : save notebook</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">ctrl+s</span><span class=\"shortcut_descr\"> : save notebook</span></div></div></div>"
"<div class=\"hbox\"><div class=\"box-flex0\"><div class=\"quickhelp\"><span class=\"shortcut_key\">esc</span><span class=\"shortcut_descr\"> : command mode</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">ctrl+m</span><span class=\"shortcut_descr\"> : command mode</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">shift+enter</span><span class=\"shortcut_descr\"> : run cell</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">ctrl+enter</span><span class=\"shortcut_descr\"> : run cell, select below</span></div></div><div class=\"box-flex0\"><div class=\"quickhelp\"><span class=\"shortcut_key\">alt+enter</span><span class=\"shortcut_descr\"> : run cell, insert below</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">alt+-</span><span class=\"shortcut_descr\"> : split cell</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">meta+s</span><span class=\"shortcut_descr\"> : save notebook</span></div><div class=\"quickhelp\"><span class=\"shortcut_key\">ctrl+s</span><span class=\"shortcut_descr\"> : save notebook</span></div></div></div>"
],
"output_type": "display_data"
},
Expand All @@ -176,11 +176,11 @@
"metadata": {},
"output_type": "display_data",
"text": [
"<IPython.core.display.Javascript at 0x10e441250>"
"<IPython.core.display.Javascript at 0x10e8d1a50>"
]
}
],
"prompt_number": 14
"prompt_number": 17
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -223,11 +223,11 @@
"metadata": {},
"output_type": "display_data",
"text": [
"<IPython.core.display.Javascript at 0x10e441410>"
"<IPython.core.display.Javascript at 0x10e8d1650>"
]
}
],
"prompt_number": 15
"prompt_number": 18
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -281,7 +281,7 @@
"\n",
"IPython.keyboard_manager.command_shortcuts.add_shortcut('r', {\n",
" help : 'run cell',\n",
" help_index : 'aa',\n",
" help_index : 'zz',\n",
" handler : function (event) {\n",
" IPython.notebook.execute_cell();\n",
" return false;\n",
Expand All @@ -291,11 +291,11 @@
"metadata": {},
"output_type": "display_data",
"text": [
"<IPython.core.display.Javascript at 0x1019ba990>"
"<IPython.core.display.Javascript at 0x10e8d1890>"
]
}
],
"prompt_number": 6
"prompt_number": 7
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -365,7 +365,7 @@
"metadata": {},
"output_type": "display_data",
"text": [
"<IPython.core.display.Javascript at 0x1019ba950>"
"<IPython.core.display.Javascript at 0x10e8d1950>"
]
}
],
Expand Down Expand Up @@ -397,7 +397,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
"from IPython.display import Javascript, display\n",
"from IPython.display import Javascript, display, HTML\n",
"\n",
"t = \"\"\"var help = IPython.quick_help.build_{0}_help();\n",
"help.children().first().remove();\n",
Expand All @@ -407,12 +407,36 @@
" display(Javascript(t.format('command')))\n",
"\n",
"def display_edit_shortcuts():\n",
" display(Javascript(t.format('edit'))) "
" display(Javascript(t.format('edit')))\n",
"\n",
"display(HTML(\"\"\"\n",
"<style>\n",
".shortcut_key {display: inline-block; width: 15ex; text-align: right; font-family: monospace;}\n",
".shortcut_descr {display: inline-block;}\n",
"div.quickhelp {float: none; width: 100%;}\n",
"</style>\n",
"\"\"\"))"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
"outputs": [
{
"html": [
"\n",
"<style>\n",
".shortcut_key {display: inline-block; width: 15ex; text-align: right; font-family: monospace;}\n",
".shortcut_descr {display: inline-block;}\n",
"div.quickhelp {float: none; width: 100%;}\n",
"</style>\n"
],
"metadata": {},
"output_type": "display_data",
"text": [
"<IPython.core.display.HTML at 0x10e8b0710>"
]
}
],
"prompt_number": 16
}
],
"metadata": {}
Expand Down

0 comments on commit 1642e85

Please sign in to comment.