|
29 | 29 | " if meta: meta = \"{\" + meta + \"}\"\n", |
30 | 30 | " return md + meta\n", |
31 | 31 | "\n", |
32 | | - "def img(fname, style=\"\", height=None, relative=None):\n", |
| 32 | + "def img(fname, style=\"\", height=None, relative=None, link=False):\n", |
33 | 33 | " meta = \"\"\n", |
34 | 34 | " if height:\n", |
35 | 35 | " if meta: meta += \" \"\n", |
|
41 | 41 | " if style:\n", |
42 | 42 | " if meta: meta += \" \"\n", |
43 | 43 | " meta += f'style=\"{style}\"'\n", |
44 | | - " return add_meta(f'', meta)\n", |
| 44 | + " res = f''\n", |
| 45 | + " if link: res = f'[{res}](images/{fname})'\n", |
| 46 | + " return add_meta(res, meta)\n", |
45 | 47 | "\n", |
46 | 48 | "def btn(txt, link):\n", |
47 | 49 | " meta = '.btn-action-primary .btn-action .btn .btn-success .btn-lg role=\"button\"'\n", |
|
70 | 72 | "\n", |
71 | 73 | "[Get started](getting_started.ipynb){.btn-action-primary .btn-action .btn .btn-success .btn-lg role=\"button\"}\n", |
72 | 74 | "\n", |
73 | | - "{style=\"margin-top: 40px; margin-bottom: 40px\"}\n", |
| 75 | + "[](images/card.png){style=\"margin-top: 40px; margin-bottom: 40px\"}\n", |
74 | 76 | "\n", |
75 | 77 | "\n", |
76 | 78 | ":::\n" |
|
92 | 94 | "\n", |
93 | 95 | "{btn('Get started', 'getting_started.ipynb')}\n", |
94 | 96 | "\n", |
95 | | - "{img('card.png', style=\"margin-top: 40px; margin-bottom: 40px\")}\n", |
| 97 | + "{img('card.png', style=\"margin-top: 40px; margin-bottom: 40px\", link=True)}\n", |
96 | 98 | "\"\"\", \".content-block\")" |
97 | 99 | ] |
98 | 100 | }, |
|
361 | 363 | "source": [ |
362 | 364 | "def testm(im, nm, detl, txt):\n", |
363 | 365 | " return f\"\"\"::: {{.testimonial .g-col-12 .g-col-md-6}}\n", |
364 | | - "{img(im)}\n", |
| 366 | + "{img(im, link=True)}\n", |
365 | 367 | "\n", |
366 | 368 | "# {nm}\n", |
367 | 369 | "\n", |
|
398 | 400 | "::: {.content-block .grid .gap-4}\n", |
399 | 401 | "\n", |
400 | 402 | "::: {.testimonial .g-col-12 .g-col-md-6}\n", |
401 | | - "\n", |
| 403 | + "[](images/chris-lattner.png)\n", |
402 | 404 | "\n", |
403 | 405 | "# Chris Lattner\n", |
404 | 406 | "\n", |
|
408 | 410 | ":::\n", |
409 | 411 | "\n", |
410 | 412 | "::: {.testimonial .g-col-12 .g-col-md-6}\n", |
411 | | - "\n", |
| 413 | + "[](images/fernando-pérez.jpeg)\n", |
412 | 414 | "\n", |
413 | 415 | "# Fernando Pérez\n", |
414 | 416 | "\n", |
|
418 | 420 | ":::\n", |
419 | 421 | "\n", |
420 | 422 | "::: {.testimonial .g-col-12 .g-col-md-6}\n", |
421 | | - "\n", |
| 423 | + "[](images/david-berg.jpeg)\n", |
422 | 424 | "\n", |
423 | 425 | "# David Berg\n", |
424 | 426 | "\n", |
|
428 | 430 | ":::\n", |
429 | 431 | "\n", |
430 | 432 | "::: {.testimonial .g-col-12 .g-col-md-6}\n", |
431 | | - "\n", |
| 433 | + "[](images/erik-gaasedelen.jpeg)\n", |
432 | 434 | "\n", |
433 | 435 | "# Erik Gaasedelen\n", |
434 | 436 | "\n", |
|
438 | 440 | ":::\n", |
439 | 441 | "\n", |
440 | 442 | "::: {.testimonial .g-col-12 .g-col-md-6}\n", |
441 | | - "\n", |
| 443 | + "[](images/roxanna-pourzand.jpeg)\n", |
442 | 444 | "\n", |
443 | 445 | "# Roxanna Pourzand\n", |
444 | 446 | "\n", |
|
448 | 450 | ":::\n", |
449 | 451 | "\n", |
450 | 452 | "::: {.testimonial .g-col-12 .g-col-md-6}\n", |
451 | | - "\n", |
| 453 | + "[](images/hugo-bowne-anderson.jpeg)\n", |
452 | 454 | "\n", |
453 | 455 | "# Hugo Bowne-Anderson\n", |
454 | 456 | "\n", |
|
528 | 530 | "Copyright © 2019 onward fast.ai, Inc. All rights reserved.\n", |
529 | 531 | ":::" |
530 | 532 | ] |
531 | | - }, |
532 | | - { |
533 | | - "cell_type": "code", |
534 | | - "execution_count": null, |
535 | | - "metadata": {}, |
536 | | - "outputs": [], |
537 | | - "source": [] |
538 | 533 | } |
539 | 534 | ], |
540 | 535 | "metadata": { |
|
0 commit comments