No description
This repository has been archived on 2026-08-22. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Perl 61.6%
  • CSS 28.5%
  • Raku 9.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Henning Thorsen 9996b29de1 Released version 0.03
* Add local/ to MANIFEST.SKIP
2014-04-13 15:18:00 +02:00
lib/Mojolicious/Plugin Released version 0.03 2014-04-13 15:18:00 +02:00
t Fix t/mounted.t 2014-03-20 21:35:31 +01:00
.gitignore /local to .gitignore 2014-03-13 14:43:37 +01:00
Changes Released version 0.03 2014-04-13 15:18:00 +02:00
Makefile.PL Add dependencies to Makefile.PL 2014-03-13 16:15:56 +01:00
MANIFEST.SKIP Released version 0.03 2014-04-13 15:18:00 +02:00
README Released version 0.03 2014-04-13 15:18:00 +02:00
README.pod Rename to Mojolicious::Plugin::Responsinator 2014-03-11 08:14:30 +01:00

NAME
    Mojolicious::Plugin::Responsinator - Simulate screen sizes

VERSION
    0.03

DESCRIPTION
    This module allow you to embed a given web page inside an iframe to see
    how it would look on different screens.

    This is probably just a module you want to use while developing, and not
    bundle it with the final application. Example usage:

      sub startup {
        my $self = shift;
        $self->plugin("responsinator") if $ENV{ENABLE_RESPONSINATOR};
      }

SYNOPSIS
    You need to enable the plugin in your Mojolicious application:

      use Mojolicious::Lite;
      plugin "responsinator";
      get "/" => sub { shift->render(text => "test\n") };
      app->start;

    Then from the browser, you can ask for an URL with the "_size" param to
    embed a website inside an iframe. Example:

      http://localhost:3000/some/path?_size=iphone          # iphone landscape
      http://localhost:3000/some/path?_size=iphone:portrait # iphone portrait
      http://localhost:3000/some/path?_size=100x400         # width: 100px; height: 400px

PREDEFINED SIZES
    You can replace "iphone" in the example above with any of the predefined
    sizes below:

    *   iphone

    *   iphone-5

    *   ipad

    *   wildfire

    *   nexus-4

METHODS
  register
      $self->reqister($app, \%config);
      $app->plugin(responsinator => \%config);

    Will register an "around_dispatch" hook, which will trigger on the
    "_size" query param. %config can contain:

    *   param

        Use this to specify another query param than the default "_size".

COPYRIGHT
  Images
    The images are provided by the The Responsinator Team,
    <http://www.responsinator.com>.

  Code
    The code is written by Jan Henning Thorsen, <http://thorsen.pm>.

AUTHOR
    Jan Henning Thorsen - "jhthorsen@cpan.org"