HSMA logo
HSMA logo
HSMA logo

Title

Subtitle goes here

Dr Dan Chalk, Sammi Rosser

Health Service Modelling Associates Programme

SimPy the Best

HSMA logo
HSMA logo

Section Header Example

Your Content Here

Slide Example

This is a slide with some text on it.

Code Examples

Defining code snippets in the qmd file

import plotly.express as px

px.scatter(x=[1,2,3], y=[2,3,4])

Defining and running code snippets in the qmd file

import plotly.express as px
import plotly.io as pio
pio.renderers.default = "notebook"

px.scatter(x=[1,2,3], y=[2,3,4], height=400)

Including just the output

Importing code snippets from files

print("Never gonna give you up")

Importing and running code snippets

print("Never gonna give you up")
Never gonna give you up

Embedded Streamlit

Layouts

2 col layout example

Here is column 1

Here is column 2

Incremental list reveal

This will be on the screen at the start.

  • Here’s bullet point 1
  • Here’s bullet point 2

Fragments

This will be on the screen at the start.

This won’t appear until you press a button.

Then this will appear when you’re ready.

Simple boxes 1

Value boxes

A simple value box can help convey points, especially when combined with fragments.

Complex icon box layouts with index parameter

Left Column

This appears SECOND (Index 2)

Right Column

This appears FIRST (Index 1)

Other features

Speaker notes

There are some speaker notes on this slide - but you can’t see them unless you’re in speaker view!

No box

Use the {.no-box} syntax next to your slide title to remove the background grey box.

This only works on second level slides - not # level slides.

Simple boxes 2

Value boxes

A simple value box can help convey points, especially when combined with fragments.

Value boxes

Like this!

Icon boxes

And here’s a more advanced type of box with an icon

Big text

And here’s a more advanced type of box with an icon and a value

And one without an icon

Complex icon box layouts with index parameter

Left Column

This appears SECOND (Index 2)

Right Column

This appears FIRST (Index 1)

Fade-in-then-out-lists

You can use the {.focus-list} div to auto fade in and out as you move through a list

  • First important point
  • Second important point (previous one dims!)
  • Third important point

Fade-in-then-out-lists

This works with indented lists too

  • First important point
    • And a sub-point on that matter
  • Second important point (previous one dims!)
    • And a sub-point on that matter
      • … and a really nested point
  • Third important point

Code focus

Using reunings code focus extension, we can highlight different parts of a code example.

answer = "42"
question = "What is the answer to life, the universe, and everything?"
print(f"Question: '{question}'\n Answer: '{answer}'")

When this fragment is shown, the first line of code will have the focus class added to it and it gets highlighted.

Then this line when we move through

Live code example

Custom title slide layout

The title slide (the very first slide of the deck) is generated from the title-slide.html partial and styled by title-slide.scss. It is driven entirely by YAML frontmatter keys — see the top of this file for the values used to build this deck’s title slide:

  • title, subtitle — the module/session text
  • author — as before; the author name is coloured via $hsma-title-author-color
  • tagline — short strapline, coloured via $hsma-title-tagline-color
  • partner-logo / partner-logo-alt — a logo shown on a white plate, top-right

Custom title slide layout (continued)

  • title-image — a small image/GIF (or video:) shown above the title text
  • title-media-a — a single image/video panel, top-left of the slide
  • title-media — a list of image/video panels, bottom-right of the slide

Every key is optional. Leave all of them out and the title slide falls back to the original centred title/author layout.

Each media slot accepts either image: (works for GIFs too) or video: (plus optional poster: and autoplay: true).

Custom Title Slide - Escape hatch

If a deck needs a hand-built title slide instead of the generated one, add data-visibility: hidden to title-slide-attributes to hide the generated slide, then reuse the same styling on a normal slide with the .hsma-title class and the .hsma-ts-* slot classes shown below:

::: {.hsma-title}

::: {.hsma-ts-text}
# My Custom Title
:::

:::