Improve contact mentions with hovercards.
This commit is contained in:
parent
67bd721654
commit
7eb5ecae2d
20 changed files with 1469 additions and 149 deletions
44
resources/assets/sass/layout.scss
vendored
44
resources/assets/sass/layout.scss
vendored
|
@ -44,9 +44,47 @@ body {
|
|||
padding-left: 3px;
|
||||
}
|
||||
|
||||
.mini-h-card img {
|
||||
display: inline-block;
|
||||
height: 1rem;
|
||||
.mini-h-card {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mini-h-card .p-name {
|
||||
position: relative;
|
||||
z-index: 100; /* we want this to still appear in the hovercard */
|
||||
}
|
||||
|
||||
.mini-h-card .hovercard {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mini-h-card:hover .hovercard {
|
||||
display: inline;
|
||||
background-color: white;
|
||||
border: solid 1px grey;
|
||||
position: absolute;
|
||||
min-width: 300px;
|
||||
left: -10px;
|
||||
top: -10px;
|
||||
z-index: 50; /* less than p-name */
|
||||
padding: 2rem 3rem 10px 10px;
|
||||
}
|
||||
|
||||
.hovercard .u-photo {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
width: 3rem;
|
||||
height: auto;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.hovercard .social-icon {
|
||||
height: 0.8rem;
|
||||
}
|
||||
|
||||
.hovercard a::before {
|
||||
content: "\A";
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
body > .h-card {
|
||||
|
|
|
@ -1,8 +1 @@
|
|||
<span class="u-category h-card">
|
||||
<a class="mini-h-card u-url p-name" href="{{ $contact->homepage }}">
|
||||
<img class="u-photo" alt="" src="{{ $contact->photo }}">
|
||||
{!! $contact->name !!}
|
||||
</a>
|
||||
@if ($contact->facebook)<a class="u-url" href="https://www.facebook.com/{{ $contact->facebook }}"></a>@endif
|
||||
@if ($contact->twitter)<a class="u-url" href="https://twitter.com/{{ $contact->twitter }}"></a>@endif
|
||||
</span>
|
||||
<span class="u-category h-card mini-h-card"><a class="u-url p-name" href="{{ $contact->homepage }}">{!! $contact->name !!}</a><span class="hovercard">@if ($contact->facebook)<a class="u-url" href="https://www.facebook.com/{{ $contact->facebook }}"><img class="social-icon" src="/assets/img/social-icons/facebook.svg"> {{ $contact->facebook_name ?: 'Facebook' }}</a>@endif @if ($contact->twitter)<a class="u-url" href="https://twitter.com/{{ $contact->twitter }}"><img class="social-icon" src="/assets/img/social-icons/twitter.svg"> {{ $contact->twitter }}</a><img class="u-photo" alt="" src="{{ $contact->photo }}">@endif</span></span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue