Mojolicious-Plugin-AssetPack
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/AssetPack/Pipe/Favicon.pm view on Meta::CPAN
$asset->content($markup)->tag_for($renderer);
}
sub _build_design {
my $self = shift;
my $name = ref $self->app;
my $bg_color = '#F5F5F5';
my $theme_color = '#536DFE';
return {
desktop_browser => {},
android_chrome => {
manifest => {display => 'standalone', name => $name, orientation => 'portrait'},
picture_aspect => 'shadow',
theme_color => $theme_color,
},
firefox_app => {
background_color => $bg_color,
circle_inner_margin => '5',
keep_picture_in_circle => 'true',
picture_aspect => 'circle',
lib/Mojolicious/Plugin/AssetPack/Pipe/Favicon.pm view on Meta::CPAN
The above template will expand to whatever HTML that
L<http://realfavicongenerator.net> has generated, based on L</design>. Example:
<link rel="icon" type="image/png" href="/asset/52eaz7613a/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/asset/65428718f1/favicon-32x32.png" sizes="32x32">
<link rel="apple-touch-icon" sizes="114x114" href="/asset/9aab8718f1/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="152x152" href="/asset/feee661542/apple-touch-icon-152x152.png">
<meta name="msapplication-square310x310logo" content="/asset/123ab718f1/largelogo.png">
<meta name="msapplication-wide310x150logo" content="/asset/a827bfddf0/widelogo.png">
By default this pipe will only create desktop icons. Configure L</design> for
more icons.
=head1 DESCRIPTION
L<Mojolicious::Plugin::AssetPack::Pipe::Favicon> uses
L<http://realfavicongenerator.net> to generate all the different favicons that
is required for your site.
This pipe is EXPERIMENTAL. Let me know if you are using it.
lib/Mojolicious/Plugin/AssetPack/Pipe/Favicon.pm view on Meta::CPAN
=head2 api_key
$self = $self->api_key($key);
$str = $self->api_key;
An API key obtained from L<http://realfavicongenerator.net/api/>.
=head2 design
$hash = $self->design;
$self = $self->design({desktop_browser => {}, ios => {}, windows => {}});
Can be used to customize the different designs. Look for "favicon_design" on
L<http://realfavicongenerator.net/api/non_interactive_api> for details.
=head2 settings
$hash = $self->settings;
$self = $self->settings({compression => 3});
Can be used to customize the different settings. Look for "settings" on
( run in 0.353 second using v1.01-cache-2.11-cpan-299005ec8e3 )