Hide social urls behind a button

This commit is contained in:
Michael Rose 2016-03-20 22:15:43 -04:00
parent 60de8f20aa
commit abb89f7eb6
5 changed files with 93 additions and 22 deletions

View file

@ -14,9 +14,11 @@
<div class="author__content"> <div class="author__content">
<h3 class="author__name">{{ author.name }}</h3> <h3 class="author__name">{{ author.name }}</h3>
{% if author.bio %}<p class="author__bio">{{ author.bio }}</p>{% endif %} {% if author.bio %}<p class="author__bio">{{ author.bio }}</p>{% endif %}
</div>
<div class="author__urls_wrapper">
<span class="btn">Follow</span>
<div class="author__urls"> <div class="author__urls">
{% if author.uri %} {% if author.uri %}
<a href="{{ author.uri }}" target="_blank"><i class="fa fa-fw fa-globe"></i>Website</a> <a href="{{ author.uri }}" target="_blank"><i class="fa fa-fw fa-globe"></i>Website</a>

View file

@ -49,6 +49,23 @@ a:hover {
} }
/*
List view
========================================================================== */
.list__item {
@include breakpoint($medium) {
padding-right: $right-sidebar-width-narrow;
}
@include breakpoint($large) {
padding-right: $right-sidebar-width;
}
@include breakpoint($x-large) {
padding-right: $right-sidebar-width-wide;
}
}
/* /*
Grid view Grid view
========================================================================== */ ========================================================================== */

View file

@ -8,8 +8,7 @@
.sidebar { .sidebar {
@include clearfix(); @include clearfix();
margin-bottom: 2em; margin-bottom: 1em;
padding-bottom: 1em;
@include breakpoint($large) { @include breakpoint($large) {
@include span(2 of 12); @include span(2 of 12);
@include suffix(0.25 of 12); @include suffix(0.25 of 12);
@ -56,12 +55,14 @@
========================================================================== */ ========================================================================== */
.author__avatar { .author__avatar {
float: left; display: table-cell;
width: 50px; vertical-align: top;
margin-right: 10px; width: 36px;
height: 36px;
@include breakpoint($large) { @include breakpoint($large) {
float: none; display: block;
width: initial; width: initial;
height: initial;
} }
img { img {
max-width: 110px; max-width: 110px;
@ -70,23 +71,32 @@
} }
.author__content { .author__content {
float: right; display: table-cell;
width: calc(100% - 60px); // subtract avatar width + any margin/padding vertical-align: top;
vertical-align: top;
padding-left: 15px;
padding-right: 15px;
line-height: 1;
@include breakpoint($large) { @include breakpoint($large) {
float: none; display: block;
width: 100%; width: 100%;
padding-left: 0;
padding-right: 0;
} }
} }
.author__name { .author__name {
margin: 0; margin: 0;
font-family: $sans-serif-narrow; font-size: 18px;
font-size: 20px;
@include breakpoint($large) { @include breakpoint($large) {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 20px;
} }
} }
.sidebar .author__name {
font-family: $sans-serif;
}
.author__bio { .author__bio {
margin-bottom: 10px; margin-bottom: 10px;
@ -97,16 +107,58 @@
} }
} }
.author__urls_wrapper {
position: relative;
display: table-cell;
vertical-align: top;
font-family: $sans-serif;
@include breakpoint($large) {
display: block;
}
&:hover .author__urls {
display: block;
}
}
.author__urls { .author__urls {
display: none;
position: absolute;
right: 0;
margin-top: 10px;
padding: 10px;
border: 1px solid $border-color;
border-radius: $border-radius;
&:after {
content: "";
position: absolute;
border-style: solid;
border-width: 0 10px 10px;
border-color: #fff transparent;
display: block;
width: 0;
z-index: 1;
top: -10px;
left: calc(50% - 10px);
}
&:before {
content: '';
position: absolute;
border-style: solid;
border-width: 0 10px 10px;
border-color: $border-color transparent;
display: block;
width: 0;
z-index: 0;
top: -11px;
left: calc(50% - 10px);
}
a { a {
display: inline-block; display: block;
margin-bottom: 5px; margin-bottom: 5px;
padding-right: 5px; padding-right: 5px;
font-size: 14px; font-size: 14px;
text-decoration: none; text-decoration: none;
@include breakpoint($large) { white-space: nowrap;
display: block;
}
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;
} }

File diff suppressed because one or more lines are too long

10
assets/js/main.min.js vendored

File diff suppressed because one or more lines are too long