block--floating-social-icons.html.twig in Floating Social Icons 8
Default theme implementation to display a block.
Available variables:
- plugin_id: The ID of the block implementation.
- label: The configured label of the block if visible.
- configuration: A list of the block's configuration values.
- label: The configured label for the block.
- label_display: The display settings for the label.
- provider: The module or other provider that provided this block plugin.
- Block plugin specific settings will also be stored here.
- content: The content of this block.
- attributes: array of HTML attributes populated by modules, intended to
be added to the main container tag of this template.
- id: A valid HTML ID and guaranteed unique.
- title_attributes: Same as attributes, except applied to the main title tag that appears in the template.
- title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
- title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.
See also
File
templates/block--floating-social-icons.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a block.
- *
- * Available variables:
- * - plugin_id: The ID of the block implementation.
- * - label: The configured label of the block if visible.
- * - configuration: A list of the block's configuration values.
- * - label: The configured label for the block.
- * - label_display: The display settings for the label.
- * - provider: The module or other provider that provided this block plugin.
- * - Block plugin specific settings will also be stored here.
- * - content: The content of this block.
- * - attributes: array of HTML attributes populated by modules, intended to
- * be added to the main container tag of this template.
- * - id: A valid HTML ID and guaranteed unique.
- * - title_attributes: Same as attributes, except applied to the main title
- * tag that appears in the template.
- * - title_prefix: Additional output populated by modules, intended to be
- * displayed in front of the main title tag that appears in the template.
- * - title_suffix: Additional output populated by modules, intended to be
- * displayed after the main title tag that appears in the template.
- *
- * @see template_preprocess_block()
- *
- * @ingroup themeable
- */
- #}
-
- {# Set main class and sub class based on values #}
- {% if social_values.icons == '1' %}
- {% set main_class = 'floating-top' %}
- {% elseif social_values.icons == '2' %}
- {% set main_class = 'floating-right' %}
- {% elseif social_values.icons == '3' %}
- {% set main_class = 'floating-bottom' %}
- {% elseif social_values.icons == '4' %}
- {% set main_class = 'floating-left' %}
- {% endif %}
-
- {% if social_values.icons is odd %}
- {% set sub_class = 'floating-horizontal' %}
- {% else %}
- {% set sub_class = 'floating-vertical' %}
- {% endif %}
-
- {# Set Responsive class #}
- {% if social_values.count == '2' %}
- {% set responsive_class = 'two' %}
- {% elseif social_values.count == '3' %}
- {% set responsive_class = 'three' %}
- {% elseif social_values.count == '4' %}
- {% set responsive_class = 'four' %}
- {% elseif social_values.count == '5' %}
- {% set responsive_class = 'five' %}
- {% elseif social_values.count == '6' %}
- {% set responsive_class = 'six' %}
- {% elseif social_values.count == '7' %}
- {% set responsive_class = 'seven' %}
- {% elseif social_values.count == '8' %}
- {% set responsive_class = 'eight' %}
- {% endif %}
-
- <div id="floating-icons">
- <div class="floating-social-icons {{ main_class }}">
- {% if social_values.facebook is not empty %}
- <div class="{{ sub_class }} {{ responsive_class }}">
- <a title="{{ social_titles.facebook_title }}" class="{{ social_values.hover }} facebook" href="{{ social_values.facebook }}" target="{{ social_values.target }}">
- <span class="fab fa-facebook-f"></span>
- </a>
- </div>
- {% endif %}
-
- {% if social_values.google_plus is not empty %}
- <div class="{{ sub_class }} {{ responsive_class }}">
- <a title="{{ social_titles.google_plus_title }}" class="{{ social_values.hover }} google-plus" href="{{ social_values.google_plus }}" target="{{ social_values.target }}">
- <span class="fab fa-google-plus-g"></span>
- </a>
- </div>
- {% endif %}
-
- {% if social_values.linkedIn is not empty %}
- <div class="{{ sub_class }} {{ responsive_class }}">
- <a title="{{ social_titles.linkedIn_title }}" class="{{ social_values.hover }} linkedin" href="{{ social_values.linkedIn }}" target="{{ social_values.target }}">
- <span class="fab fa-linkedin-in"></span>
- </a>
- </div>
- {% endif %}
-
- {% if social_values.twitter is not empty %}
- <div class="{{ sub_class }} {{ responsive_class }}">
- <a title="{{ social_titles.twitter_title }}" class="{{ social_values.hover }} twitter" href="{{ social_values.twitter }}" target="{{ social_values.target }}">
- <span class="fab fa-twitter"></span>
- </a>
- </div>
- {% endif %}
-
- {% if social_values.pinterest is not empty %}
- <div class="{{ sub_class }} {{ responsive_class }}">
- <a title="{{ social_titles.pinterest_title }}" class="{{ social_values.hover }} pinterest" href="{{ social_values.pinterest }}" target="{{ social_values.target }}">
- <span class="fab fa-pinterest"></span>
- </a>
- </div>
- {% endif %}
-
- {% if social_values.instagram is not empty %}
- <div class="{{ sub_class }} {{ responsive_class }}">
- <a title="{{ social_titles.instagram_title }}" class="{{ social_values.hover }} instagram" href="{{ social_values.instagram }}" target="{{ social_values.target }}">
- <span class="fab fa-instagram"></span>
- </a>
- </div>
- {% endif %}
-
- {% if social_values.mail is not empty %}
- <div class="{{ sub_class }} {{ responsive_class }}">
- <a title="{{ social_titles.mail_title }}" class="{{ social_values.hover }} mail" href="mailto:{{ social_values.mail }}" target="{{ social_values.target }}">
- <span class="fas fa-envelope"></span>
- </a>
- </div>
- {% endif %}
-
- {% if social_values.youtube is not empty %}
- <div class="{{ sub_class }} {{ responsive_class }}">
- <a title="{{ social_titles.youtube_title }}" class="{{ social_values.hover }} youtube" href="{{ social_values.youtube }}" target="{{ social_values.target }}">
- <span class="fab fa-youtube"></span>
- </a>
- </div>
- {% endif %}
- </div>
- </div>