add no email display

This commit is contained in:
b1ek 2023-02-20 17:02:06 +10:00
parent 8f753a5a3d
commit 977e434d2e
2 changed files with 19 additions and 11 deletions

View File

@ -35,29 +35,35 @@
.gb_hidden_mail {
display:inline-block;
height:10pt;
background-color: #d6bdbd;
padding: 1px 3px;
border: 1px solid #a2a6a2;
border-radius: 4px;
background:#666d65;
transform: translateY(1px);
border: 1px solid #4f534e;
box-sizing: border-box;
transition: 150ms ease;
font-size: 7pt;
color: #eaeaea;
text-align: center;
user-select: none;
box-shadow: inset 0 1px 2px #fefefe20 1px 2px #30303040;
content: '';
min-width: 100px;
min-width: 75px;
}
.gb_hidden_mail:hover {
background: #7e8b7b;
}
.gb_hidden_mail:hover::before {
.gb_hidden_mail::before {
content: 'Email is hidden';
}
.gb_no_mail {
background-color: #d6bdbd;
padding: 1px 3px;
border: 1px solid #a2a6a2;
border-radius: 4px;
box-sizing: border-box;
font-size: 7pt;
box-shadow: inset 0 1px 2px #fefefe20 1px 2px #30303040;
}
.gb_entry_message_text {
margin: 0;
padding: 10px;

View File

@ -98,6 +98,8 @@ block content
if (!entry.hidemail)
| Email:
a(href='mailto:' + entry.email)= entry.email
if (entry.email == '')
span(class='gb_no_mail') No mail address
else
| Email:
span(class='gb_hidden_mail' style='width:' + (10 * (entry.email || '.').length) + 'px')