class HomeView < Live::View

Inherits from
Live::View

The home view which links to each presentation interface.

Definitions

def initialize(id, data, controller:)

Initialize the home view.

Signature

parameter id String

The unique element identifier.

parameter data Hash

The element data attributes.

parameter controller PresentationController

The shared presentation controller.

Implementation

def initialize(id, data, controller:)
	super(id, data)
end

def render(builder)

Render links to the available presentation interfaces.

Signature

parameter builder XRB::Builder

The HTML builder.

Implementation

def render(builder)
	builder.tag(:main, class: "home") do
		builder.tag(:div, class: "home-heading") do
			builder.tag(:p, class: "home-kicker"){builder.text("Presently")}
			builder.tag(:h1){builder.text("Presentation interfaces")}
			builder.tag(:p, class: "home-introduction") do
				builder.text("Choose an interface to present, control, record, or review your presentation.")
			end
		end
		
		builder.tag(:nav, class: "home-interfaces", "aria-label": "Presentation interfaces") do
			INTERFACES.each do |interface|
				builder.tag(:a, class: "home-interface", href: interface[:href]) do
					builder.tag(:strong){builder.text(interface[:title])}
					builder.tag(:span){builder.text(interface[:description])}
				end
			end
		end
	end
end