-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
105 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "d173db05-a853-4676-9dc2-683cc7200fe5", | ||
"metadata": {}, | ||
"source": [ | ||
"# Notebook Tour\n", | ||
"\n", | ||
"An `.ipynb` can store one or more Tours in notebook metadata. When populated, the tour can be started from a number of places:\n", | ||
"- the pin icon in the _Notebook Toolbar_\n", | ||
"- the _Help_ menu in the _Main Menu_\n", | ||
"- the _Command Palette_ under _Launch a New Tour_" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "9c27102d-0c16-4a5c-b1e8-8c835db3a8ff", | ||
"metadata": {}, | ||
"source": [ | ||
"## This Notebook's Tour\n", | ||
"\n", | ||
"This tour in this notebook works in both JupyterLab and Jupyter Notebook." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "f0af7aa3-de82-42f2-8502-63f42a4d721c", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import json\n", | ||
"from pathlib import Path\n", | ||
"from IPython.display import JSON, HTML\n", | ||
"\n", | ||
"nb = json.load(Path(\"Notebook Tour.ipynb\").open())\n", | ||
"JSON(nb[\"metadata\"][\"jupyterlab-tour\"], expanded=True)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"jupyterlab-tour": { | ||
"tours": [ | ||
{ | ||
"id": "my-tour", | ||
"label": "My First Tour", | ||
"options": { | ||
"styles": { | ||
"options": { | ||
"backgroundColor": "var(--jp-warn-color0)" | ||
} | ||
} | ||
}, | ||
"steps": [ | ||
{ | ||
"content": "Look at this!", | ||
"target": "#jp-MainLogo, #jp-NotebookLogo" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"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.11.5" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |