4.3.1 molecules.files.node File in node

Toggle example guides Toggle HTML markup

The display of files in nodes is done with small cards (emphasis layer). The cards must be placed in a grid .files__grid. The element consists of the file name (max 3 lines truncated), the file type and file size.

Markup: 03-molecules/file/file-node.twig
<ul class="files__grid">
<li class="node-file">
  <a class="node-file__link" href="#" title="{{ 'Open file in a new window'|t }}" target="_blank">
    <span class="node-file__title">Vestibulum id ligula porta felis euismod semper.pdf</span>
    <span class="node-file__type">
        <img class="node-file__icon" src="kss-assets/icon_1_pdf_x16.png" srcset="kss-assets/icon_1_pdf_x32.png 2x" alt="{{ node_icon }}" />
        <span class="node-file__size">40.14 KB</span>
Source: 03-molecules/file/file.scss, line 10