fix: more noticeable invite link on first run

This commit is contained in:
Sean Yesmunt 2019-02-05 09:16:24 -05:00
parent 762dc19f9f
commit eebe0defde
5 changed files with 89 additions and 41 deletions

View file

@ -57,7 +57,7 @@ class ToolTip extends React.PureComponent<Props, State> {
ref={ref => { ref={ref => {
this.tooltip = ref; this.tooltip = ref;
}} }}
className={classnames('card tooltip__body', { className={classnames('tooltip__body', {
'tooltip__body--short': isShortDescription, 'tooltip__body--short': isShortDescription,
})} })}
> >

View file

@ -29,6 +29,7 @@ class SideBar extends React.PureComponent<Props> {
<li <li
className={classnames('navigation__link', { className={classnames('navigation__link', {
'navigation__link--active': active, 'navigation__link--active': active,
'navigation__link--guide': guide,
})} })}
key={label} key={label}
> >

View file

@ -45,3 +45,24 @@
transform: scaleY(1); transform: scaleY(1);
} }
} }
@keyframes bounce {
0% {
width: 0;
}
10% {
width: 0.5rem;
}
20% {
width: 0;
}
30% {
width: 0.5rem;
}
40% {
width: 0;
}
}

View file

@ -61,11 +61,12 @@
transition: color 0.2s; transition: color 0.2s;
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
color: $lbry-gray-5;
&::before { &::before {
top: 0; top: 0;
left: 0; left: 0;
width: 0;
background-color: $lbry-teal-3; background-color: $lbry-teal-3;
content: ''; content: '';
height: 100%; height: 100%;
@ -73,14 +74,6 @@
transition: width 0.2s; transition: width 0.2s;
} }
&:not(.navigation__link--active):not(.navigation__link--title) {
color: $lbry-gray-5;
&::before {
width: 0;
}
}
&:not(.navigation__link--title):hover, &:not(.navigation__link--title):hover,
&.navigation__link--active { &.navigation__link--active {
color: $lbry-black; color: $lbry-black;
@ -93,6 +86,14 @@
width: 0.5rem; width: 0.5rem;
} }
} }
&.navigation__link--guide:not(:hover) {
color: rgba($lbry-white, 0.75);
&::before {
animation: bounce 1.75s infinite;
}
}
} }
.navigation__link--title { .navigation__link--title {

View file

@ -22,11 +22,13 @@
text-align: center; text-align: center;
white-space: pre-wrap; white-space: pre-wrap;
width: 200px; width: 200px;
background-color: $lbry-white;
border: 1px solid $lbry-gray-1;
box-shadow: 5px 5px 5px rgba($lbry-black, 0.15); box-shadow: 5px 5px 5px rgba($lbry-black, 0.15);
border-radius: 0.5rem;
html[data-theme='dark'] & { &.tooltip__body--short {
border: 1px solid #2f2f2f; width: 130px;
background-color: $lbry-gray-1;
} }
&::after { &::after {
@ -38,9 +40,39 @@
content: ' '; content: ' ';
position: absolute; position: absolute;
} }
}
&.tooltip__body--short { $tooltip-border: $lbry-gray-5;
width: 130px; &.tooltip--bottom .tooltip__body::after {
border-color: transparent transparent $tooltip-border transparent;
}
&.tooltip--left .tooltip__body::after {
border-color: transparent transparent transparent $tooltip-border;
}
&.tooltip--right .tooltip__body::after {
border-color: transparent $tooltip-border transparent transparent;
}
&.tooltip--top .tooltip__body::after {
border-color: $tooltip-border transparent transparent transparent;
}
html[data-theme='dark'] & {
.tooltip__body {
border: none;
}
$tooltip-border: $lbry-white;
&.tooltip--bottom .tooltip__body::after {
border-color: transparent transparent $tooltip-border transparent;
}
&.tooltip--left .tooltip__body::after {
border-color: transparent transparent transparent $tooltip-border;
}
&.tooltip--right .tooltip__body::after {
border-color: transparent $tooltip-border transparent transparent;
}
&.tooltip--top .tooltip__body::after {
border-color: $tooltip-border transparent transparent transparent;
} }
} }
} }
@ -51,24 +83,6 @@
} }
} }
.tooltip--bottom .tooltip__body {
top: 90%;
left: 50%;
margin-left: -100px;
&.tooltip__body--short {
margin-left: -65px;
}
&::after {
bottom: 100%;
left: 50%;
border-color: transparent transparent $lbry-gray-5 transparent;
margin-left: -5px;
}
}
.tooltip--label { .tooltip--label {
// When there is a label for the tooltip and not just using a button or icon // When there is a label for the tooltip and not just using a button or icon
font-size: 14px; font-size: 14px;
@ -79,12 +93,29 @@
} }
} }
.tooltip--on-component { .tooltip--on-component,
.tooltip--icon {
.tooltip__body { .tooltip__body {
margin-top: 10px; margin-top: 10px;
} }
} }
.tooltip--bottom .tooltip__body {
top: 90%;
left: 50%;
margin-left: -100px;
&.tooltip__body--short {
margin-left: -65px;
}
&::after {
bottom: 101%;
left: 50%;
margin-left: -5px;
}
}
.tooltip--left .tooltip__body { .tooltip--left .tooltip__body {
top: -5px; top: -5px;
right: 105%; right: 105%;
@ -92,8 +123,6 @@
&::after { &::after {
top: 17px; top: 17px;
left: 100%; left: 100%;
border-color: transparent transparent transparent $lbry-gray-5;
margin-top: -5px; margin-top: -5px;
} }
} }
@ -105,14 +134,12 @@
&::after { &::after {
top: 17px; top: 17px;
right: 100%; // To the left of the tooltip right: 100%; // To the left of the tooltip
border-color: transparent $lbry-gray-5 transparent transparent;
margin-top: -5px; margin-top: -5px;
} }
} }
.tooltip--top .tooltip__body { .tooltip--top .tooltip__body {
bottom: 100%; bottom: 120%;
left: 50%; left: 50%;
margin-left: -100px; margin-left: -100px;
@ -123,8 +150,6 @@
&::after { &::after {
top: 100%; top: 100%;
left: 50%; left: 50%;
border-color: $lbry-gray-5 transparent transparent transparent;
margin-left: -5px; margin-left: -5px;
} }
} }