Adding placeholder ads for Bar cristobal.

This commit is contained in:
Sergiotarxz 2023-09-02 03:51:35 +02:00
parent 4b3d168999
commit 687531f1ad
4 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,58 @@
package BurguillosInfo::Ads::Cristobal;
use v5.36.0;
use strict;
use warnings;
use utf8;
use feature 'signatures';
use Moo;
use parent 'BurguillosInfo::Ad';
sub id ($self) {
return 'cristobal';
}
sub weight {
return 75;
}
sub max_alternative {
return 3;
}
sub default_alternative($self) {
return int($self->alternative * ($self->max_alternative + 1));
}
sub is_active ($self) {
return 1;
}
sub img ($self) {
if ( $self->default_alternative == 2 ) {
return '/img/anuncio-cristobal-1.webp'
}
if ( $self->default_alternative == 1 ) {
return '/img/anuncio-cristobal-2.webp'
}
return '/img/anuncio-cristobal-3.webp'
}
sub text($self) {
if ( $self->default_alternative == 2 ) {
return 'Disfruta de comidas abundantes en Bar Cristóbal.';
}
if ( $self->default_alternative == 1 ) {
return 'Bar Cristóbal, para chuparse los dedos.';
}
return '¿Te apetece una cervecita y buena comida? Ven a Bar Cristóbal.';
}
sub href {
return '/posts/bar-cristobal?come-from-ad=1';
}
1;

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB