Merge branch 'bar_cristobal_anuncio' of git.owlcode.tech:sergiotarxz/burguillos.info

This commit is contained in:
sergiotarxz 2023-09-05 20:29:57 +02:00
commit adc116b69c
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