SyuanYu 2 éve
szülő
commit
64ecf9e397

+ 3 - 3
layouts/collection/list.html

@@ -120,7 +120,7 @@
           <div class="bhouseweb_search_img">
             <i class="fas fa-search"></i>
           </div>
-          <input id="bhouseweb_search" class="me-md-2" type="search" placeholder="搜 尋「 北 歐 」「 現 代 」「 無印 」"
+          <input id="bhouseweb_search" class="me-md-2" type="search" placeholder="搜 尋「 工 業 」「 中 島 」「 台 中 」"
             aria-label="Search" />
           <!-- <button class="btn btn-outline-success" type="submit">Search</button> -->
         </form>
@@ -220,14 +220,14 @@
         console.log('Time elapsed!', this.value);
         // 取得輸入框的值
         let inputVal = $('#bhouseweb_search').val();
+        console.log('inputVal', inputVal);
         matchContent = "";
         let falseItem = [];
         contentsData.map((item, index) => {
           // 搜尋特定分類文章
           // if (item.categories) {
           //   if (item.categories.includes(category)) {
-          // 搜尋所有分類文章
-          if (item.title.includes(inputVal) || item.description.includes(inputVal)) {
+          if (item.title.includes(inputVal) || item.description.includes(inputVal) || item.banner_img_text?.includes(inputVal) || item.content.includes(inputVal)) {
             if (item.url != '/collection') {
               matchContent += ` 
         <div class="col-12 col-sm-6 p-1"> \

BIN
static/img/home/cafe.png


BIN
static/img/home/collection4.webp


BIN
static/img/home/collection5.webp


BIN
static/img/home/collection6.webp


BIN
static/img/home/head.png


+ 0 - 0
static/img/home/news1.webp → static/img/home/news.webp


+ 2 - 2
themes/hugo-universal-theme-master/layouts/index.html

@@ -21,7 +21,7 @@
 
   {{ partial "scripts.html" . }}
 
-  <script>
+  <!-- <script>
     (function getContentsData() {
       // 線上版網址 https://bhouse3.ptt.cx:9002/api/
       // 本地端網址 http://localhost:9001/api/
@@ -48,7 +48,7 @@
         collectionContent.innerHTML = collectionList.join(" ");
       })
     })();
-  </script>
+  </script> -->
 
 </body>
 

+ 6 - 5
themes/hugo-universal-theme-master/layouts/partials/carousel.html

@@ -7,18 +7,19 @@
   {{ end }}
   <div class="slider responsive">
     <div class="slider-item">
-      <img src="./img/head1.webp" alt="" class="img-fluid">
+      <img src="./img/home/head.png" alt="" class="img-fluid">
     </div>
     <div class="slider-item">
-      <a href="/news/the_country_you_most_want_to_go_to_in_2023_is_your_new_home">
-        <img src="./img/home/news1.webp" alt="" class="img-fluid">
+      <a href="https://maac.io/1QYHI">
+        <img src="./img/home/cafe.png" alt="" class="img-fluid cafe-img">
       </a>
     </div>
-    <div class="slider-item">
+    <!-- LINE@ 暫時關閉 -->
+    <!-- <div class="slider-item">
       <a href="https://maac.io/1Qcnm" target="_blank">
         <img src="./img/home/pillow.jpg" alt="" class="img-fluid">
       </a>
-    </div>
+    </div> -->
     <div class="slider-item">
       <a style="text-decoration: none;" href="/collection/industrial_bar_house">
         <img src="./img/home/collection1.webp" alt="" class="img-fluid">

+ 45 - 32
themes/hugo-universal-theme-master/layouts/partials/features.html

@@ -1,29 +1,42 @@
 <div class="home-container container-fluid">
-    <div class="row g-3 home-content">
-      <div class="col-sm-6 bg-portfolio">
-        <a href="/collection/">
-          <div class="bg-img"></div>
-        </a>
-      </div>
-      <div class="col-sm-6 bg-serve">
-        <a href="/room_planner/">
-          <div class="bg-img"></div>
-        </a>
-      </div>
-      <div class="col-sm-6 bg-qa">
-        <a href="/frequently_asked_questions/">
-          <div class="bg-img"></div>
-        </a>
-      </div>
-      <div class="col-sm-6 bg-store">
-        <a href="/store/">
-          <div class="bg-img"></div>
-        </a>
-      </div>
+  <div class="row g-3 home-content">
+    <div class="col-sm-6 bg-portfolio">
+      <a href="/collection/">
+        <div class="bg-img"></div>
+      </a>
     </div>
+    <div class="col-sm-6 bg-serve">
+      <a href="/room_planner/">
+        <div class="bg-img"></div>
+      </a>
+    </div>
+    <div class="col-sm-6 bg-qa">
+      <a href="/frequently_asked_questions/">
+        <div class="bg-img"></div>
+      </a>
+    </div>
+    <div class="col-sm-6 bg-store">
+      <a href="/store/">
+        <div class="bg-img"></div>
+      </a>
+    </div>
+  </div>
 
-    <div class="row g-3 home-content collection-content" style="padding: 0 8px;">
-      <!-- <div class="col-12 p-0 bottom-box">
+  <div class="row g-3 home-content collection-content" style="padding: 0 8px;">
+    {{ with .Site.GetPage "/collection" }}
+    {{ range first 3 .Pages }}
+    <div class="col-12 p-0 bottom-box">
+      <a style="text-decoration: none;" href="{{ .Params.url }}">
+        <img src="{{ .Params.cover_img }}" style="max-width: 100%;">
+        <div>
+          <p>{{ .Params.banner_img_text }}</p>
+          <p>{{ .Params.homeowner }}|{{ .Params.room_count }}|{{ .Params.house_size }}</p>
+        </div>
+      </a>
+    </div>
+    {{ end }}
+    {{ end }}
+    <!-- <div class="col-12 p-0 bottom-box">
         <a style="text-decoration: none;" href="/collection/deep_sea_wandering">
           <img src="/img/home/collection4.webp" style="max-width: 100%;">
           <div>
@@ -50,14 +63,14 @@
           </div>
         </a>
       </div> -->
-    </div>
   </div>
+</div>
 
-  <div class="reserve d-flex flex-column">
-    <a href="https://maac.io/1Pife" target="_blank">
-      <img src="/img/home/reserve.png" alt="">
-    </a>
-    <a href="/store/">
-      <img src="/img/home/store-reserve.png" alt="">
-    </a>
-  </div>
+<div class="reserve d-flex flex-column">
+  <a href="https://maac.io/1Pife" target="_blank">
+    <img src="/img/home/reserve.png" alt="">
+  </a>
+  <a href="/store/">
+    <img src="/img/home/store-reserve.png" alt="">
+  </a>
+</div>

+ 11 - 2
themes/hugo-universal-theme-master/static/css/style.bhouse.css

@@ -432,10 +432,9 @@ button {
 .slider-item {
   position: relative;
 }
-
 .slider-item img {
   width: 100%;
-  height: 700px;
+  height: 44vw;
   -o-object-fit: cover;
   object-fit: cover;
 }
@@ -449,6 +448,16 @@ button {
     height: 335px;
   }
 }
+.slider-item .cafe-img {
+  -o-object-position: 0 80%;
+     object-position: 0 80%;
+}
+@media (max-width: 991px) {
+  .slider-item .cafe-img {
+    -o-object-position: center;
+       object-position: center;
+  }
+}
 
 .slider-item div {
   padding: 20px 18vw;

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
themes/hugo-universal-theme-master/static/css/style.bhouse.css.map


+ 17 - 12
themes/hugo-universal-theme-master/static/css/style.bhouse.scss

@@ -451,19 +451,24 @@ button {
 
 .slider-item {
   position: relative;
-}
-
-.slider-item img {
-  width: 100%;
-  height: 700px;
-  -o-object-fit: cover;
-  object-fit: cover;
-  @media (max-width: 991px) {
-    height: 500px;
-  }
-  @media (max-width: 576px) {
-    height: 335px;
+  img {
+    width: 100%;
+    height: 845px;
+    -o-object-fit: cover;
+    object-fit: cover;
+    @media (max-width: 991px) {
+      height: 500px;
+    }
+    @media (max-width: 576px) {
+      height: 335px;
+    }
   }
+  // .cafe-img {
+  //   object-position: 0 80%;
+  //   @media (max-width: 991px) {
+  //     object-position: center;
+  //   }
+  // }
 }
 
 .slider-item div {

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott