nfu_new2_bo5/assets/stylesheets/template/modules/ad_banner.scss

979 lines
21 KiB
SCSS

@charset "utf-8";
@import "../initial";
//
// Widget
//
// Widget
// ## gerenral styles
.banner-shadow{
z-index: 198;
display: block;
position: absolute;
width: 100%;
height: 7em;
top: 0;
left: 0;
background-image: linear-gradient(180deg, #000000ab 0%, #00000040 53%, transparent 100%);
}
.w-ba-banner .controlplay .resume-slide.active i {
color:#a0d2f3!important;
}
.w-ba-banner .controlplay .pause-slide.active i {
color: $theme-color-green;
}
.banner-deco .background-mask {
opacity: 0;
transform: translateY(-100px); /* 從上方出現 */
transition: transform 1s ease-out, opacity 1s ease-out;
}
.banner-deco .background-mask::before,
.banner-deco .background-mask::after {
opacity: 0;
transform: translateY(100px); /* 從下方出現 */
transition: transform 1s ease-out 0.3s, opacity 1s ease-out 0.3s; /* 延遲 0.3 秒 */
}
/* 加上 .active 後觸發進場動畫 */
.banner-deco.active{
opacity: 1;
transform: translateY(0);
&:before{
opacity: 1;
transform: translateY(0);
}
&:after{
opacity: 1;
transform: translateY(0);
}
}
.banner-deco.active .background-mask {
opacity: 1;
transform: translateY(0);
}
.banner-deco.active .background-mask::after {
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0);
}
.banner-deco.active .background-mask::before{
opacity: 1;
-webkit-transform: translate(-50%, 85%);
transform: translate(-50%, 85%);
// @media(max-width:480px){
// -webkit-transform: translate(-50%, 85%);
// transform: translate(-22%, 42%);
// }
}
.banner-deco{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 199;
pointer-events: none;
transform: translate(0, 0);
transition: transform 0.6s ease-out; /* 平滑回原位 */
will-change: transform;
&:before{
transform: translateY(-50%);
transition: transform 0.6s ease-out; /* 平滑回原位 */
will-change: transform;
content: '';
position: absolute;
top: -621px;
left: -250px;
width: 800px;
height: 800px;
background-size: contain;
background:url(/assets/banner-deco.svg) no-repeat;
// clip-path: polygon(25% 5.77%, 75% 5.77%, 100% 50%, 75% 94.23%, 25% 94.23%, 0% 50%);
// background: radial-gradient(circle at 70% 80%, #66a9e2b3, transparent 60%), radial-gradient(circle at 25% 25%, #ffa0dc80, transparent 40%), radial-gradient(circle at 50% 50%, #3c78ff4d, transparent 70%), linear-gradient(135deg, #54a1e1 0%, #00437c 60%, #80b5ff 100%);
}
&:after{
transform: translateY(-50%);
transition: transform 0.6s ease-out; /* 平滑回原位 */
will-change: transform;
content: '';
position: absolute;
top: -621px;
right: -567px;
width: 800px;
height: 800px;
background-size: contain;
background:url(/assets/banner-deco.svg) no-repeat;
// clip-path: polygon(25% 5.77%, 75% 5.77%, 100% 50%, 75% 94.23%, 25% 94.23%, 0% 50%);
// background: radial-gradient(circle at 70% 80%, #66a9e2b3, transparent 60%), radial-gradient(circle at 25% 25%, #ffa0dc80, transparent 40%), radial-gradient(circle at 50% 50%, #3c78ff4d, transparent 70%), linear-gradient(135deg, #54a1e1 0%, #00437c 60%, #80b5ff 100%);
}
.background-mask{
width: 100%;
height: 100%;
content: '';
position: absolute;
top: 0;
left: 0;
// background: top left/500px 300px no-repeat url(/assets/triangle-left.png), top right/300px 100px no-repeat url(/assets/triangle-right.png);
z-index:3;
// @media(max-width:480px){
// background: top left/300px 150px no-repeat url(/assets/triangle-left.png), top right/100px 50px no-repeat url(/assets/triangle-right.png);
// }
&:before{
content: '';
position: absolute;
bottom: 0;
left: 0;
display: block;
padding-bottom: 100%;
width: 100%;
background:url(/assets/banner-deco.svg) no-repeat;
// background: radial-gradient(circle at 70% 80%, #66a9e2b3, transparent 60%), radial-gradient(circle at 25% 25%, #ffa0dc80, transparent 40%), radial-gradient(circle at 50% 50%, #3c78ff4d, transparent 70%), linear-gradient(135deg, #54a1e1 0%, #00437c 60%, #80b5ff 100%);
// border-radius: 50%;
-webkit-transform: translate(-60%, 110%);
transform: translate(-60%, 110%);
// clip-path: polygon(25% 5.77%, 75% 5.77%, 100% 50%, 75% 94.23%, 25% 94.23%, 0% 50%);
}
&:after{
opacity: .3;
width: 400px;
height: 400px;
content: '';
position: absolute;
bottom: -300px;
right:-200px;
display: block;
background: url(/assets/screw.png) no-repeat top left;
-webkit-transform: translateY(50%);
transform: translateY(50%);
background-size: cover;
}
}
}
ul.button-mid{
margin:0;
}
.banner-pager .active-slide button{
background: $theme-color-second!important;
}
.w-ba-banner .button-mid {
position: absolute;
width: 100%;
height: 0;
top: 50%;
}
.next-button, .prev-button {
cursor: pointer;
}
iframe{
border: none;
}
.jp-video{
border:0;
}
.w-ba-banner {
.cursor {
cursor: pointer;
}
.w-ad-banner__caption{
@media(max-width:768px){
h3{
margin-top: 0;
}
}
}
}
.w-ba-banner__wrap {
width: 100%;
max-width: 100%;
height: auto;
}
.w-ba-banner__slide {
width: 100%;
}
[data-cycle-carousel-visible="3"] .w-ba-banner__slide {
width: auto;
height: auto
}
[data-cycle-carousel-visible="3"]{
padding-bottom: 0;
}
.ad-overlay {
color: #333333;
font-family: $main-font;
width: 100%;
bottom: 0;
font-family: "Noto Serif TC",sans-serif;
// background-image: linear-gradient(180deg,transparent 0,rgba(0,0,0,.7) 40%,#000);
h3,h2{
font-weight: bold;
}
@media(max-width: $screen-sm) {
padding: 0.5em 1em;
}
}
.banner-pager {
@include list-reset;
position: absolute;
bottom: 0.5em;
z-index: 200;
text-align:center;
width: 100%;
li {
// height: 3px;
// width: 4%;
// margin: 0 2px;
cursor: pointer;
display: inline-block;
width:auto!important;
}
button {
// background: hsla(0,0%,100%,.4);
// width: 100%;
// height: 3px;
// border: unset;
background:#ccc !important;
display: inline-block;
margin-right: 0.25em;
width: 0.8em !important;
height: 0.8em !important;
border-radius: 50%;
opacity: .5;
cursor: pointer;
border: 0;
}
.active-slide button {
opacity: 1;
background: $theme-color-green;
}
a {
background: white;
display: inline-block;
margin-right: 0.25em;
width: 0.8em;
height: 0.8em;
border-radius: 50%;
//behavior: url("/assets/ie_support/PIE2/PIE.htc");
opacity: .5;
cursor:pointer;
border:0;
}
.active-slide a {
opacity: 1;
}
}
.controlplay{
position: absolute;
right: 1em;
top: 3%;
z-index:101;
a {
display: inline-block;
margin-right: 0.25em;
cursor: pointer;
padding: 5px 10px;
border: 1px solid rgba(255, 255, 255, 0.5);
background: rgba(0, 0, 0, 0.2);
i {
font-family: FontAwesome;
position: relative;
font-size: 1rem;
line-height: 1;
color: #FFF;
vertical-align: middle;
font-style: unset;
}
}
.resume-slide i::before{
content:"\f04b"
}
.pause-slide i::before{
content:"\f04c"
}
@media(max-width: $screen-sm) {
right: 0;
a { padding: 0 5px;}
a i { font-size: 0.75em; }
}
}
ul.button-mid{
.prev-button{
transition: 0.4s;
position: relative;
float:left;
left: 0.5rem;
width: 2.5rem;
height: 2.5rem;
font-size: 1.5rem;
border-radius: 1em;
color: #ffffff;
// background:$theme-color-third;
background: radial-gradient(circle at 60% 90%, #ea8466, transparent 60%), radial-gradient(circle at 10px 10px, #e66c4a, transparent 25%), #cc3d00;
text-align: center;
line-height: 2.5rem;
top: 50%;
position: absolute;
transform: translateY(-50%);
z-index: 999;
&:hover {
background: rgba(0,0,0,0.1);
}
}
.next-button{
float: right;
transition: 0.4s;
position: relative;
right: 0.5rem;
width: 2.5rem;
height: 2.5rem;
font-size: 1.5rem;
border-radius: 1em;
color: $theme-white;
// background: $theme-color-third;
background: radial-gradient(circle at 60% 90%, #ea8466, transparent 60%), radial-gradient(circle at 10px 10px, #e66c4a, transparent 25%), #cc3d00;
text-align: center;
line-height: 2.5rem;
top: 50%;
position: absolute;
transform: translateY(-50%);
z-index: 999;
&:hover {
background: rgba(0,0,0,0.1);
}
}
}
.banner-responsive {
width: 100%;
}
.background-overlay{
background-color: #F5F5F5;
opacity: 0.95;
transition: background 0.3s, border-radius 0.3s, opacity 0.3s;
height: 100%;
top: 0;
left: 0;
z-index: 100;
position: absolute;
width: 100%;
}
// Widget 10
.ba-banner-widget-10 {
height: 30vh !important;
z-index: 0;
.title{
border-bottom:0!important;
}
.en{
letter-spacing: 0.5px;
color: #EAFFDB;
font-size: 0.6em;
line-height: 1.3;
font-weight: 400;
}
.youtube, .cycle-youtube {
width: 100%;
height: 100%;
}
object, embed {
width: 100%;
height: 100%;
}
.button-mid{
z-index: 101;
}
.ad-overlay{
text-align: center;
position: relative;
background: none;
color: #fff;
z-index: 100;
padding-left: 10%;
padding-right: 10%;
// text-shadow: 1px 1px 1px #0000008c;
color: #fff;
text-align: center;
text-shadow: 0px 0px 6px #00000080;
h3{
width: 100%;
display: inline-block;
font-size: 2.1em;
}
.cht{
color: #fff;
width: 100%;
display: inline-block;
font-size: 1.3em;
font-weight: normal;
}
}
img{
position: fixed;
top:0;
height: 50vh;
width: 100vw;
}
&,& .jp-jplayer{
@media(min-width:1801px){
.ad-overlay{
bottom: 0;
position: absolute;
}
}
.ad-overlay{
position: absolute;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
h2{
text-align: center;
line-height: 1.5;
text-transform: uppercase;
font-weight: 600;
display: block;
span{
color: #c9eff6;
font-size: 0.6em;
line-height: 1.1;
margin: 0px;
display: block;
font-weight: 500;
}
}
}
}
}
// Widget 0
.ba-banner-widget-0 {
background: radial-gradient(circle at 70% 80%, #00437c, transparent 60%), radial-gradient(circle at 25% 25%, #a0bfff80, transparent 40%), radial-gradient(circle at 50% 50%, #3c78ff4d, transparent 70%), linear-gradient(135deg, #00437c 0%, #00437c 60%, #80b5ff 100%);
@media(min-width:769px){
height: 100vh !important;
}
z-index: 0;
.w-ba-banner__wrap{
@media(min-width:769px){
height: 100vh !important;
}
}
.youtube, .cycle-youtube {
width: 100%;
height: 100%;
}
object, embed {
width: 100%;
height: 100%;
}
.button-mid{
width: 8%;
min-width: 7em;
top: auto;
bottom: 4em;
left: 4em;
position: absolute;
z-index: 200;
@media(max-width:480px){
bottom: 3em;
left: 1em;
}
}
.controlplay{
bottom: 1em;
top: auto;
z-index: 200;
}
.banner-pager{
display: none;
}
.banner-overlay{
text-shadow: 2px 3px 2px #000000;
z-index: 199;
color: #fff;
position: absolute;
padding: 6.5em 5em;
background:none;
h2{
font-size: 2.2em;
}
h3{
font-size: 2em;
}
h4{
font-size: 1.5em;
}
}
.w-ba-banner__caption {
p {
font-family: $main-font;
font-size: $w-caption-desc;
}
}
@media(max-width: $screen-sm) {
.banner-deco:after{
display: none;
}
.banner-deco:before{
display: none;
top: -120px;
left: -120px;
width: 200px;
height: 200px;
}
.banner-responsive{
position: relative;
}
.ad-overlay {
position: relative;
padding:2em 1em 5em;
}
.controlplay {
right: 0;
a { padding: 0 5px;}
a i { font-size: 0.75em; }
}
}
img{
position: fixed;
top:0;
}
}
// Widget 1
.ba-banner-widget-1 {
.banner-pager{
display: none;
}
.prev-button,.next-button{
background: radial-gradient(circle at 60% 90%, #ea8466, transparent 60%), radial-gradient(circle at 10px 10px, #e66c4a, transparent 25%), #cc3d00!important;
font-size: 1.2rem!important;
}
.banner-overlay{
z-index: 200;
position: absolute;
padding: 6.5em 5em;
background:none;
color: #fff;
h2{
font-size: 2em;
}
}
.w-ba-banner__caption {
p {
font-family: $main-font;
font-size: $w-caption-desc;
}
}
@media(max-width: $screen-sm) {
.ad-overlay {
padding:1em;
}
.controlplay {
right: 0;
a { padding: 0 5px;}
a i { font-size: 0.75em; }
}
}
}
// Widget 2
.ba-banner-widget-2 {
.w-ba-banner__image {
width: 100%;
height: auto;
}
.youtube, .cycle-youtube {
width: 100%;
height: 100%;
}
object, embed {
width: 100%;
height: 100%;
}
.banner-pager {
right: 1em;
top: -2em;
z-index: 102;
display: none;
}
}
// Widget 3
.ba-banner-widget-3 {
position: relative;
.banner-pager .active-slide a {
background: $theme-color-second !important;
}
.w-ba-banner__wrap {
width: 100%;
}
.w-ba-banner__slide {
width: 100%;
position: relative;
}
.banner-pager {
right: 0;
bottom: 2em;
li { height: unset; width: unset; }
}
ul.button-mid { display: none; }
}
//Widget 4
.ba-banner-widget-4 {
.w-ba-banner__wrap {
text-align: center;
// img { margin-bottom: 0.5rem; }
}
}
//Widget 5
.ba-banner-widget-5 {
margin:0;
.controlplay{
top: 1em;
right: auto;
}
.w-ba-banner__slide{
&:hover{
.slide-content{
-webkit-transition: all 200ms
cubic-bezier(0.39, 0.5, 0.15, 1.36);
-moz-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
-ms-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
-o-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
transition: all 200ms
cubic-bezier(0.39, 0.5, 0.15, 1.36);
background: radial-gradient(circle at 70% 80%, #66a9e2b3, transparent 60%), radial-gradient(circle at 5% 5%, #fb8f72, transparent 40%), radial-gradient(circle at 50% 50%, #3c78ff4d, transparent 70%), linear-gradient(135deg, #2b7bbe 0%, #00437c 60%, #fb8f72 100%);
}
.slide-content,.slide-img {
-webkit-box-shadow: 0 10px 20px 0 #00000033;
box-shadow: 0 10px 20px 0 #00000033;
-webkit-transition: -webkit-box-shadow 0.3s;
transition: -webkit-box-shadow 0.3s;
transition: box-shadow 0.3s;
transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
}
}
}
.button-mid{
min-width: 8em;
@media(max-width:768px){
bottom: -2em;
position: relative;
clear: both;
}
@media(min-width:769px){
width: 9%;
position: absolute;
right: 0;
bottom: 4em;
}
}
.banner-pager{
position: relative;
display: block;
clear: both;
@media(min-width:769px){
width: 15%;
bottom: 0;
left: 0;
}
}
.slide-img {
@media(max-width:768px){
padding: 0;
}
@media(min-width:769px){
padding: 0;
}
}
.slide-content {
z-index: 200;
font-family: $main-font;
padding: 1em;
background: radial-gradient(circle at 70% 80%, #66a9e2b3, transparent 60%), radial-gradient(circle at 5% 5%, #80b5ff, transparent 40%), radial-gradient(circle at 50% 50%, #3c78ff4d, transparent 70%), linear-gradient(135deg, #54a1e1 0%, #00437c 60%, #fb8f72 100%);
@media(min-width:769px){
min-height: 11em;
position: absolute;
width: 32%;
right: 0;
}
h2{
font-size: 2.2em;
}
h3{
font-size: 2em;
margin: 0.5em 0;
color: #fff;
}
h4{
font-size: 1.5em;
}
div {
white-space: normal;
word-break: break-all;
font-size: 1rem;
color: #fff;
}
}
.banner-pager {
li { height: unset; width: unset; }
a { background: #a0d2f3;}
}
@media(max-width: $screen-sm) {
.slide-content {
padding: 0.5em 1em;
position: relative;
h3 { font-size: 1em; }
}
.controlplay {
a { padding: 0 5px;}
a i { font-size: 0.75em; }
}
}
@media(max-width: $screen-sm -1) {
ul.button-mid.next-button, ul.button-mid.prev-button{
top: 35%;
transform: translateY(-35%);
}
.slide-content h3, .slide-content div { color: $theme-white; }
.w-ba-banner__wrap { overflow: visible;}
}
}
// Widget 7
.ba-banner-widget-7 {
position: relative;
background: radial-gradient(circle at 70% 80%, #66a9e2b3, transparent 60%), radial-gradient(circle at 5% 5%, #80b5ff, transparent 40%), radial-gradient(circle at 50% 50%, #3c78ff4d, transparent 70%), linear-gradient(135deg, #54a1e1 0%, #00437c 60%, #fb8f72 100%);
@media(min-width:1024px){
display: flex;
.w-ba-banner__wrap{
flex: 0 0 60%;
}
.ad-overlay{
position: relative;
background: none;
}
.banner-overlay{
padding:2em 1em;
}
background: radial-gradient(circle at 70% 80%, #66a9e2b3, transparent 60%), radial-gradient(circle at 5% 5%, #80b5ff, transparent 40%), radial-gradient(circle at 50% 50%, #3c78ff4d, transparent 70%), linear-gradient(135deg, #54a1e1 0%, #00437c 60%, #fb8f72 100%);
}
.w-ba-banner__caption {
color: #fff;
}
@media(max-width:$screen-xs){
height:auto!important;
}
@media (max-width: 769px){
.ad-overlay, .banner-overlay {
padding: 2em;
}
.w-ad-banner__caption{
}
}
}
// widget8
.ba-banner-widget-8{
position: relative;
z-index: 0;
.controlplay{
display: none;
}
.w-ba-banner__slide{
padding: 0.5em;
overflow: hidden;
}
.banner-pager{
display: none;
}
.banner-overlay {
border-bottom: 3px solid $theme-color-second;
text-align: center;
width: 100%;
visibility: unset !important;
overflow: hidden;
h3{
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
white-space: pre-line;
}
h3,p{
font-size: 1.25em;
}
p{
padding: 0 0.2em;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
}
}
}
.ba-banner-widget-youtube{
overflow: hidden;
}
// widget9
.ba-banner-widget-9{
background: radial-gradient(circle at 70% 80%, #00437c, transparent 60%), radial-gradient(circle at 25% 25%, rgba(160, 191, 255, 0.501961), transparent 40%), radial-gradient(circle at 50% 50%, rgba(60, 120, 255, 0.301961), transparent 70%), linear-gradient(135deg, #00437c 0%, #00437c 60%, #80b5ff 100%);
@media(max-width:1024px){
height: auto!important;
.w-ba-banner__wrap{
height: auto!important;
}
}
@media(min-width:1025px){
height: 90vh !important;
.jp-jplayer{
position: fixed;
}
.jp-video{
height: 90vh !important;
}
}
.w-ad-banner__caption_text {
display: none;
}
.w-ba-banner__slide{
@media(min-width:1025px){
position: fixed!important;
}
}
.w-ba-banner__wrap{
@media(min-width:1025px){
height: 90vh !important;
}
}
.w-ba-banner__caption {
h2 {
font-family: $main-font;
font-size: $w-caption-font-size;
margin: 0.5em 0;
}
p {
font-family: $main-font;
font-size: $w-caption-desc;
}
}
.controlplay{
bottom: 1em;
top: auto;
z-index: 200;
visibility: visible !important;
}
.banner-pager{
display: none;
}
.button-mid{
width: 8%;
min-width: 7em;
top: auto;
bottom: 4em;
left: 4em;
position: absolute;
z-index: 200;
visibility: visible !important;
@media(max-width:480px){
bottom: 3em;
left: 1em;
}
}
.controlplay{
bottom: 1em;
top: auto;
z-index: 200;
}
.banner-overlay{
visibility: visible !important;
text-shadow: 2px 3px 2px #000000;
z-index: 199;
color: #fff;
position: absolute;
padding: 6.5em 5em;
background:none;
h2{
font-size: 2.2em;
}
h3{
font-size: 2em;
}
h4{
font-size: 1.5em;
}
}
.w-ba-banner__caption {
p {
font-family: $main-font;
font-size: $w-caption-desc;
}
}
@media(max-width: $screen-sm) {
.banner-deco:after{
display: none;
}
.banner-deco:before{
display: none;
top: -120px;
left: -120px;
width: 200px;
height: 200px;
}
.banner-responsive{
position: relative;
}
.ad-overlay {
position: relative;
padding:2em 1em 5em;
}
.controlplay {
right: 0;
a { padding: 0 5px;}
a i { font-size: 0.75em; }
}
}
}