From 5b1183f66bc737b2adc670a0c74deb423f84c926 Mon Sep 17 00:00:00 2001 From: Chihyu Date: Wed, 15 Apr 2020 11:43:38 +0800 Subject: [PATCH] add adbanner widget 5 --- README.md | 0 .../template/modules/ad_banner.scss | 78 ++++++++++++++++--- assets/stylesheets/template/template.scss | 5 ++ modules/ad_banner/_ad_banner_widget5.html.erb | 59 ++++++++++++++ modules/ad_banner/info.json | 9 ++- 5 files changed, 139 insertions(+), 12 deletions(-) create mode 100644 README.md create mode 100644 modules/ad_banner/_ad_banner_widget5.html.erb diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/assets/stylesheets/template/modules/ad_banner.scss b/assets/stylesheets/template/modules/ad_banner.scss index 9ee385e..20b43a6 100644 --- a/assets/stylesheets/template/modules/ad_banner.scss +++ b/assets/stylesheets/template/modules/ad_banner.scss @@ -131,28 +131,23 @@ } ul.button-mid{ - width: 100%; - top: 50%; - position: absolute; - padding: 0; - margin-top: 0; - margin: 0; - transform: translateY(-50%); - z-index: 999; - .prev-button{ transition: 0.4s; position: relative; float:left; left: 0.5rem; width: 2.5rem; - /* background: url(/assets/next.png) no-repeat center; */ height: 2.5rem; font-size: 2.2rem; color: #ffffff; background: rgba(0,0,0,0.2); 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); } @@ -169,13 +164,17 @@ ul.button-mid{ position: relative; right: 0.5rem; width: 2.5rem; - /* background: url(/assets/next.png) no-repeat center; */ height: 2.5rem; font-size: 2.2rem; color: $theme-white; background: rgba(0,0,0,0.2); 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); } @@ -282,4 +281,61 @@ ul.button-mid{ .cycle-slide-active { z-index: 101 !important; } +} + +//Widget 5 +.ba-banner-widget-5 { + background: url(/assets/BANNER-BG-01.jpg) 0 0 no-repeat; + .slide-img { padding: 1rem 1.5rem; } + .slide-content { + z-index: 200; + font-family: $main-font; + padding-top: 0.5rem; + padding-left: 0; + + h3 { + font-size: 1rem; + margin: 0.5em 0; + color: #12517a; + } + + div { + white-space: normal; + word-break: break-all; + font-size: 1rem; + color: #373634; + padding: 0 2em 0.5em 0; + } + } + .controlplay { display: none; } + .banner-pager { + right: 1rem; + top: 0; + width: unset; + li { height: unset; width: unset; } + a { background: #a0d2f3;} + } + + @media(max-width: $screen-sm) { + .slide-content { + padding: 0.5em 1em; + position: relative; + background: #a0d2f3; + h3 { font-size: 1em; } + div { font-size: 0.75em; } + } + .controlplay { + right: 0; + 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;} + } } \ No newline at end of file diff --git a/assets/stylesheets/template/template.scss b/assets/stylesheets/template/template.scss index 18418ff..4b901f0 100644 --- a/assets/stylesheets/template/template.scss +++ b/assets/stylesheets/template/template.scss @@ -33,6 +33,11 @@ .response-container { position: relative; + @media (min-width: $screen-xs) { + width: 100%; + padding: 0; + } + @media (min-width: $screen-sm) { width: 100%; } diff --git a/modules/ad_banner/_ad_banner_widget5.html.erb b/modules/ad_banner/_ad_banner_widget5.html.erb new file mode 100644 index 0000000..5d6621b --- /dev/null +++ b/modules/ad_banner/_ad_banner_widget5.html.erb @@ -0,0 +1,59 @@ +
+
+
+
+ + + +
+
+

{{title}}

+
{{context}}
+
+ +
+
+ + + +
+ \ No newline at end of file diff --git a/modules/ad_banner/info.json b/modules/ad_banner/info.json index 5bd044e..d7936ad 100644 --- a/modules/ad_banner/info.json +++ b/modules/ad_banner/info.json @@ -39,7 +39,14 @@ "en" : "4. Pro Carousel ( image, Youtube video, navigation )" }, "thumbnail" : "thumb.png" + }, + { + "filename" : "ad_banner_widget5", + "name" : { + "zh_tw" : "5. 橫幅文字輪播 ( 圖片, 文字區域, 導航圖示 )", + "en" : "5. Carousel ( image, title, description, navigation )" + }, + "thumbnail" : "thumb.png" } - ] } \ No newline at end of file