framework/front

Types

pub type Area {
  Area(
    name: String,
    flow: css.Flow,
    pin: css.Pin,
    style: List(css.Style),
  )
}

Constructors

pub type Cell {
  Flow
  Span(cols: Int, rows: Int)
  At(col: Int, row: Int, span: CellSpan)
}

Constructors

  • Flow
  • Span(cols: Int, rows: Int)
  • At(col: Int, row: Int, span: CellSpan)
pub type CellSpan {
  CellSpan(cols: Int, rows: Int)
}

Constructors

  • CellSpan(cols: Int, rows: Int)
pub type Frame(service, block) {
  Frame(
    areas: List(Area),
    placements: List(Placement(service, block)),
    cols: List(track.Track),
    rows: List(track.Track),
    template: List(List(String)),
  )
}

Constructors

pub type From {
  Path(String)
  Query(String)
  Session(SessionKey)
  Origin(face: String)
  AuthOrigin
}

Constructors

  • Path(String)
  • Query(String)
  • Session(SessionKey)
  • Origin(face: String)
  • AuthOrigin
pub type Layout(service, block) {
  Layout(
    vars: List(Var),
    sp: Frame(service, block),
    pc: option.Option(Frame(service, block)),
    tablet: option.Option(Frame(service, block)),
  )
}

Constructors

pub type Page(service, block) {
  Page(
    of: option.Option(service),
    layout: Layout(service, block),
    theme: option.Option(String),
    vars: List(Var),
    sp: Frame(service, block),
    pc: option.Option(Frame(service, block)),
    tablet: option.Option(Frame(service, block)),
  )
}

Constructors

pub type Placement(service, block) {
  Fixed(area: String, block: block, cell: Cell)
  Widget(area: String, of: service, render: Render(block))
}

Constructors

  • Fixed(area: String, block: block, cell: Cell)
  • Widget(area: String, of: service, render: Render(block))
pub type Render(block) {
  One(block: block)
  ByKind(by: String, table: List(#(String, block)))
}

Constructors

  • One(block: block)
  • ByKind(by: String, table: List(#(String, block)))
pub type SessionKey {
  SubjectHandle
  SubjectId
}

Constructors

  • SubjectHandle
  • SubjectId
pub type Target(service, attached) {
  Of(service)
  Entry(attached)
}

Constructors

  • Of(service)
  • Entry(attached)
pub type Var {
  Var(name: String, from: From)
}

Constructors

  • Var(name: String, from: From)

Values

pub fn area_flow_css(flow: css.Flow) -> List(String)

Area の flow を、生成される grid の CSS(その Area の規則)に書く宣言にする。 Stack は縦の flex で、中の block は幅いっぱいのまま(align-items: stretch)。 各 variant は並びの向きまで書き切る ── pc・tablet の Frame で別の flow に替えても、 sp の規則の向きが残らない。

pub const default_sp_cols: List(track.Track)
pub const default_wide_cols: List(track.Track)
pub fn resolved_cols(
  frame: Frame(service, block),
  at: css.Breakpoint,
) -> List(track.Track)
pub fn resolved_template(
  sp: Frame(service, block),
  frame: Frame(service, block),
  at: css.Breakpoint,
) -> List(List(String))
✨ Search Document