<div class="mini-carousel">
    <div class="mini-carousel__spacer">
        <div class="mini-carousel__inner">
            <div class="mini-carousel__title">
                key facts
            </div>
            <div class="mini-carousel__item">

                <h4 class="heading heading--medium">Top 20 biopharmaceutical companies</h4>
                <div class="mini-carousel__item__inner">
                    <p>Ipsen is one of the worlds top 20 biopharmaceutical companies in terms of oncology sales</p>
                </div>
            </div>
            <div class="mini-carousel__item">

                <h4 class="heading heading--medium">Top 20 biopharmaceutical companies 2</h4>
                <div class="mini-carousel__item__inner">
                    <p>Ipsen is one of the worlds top 20 biopharmaceutical companies in terms of oncology sales</p>
                </div>
            </div>
        </div>
    </div>
</div>
  • Content:
    /* @mini-carousel */
    @keyframes anim-pulse-1 {
    	0% {
    		opacity: 1;
    		transform: scale3d(0.5, 0.5, 1);
    	}
    	20% {
    		opacity: 0;
    		transform: scale3d(1.1, 1.1, 1);
    	}
    }
    
    @keyframes anim-pulse-2 {
    	0% {
    		opacity: 1;
    		transform: scale3d(0.5, 0.5, 1);
    	}
    	10%, 20% {
    		opacity: 0;
    		transform: scale3d(1.2, 1.2, 1);
    	}
    }
    
  • URL: /components/raw/mini-carousel-block/_mini-carousel-block.scss
  • Filesystem Path: src/components/cms-blocks/mini-carousel-block/_mini-carousel-block.scss
  • Size: 317 Bytes
  • Content:
    <?php
    $items = array(
      'key' => 'mini_carousel', //<---- this is needed so that it shows on the Add Block
      'label' => 'Mini Carousel', //<---- this is needed so that it shows on the Add Block
      'title' => 'Mini Carousel',
      'name' => 'mini-carousel-block', // <---- This line defines the Twig file you're using, in this case '@mini-carousel'
      'type' => 'group',//<---- this is needed so that it shows on the Add Block Correctly
    	'sub_fields' => array( //<---- this is initially fields, needs to be renamed as sub_fields
        array(
    			'key' => 'field_5bd039f4c2f2d',
    			'label' => 'Mini Carousel Title',
    			'name' => 'category', // the 'name' value for each field has to match the variable in the Twig file.
    			'type' => 'text',
    			'instructions' => '',
    			'required' => 1,
    			'conditional_logic' => 0,
    			'wrapper' => array(
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    			'default_value' => '',
    			'placeholder' => '',
    			'prepend' => '',
    			'append' => '',
    			'maxlength' => '',
    		),
            array (
              'key' => 'mini_carousel_section_label',
              'label' => 'Section Label',
              'name' => 'blocklabel',
              'type' => 'text',
              'instructions' => __('This label appears in in-page navigation and within the content of some blocks, overriding the title.', 'ipsen-master'),
            ),
    		array(
    			'key' => 'field_5bd02da0c2f2a',
    			'label' => 'Mini Carousel Items',
    			'name' => 'items', // the 'name' value has to match the variable passed to the twig file
    			'type' => 'repeater',
    			'instructions' => '',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array(
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    			'collapsed' => '',
    			'min' => 0,
    			'max' => 0,
    			'layout' => 'table',
    			'button_label' => '',
    			'sub_fields' => array(
    				array(
    					'key' => 'field_5bd02dbac2f2b',
    					'label' => 'Item Title',
    					'name' => 'title', // the 'name' value for each field has to match the variable in the Twig file.
    					'type' => 'text',
    					'instructions' => '',
    					'required' => 0,
    					'conditional_logic' => 0,
    					'wrapper' => array(
    						'width' => '',
    						'class' => '',
    						'id' => '',
    					),
    					'default_value' => '',
    					'placeholder' => '',
    					'prepend' => '',
    					'append' => '',
    					'maxlength' => '',
    				),
    				array(
    					'key' => 'field_5bd03910c2f2c',
    					'label' => 'Item Content',
    					'name' => 'content', // the 'name' value for each field has to match the variable in the Twig file.
    					'type' => 'textarea',
    					'instructions' => '',
    					'required' => 0,
    					'conditional_logic' => 0,
    					'wrapper' => array(
    						'width' => '',
    						'class' => '',
    						'id' => '',
    					),
    					'default_value' => '',
    					'placeholder' => '',
    					'maxlength' => '',
    					'rows' => '',
    					'new_lines' => '',
    				),
    			),
    		)
    	)
    );
    
    array_push($_SESSION["blocks"], $items); //<---- this is needed so that it shows on the Add Block
    
  • URL: /components/raw/mini-carousel-block/mini-carousel-block.php
  • Filesystem Path: src/components/cms-blocks/mini-carousel-block/mini-carousel-block.php
  • Size: 2.9 KB