first version of tel

This commit is contained in:
Matteo Manzinello
2019-09-13 22:43:49 +02:00
parent 8c85892728
commit 376db1d5b5
5 changed files with 38 additions and 13 deletions

View File

@@ -194,7 +194,7 @@ const mailgoTelInit = () => {
// title (email address)
let title = document.createElement("strong");
title.id = "mailgo-title";
title.id = "mailgo-tel-title";
title.className = "mailgo-title";
modalContent.appendChild(title);
@@ -235,7 +235,7 @@ const mailgoTelInit = () => {
call.id = "mailgo-call";
call.href = "#mailgo-call";
call.classList.add("mailgo-open");
call.classList.add("mailgo-open");
call.classList.add("mailgo-default");
let callSpan = document.createElement("span");
callSpan.className = "mailgo-weight-500";
let callSpanContent = document.createTextNode("call");
@@ -248,7 +248,7 @@ const mailgoTelInit = () => {
// copy
let copy = document.createElement("a");
copy.id = "mailgo-copy";
copy.id = "mailgo-tel-copy";
copy.href = "#mailgo-copy";
copy.classList.add("mailgo-copy");
copy.classList.add("mailgo-weight-500");
@@ -430,16 +430,18 @@ const mailgoTelRender = mailgo => {
);
}
console.log(tel);
// information
let titleEl = getE("mailgo-title");
let titleEl = getE("mailgo-tel-title");
// actions
let waButton = getE("mailgo-wa");
let telegramButton = getE("mailgo-telegram");
let callButton = getE("mailgo-call");
let copyButton = getE("mailgo-copy");
let copyButton = getE("mailgo-tel-copy");
// the title of the modal (email address)
// the title of the modal (tel)
titleEl.innerHTML = tel;
// add the actions
@@ -639,7 +641,10 @@ const showMailgo = () => (getE("mailgo").style.display = "flex");
const showMailgoTel = () => (getE("mailgo-tel").style.display = "flex");
// hide the modal
const hideMailgo = () => (getE("mailgo").style.display = "none");
const hideMailgo = () => (
(getE("mailgo").style.display = "none"),
(getE("mailgo-tel").style.display = "none")
);
// is the modal hidden?
const mailgoIsShowing = () => getE("mailgo").style.display === "flex";

View File

@@ -4,6 +4,8 @@ $mailgo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
$default-color: #4a4a4a;
$gmail-color: #d44638;
$outlook-color: #0072c6;
$wa-color: #00bfa5;
$telegram-color: #0088cc;
.mailgo-modal {
position: fixed;
@@ -98,6 +100,14 @@ $outlook-color: #0072c6;
color: $outlook-color;
}
&.mailgo-wa {
color: $wa-color;
}
&.mailgo-telegram {
color: $telegram-color;
}
&.mailgo-copy {
padding: 16px 10px;
font-size: 16px;
@@ -109,14 +119,24 @@ $outlook-color: #0072c6;
color: $default-color;
}
&.mailgo-gmail:hover {
background-color: rgba(212, 70, 56, 0.08);
color: $gmail-color;
}
&.mailgo-outlook:hover {
background-color: rgba(0, 114, 198, 0.08);
color: $outlook-color;
}
&.mailgo-gmail:hover {
background-color: rgba(212, 70, 56, 0.08);
color: $gmail-color;
&.mailgo-wa:hover {
background-color: rgba(0, 114, 198, 0.08);
color: $wa-color;
}
&.mailgo-telegram:hover {
background-color: rgba(0, 114, 198, 0.08);
color: $telegram-color;
}
&.mailgo-by {