NAME
Whatbot::Helper::Bootstrap - Provide a helper shell to render a Bootstrap page.
DESCRIPTION
This module will allow a command to utilize Twitter Bootstrap 3 as the default layout for their web command. There isn't a lot of customization provided, this is just a way to quickly get something running in whatbot. It provides a global menu to hop to other web applications, and can have additional nav options added on deployment.
The majority of the work is handled in Whatbot::Command::Role::BootstrapTemplate. The only available method here is add_application(), which will add your command to the global menu.
SYNOPSIS
package Whatbot::Command::Example;
use Moose;
BEGIN { extends 'Whatbot::Command'; with 'Whatbot::Command::Role::BootstrapTemplate'; }
sub register {
my ($self) = @_;
$self->require_direct(0);
# Add command to global menu
Whatbot::Helper::Bootstrap->add_application( 'Example', '/example' );
# Add an additional menu option, if desired
$self->add_menu_item( Whatbot::Helper::Bootstrap::Link->new({
'title' => 'A fun trick',
'href' => '/example/fun',
}) );
$self->web( '/example', \&example );
$self->web( '/example/fun', \&example_fun );
return;
}
PUBLIC METHODS
LICENSE/COPYRIGHT
Be excellent to each other and party on, dudes.