koel/resources/assets/sass/partials/_mixins.scss
An Phan 3ca0009f73 Add a home (dashboard) view
A home/dashboard view has been added, which contains most
recently-played songs (in the current session), top songs, albums, and
artists. Song playback has also been revised with proper Vue's
reactivity, resulting in a much better and cleaner code base.
2016-02-08 19:25:44 +07:00

185 lines
4.1 KiB
SCSS

@mixin vertical-center() {
display: flex;
align-items: center;
justify-content: center;
}
@mixin artist-album-wrapper() {
justify-content: space-between;
flex-wrap: wrap;
display: flex;
@media only screen
and (max-device-width : 768px) {
justify-content: center;
}
@media only screen
and (min-device-width: 769px)
and (max-device-width : 1024px) {
justify-content: space-around;
}
}
@mixin artist-album-card() {
.item {
display: flex;
flex: 0 0 256px;
flex-direction: column;
margin-bottom: 16px;
.cover {
@include vertical_center();
display: flex;
flex: 0 0 256px;
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
position: relative;
.control {
display: none;
width: 96px;
height: 96px;
text-align: center;
line-height: 96px;
font-size: 54px;
background: #111;
border-radius: 50%;
text-indent: 5px;
opacity: .7;
border: 1px solid transparent;
transition: .3s;
&:hover {
opacity: 1;
border-color: #fff;
transform: scale(1.1);
}
html.touchevents & {
display: block;
}
}
&:before {
content: " ";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
transition: .3s;
}
&:hover {
&:before {
background-color: rgba(0, 0, 0, .4);
}
.control {
display: block;
}
}
}
footer {
padding: 16px;
background: #333;
flex: 1;
}
.name {
font-weight: 500;
}
.meta {
color: $color2ndText;
margin-top: 4px;
font-size: 12px;
}
a.name, a.artist {
display: block;
color: $colorMainText;
&:hover {
color: $colorHighlight;
}
}
}
}
@mixin inset-when-pressed() {
&:active {
box-shadow: inset 0px 10px 10px -10px rgba(0,0,0,1);
}
}
@mixin button-group() {
display: flex;
position: relative;
min-width: 192px;
justify-content: flex-end;
button {
$buttonHeight: 28px;
background-color: $colorHighlight;
font-size: 12px;
height: $buttonHeight;
padding: 0 16px;
line-height: $buttonHeight;
text-transform: uppercase;
display: inline-block;
border-radius: $buttonHeight/2 0px 0px $buttonHeight/2;
&:last-of-type {
border-top-right-radius: $buttonHeight/2;
border-bottom-right-radius: $buttonHeight/2;
}
&:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
margin-left: 1px;
}
i {
margin-right: 4px;
}
&:hover {
background-color: darken($colorHighlight, 10%);
}
@include inset-when-pressed();
}
}
@mixin context-menu() {
font-weight: $fontWeight_Thin;
font-size: $fontSize;
color: #111;
background-color: rgb(232, 232, 232);
padding: 8px;
border-radius: 5px;
display: flex;
justify-content: center;
flex-direction: column;
align-items: stretch;
text-align: left;
box-shadow: inset 0 0px 0 rgba(255,255,255,.6), 0 22px 70px 4px rgba(0,0,0,0.56), 0 0 0 1px rgba(0, 0, 0, 0.3);
input[type="search"], input[type="text"], input[type="email"], input[type="url"] {
background: #fff;
&:focus {
background: $colorDirtyInputBgr;
}
}
}