From 13b606df453eb504dd2c74d919f56a74231a38f8 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Mon, 17 Sep 2018 18:16:42 +0200 Subject: [PATCH] CSS cleanup and use classes for styling --- src/styles/_comments.sass | 2 +- src/styles/plugins/_jstree.sass | 64 ------------------- .../nodes/custom/asset/video/view_embed.pug | 2 +- src/templates/nodes/view_base.pug | 6 +- 4 files changed, 5 insertions(+), 69 deletions(-) diff --git a/src/styles/_comments.sass b/src/styles/_comments.sass index 2e76c3d7..927c3700 100644 --- a/src/styles/_comments.sass +++ b/src/styles/_comments.sass @@ -32,7 +32,7 @@ $comments-width-max: 710px .comment-reply-container display: flex position: relative - padding: 15px 0 20px 0 + padding: 15px 0 transition: background-color 150ms ease-in-out, padding 150ms ease-in-out, margin 150ms ease-in-out &.comment-linked diff --git a/src/styles/plugins/_jstree.sass b/src/styles/plugins/_jstree.sass index 853213b8..df410fd9 100644 --- a/src/styles/plugins/_jstree.sass +++ b/src/styles/plugins/_jstree.sass @@ -123,7 +123,6 @@ $tree-color-highlight-background-text: $primary /* Selected item */ &.jstree-clicked - background-color: $tree-color-highlight-background !important color: $tree-color-highlight-background-text !important font-weight: bold @@ -137,16 +136,12 @@ $tree-color-highlight-background-text: $primary /* hover an active item */ &.jstree-hovered - background-color: lighten($tree-color-highlight-background, 10%) !important box-shadow: none color: $tree-color-highlight-background-text !important &.jstree-hovered .jstree-icon color: $tree-color-highlight-background-text !important - .jstree-hovered - background-color: rgba($tree-color-highlight, .1) !important - .jstree-leaf .jstree-clicked width: 100% !important @@ -193,63 +188,6 @@ $tree-color-highlight-background-text: $primary &:after display: none !important - &.blog - .jstree-anchor - padding: 6px 6px 6px 12px - - &:hover - color: $tree-color-highlight - - &.post - border-bottom: thin solid $color-background-dark - - &.jstree-clicked - &.post - background-color: transparent !important - - &:after - top: 8px - color: $tree-color-highlight !important - - .tree-item-info - color: $color-text - - .tree-item-title - color: $tree-color-highlight - - .tree-item - line-height: initial - padding-right: 10px - - &-title - font-size: 1.2em - overflow: initial - text-overflow: initial - white-space: normal - - &-info - color: $color-text-dark-secondary - display: block - font-size: .8em - padding: 5px - - &-thumbnail - align-items: center - background-color: $color-background - border-radius: 3px - color: $color-text-dark-secondary - display: flex - float: left - height: 70px - justify-content: center - margin: 0 10px 0 -5px - width: 70px - - img - height: 70px - width: 70px - - .jstree-loading padding: 5px color: $color-text-light-secondary @@ -276,11 +214,9 @@ $tree-color-highlight-background-text: $primary a.jstree-anchor.jstree-clicked+ul li a.jstree-anchor.jstree-clicked - background-color: rgba($tree-color-highlight-background, .8) !important color: $tree-color-highlight-background-text !important a.jstree-anchor.jstree-clicked+ul li a.jstree-anchor.jstree-clicked+ul li a.jstree-anchor.jstree-clicked - background-color: rgba($tree-color-highlight-background, .8) !important color: $tree-color-highlight-background-text !important i.jstree-icon.jstree-ocl diff --git a/src/templates/nodes/custom/asset/video/view_embed.pug b/src/templates/nodes/custom/asset/video/view_embed.pug index 6ba9d44d..d3499eda 100644 --- a/src/templates/nodes/custom/asset/video/view_embed.pug +++ b/src/templates/nodes/custom/asset/video/view_embed.pug @@ -23,7 +23,7 @@ section.node-preview.video | {% block node_download %} | {% if node.file_variations %} -button.btn.btn-sm.btn-outline-primary.dropdown-toggle.px-3( +button.btn.btn-outline-primary.dropdown-toggle.px-3( type="button", data-toggle="dropdown", aria-haspopup="true", diff --git a/src/templates/nodes/view_base.pug b/src/templates/nodes/view_base.pug index 31938d33..b737759b 100644 --- a/src/templates/nodes/view_base.pug +++ b/src/templates/nodes/view_base.pug @@ -45,7 +45,7 @@ section.node-details-meta.pl-4.pr-2.py-2.border-bottom | {{ node.properties.status | undertitle }} | {% endif %} - li.px-2(title="Author") + li.pr-2(title="Author") | {{ node.user.full_name }} | {{ node.user.badges.html|safe }} @@ -87,7 +87,7 @@ section.node-details-meta.pl-4.pr-2.py-2.border-bottom title="Download {{ node.properties.content_type | undertitle }}", href="{{ node.file.link }}", download="{{ node.file.filename }}") - button.btn.btn-sm.btn-outline-primary.px-3(type="button") + button.btn.btn-outline-primary.px-3(type="button") i.pi-download.pr-2 | Download | {% endblock node_download %} @@ -118,7 +118,7 @@ section.node-details-meta.pl-4.pr-2.py-2.border-bottom .row | {% block node_comments %} .col-md-8.col-sm-12 - #comments-embed + #comments-embed.p-2 .comments-list-loading i.pi-spin | {% endblock node_comments %}