diff --git a/CHANGELOG.md b/CHANGELOG.md index d2995d275eaee1e6030d16e3234498e5c18e422c..18aa8c7652d4bd452765c63e0fafd364555cc260 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.6.0] + +- Removed file size next to file link so that it will not appear twice when in table of files. + + ## [2.5.0] - 18-07-2019 - Fixed issue of toolbar not working in non-CERN themes diff --git a/css/layout.css b/css/layout.css index c2417d15c4e22860b94d831d113b23bd77bd7a5d..39ce77a4e9b9d090617bc65ddb781e95e59f01ba 100755 --- a/css/layout.css +++ b/css/layout.css @@ -30,6 +30,7 @@ strong { .sidebar-left .cern-view-display-block .view-header h2 { font-size: 26px !important; font-family: "opensans-regular" !important; } + .sidebar-right .cern-view-display-block > h2, .sidebar-left .cern-view-display-block > h2 { font-size: 26px !important; @@ -53,18 +54,16 @@ strong { height: 5px; display: block; width: 100%; } - h1 span.line-of-lines, h2 span.line-of-lines { height: 5px; } - h3 span.line-of-lines, h4 span.line-of-lines { height: 4px; } - p span.line-of-lines { height: 2px; vertical-align: 20%; } } + /* main .field--type-text-with-summary blockquote, main .field--type-text-with-summary q{ */ /*main .field--type-text-with-summary */ @@ -231,6 +230,7 @@ iframe { @media only screen and (max-width: 600px) { .text-component figure.cds-video iframe { min-height: 300px; } } + .cern-tag { padding: 3px 8px 0px; } @@ -344,15 +344,20 @@ span.upper-cern-tag { .nav .open > a:hover, .nav .open > a:focus { background-color: transparent; } -.pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > span:hover, .pagination > li > span:focus { +.pagination > li > a:hover, +.pagination > li > a:focus, +.pagination > li > span:hover, +.pagination > li > span:focus { background-color: transparent; border-color: transparent; } -.pager li > a:hover, .pager li > a:focus { +.pager li > a:hover, +.pager li > a:focus { background-color: transparent; } #toolbar-administration .toolbar-tab > .toolbar-item.devel { display: none; } + #toolbar-administration .toolbar-tab > .toolbar-item.dashboards, #toolbar-administration .toolbar-tab > .toolbar-item.configuration.vocabulary { color: #bebebe; padding: 13px 15px 13px 45px; @@ -370,6 +375,7 @@ span.upper-cern-tag { #toolbar-administration .toolbar-tab > .toolbar-item.dashboards:active:before, #toolbar-administration .toolbar-tab > .toolbar-item.dashboards.is-active:before, #toolbar-administration .toolbar-tab > .toolbar-item.configuration.vocabulary:active:before, #toolbar-administration .toolbar-tab > .toolbar-item.configuration.vocabulary.is-active:before { color: #ffffff; background: url("../images/dashboard-ffffff.svg") no-repeat center center/20px auto; } + #toolbar-administration .toolbar-tab.is-active, #toolbar-administration .toolbar-tab:hover { color: #ffffff; } #toolbar-administration .toolbar-tab.is-active:before, #toolbar-administration .toolbar-tab:hover:before { @@ -386,6 +392,7 @@ span.upper-cern-tag { padding-right: 0; text-indent: -9999px; width: 4em; } } + .box-pattern { overflow: hidden; } @@ -412,13 +419,13 @@ span.upper-cern-tag { .container-fluid .wrapper-center.has-right-column, .container-fluid .wrapper-center.has-no-column { padding: 0; } - .container .wrapper-center, .container .wrapper-center.has-columns, .container .wrapper-center.has-left-column, .container .wrapper-center.has-right-column, .container .wrapper-center.has-no-column { padding: 0 3%; } } + .content-footer-container { padding: 0; } @@ -426,6 +433,7 @@ span.upper-cern-tag { .content-footer-container, .wrapper-center { padding: 0 3%; } } + .tooltip { -webkit-transition: none !important; -khtml-transition: none !important; @@ -444,4 +452,5 @@ span.upper-cern-tag { .hide-in-mobile { display: none !important; } } -/*# sourceMappingURL=layout.css.map */ +.file-link { + padding-right: 0.5em; } diff --git a/sass/layout.scss b/sass/layout.scss index 580d8541acd4709bf1e7bbf64ac947b2ea6ec7a6..5394f29502b494aa5404002135028d0d16f8ae06 100755 --- a/sass/layout.scss +++ b/sass/layout.scss @@ -650,3 +650,7 @@ span.upper-cern-tag { display: none !important; } } + +.file-link { + padding-right: 0.5em; +} diff --git a/templates/layout/file-link.html.twig b/templates/layout/file-link.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..8120dde75974812a1d22b233e16b74f7f046f4a6 --- /dev/null +++ b/templates/layout/file-link.html.twig @@ -0,0 +1,39 @@ +{# +/** + * @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: An icon. + * - icon_only: Flag to display only the icon and not the label. + * - icon_position: Where an icon should be displayed. + * + * @ingroup templates + * + * @see \Drupal\bootstrap\Plugin\Preprocess\FileLink::preprocessVariables + */ +#} +{% spaceless %} + {% + set classes = [ + icon_only ? 'icon-only', + not icon_only ? 'icon-' ~ icon_position|clean_class + ] + %} + <span{{ attributes.addClass(classes) }}> + {% if icon_only %} + <span class="file-icon">{{ icon }}</span> + <span class="sr-only"> + <span class="file-link">{{ link }}</span> + </span> + {% else %} + {% if icon_position == 'after' %} + <span class="file-link">{{ link }}</span><span class="file-icon">{{ icon }}</span> + {% else %} + <span class="file-icon">{{ icon }}</span><span class="file-link">{{ link }}</span> + {% endif %} + {% endif %} + </span> +{% endspaceless %}