module

Sunstone::Docs::B_AUTHORING::Layouts

Semantic Slide Layouts

Executive Summary & Key Topics

Topic Method / Anchor Description
Layout Gallery .topic_01_layout_gallery Overview of layout types and their use cases.
Two-Column Slide Syntax .topic_02_two_column_syntax Example YAML syntax for a two-column code and notes slide.

Class methods

topic_02_two_column_syntax

Two-Column Slide Syntax: Example YAML syntax for a two-column code and notes slide.

id: "channels_example"
layout: "two-column"
badge: "CONCURRENCY"
badge_color: "accent"
palette: "emerald_matrix"
ratio: "3:2"
title: "Buffered Channels"
subtitle: "Non-blocking message passing between fibers"
code_title: "channel.cr"
code_lang: "crystal"
code: |
  ch = Channel(Int32).new(capacity: 10)
  spawn do
    10.times { |i| ch.send(i) }
    ch.close
  end
  while val = ch.receive?
    puts val
  end
cards:
  - title: "Key Principles"
    color: "emerald"
    items:
      - "Channel buffers prevent producer backpressure"
      - "Fibers yield cooperatively upon buffer saturation"
notes: |
  Explain how Crystal channels compare with Go channels.
Source