Update app.py
Browse files
app.py
CHANGED
@@ -1,469 +1,201 @@
|
|
1 |
-
import marimo
|
2 |
-
|
3 |
-
__generated_with = "0.9.2"
|
4 |
-
app = marimo.App()
|
5 |
-
|
6 |
-
|
7 |
-
@app.cell
|
8 |
-
def __():
|
9 |
-
import marimo as mo
|
10 |
-
|
11 |
-
mo.md("# Welcome to marimo! ππ")
|
12 |
-
return (mo,)
|
13 |
-
|
14 |
-
|
15 |
-
@app.cell
|
16 |
-
def __(mo):
|
17 |
-
slider = mo.ui.slider(1, 22)
|
18 |
-
return (slider,)
|
19 |
-
|
20 |
-
|
21 |
-
@app.cell
|
22 |
-
def __(mo, slider):
|
23 |
-
mo.md(
|
24 |
-
f"""
|
25 |
-
marimo is a **reactive** Python notebook.
|
26 |
-
|
27 |
-
This means that unlike traditional notebooks, marimo notebooks **run
|
28 |
-
automatically** when you modify them or
|
29 |
-
interact with UI elements, like this slider: {slider}.
|
30 |
-
|
31 |
-
{"##" + "π" * slider.value}
|
32 |
-
"""
|
33 |
-
)
|
34 |
-
return
|
35 |
-
|
36 |
-
|
37 |
-
@app.cell(hide_code=True)
|
38 |
-
def __(mo):
|
39 |
-
mo.accordion(
|
40 |
-
{
|
41 |
-
"Tip: disabling automatic execution": mo.md(
|
42 |
-
rf"""
|
43 |
-
marimo lets you disable automatic execution: just go into the
|
44 |
-
notebook settings and set
|
45 |
-
|
46 |
-
"Runtime > On Cell Change" to "lazy".
|
47 |
-
|
48 |
-
When the runtime is lazy, after running a cell, marimo marks its
|
49 |
-
descendants as stale instead of automatically running them. The
|
50 |
-
lazy runtime puts you in control over when cells are run, while
|
51 |
-
still giving guarantees about the notebook state.
|
52 |
-
"""
|
53 |
-
)
|
54 |
-
}
|
55 |
-
)
|
56 |
-
return
|
57 |
-
|
58 |
-
|
59 |
-
@app.cell(hide_code=True)
|
60 |
-
def __(mo):
|
61 |
-
mo.md(
|
62 |
-
"""
|
63 |
-
Tip: This is a tutorial notebook. You can create your own notebooks
|
64 |
-
by entering `marimo edit` at the command line.
|
65 |
-
"""
|
66 |
-
).callout()
|
67 |
-
return
|
68 |
-
|
69 |
-
|
70 |
-
@app.cell(hide_code=True)
|
71 |
-
def __(mo):
|
72 |
-
mo.md(
|
73 |
-
"""
|
74 |
-
## 1. Reactive execution
|
75 |
|
76 |
-
A marimo notebook is made up of small blocks of Python code called
|
77 |
-
cells.
|
78 |
|
79 |
-
|
80 |
-
a cell that defines a global variable is run, marimo
|
81 |
-
**automatically runs** all cells that reference that variable.
|
82 |
-
|
83 |
-
Reactivity keeps your program state and outputs in sync with your code,
|
84 |
-
making for a dynamic programming environment that prevents bugs before they
|
85 |
-
happen.
|
86 |
-
"""
|
87 |
-
)
|
88 |
-
return
|
89 |
-
|
90 |
-
|
91 |
-
@app.cell(hide_code=True)
|
92 |
-
def __(changed, mo):
|
93 |
-
(
|
94 |
-
mo.md(
|
95 |
-
f"""
|
96 |
-
**β¨ Nice!** The value of `changed` is now {changed}.
|
97 |
-
|
98 |
-
When you updated the value of the variable `changed`, marimo
|
99 |
-
**reacted** by running this cell automatically, because this cell
|
100 |
-
references the global variable `changed`.
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
enables marimo notebooks to double as tools and apps.
|
105 |
-
"""
|
106 |
-
)
|
107 |
-
if changed
|
108 |
-
else mo.md(
|
109 |
-
"""
|
110 |
-
**π See it in action.** In the next cell, change the value of the
|
111 |
-
variable `changed` to `True`, then click the run button.
|
112 |
-
"""
|
113 |
-
)
|
114 |
-
)
|
115 |
-
return
|
116 |
|
117 |
|
118 |
@app.cell
|
119 |
-
def
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
def __(mo):
|
171 |
-
mo.accordion(
|
172 |
-
{
|
173 |
-
"Tip: private variables": (
|
174 |
-
"""
|
175 |
-
Variables prefixed with an underscore are "private" to a cell, so
|
176 |
-
they can be defined by multiple cells.
|
177 |
-
"""
|
178 |
-
)
|
179 |
-
}
|
180 |
-
)
|
181 |
-
return
|
182 |
-
|
183 |
-
|
184 |
-
@app.cell(hide_code=True)
|
185 |
-
def __(mo):
|
186 |
-
mo.md(
|
187 |
-
"""
|
188 |
-
## 2. UI elements
|
189 |
-
|
190 |
-
Cells can output interactive UI elements. Interacting with a UI
|
191 |
-
element **automatically triggers notebook execution**: when
|
192 |
-
you interact with a UI element, its value is sent back to Python, and
|
193 |
-
every cell that references that element is re-run.
|
194 |
-
|
195 |
-
marimo provides a library of UI elements to choose from under
|
196 |
-
`marimo.ui`.
|
197 |
-
"""
|
198 |
-
)
|
199 |
return
|
200 |
|
201 |
|
202 |
@app.cell
|
203 |
-
def
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
return
|
206 |
|
207 |
|
208 |
@app.cell
|
209 |
-
def
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
return
|
224 |
|
225 |
|
226 |
@app.cell
|
227 |
-
def
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
@app.cell(hide_code=True)
|
256 |
-
def __(mo):
|
257 |
-
mo.md(
|
258 |
-
"""
|
259 |
-
## 4. Running notebooks as apps
|
260 |
-
|
261 |
-
marimo notebooks can double as apps. Click the app window icon in the
|
262 |
-
bottom-right to see this notebook in "app view."
|
263 |
-
|
264 |
-
Serve a notebook as an app with `marimo run` at the command-line.
|
265 |
-
Of course, you can use marimo just to level-up your
|
266 |
-
notebooking, without ever making apps.
|
267 |
-
"""
|
268 |
-
)
|
269 |
-
return
|
270 |
-
|
271 |
-
|
272 |
-
@app.cell(hide_code=True)
|
273 |
-
def __(mo):
|
274 |
-
mo.md(
|
275 |
-
"""
|
276 |
-
## 5. The `marimo` command-line tool
|
277 |
-
|
278 |
-
**Creating and editing notebooks.** Use
|
279 |
-
|
280 |
-
```
|
281 |
-
marimo edit
|
282 |
-
```
|
283 |
-
|
284 |
-
in a terminal to start the marimo notebook server. From here
|
285 |
-
you can create a new notebook or edit existing ones.
|
286 |
-
|
287 |
-
|
288 |
-
**Running as apps.** Use
|
289 |
-
|
290 |
-
```
|
291 |
-
marimo run notebook.py
|
292 |
-
```
|
293 |
-
|
294 |
-
to start a webserver that serves your notebook as an app in read-only mode,
|
295 |
-
with code cells hidden.
|
296 |
-
|
297 |
-
**Convert a Jupyter notebook.** Convert a Jupyter notebook to a marimo
|
298 |
-
notebook using `marimo convert`:
|
299 |
-
|
300 |
-
```
|
301 |
-
marimo convert your_notebook.ipynb > your_app.py
|
302 |
-
```
|
303 |
-
|
304 |
-
**Tutorials.** marimo comes packaged with tutorials:
|
305 |
-
|
306 |
-
- `dataflow`: more on marimo's automatic execution
|
307 |
-
- `ui`: how to use UI elements
|
308 |
-
- `markdown`: how to write markdown, with interpolated values and
|
309 |
-
LaTeX
|
310 |
-
- `plots`: how plotting works in marimo
|
311 |
-
- `sql`: how to use SQL
|
312 |
-
- `layout`: layout elements in marimo
|
313 |
-
- `fileformat`: how marimo's file format works
|
314 |
-
- `markdown-format`: for using `.md` files in marimo
|
315 |
-
- `for-jupyter-users`: if you are coming from Jupyter
|
316 |
-
|
317 |
-
Start a tutorial with `marimo tutorial`; for example,
|
318 |
-
|
319 |
-
```
|
320 |
-
marimo tutorial dataflow
|
321 |
-
```
|
322 |
-
|
323 |
-
In addition to tutorials, we have examples in our
|
324 |
-
[our GitHub repo](https://www.github.com/marimo-team/marimo/tree/main/examples).
|
325 |
-
"""
|
326 |
-
)
|
327 |
-
return
|
328 |
-
|
329 |
-
|
330 |
-
@app.cell(hide_code=True)
|
331 |
-
def __(mo):
|
332 |
-
mo.md(
|
333 |
-
"""
|
334 |
-
## 6. The marimo editor
|
335 |
-
|
336 |
-
Here are some tips to help you get started with the marimo editor.
|
337 |
-
"""
|
338 |
-
)
|
339 |
return
|
340 |
|
341 |
|
342 |
@app.cell
|
343 |
-
def
|
344 |
-
mo
|
345 |
-
return
|
346 |
-
|
347 |
-
|
348 |
-
@app.cell(hide_code=True)
|
349 |
-
def __(mo):
|
350 |
-
mo.md("""## Finally, a fun fact""")
|
351 |
-
return
|
352 |
-
|
353 |
-
|
354 |
-
@app.cell(hide_code=True)
|
355 |
-
def __(mo):
|
356 |
-
mo.md(
|
357 |
-
"""
|
358 |
-
The name "marimo" is a reference to a type of algae that, under
|
359 |
-
the right conditions, clumps together to form a small sphere
|
360 |
-
called a "marimo moss ball". Made of just strands of algae, these
|
361 |
-
beloved assemblages are greater than the sum of their parts.
|
362 |
-
"""
|
363 |
-
)
|
364 |
-
return
|
365 |
-
|
366 |
-
|
367 |
-
@app.cell(hide_code=True)
|
368 |
-
def __():
|
369 |
-
tips = {
|
370 |
-
"Saving": (
|
371 |
-
"""
|
372 |
-
**Saving**
|
373 |
-
|
374 |
-
- _Name_ your app using the box at the top of the screen, or
|
375 |
-
with `Ctrl/Cmd+s`. You can also create a named app at the
|
376 |
-
command line, e.g., `marimo edit app_name.py`.
|
377 |
-
|
378 |
-
- _Save_ by clicking the save icon on the bottom right, or by
|
379 |
-
inputting `Ctrl/Cmd+s`. By default marimo is configured
|
380 |
-
to autosave.
|
381 |
-
"""
|
382 |
-
),
|
383 |
-
"Running": (
|
384 |
-
"""
|
385 |
-
1. _Run a cell_ by clicking the play ( β· ) button on the top
|
386 |
-
right of a cell, or by inputting `Ctrl/Cmd+Enter`.
|
387 |
-
|
388 |
-
2. _Run a stale cell_ by clicking the yellow run button on the
|
389 |
-
right of the cell, or by inputting `Ctrl/Cmd+Enter`. A cell is
|
390 |
-
stale when its code has been modified but not run.
|
391 |
-
|
392 |
-
3. _Run all stale cells_ by clicking the play ( β· ) button on
|
393 |
-
the bottom right of the screen, or input `Ctrl/Cmd+Shift+r`.
|
394 |
-
"""
|
395 |
-
),
|
396 |
-
"Console Output": (
|
397 |
-
"""
|
398 |
-
Console output (e.g., `print()` statements) is shown below a
|
399 |
-
cell.
|
400 |
-
"""
|
401 |
-
),
|
402 |
-
"Creating, Moving, and Deleting Cells": (
|
403 |
-
"""
|
404 |
-
1. _Create_ a new cell above or below a given one by clicking
|
405 |
-
the plus button to the left of the cell, which appears on
|
406 |
-
mouse hover.
|
407 |
-
|
408 |
-
2. _Move_ a cell up or down by dragging on the handle to the
|
409 |
-
right of the cell, which appears on mouse hover.
|
410 |
-
|
411 |
-
3. _Delete_ a cell by clicking the trash bin icon. Bring it
|
412 |
-
back by clicking the undo button on the bottom right of the
|
413 |
-
screen, or with `Ctrl/Cmd+Shift+z`.
|
414 |
-
"""
|
415 |
-
),
|
416 |
-
"Disabling Automatic Execution": (
|
417 |
-
"""
|
418 |
-
Via the notebook settings (gear icon) or footer panel, you
|
419 |
-
can disable automatic execution. This is helpful when
|
420 |
-
working with expensive notebooks or notebooks that have
|
421 |
-
side-effects like database transactions.
|
422 |
-
"""
|
423 |
-
),
|
424 |
-
"Disabling Cells": (
|
425 |
-
"""
|
426 |
-
You can disable a cell via the cell context menu.
|
427 |
-
marimo will never run a disabled cell or any cells that depend on it.
|
428 |
-
This can help prevent accidental execution of expensive computations
|
429 |
-
when editing a notebook.
|
430 |
-
"""
|
431 |
-
),
|
432 |
-
"Code Folding": (
|
433 |
-
"""
|
434 |
-
You can collapse or fold the code in a cell by clicking the arrow
|
435 |
-
icons in the line number column to the left, or by using keyboard
|
436 |
-
shortcuts.
|
437 |
-
|
438 |
-
Use the command palette (`Ctrl/Cmd+k`) or a keyboard shortcut to
|
439 |
-
quickly fold or unfold all cells.
|
440 |
-
"""
|
441 |
-
),
|
442 |
-
"Code Formatting": (
|
443 |
-
"""
|
444 |
-
If you have [ruff](https://github.com/astral-sh/ruff) installed,
|
445 |
-
you can format a cell with the keyboard shortcut `Ctrl/Cmd+b`.
|
446 |
-
"""
|
447 |
-
),
|
448 |
-
"Command Palette": (
|
449 |
-
"""
|
450 |
-
Use `Ctrl/Cmd+k` to open the command palette.
|
451 |
-
"""
|
452 |
-
),
|
453 |
-
"Keyboard Shortcuts": (
|
454 |
-
"""
|
455 |
-
Open the notebook menu (top-right) or input `Ctrl/Cmd+Shift+h` to
|
456 |
-
view a list of all keyboard shortcuts.
|
457 |
-
"""
|
458 |
-
),
|
459 |
-
"Configuration": (
|
460 |
-
"""
|
461 |
-
Configure the editor by clicking the gears icon near the top-right
|
462 |
-
of the screen.
|
463 |
-
"""
|
464 |
-
),
|
465 |
-
}
|
466 |
-
return (tips,)
|
467 |
|
468 |
|
469 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
2 |
|
3 |
+
import marimo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
+
__generated_with = "0.13.1-dev16"
|
6 |
+
app = marimo.App(layout_file="layouts/notebook.slides.json")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
|
9 |
@app.cell
|
10 |
+
def _(mo):
|
11 |
+
# Page 3 Content
|
12 |
+
mo.Html("""
|
13 |
+
<!-- Page 3 -->
|
14 |
+
<div id="page3" class="page">
|
15 |
+
<h2>Bonus: Team Mascots!</h2>
|
16 |
+
<p>...and we discovered our legal partners appreciate cute companions too!</p>
|
17 |
+
<div class="cat-gallery">
|
18 |
+
<svg viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
|
19 |
+
<title>Teal Accented Sitting Cat</title>
|
20 |
+
<path d="M 10 45 C 5 30, 15 15, 25 15 C 35 15, 45 30, 40 45 Z" fill="#e0e0e0" stroke="#aaaaaa" stroke-width="0.5"/>
|
21 |
+
<circle cx="25" cy="18" r="10" fill="#e0e0e0" stroke="#aaaaaa" stroke-width="0.5"/>
|
22 |
+
<path d="M 18 12 L 15 8 L 22 10 Z" fill="#e0e0e0" stroke="#aaaaaa" stroke-width="0.5"/>
|
23 |
+
<path d="M 32 12 L 35 8 L 28 10 Z" fill="#e0e0e0" stroke="#aaaaaa" stroke-width="0.5"/>
|
24 |
+
<circle cx="22" cy="18" r="1.2" fill="#00A87E"/>
|
25 |
+
<circle cx="28" cy="18" r="1.2" fill="#00A87E"/>
|
26 |
+
<path d="M 24 21 L 26 21 L 25 22 Z" fill="#6c757d"/>
|
27 |
+
<path d="M 40 40 Q 50 35, 45 25" stroke="#aaaaaa" stroke-width="2" fill="none" stroke-linecap="round"/>
|
28 |
+
</svg>
|
29 |
+
<svg viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
|
30 |
+
<title>Grey Lounging Cat</title>
|
31 |
+
<path d="M 5 40 C 15 30, 35 30, 45 40 C 40 45, 10 45, 5 40 Z" fill="#d3d3d3" stroke="#a9a9a9" stroke-width="0.5"/>
|
32 |
+
<circle cx="15" cy="30" r="8" fill="#d3d3d3" stroke="#a9a9a9" stroke-width="0.5"/>
|
33 |
+
<path d="M 10 25 L 7 22 L 13 24 Z" fill="#d3d3d3" stroke="#a9a9a9" stroke-width="0.5"/>
|
34 |
+
<path d="M 20 25 L 23 22 L 17 24 Z" fill="#d3d3d3" stroke="#a9a9a9" stroke-width="0.5"/>
|
35 |
+
<path d="M 12 30 Q 14 28, 16 30" stroke="#606060" stroke-width="0.5" fill="none"/>
|
36 |
+
<path d="M 18 30 Q 20 28, 22 30" stroke="#606060" stroke-width="0.5" fill="none"/>
|
37 |
+
<path d="M 45 40 Q 50 38, 48 30" stroke="#a9a9a9" stroke-width="2" fill="none" stroke-linecap="round"/>
|
38 |
+
</svg>
|
39 |
+
<svg viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
|
40 |
+
<title>Black and White Cat Face</title>
|
41 |
+
<circle cx="25" cy="25" r="15" fill="#ffffff" stroke="#cccccc" stroke-width="0.5"/>
|
42 |
+
<path d="M 20 10 Q 25 20, 30 10 C 28 5, 22 5, 20 10 Z" fill="#444444"/>
|
43 |
+
<path d="M 32 20 a 5 5 0 1 1 -10 0 a 5 5 0 1 1 10 0" fill="#444444"/>
|
44 |
+
<path d="M 15 15 L 10 10 L 20 13 Z" fill="#444444"/>
|
45 |
+
<path d="M 35 15 L 40 10 L 30 13 Z" fill="#ffffff" stroke="#cccccc" stroke-width="0.5"/>
|
46 |
+
<circle cx="20" cy="25" r="1.5" fill="#333333"/>
|
47 |
+
<circle cx="30" cy="25" r="1.5" fill="#333333"/>
|
48 |
+
<path d="M 24 29 L 26 29 L 25 30 Z" fill="#aaaaaa"/>
|
49 |
+
<path d="M 25 30 Q 23 32, 21 31" stroke="#666666" stroke-width="0.5" fill="none" stroke-linecap="round"/>
|
50 |
+
<path d="M 25 30 Q 27 32, 29 31" stroke="#666666" stroke-width="0.5" fill="none" stroke-linecap="round"/>
|
51 |
+
<path d="M 18 27 L 10 26" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
52 |
+
<path d="M 18 29 L 10 30" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
53 |
+
<path d="M 18 31 L 10 34" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
54 |
+
<path d="M 32 27 L 40 26" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
55 |
+
<path d="M 32 29 L 40 30" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
56 |
+
<path d="M 32 31 L 40 34" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
57 |
+
</svg>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
return
|
62 |
|
63 |
|
64 |
@app.cell
|
65 |
+
def _(mo):
|
66 |
+
# Page 2 Content
|
67 |
+
mo.Html("""
|
68 |
+
<!-- Page 2 -->
|
69 |
+
<div id="page2" class="page">
|
70 |
+
<h2>A t:able Conversation!</h2>
|
71 |
+
<p>But actually talking with them sparked creativity and opened doors to solutions!</p>
|
72 |
+
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
73 |
+
<title>Idea Lightbulb</title>
|
74 |
+
<path d="M 50 10 C 30 10, 25 30, 25 50 C 25 70, 35 80, 40 85 L 60 85 C 65 80, 75 70, 75 50 C 75 30, 70 10, 50 10 Z" fill="#e6f7f3" stroke="#b2e0d4" stroke-width="1.5"/>
|
75 |
+
<path d="M 45 65 C 40 70, 60 70, 55 65 L 50 80" stroke="#6c757d" stroke-width="1" fill="none"/>
|
76 |
+
<rect x="40" y="84" width="20" height="5" fill="#cccccc" stroke="#a9a9a9" stroke-width="0.5"/>
|
77 |
+
<rect x="42" y="89" width="16" height="3" fill="#cccccc" stroke="#a9a9a9" stroke-width="0.5"/>
|
78 |
+
<rect x="44" y="92" width="12" height="3" fill="#cccccc" stroke="#a9a9a9" stroke-width="0.5"/>
|
79 |
+
<path d="M 60 20 L 65 25" stroke="#ffd700" stroke-width="2.5" stroke-linecap="round"/>
|
80 |
+
<path d="M 70 35 L 75 40" stroke="#ffd700" stroke-width="2.5" stroke-linecap="round"/>
|
81 |
+
<path d="M 70 55 L 75 60" stroke="#ffd700" stroke-width="2.5" stroke-linecap="round"/>
|
82 |
+
</svg>
|
83 |
+
</div>
|
84 |
+
""")
|
85 |
return
|
86 |
|
87 |
|
88 |
@app.cell
|
89 |
+
def _(mo):
|
90 |
+
# Page 3 and 4 Content
|
91 |
+
mo.Html("""
|
92 |
+
<!-- Page 3 -->
|
93 |
+
<div id="page3" class="page">
|
94 |
+
<h2>Bonus: Team Mascots!</h2>
|
95 |
+
<p>...and we discovered our legal partners appreciate cute companions too!</p>
|
96 |
+
<div class="cat-gallery">
|
97 |
+
<svg viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
|
98 |
+
<title>Teal Accented Sitting Cat</title>
|
99 |
+
<path d="M 10 45 C 5 30, 15 15, 25 15 C 35 15, 45 30, 40 45 Z" fill="#e0e0e0" stroke="#aaaaaa" stroke-width="0.5"/>
|
100 |
+
<circle cx="25" cy="18" r="10" fill="#e0e0e0" stroke="#aaaaaa" stroke-width="0.5"/>
|
101 |
+
<path d="M 18 12 L 15 8 L 22 10 Z" fill="#e0e0e0" stroke="#aaaaaa" stroke-width="0.5"/>
|
102 |
+
<path d="M 32 12 L 35 8 L 28 10 Z" fill="#e0e0e0" stroke="#aaaaaa" stroke-width="0.5"/>
|
103 |
+
<circle cx="22" cy="18" r="1.2" fill="#00A87E"/>
|
104 |
+
<circle cx="28" cy="18" r="1.2" fill="#00A87E"/>
|
105 |
+
<path d="M 24 21 L 26 21 L 25 22 Z" fill="#6c757d"/>
|
106 |
+
<path d="M 40 40 Q 50 35, 45 25" stroke="#aaaaaa" stroke-width="2" fill="none" stroke-linecap="round"/>
|
107 |
+
</svg>
|
108 |
+
<svg viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
|
109 |
+
<title>Grey Lounging Cat</title>
|
110 |
+
<path d="M 5 40 C 15 30, 35 30, 45 40 C 40 45, 10 45, 5 40 Z" fill="#d3d3d3" stroke="#a9a9a9" stroke-width="0.5"/>
|
111 |
+
<circle cx="15" cy="30" r="8" fill="#d3d3d3" stroke="#a9a9a9" stroke-width="0.5"/>
|
112 |
+
<path d="M 10 25 L 7 22 L 13 24 Z" fill="#d3d3d3" stroke="#a9a9a9" stroke-width="0.5"/>
|
113 |
+
<path d="M 20 25 L 23 22 L 17 24 Z" fill="#d3d3d3" stroke="#a9a9a9" stroke-width="0.5"/>
|
114 |
+
<path d="M 12 30 Q 14 28, 16 30" stroke="#606060" stroke-width="0.5" fill="none"/>
|
115 |
+
<path d="M 18 30 Q 20 28, 22 30" stroke="#606060" stroke-width="0.5" fill="none"/>
|
116 |
+
<path d="M 45 40 Q 50 38, 48 30" stroke="#a9a9a9" stroke-width="2" fill="none" stroke-linecap="round"/>
|
117 |
+
</svg>
|
118 |
+
<svg viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
|
119 |
+
<title>Black and White Cat Face</title>
|
120 |
+
<circle cx="25" cy="25" r="15" fill="#ffffff" stroke="#cccccc" stroke-width="0.5"/>
|
121 |
+
<path d="M 20 10 Q 25 20, 30 10 C 28 5, 22 5, 20 10 Z" fill="#444444"/>
|
122 |
+
<path d="M 32 20 a 5 5 0 1 1 -10 0 a 5 5 0 1 1 10 0" fill="#444444"/>
|
123 |
+
<path d="M 15 15 L 10 10 L 20 13 Z" fill="#444444"/>
|
124 |
+
<path d="M 35 15 L 40 10 L 30 13 Z" fill="#ffffff" stroke="#cccccc" stroke-width="0.5"/>
|
125 |
+
<circle cx="20" cy="25" r="1.5" fill="#333333"/>
|
126 |
+
<circle cx="30" cy="25" r="1.5" fill="#333333"/>
|
127 |
+
<path d="M 24 29 L 26 29 L 25 30 Z" fill="#aaaaaa"/>
|
128 |
+
<path d="M 25 30 Q 23 32, 21 31" stroke="#666666" stroke-width="0.5" fill="none" stroke-linecap="round"/>
|
129 |
+
<path d="M 25 30 Q 27 32, 29 31" stroke="#666666" stroke-width="0.5" fill="none" stroke-linecap="round"/>
|
130 |
+
<path d="M 18 27 L 10 26" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
131 |
+
<path d="M 18 29 L 10 30" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
132 |
+
<path d="M 18 31 L 10 34" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
133 |
+
<path d="M 32 27 L 40 26" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
134 |
+
<path d="M 32 29 L 40 30" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
135 |
+
<path d="M 32 31 L 40 34" stroke="#bbbbbb" stroke-width="0.3" fill="none"/>
|
136 |
+
</svg>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
<!-- Page 4: Conclusion -->
|
140 |
+
<div id="page4" class="page">
|
141 |
+
<h2>Collaboration Wins!</h2>
|
142 |
+
<p>Working together transforms challenges into opportunities. Legal can be a great partner!</p>
|
143 |
+
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
144 |
+
<title>Handshake</title>
|
145 |
+
<path d="M 10 50 Q 20 40, 35 45 L 45 50 Q 55 55, 50 65 L 30 75 Q 15 70, 10 60 Z" fill="#f5e0c4" stroke="#6c757d" stroke-width="1"/>
|
146 |
+
<path d="M 35 45 Q 45 35, 55 45" fill="#f5e0c4" stroke="#6c757d" stroke-width="1"/>
|
147 |
+
<path d="M 90 50 Q 80 40, 65 45 L 55 50 Q 45 55, 50 65 L 70 75 Q 85 70, 90 60 Z" fill="#d1bea8" stroke="#5a4d41" stroke-width="1"/>
|
148 |
+
<path d="M 65 45 Q 55 35, 45 45" fill="#d1bea8" stroke="#5a4d41" stroke-width="1"/>
|
149 |
+
<rect x="5" y="60" width="10" height="15" fill="#e0e0e0" rx="2"/>
|
150 |
+
<rect x="85" y="60" width="10" height="15" fill="#f0f0f0" rx="2"/>
|
151 |
+
</svg>
|
152 |
+
</div>
|
153 |
+
<!-- Navigation Buttons -->
|
154 |
+
<div class="navigation">
|
155 |
+
<button id="prevBtn" disabled>Previous</button>
|
156 |
+
<button id="nextBtn">Next</button>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</body>
|
160 |
+
</html>
|
161 |
+
""")
|
162 |
return
|
163 |
|
164 |
|
165 |
@app.cell
|
166 |
+
def _(mo):
|
167 |
+
# Page 4: Conclusion
|
168 |
+
mo.Html("""
|
169 |
+
<!-- Page 4: Conclusion -->
|
170 |
+
<div id="page4" class="page">
|
171 |
+
<h2>Collaboration Wins!</h2>
|
172 |
+
<p>Working together transforms challenges into opportunities. Legal can be a great partner!</p>
|
173 |
+
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
174 |
+
<title>Handshake</title>
|
175 |
+
<path d="M 10 50 Q 20 40, 35 45 L 45 50 Q 55 55, 50 65 L 30 75 Q 15 70, 10 60 Z" fill="#f5e0c4" stroke="#6c757d" stroke-width="1"/>
|
176 |
+
<path d="M 35 45 Q 45 35, 55 45" fill="#f5e0c4" stroke="#6c757d" stroke-width="1"/>
|
177 |
+
<path d="M 90 50 Q 80 40, 65 45 L 55 50 Q 45 55, 50 65 L 70 75 Q 85 70, 90 60 Z" fill="#d1bea8" stroke="#5a4d41" stroke-width="1"/>
|
178 |
+
<path d="M 65 45 Q 55 35, 45 45" fill="#d1bea8" stroke="#5a4d41" stroke-width="1"/>
|
179 |
+
<rect x="5" y="60" width="10" height="15" fill="#e0e0e0" rx="2"/>
|
180 |
+
<rect x="85" y="60" width="10" height="15" fill="#f0f0f0" rx="2"/>
|
181 |
+
</svg>
|
182 |
+
</div>
|
183 |
+
<!-- Navigation Buttons -->
|
184 |
+
<div class="navigation">
|
185 |
+
<button id="prevBtn" disabled>Previous</button>
|
186 |
+
<button id="nextBtn">Next</button>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
</body>
|
190 |
+
</html>
|
191 |
+
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
return
|
193 |
|
194 |
|
195 |
@app.cell
|
196 |
+
def _():
|
197 |
+
import marimo as mo
|
198 |
+
return (mo,)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
|
201 |
if __name__ == "__main__":
|