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

View File

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