From 7098ca9df0675debe7351480ba3dad22750c8150 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Tue, 6 Jun 2017 00:24:30 +0100 Subject: [PATCH 1/6] Added styling for copy to clipboard button - currently using the edit button's image as a placeholder Signed-off-by: Oliver Hunt --- .../views/rooms/_EventTile.scss | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss index 9d970ad454..e99609e039 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss @@ -332,6 +332,24 @@ limitations under the License. .mx_EventTile_content .markdown-body code { background-color: #f8f8f8; } +.mx_EventTile_copyButton { + position: absolute; + display: inline-block; + visibility: hidden; + cursor: pointer; + top: 6px; + right: 6px; + width: 19px; + height: 19px; + background-image: url($edit-button-url); +} +.mx_EventTile_body pre { + position: relative; +} +.mx_EventTile_body pre:hover .mx_EventTile_copyButton +{ + visibility: visible; +} .mx_EventTile_content .markdown-body h1, .mx_EventTile_content .markdown-body h2, From fd42698cf02a750cd94a9854cf74a2cf847f750f Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Tue, 6 Jun 2017 13:21:50 +0100 Subject: [PATCH 2/6] Added svg for copy icon - I'm not a designer, someone else should probably replace these! Signed-off-by: Oliver Hunt --- .../views/rooms/_EventTile.scss | 2 +- src/skins/vector/css/themes/_base.scss | 3 +- src/skins/vector/css/themes/_dark.scss | 1 + src/skins/vector/img/icon_copy_message.svg | 86 +++++++++++++++++++ .../vector/img/icon_copy_message_dark.svg | 77 +++++++++++++++++ 5 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 src/skins/vector/img/icon_copy_message.svg create mode 100644 src/skins/vector/img/icon_copy_message_dark.svg diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss index e99609e039..8f3c6d6c7b 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss @@ -341,7 +341,7 @@ limitations under the License. right: 6px; width: 19px; height: 19px; - background-image: url($edit-button-url); + background-image: url($copy-button-url); } .mx_EventTile_body pre { position: relative; diff --git a/src/skins/vector/css/themes/_base.scss b/src/skins/vector/css/themes/_base.scss index b601191348..fc24af93e2 100644 --- a/src/skins/vector/css/themes/_base.scss +++ b/src/skins/vector/css/themes/_base.scss @@ -102,6 +102,7 @@ $event-redacted-img: url('../../img/redacted.jpg'); $event-timestamp-color: #acacac; $edit-button-url: "../../img/icon_context_message.svg"; +$copy-button-url: "../../img/icon_copy_message.svg"; // e2e $e2e-verified-color: #76cfa5; // N.B. *NOT* the same as $accent-color @@ -114,4 +115,4 @@ $lightbox-fg-color: #ffffff; $lightbox-border-color: #ffffff; // unused? -$progressbar-color: #000; \ No newline at end of file +$progressbar-color: #000; diff --git a/src/skins/vector/css/themes/_dark.scss b/src/skins/vector/css/themes/_dark.scss index 72c21b7572..fe2e7591cf 100644 --- a/src/skins/vector/css/themes/_dark.scss +++ b/src/skins/vector/css/themes/_dark.scss @@ -102,6 +102,7 @@ $event-redacted-img: url('../../img/redacted-dark.jpg'); $event-timestamp-color: #acacac; $edit-button-url: "../../img/icon_context_message_dark.svg"; +$copy-button-url: "../../img/icon_copy_message_dark.svg"; // e2e $e2e-verified-color: #76cfa5; // N.B. *NOT* the same as $accent-color diff --git a/src/skins/vector/img/icon_copy_message.svg b/src/skins/vector/img/icon_copy_message.svg new file mode 100644 index 0000000000..8d8887bb22 --- /dev/null +++ b/src/skins/vector/img/icon_copy_message.svg @@ -0,0 +1,86 @@ + + + + + + image/svg+xml + + ED5D3E59-2561-4AC1-9B43-82FBC51767FC + + + + + + ED5D3E59-2561-4AC1-9B43-82FBC51767FC + Created with sketchtool. + + + + + + + + + diff --git a/src/skins/vector/img/icon_copy_message_dark.svg b/src/skins/vector/img/icon_copy_message_dark.svg new file mode 100644 index 0000000000..b81e617d8c --- /dev/null +++ b/src/skins/vector/img/icon_copy_message_dark.svg @@ -0,0 +1,77 @@ + + + + + + image/svg+xml + + ED5D3E59-2561-4AC1-9B43-82FBC51767FC + + + + + + ED5D3E59-2561-4AC1-9B43-82FBC51767FC + Created with sketchtool. + + + + + + + From 873656232fceba83979edffc0deda41fa8e3029b Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 8 Jun 2017 11:42:03 +0100 Subject: [PATCH 3/6] fix vector-im/riot-web#3298 correctly, and unbreak scrolling fixes https://github.com/vector-im/riot-web/issues/4241 and https://github.com/vector-im/riot-web/issues/4154 --- res/home.html | 117 +++++++++++++++++- res/home/css/welcome.css | 106 ---------------- .../css/vector-web/structures/_HomePage.scss | 5 +- 3 files changed, 118 insertions(+), 110 deletions(-) delete mode 100644 res/home/css/welcome.css diff --git a/res/home.html b/res/home.html index c77b38090c..efe2da4b89 100644 --- a/res/home.html +++ b/res/home.html @@ -1,5 +1,118 @@ - -