global linking blocks: color changes, new icon, new button text

This commit is contained in:
Emir 2020-12-13 20:57:43 +03:00
parent 657bec2fa4
commit a61872d22a
4 changed files with 14 additions and 8 deletions

View File

@ -36,9 +36,9 @@
display: block; display: block;
flex-shrink: 0; flex-shrink: 0;
margin-right: 6px; margin-right: 6px;
height: 14px; height: 16px;
width: 14px; width: 16px;
fill: var(--theme--text); fill: var(--theme--text_ui);
} }
.admiraldus-glb-page-button > span { .admiraldus-glb-page-button > span {
@ -81,7 +81,7 @@
margin-left: 14px; margin-left: 14px;
height: 17px; height: 17px;
width: 17px; width: 17px;
fill: inherit; fill: var(--theme--text);
} }
.admiraldus-glb-block-button > span { .admiraldus-glb-block-button > span {

View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 30 30">
<path d="M2,12c0-3.309,2.691-6,6-6h8c3.309,0,6,2.691,6,6s-2.691,6-6,6h-6c0,0.736,0.223,1.41,0.574,2H16c4.418,0,8-3.582,8-8 c0-4.418-3.582-8-8-8H8c-4.418,0-8,3.582-8,8c0,2.98,1.634,5.575,4.051,6.951C4.021,18.638,4,18.321,4,18 c0-0.488,0.046-0.967,0.115-1.436C2.823,15.462,2,13.827,2,12z M25.953,11.051C25.984,11.363,26,11.68,26,12 c0,0.489-0.047,0.965-0.117,1.434C27.176,14.536,28,16.172,28,18c0,3.309-2.691,6-6,6h-8c-3.309,0-6-2.691-6-6s2.691-6,6-6h6 c0-0.731-0.199-1.413-0.545-2H14c-4.418,0-8,3.582-8,8c0,4.418,3.582,8,8,8h8c4.418,0,8-3.582,8-8 C30,15.021,28.368,12.428,25.953,11.051z"></path>
</svg>

After

Width:  |  Height:  |  Size: 631 B

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -47,7 +47,10 @@ module.exports = {
* Everything happens here. ¯\_()_/¯ * Everything happens here. ¯\_()_/¯
*/ */
async function main() { async function main() {
const icon = await x$.svg('/icons/link.svg'); const icons = {
globe: await x$.svg('/icons/globe.svg'),
chain: await x$.svg('/icons/chain.svg'),
};
const pageClass = 'admiraldus-glb-page-button'; const pageClass = 'admiraldus-glb-page-button';
const blockClass = 'admiraldus-glb-block-button'; const blockClass = 'admiraldus-glb-block-button';
const spanClass = 'admiraldus-glb-span-hide'; const spanClass = 'admiraldus-glb-span-hide';
@ -68,8 +71,8 @@ module.exports = {
]; ];
const html = x$.el( const html = x$.el(
`<div ${attr[0]}> `<div ${attr[0]}>
${icon} ${icons.chain}
<span>Global Link</span> <span>Copy link</span>
<span ${attr[1]}>Link copied!</span <span ${attr[1]}>Link copied!</span
</div>`); </div>`);
@ -101,7 +104,7 @@ module.exports = {
const attr = `class="${blockClass}" role="button" tabindex="0"`; const attr = `class="${blockClass}" role="button" tabindex="0"`;
const html = x$.el( const html = x$.el(
`<div ${attr}> `<div ${attr}>
${icon} ${icons.globe}
<span>Global link</span> <span>Global link</span>
</div>`); </div>`);