Skip to content

Commit

Permalink
Merge pull request #296 from gerMdz/agregando_types_block
Browse files Browse the repository at this point in the history
Agregando una opción más para imágenes half size
  • Loading branch information
gerMdz authored Jul 28, 2024
2 parents b339039 + d325202 commit 6120566
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 7 deletions.
6 changes: 6 additions & 0 deletions config/packages/liip_imagine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ liip_imagine:
size: [1920, 1080]
mode: inset
allow_upscale: false


squared_thumbnail_half_3840:
filters:
thumbnail: { size: [ 3840, 768 ], mode: inset, allow_upscale: true }

squared_thumbnail_large_notas:
filters:
thumbnail:
Expand Down
36 changes: 36 additions & 0 deletions src/DataFixtures/TypeBlockFixture.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace App\DataFixtures;

use App\Entity\TypeBlock;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
use Doctrine\Persistence\ObjectManager;

class TypeBlockFixture extends Fixture implements FixtureGroupInterface
{

public const TYPE_BLOCK = [
['page', 'Página visible, landing', 'page', true],
['seccion', 'Partes de una page, secciones', 'seccion', true],
['entrada', 'Parte de una sección, normalmente donde se escribe', 'entrada', true],
];

public function load(ObjectManager $manager): void
{
foreach (self::TYPE_BLOCK as $typeBlock) {
$tB = new TypeBlock();
$tB->setName($typeBlock[0])
->setIdentifier($typeBlock[2])
->setDescription($typeBlock[1])
->setIsActive($typeBlock[3]);
$manager->persist($tB);
}
$manager->flush();
}

public static function getGroups(): array
{
return ['groupTypeBlock'];
}
}
17 changes: 10 additions & 7 deletions templates/models/principal/plataforma.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,21 @@
{% block header %}
<header>
{% include 'inicio/_nav.html.twig' %}
<section class="js-parallax u-promo-block u-promo-block--mheight-500 u-overlay bg-gris-medio text-white "
style=" background-image: url({{ principal.imagePath|imagine_filter('squared_thumbnail_large_1920if') }})">
<section class="js-parallax bg-gris-medio text-white mx-auto img-responsive"
style=" background-image: url({{ principal.imagePath|imagine_filter('squared_thumbnail_half_3840') }});
height: 50vh; background-repeat:no-repeat;
background-size:contain;
background-position:center;">
<!-- Promo Content -->
<div class="container u-overlay__inner u-ver-center u-content-space">
<div class="row justify-content-center">
<div class="col-12">
<div class="text-center d-md-none d-lg-none d-xl-none">
<h1 class="display-sm-4 display-lg-3 h2"><b class="{{ principal.cssClass}} aire-2">
{{ principal.titulo | replace({'<p>':'', '</p>':'<br/>'}) | raw }}
</b></br>
</h1>
<hr style="width: 25%"/>
{# <h1 class="display-sm-4 display-lg-3 h2"><b class="{{ principal.cssClass}} aire-2">#}
{# {{ principal.titulo | replace({'<p>':'', '</p>':'<br/>'}) | raw }}#}
{# </b>#}
{# </h1>#}
{# <hr style="width: 25%"/>#}
</div>
</div>
</div>
Expand Down

0 comments on commit 6120566

Please sign in to comment.