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
titleString The page title.
-
parameter
bodyLive::View | Nil The Live view to embed in the page.
-
parameter
interfaceSymbol | Nil The interface-specific stylesheets to load, or all interface stylesheets by default for compatibility.
-
parameter
stylesheetsArray(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