From fe4e785c0afa9e3b103ab5d7c27c19522b5ac0ad Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 1 Sep 2021 21:07:04 +0800 Subject: [PATCH] fix some error --- .../stylesheets/template/base/_autobackup.bak | 22 --- assets/stylesheets/template/base/_global.scss | 2 + .../stylesheets/template/base/_variables.scss | 6 - .../stylesheets/template/layout/content.scss | 126 ++++++++---------- .../template/modules/announcement.scss | 5 - assets/stylesheets/template/template.scss | 4 +- .../stylesheets/template/widget/sitemenu.scss | 10 +- modules/announcement/_annc_widget2.html.erb | 5 +- .../event_news/_event_news_widget2.html.erb | 71 +++++----- 9 files changed, 101 insertions(+), 150 deletions(-) diff --git a/assets/stylesheets/template/base/_autobackup.bak b/assets/stylesheets/template/base/_autobackup.bak index ae0d2d6..e69de29 100644 --- a/assets/stylesheets/template/base/_autobackup.bak +++ b/assets/stylesheets/template/base/_autobackup.bak @@ -1,22 +0,0 @@ - -.response-content { - justify-self: auto; -} -.response-content { - justify-self: auto; -} -.response-content { - justify-self: auto; -} -.response-content { - justify-self: auto; -} -.response-content { - justify-self: auto; -} -.response-content { - justify-self: auto; -} -.response-content { - justify-self: auto; -} diff --git a/assets/stylesheets/template/base/_global.scss b/assets/stylesheets/template/base/_global.scss index 2a4636c..660f79a 100644 --- a/assets/stylesheets/template/base/_global.scss +++ b/assets/stylesheets/template/base/_global.scss @@ -28,6 +28,8 @@ a:focus { img { max-width: 100%; height: auto; + object-fit: cover; + object-position: center; } .admin-edit { diff --git a/assets/stylesheets/template/base/_variables.scss b/assets/stylesheets/template/base/_variables.scss index fbd01ae..62fb3ab 100644 --- a/assets/stylesheets/template/base/_variables.scss +++ b/assets/stylesheets/template/base/_variables.scss @@ -85,12 +85,6 @@ $w-item-heading-font-size: 0.85rem; $border-width: 0.25em; - - - - - - .response-content { justify-self: auto; } diff --git a/assets/stylesheets/template/layout/content.scss b/assets/stylesheets/template/layout/content.scss index 2667bf5..df2fb0d 100644 --- a/assets/stylesheets/template/layout/content.scss +++ b/assets/stylesheets/template/layout/content.scss @@ -60,33 +60,27 @@ } } .w-event_news__img-wrap{ - height: 200px; - width: 200px; - @media(max-width: $screen-xs){ - width: 300px; - height: 300px; - margin: auto; - } - margin: 0 0 1em 0; - &:hover{ - - .captiondetail{ - visibility: visible; - opacity: 1; - transition: opacity .5s ease-out; - } - .w-event_news__img{ - transform: scale(1.5,1.5); - transition: all .5s; - } - } -} -.w-event_news__img{ - width: 200px!important; - height: 200px!important; - @media(max-width: $screen-xs){ - width: 300px!important; - height: 300px!important; + height: 200px; + width: 200px; + padding: 0; + margin: 0 0 1em 0; + @media(max-width: $screen-sm){ + width: 90%; + height: auto; + margin: auto; + } + .w-event_news__img { + transition: all .5s ease-in-out; + position: relative !important; + transform: none !important; + max-width: none !important; + width: 100% !important; + height: 100% !important; + } + &:hover{ + .w-event_news__img{ + transform: scale(1.5) !important; + } } } .w-event_news__img-wrap::before{ @@ -101,18 +95,6 @@ border-style: solid; border-width: 40px 40px 0 0; } -.captiondetail{ - width: 200px; - height: 200px; - position: absolute; - left: 0; - opacity: 0; - background: #000000a6 url(/assets/hover.png) center center no-repeat; - @media(max-width: $screen-xs){ - width: 300px; - height: 300px; - } -} .index-event_news-5{ img{ width: 100%; @@ -147,16 +129,16 @@ height: 100%; } } - @media(min-width:$screen-xs){ + @media(min-width:$screen-sm){ height: 300px; } - @media(max-width:$screen-xs){ + @media(max-width:$screen-sm){ margin-bottom: 1em; } } .i-event_news__item{ margin-bottom: 6em; - @media(max-width:$screen-xs){ + @media(max-width:$screen-sm){ margin-bottom: 6em; } } @@ -374,36 +356,32 @@ background: linear-gradient( bottom: 0; position: absolute; @media(min-width:1900px){ - height: 983px; - top: 180%; - } - @media screen and (min-width:1400px) and (max-width:1899px){ - height: 992px; - top: 172%; - } - @media screen and (min-width:1025px) and (max-width:1400px){ - height: 1025px; - top: 164%; - background: linear-gradient( -338deg -, transparent 63px, #fff 0); - } - @media screen and (min-width:769px) and (max-width:1025px){ - height: 990px; - top: 168%; - } - @media screen and (min-width:$screen-xs) and (max-width:769px){ - top: 186%; - height: 10405px; - background: linear-gradient( -338deg -, transparent 38px, #fff 0); - } - @media(max-width:$screen-xs){ - height: 2131px; - top: 260%; - background: #fff; - } + height: 983px; + top: 180%; + } + @media screen and (min-width:1400px) and (max-width:1899px){ + height: 992px; + top: 172%; + } + @media screen and (min-width:1025px) and (max-width:1400px){ + height: 1025px; + top: 164%; + background: linear-gradient(338deg, transparent 63px, #fff 0); + } + @media screen and (min-width:769px) and (max-width:1025px){ + height: 990px; + top: 168%; + } + @media screen and (min-width:$screen-xs) and (max-width:769px){ + top: 186%; + height: 10405px; + background: linear-gradient(338deg, transparent 38px, #fff 0); + } + @media(max-width:$screen-xs){ + height: 2131px; + top: 260%; + background: #fff; + } } .triangle5{ border-color: transparent #fff #fff transparent; @@ -416,8 +394,8 @@ background: linear-gradient( position: relative; margin-top: -8em; @media screen and (min-width:769px) and (max-width:1024px){ - border-width: 42px 108px; - margin-top: -4em; + border-width: 42px 108px; + margin-top: -4em; } @media screen and (min-width:$screen-xs) and (max-width:769px){ diff --git a/assets/stylesheets/template/modules/announcement.scss b/assets/stylesheets/template/modules/announcement.scss index 101f51c..72823fb 100644 --- a/assets/stylesheets/template/modules/announcement.scss +++ b/assets/stylesheets/template/modules/announcement.scss @@ -7,11 +7,6 @@ // .w-annc__img-wrap{ &:hover{ - .captiondetail{ - visibility: visible; - opacity: 1; - transition: opacity .5s ease-out; - } .w-annc__img{ transform: scale(1.5,1.5); transition: all .25s; diff --git a/assets/stylesheets/template/template.scss b/assets/stylesheets/template/template.scss index c97dd5b..7d0e5f0 100644 --- a/assets/stylesheets/template/template.scss +++ b/assets/stylesheets/template/template.scss @@ -145,9 +145,11 @@ ul.tab_nav { } } span.hover-picture { - display: inline-table; + display: inline-block; position: relative; overflow: hidden; + height: 100%; + width: 100%; } span.hover-picture-background { background: rgba(0,0,0,.65) url("/assets/hover.png") center center no-repeat; diff --git a/assets/stylesheets/template/widget/sitemenu.scss b/assets/stylesheets/template/widget/sitemenu.scss index b2b9b1a..cb476fa 100644 --- a/assets/stylesheets/template/widget/sitemenu.scss +++ b/assets/stylesheets/template/widget/sitemenu.scss @@ -7,12 +7,12 @@ @include clearfix; -.sitemenu-list{ - li:first-child{ - color:#0032b2; - background: url(/assets/icon_sub-hover.png) -20px top no-repeat; + .sitemenu-list{ + li.active{ + color:#0032b2; + background: url(/assets/icon_sub-hover.png) -20px top no-repeat; + } } -} .sitemenu-item.level-1 { font-size: 0.8125rem; position: relative; diff --git a/modules/announcement/_annc_widget2.html.erb b/modules/announcement/_annc_widget2.html.erb index 9c175ee..0279346 100644 --- a/modules/announcement/_annc_widget2.html.erb +++ b/modules/announcement/_annc_widget2.html.erb @@ -5,8 +5,9 @@