angular-docs-cn/public/resources/css/module/_hero.scss

186 lines
3.2 KiB
SCSS

/*
* Hero Module
*
* A hero banner located at the top of each page that displays the
* title of the page and sometimes a decorative background.
*
*/
/*
* Class
*/
.hero {
box-sizing: border-box;
box-shadow: none;
padding: ($unit * 6) ($unit * 6) ($unit * 4) ($unit * 6);
position: relative;
height: 168px;
@include respond-to('mobile') {
height: auto;
padding-top: 40px;
}
.hero-title {
display: inline-block;
font-size: 28px;
font-weight: 400;
float: left;
line-height: 48px;
margin: 0 $unit 0 0;
opacity: .87;
text-transform: uppercase;
&.is-standard-case {
text-transform: none;
}
}
.hero-subtitle {
font-size: 14px;
font-weight: 400;
line-height: $unit * 3;
margin: 0;
opacity: .87;
text-transform: uppercase;
}
// CTA BUTTONS
.button {
margin: 0px $unit;
@include respond-to('mobile') {
margin: ($unit * 2) 0px;
display: block;
}
}
button {
// Override md-button from angular material to align language select with hero title.
margin: 0 !important;
}
/*
* Large Banner
*/
&.is-large {
height: $unit * 70;
padding-top: ($unit * 4);
text-align: center;
@include respond-to('mobile') {
height: auto;
}
h1 {
font-weight: 400;
font-size: 24px;
line-height: 32px;
margin-bottom: $unit * 4;
}
// LARGE SHEILD LOGO
.hero-logo {
filter: drop-shadow(0 2px 2px rgba($black, 0.24));
margin-bottom: $unit;
opacity: 1;
padding: 0;
width: $unit * 30;
@include respond-to('mobile') {
width: $unit * 24;
}
}
.hero-cta,
.hero-cta.md-button {
background: rgba($white, .87);
border-radius: 2px;
color: $blue-800;
font-weight: 500;
padding: 0 ($unit * 8);
transition: all .3s;
&:hover {
background: $white;
box-shadow: 0 8px 8px rgba($black, 0.24), 0 0 8px rgba($black, 0.12);
color: $blue-600;
}
}
}
/*
* Badges
*/
.hero-title-with-badges {
margin-bottom: $unit;
}
.status-circle {
margin-right: 4px;
border-radius: 50%;
width: 10px;
height: 10px;
display: inline-block;
}
// status-*, will be matched by the results in addJadeDataDocsProcessor.js, and reflect in _hero.jade
.status-deprecated {
background: #E53935;
}
.status-stable {
background: #558b2f;
}
.status-experimental {
background: #9575cd;
}
.badges {
display: flex;
justify-content: flex-start;
align-content: space-around;
align-items: center;
margin-top: 4px;
.status-badge {
color: #0143A3;
margin-left: 4px;
padding-left: 8px;
padding-right: 8px;
background-color: rgba(255,255,255,0.5);
border-radius: 2px;
line-height: 20px;
display: inline-block;
&:first-child {
margin-left: 0;
}
}
.security-risk-badge {
background-color: #FFF59D;
}
}
@media screen and (max-width: 599px) {
/* three items */
.badges .status-badge:nth-child(3) {
margin-left: 0;
margin-top: 4px;
}
.hero-title-with-badges {
margin-bottom: $unit * 2;
}
}
}