From 29e7aeff5db50889b92bf8430246f9e7df4b8534 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 25 Apr 2016 21:44:33 +0200 Subject: UI: Fix scaling of cover images (Fixes: #548) This reverts f039923ac134e4a3cc70a1a7d47c21460676b1c0 and fixes #196 in a different way (adding quotes). So that we can use the css background properties to scale the cover images. --- client/components/cards/minicard.jade | 3 +-- client/components/cards/minicard.styl | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'client/components/cards') diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index 573b3da1..1dfd2f8e 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -1,8 +1,7 @@ template(name="minicard") .minicard if cover - .minicard-cover - img(src="{{pathFor cover.url}}") + .minicard-cover(style="background-image: url('{{pathFor cover.url}}');") if labels .minicard-labels each labels diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl index 3b8c8a9a..0f6f8ad2 100644 --- a/client/components/cards/minicard.styl +++ b/client/components/cards/minicard.styl @@ -62,16 +62,11 @@ .minicard-cover background-position: center background-repeat: no-repeat - background-size: cover + background-size: contain height: 145px user-select: none margin: -6px -8px 6px -8px border-radius: top 2px - position: relative - - img - height: 100% - width: 100% .minicard-labels float: right -- cgit v1.2.3-1-g7c22 From a6bcd5bd1c6e733e262a1afd77584c4f24c6b2ab Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 19 May 2016 21:16:35 +0200 Subject: UI: Center add-attachment link --- client/components/cards/attachments.jade | 3 ++- client/components/cards/attachments.styl | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'client/components/cards') diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade index 2cb3bb85..da728114 100644 --- a/client/components/cards/attachments.jade +++ b/client/components/cards/attachments.jade @@ -49,4 +49,5 @@ template(name="attachmentsGalery") | {{_ 'delete'}} if currentUser.isBoardMember - a.attachment-item.add-attachment.js-add-attachment {{_ 'add-attachment' }} + li.attachment-item.add-attachment + a.js-add-attachment {{_ 'add-attachment' }} diff --git a/client/components/cards/attachments.styl b/client/components/cards/attachments.styl index f322ebc8..ad28bb9d 100644 --- a/client/components/cards/attachments.styl +++ b/client/components/cards/attachments.styl @@ -20,6 +20,10 @@ display: flex align-items: center + a + display: block + margin: auto + .attachment-thumbnail height: 80px display: flex -- cgit v1.2.3-1-g7c22 From 8fd4c17628f73cf49eb84de9695803d76b99ec8a Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 19 May 2016 21:17:17 +0200 Subject: UI: Scale the attachemnt thumbnails The attachements should be scaled inside the card, too. --- client/components/cards/attachments.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/components/cards') diff --git a/client/components/cards/attachments.styl b/client/components/cards/attachments.styl index ad28bb9d..df293d87 100644 --- a/client/components/cards/attachments.styl +++ b/client/components/cards/attachments.styl @@ -32,8 +32,8 @@ position: relative .attachment-thumbnail-img - height: 100% - width: 100% + max-height: 100% + max-width: 100% .attachment-thumbnail-ext text-transform: uppercase -- cgit v1.2.3-1-g7c22 From ecf050ba546bc32a0941bbbf61c4a0a4bcf8fb24 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 19 May 2016 21:18:08 +0200 Subject: UI: Put every attachment action on its own line --- client/components/cards/attachments.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components/cards') diff --git a/client/components/cards/attachments.styl b/client/components/cards/attachments.styl index df293d87..9a5d0645 100644 --- a/client/components/cards/attachments.styl +++ b/client/components/cards/attachments.styl @@ -43,7 +43,7 @@ font-size: 0.75em margin: 3px - .attachment-details-actions + .attachment-details-actions a display: block .attachment-image-preview -- cgit v1.2.3-1-g7c22