Prechádzať zdrojové kódy

added file field to home showrooms

bach 3 rokov pred
rodič
commit
94fe587324

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.css


BIN
web/themes/custom/materiotheme/assets/dist/main.css.gz


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
web/themes/custom/materiotheme/assets/dist/report.html


+ 14 - 0
web/themes/custom/materiotheme/assets/styles/main.scss

@@ -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;

+ 8 - 0
web/themes/custom/materiotheme/materiotheme.theme

@@ -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";
+}

+ 17 - 0
web/themes/custom/materiotheme/templates/field/file-link.html.twig

@@ -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>

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov