added file field to home showrooms
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -1064,6 +1064,7 @@ article.node--type-frontpage{
 | 
			
		||||
        @extend %part-columned-layout;
 | 
			
		||||
        .field--name-field-showrooms{}
 | 
			
		||||
        .field--name-field-showroom-links{
 | 
			
		||||
          display: inline-block;
 | 
			
		||||
          .field__item{
 | 
			
		||||
            display: inline-block;
 | 
			
		||||
            a{
 | 
			
		||||
@@ -1073,6 +1074,19 @@ article.node--type-frontpage{
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        .field--name-field-showroom-files{
 | 
			
		||||
          display: inline-block;
 | 
			
		||||
          .field__item{
 | 
			
		||||
            display: inline-block;
 | 
			
		||||
            span.file{
 | 
			
		||||
              @include btn;
 | 
			
		||||
              padding-left: 25px;
 | 
			
		||||
              background-position-x: 5px;
 | 
			
		||||
              background-color: #fff;
 | 
			
		||||
              color: $color-showrooms;
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        .field--name-computed-showrooms-reference{
 | 
			
		||||
          overflow: hidden;
 | 
			
		||||
          position:relative;
 | 
			
		||||
 
 | 
			
		||||
@@ -403,3 +403,11 @@ function materiotheme_preprocess_field__node__field_showrooms__frontpage(array &
 | 
			
		||||
    "href" => '/' . $variables['element']['#language'] . '/showrooms'
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function materiotheme_preprocess_file_link(array &$variables) {
 | 
			
		||||
  $url = $variables['link']['#url'];
 | 
			
		||||
  $attributes = $url->getOption('attributes');
 | 
			
		||||
  $attributes['target'] = '_blank';
 | 
			
		||||
  $url->setOption('attributes', $attributes);
 | 
			
		||||
  $t="t";
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,17 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override for a link to a file.
 | 
			
		||||
 *
 | 
			
		||||
 * Available variables:
 | 
			
		||||
 * - attributes: The HTML attributes for the containing element.
 | 
			
		||||
 * - link: A link to the file.
 | 
			
		||||
 * - icon: The icon image representing the file type.
 | 
			
		||||
 * - file_size: The size of the file.
 | 
			
		||||
 *
 | 
			
		||||
 * @see template_preprocess_file_link()
 | 
			
		||||
 * @see stable_preprocess_image_widget()
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
{{ attach_library('classy/file') }}
 | 
			
		||||
<span{{ attributes }}>{{ icon }} {{ link }}</span>
 | 
			
		||||
		Reference in New Issue
	
	Block a user