1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update shared components

This commit is contained in:
Luke Pulverenti 2016-03-09 12:40:22 -05:00
parent fb269362ff
commit 71811cb9e3
221 changed files with 32936 additions and 101 deletions

View file

@ -0,0 +1,72 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@import "../variables";
.mdl-badge {
position : relative;
white-space: nowrap;
margin-right: ($badge-size + $badge-padding);
&:not([data-badge]) {
margin-right: auto;
}
&[data-badge]:after {
content: attr(data-badge);
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-content: center;
align-items: center;
position: absolute;
top: -($badge-size / 2);
right: -($badge-size + $badge-padding);
.mdl-button & {
top: -10px;
right: -5px;
}
font-family: $preferred_font;
font-weight: 600;
font-size: $badge-font-size;
width: $badge-size;
height: $badge-size;
border-radius : 50%;
background: $badge-background;
color: $badge-color;
}
&.mdl-badge--no-background {
&[data-badge]:after {
color: $badge-color-inverse;
background: $badge-background-inverse;
box-shadow: 0 0 1px gray;
}
}
&.mdl-badge--overlap {
margin-right: ($badge-size - $badge-overlap);
&:after {
right: -($badge-size - $badge-overlap);
}
}
}

View file

@ -0,0 +1,9 @@
<style>
.demo-badge__badge-on-icon-icon .mdl-badge {
color: rgba(0, 0, 0, 0.24);
}
.demo-badge__badge-on-icon-icon .mdl-badge.material-icons {
font-size: 32px;
}
</style>
{% include "badge-on-icon-icon.html" %}

View file

@ -0,0 +1 @@
<div class="material-icons mdl-badge mdl-badge--overlap" data-badge="♥">account_box</div>

View file

@ -0,0 +1,9 @@
<style>
.demo-badge__badge-on-icon-text .mdl-badge {
color: rgba(0, 0, 0, 0.24);
}
.demo-badge__badge-on-icon-text .mdl-badge.material-icons {
font-size: 32px;
}
</style>
{% include "badge-on-icon-text.html" %}

View file

@ -0,0 +1,2 @@
<!-- Number badge on icon -->
<div class="material-icons mdl-badge mdl-badge--overlap" data-badge="1">account_box</div>

View file

@ -0,0 +1,6 @@
<style>
.demo-badge__badge-on-text-icon .mdl-badge {
color: rgba(0, 0, 0, 0.24);
}
</style>
{% include "badge-on-text-icon.html" %}

View file

@ -0,0 +1,2 @@
<!-- Icon badge -->
<span class="mdl-badge" data-badge="♥">Mood</span>

View file

@ -0,0 +1,7 @@
<style>
.demo-badge__badge-on-text-text .mdl-badge {
color: rgba(0, 0, 0, 0.24);
}
</style>
{% include "badge-on-text-text.html" %}

View file

@ -0,0 +1,2 @@
<!-- Number badge -->
<span class="mdl-badge" data-badge="4">Inbox</span>