diff --git a/lib/BurguillosInfo/Ads/Cristobal.pm b/lib/BurguillosInfo/Ads/Cristobal.pm new file mode 100644 index 0000000..78e9da4 --- /dev/null +++ b/lib/BurguillosInfo/Ads/Cristobal.pm @@ -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; diff --git a/public/img/anuncio-cristobal-1.webp b/public/img/anuncio-cristobal-1.webp new file mode 100644 index 0000000..95bc3d3 Binary files /dev/null and b/public/img/anuncio-cristobal-1.webp differ diff --git a/public/img/anuncio-cristobal-2.webp b/public/img/anuncio-cristobal-2.webp new file mode 100644 index 0000000..ec03619 Binary files /dev/null and b/public/img/anuncio-cristobal-2.webp differ diff --git a/public/img/anuncio-cristobal-3.webp b/public/img/anuncio-cristobal-3.webp new file mode 100644 index 0000000..7be61ea Binary files /dev/null and b/public/img/anuncio-cristobal-3.webp differ