jeter20131220 3 years ago
parent
commit
b198fd971d
5 changed files with 54 additions and 19 deletions
  1. 0 1
      column-report.html
  2. 25 18
      index.html
  3. 16 0
      style.css
  4. 0 0
      style.css.map
  5. 13 0
      style.scss

+ 0 - 1
column-report.html

@@ -5,7 +5,6 @@
     <meta charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta name="copyright" content="2021 © Opentalk │ All Rights Reserved.">
     <meta name="creation-date" content="2021-07-09 12:00:04 GTM+8">
     <meta name="description" content="">

+ 25 - 18
index.html

@@ -31,7 +31,6 @@
 </head>
 
 <body>
-
     <!-- 主選單 -->
     <section id="Navigation" class="container-fluid mx-0 px-0">
 
@@ -58,6 +57,7 @@
                 <div class="col-11 col-lg-11">
                     <p class="text-center">愛學習折扣| 購買课程最低僅需 NT$330,可以獲得折扣课程的最後一天。僅剩<span id="hours"></span>小時<span
                             id="minutes"></span>分鐘<span id="seconds" style="border: none;"></span>秒。</p>
+                            
                 </div>
                 <div class="col-1 col-lg-1 d-flex align-items-baseline px-0 mx-0"><img class="close-adv" width="16px"
                         src="./img/close2.png" alt=""></div>
@@ -209,7 +209,7 @@
                             <div class="sec02-top-text"><span></span>Bobbi Brown</div>
                             <div>你會學會如何選擇正確的基礎,做一個煙熏的眼睛和動人的嘴唇,並按著你的樣子呈現,無論是白天或晚上。但最重要的是,你會學會如何對自己的皮膚有信心。</div>
                         </div>
-                        <div class="sec02-box1   col-lg-4">
+                        <div class="sec02-box1 col-lg-4">
                             <a target="_blank"
                                 href="https://www.masterclass.com/classes/gordon-ramsay-teaches-cooking-restaurant-recipes-at-home"><img
                                     src="./img/sec02/sec02-2.png" alt=""></a>
@@ -1105,7 +1105,7 @@
                                     <a target="_blank" href="'+ msg[i].url + '"><img src="' + msg[i].cover_img + '" class="img-fluid rounded-start" alt=""></a>\
                                     <div  class="card-body">\
                                         <div class="card-title1 d-flex align-items-center">\
-                                            <a class="course-src" data-info="'+ msg[i].id + '" target="_blank" href="' + msg[i].url + '"><h1 style="font-weight:700;  font-size: 20px;" class="title-text">' + msg[i].title + '</h1></a>\
+                                            <a class="course-src" data-info="'+ msg[i].id + '" target="_blank" href="' + msg[i].url + '"><h1 style="font-weight:700; font-size: 18px; word-break:break-all" class="title-text">' + msg[i].title + '</h1></a>\
                                          </div>\
                                         <p style="word-break:break-all" class="card-text card-content1 d-flex align-items-center">'+ msg[i].profile + '</p>\
                                         <p  class="card-text row">\
@@ -1122,17 +1122,24 @@
                     $('#sec01-container').html(sec01course);
                     $(".title-text").each(function () {
                         var len = $(this).text().length;   //當前HTML物件text的長度
-                        if (len > 25) {
+                        if (len > 22) {
                             var str = "";
-                            str = $(this).text().substring(0, 25) + "...";  //使用字串擷取,獲取前30個字元,多餘的字元使用“......”代替
+                            str = $(this).text().substring(0, 22) + "...";  //使用字串擷取,獲取前30個字元,多餘的字元使用“......”代替
                             $(this).html(str);                   //將替換的值賦值給當前物件
+                        }else{
+                            var str2 = "";
+                            for(var i=len;i<22;i++){
+                                str2 +='&emsp;'
+                            }
+                            str = $(this).text().substring(0,len)+str2;
+                            $(this).html(str);  
                         }
                     });
                     $(".card-content1").each(function () {
                         var len = $(this).text().length;   //當前HTML物件text的長度
                         var str = "";
-                        if (len > 60) {                          
-                            str = $(this).text().substring(0, 60) + "...";  //使用字串擷取,獲取前60個字元,多餘的字元使用“......”代替
+                        if (len > 55) {                          
+                            str = $(this).text().substring(0, 55) + "...";  //使用字串擷取,獲取前60個字元,多餘的字元使用“......”代替
                             $(this).html(str);                   //將替換的值賦值給當前物件
                         }else{
                             var str2 = "";
@@ -1240,7 +1247,7 @@
                             <div class="card-body px-1">\
                                 <div class="card-title1 d-flex align-items-center">\
                                     <a class="course-src" data-info="'+ msg[i].id + '" target="_blank" href="'+ msg[i].url + '">\
-                                        <h1 style="font-weight:700;  font-size: 18px;" class="title-text">'+ msg[i].title + '</h1>\
+                                        <h1 style="font-weight:700;  font-size: 18px; word-break:break-all" class="title-text">'+ msg[i].title + '</h1>\
                                     </a>\
                                 </div>\
                                 <p style="word-break:break-all" class="card-text card-content1 d-flex align-items-center">'+ msg[i].profile + '</p>\
@@ -1290,11 +1297,11 @@
                       <div class="sec01-1 col-lg-3">\
                       <div class="card h-100">\
                       <a target="_blank" href="'+ msg[i].url + '">\
-                          <img src="'+ msg[i].cover_img + '" class="img-fluid rounded-start" alt=""></a>\
+                          <img style="height:15vw; object-fit: cover;" src="'+ msg[i].cover_img + '" class="img-fluid rounded-start" alt=""></a>\
                       <div class="card-body px-1">\
                           <div class="card-title1 d-flex align-items-center">\
                               <a class="course-src" data-info="'+ msg[i].id + '" target="_blank" href="'+ msg[i].url + '">\
-                                  <h1 style="font-weight:700;  font-size: 18px;" class="title-text">'+ msg[i].title + '</h1>\
+                                  <h1 style="font-weight:700;  font-size: 18px; word-break:break-all;" class="title-text">'+ msg[i].title + '</h1>\
                               </a>\
                           </div>\
                           <p style="word-break:break-all" class="card-text card-content1 d-flex align-items-center">'+ msg[i].profile + '</p>\
@@ -1321,13 +1328,13 @@
               });
   });
 </script>
-<!-- 管理營銷22 -->
+<!-- 管理營銷25 -->
 <script>
     $(document).ready(function () {
           $.ajax({
               method: "POST",
               url: "https://welife.asia:8002/get_courses",
-              data: '[22]',
+              data: '[25]',
               dataType: "json",
 
           })
@@ -1395,11 +1402,11 @@
                       <div class="sec01-1 col-lg-3">\
                       <div class="card h-100">\
                       <a target="_blank" href="'+ msg[i].url + '">\
-                          <img src="'+ msg[i].cover_img + '" class="img-fluid rounded-start" alt=""></a>\
+                          <img style="height:15vw; object-fit:cover;" src="'+ msg[i].cover_img + '" class="img-fluid rounded-start" alt=""></a>\
                       <div class="card-body px-1">\
                           <div class="card-title1 d-flex align-items-center">\
                               <a class="course-src" data-info="'+ msg[i].id + '" target="_blank" href="'+ msg[i].url + '">\
-                                  <h1 style="font-weight:700;  font-size: 18px;" class="title-text">'+ msg[i].title + '</h1>\
+                                  <h1 style="font-weight:700; font-size: 18px; word-break:break-all;" class="title-text">'+ msg[i].title + '</h1>\
                               </a>\
                           </div>\
                           <p style="word-break:break-all" class="card-text card-content1 d-flex align-items-center">'+ msg[i].profile + '</p>\
@@ -1499,7 +1506,7 @@
                       <div class="sec01-1 col-lg-3">\
                       <div class="card h-100">\
                       <a target="_blank" href="'+ msg[i].url + '">\
-                          <img src="'+ msg[i].cover_img + '" class="img-fluid rounded-start" alt=""></a>\
+                          <img style="height:15vw; object-fit:cover;" src="'+ msg[i].cover_img + '" class="img-fluid rounded-start" alt=""></a>\
                       <div class="card-body px-1">\
                           <div class="card-title1 d-flex align-items-center">\
                               <a class="course-src" data-info="'+ msg[i].id + '" target="_blank" href="'+ msg[i].url + '">\
@@ -1619,7 +1626,7 @@
                                     <img class="mb-1 mx-1 d-inline" style="width: 25px; object-fit: cover; "\
                                         src="./img/sec05/fire.png" alt=""><span>'+ msg[i].clicks + '人</span>\
                                 </small>\
-                                <small style="color:#FF0000; font-size:18px;" class="col-6 px-0">NT$'+ msg[i].price_discount + '</small>\
+                                <small style="color:#FF0000;" class="price col-6 px-0">NT$'+ msg[i].price_discount + '</small>\
                                 </p>\
                             </div>\
                         </div>\
@@ -1645,7 +1652,7 @@
           $.ajax({
               method: "POST",
               url: "https://welife.asia:8002/get_courses",
-              data: '[22]',
+              data: '[25]',
               dataType: "json",
 
           })
@@ -1727,7 +1734,7 @@
                                     <img class="mb-1 mx-1 d-inline" style="width: 25px; object-fit: cover; "\
                                         src="./img/sec05/fire.png" alt=""><span>'+ msg[i].clicks + '人</span>\
                                 </small>\
-                                <small style="color:#FF0000; font-size:20px;" class="col-6 px-0">NT$'+ msg[i].price_discount + '</small>\
+                                <small style="color:#FF0000; font-size:20px;" class="price col-6 px-0">NT$'+ msg[i].price_discount + '</small>\
                             </p>\
                         </div>\
                        </div>\

+ 16 - 0
style.css

@@ -1105,6 +1105,12 @@ body .line {
   color: #9400d3;
 }
 
+#sec05 .sec05-container .sec05-course a img, #sec05 .sec05-container .sec05-course2 a img {
+  height: 10vw;
+  -o-object-fit: cover;
+     object-fit: cover;
+}
+
 #sec05 .sec05-container .sec05-course img, #sec05 .sec05-container .sec05-course2 img {
   border-radius: 10px;
   -o-object-fit: cover;
@@ -1117,6 +1123,16 @@ body .line {
   }
 }
 
+#sec05-m .price {
+  font-size: 18px;
+}
+
+@media screen and (max-width: 350px) {
+  #sec05-m .price {
+    font-size: 16px;
+  }
+}
+
 #sec05-m a {
   color: #000;
   text-decoration: none;

File diff suppressed because it is too large
+ 0 - 0
style.css.map


+ 13 - 0
style.scss

@@ -906,6 +906,11 @@ body {
                 &:hover {
                     color: $subcolor;
                 }
+
+                img{
+                    height: 10vw;
+                    object-fit: cover;
+                }
             }
             img {
                 border-radius: 10px;
@@ -943,9 +948,17 @@ body {
 }
 // sec05 行動版
 #sec05-m{
+    
     @media screen and(min-width:$desktop) {
         display: none;
     }
+    .price{
+        font-size: 18px;
+        @media screen and(max-width:350px) {
+            font-size:16px ;
+        }
+        
+    }
     a{
         color:#000;
         text-decoration: none;

Some files were not shown because too many files changed in this diff