class Page < Lively::Page

Inherits from
Lively::Page

The HTML page shell for a Presently view.

Configures Lively's generic page with Presently's assets and embedded Live view component.

Definitions

def initialize(title: "Presently", body: nil, interface: nil, stylesheets: [])

Initialize a new page.

Signature

parameter title String

The page title.

parameter body Live::View | Nil

The Live view to embed in the page.

parameter interface Symbol | Nil

The interface-specific stylesheets to load, or all interface stylesheets by default for compatibility.

parameter stylesheets Array(String | Hash)

Presentation-specific stylesheets.

Implementation

def initialize(title: "Presently", body: nil, interface: nil, stylesheets: [])
	interface_stylesheets = interface ? INTERFACE_STYLESHEETS.fetch(interface) : DEFAULT_INTERFACE_STYLESHEETS
	
	super(
		title: title,
		body: body,
		icon: ICON,
		stylesheets: STYLESHEETS + interface_stylesheets + TRAILING_STYLESHEETS + stylesheets,
		imports: IMPORTS,
		modules: MODULES,
	)
end