瀏覽代碼

update css

SyuanYu 1 年之前
父節點
當前提交
878f4a5b0e

+ 3 - 3
content/news/214/1.md

@@ -39,9 +39,9 @@ image: "https://s.yimg.com/ny/api/res/1.2/n3Ou8LOZuWiZM_qDgdXm6Q--/YXBwaWQ9aGlna
 
 
 * [陳百欽個人介紹](https://www.chinabiz.org.tw/people/Show?pid=142&cat_id=370&id=3525)
-* [啟翔緬甸營運報導] (https://tw.news.yahoo.com/%E5%95%9F%E7%BF%94%E8%BC%95%E9%87%91%E5%B1%AC%E8%91%A3%E4%BA%8B%E9%95%B7%E9%99%B3%E7%99%BE%E6%AC%BD-%E7%AA%81%E7%A0%B4%E6%A5%AD%E7%95%8C%E7%95%8C%E9%99%90-%E5%8B%87%E9%97%96%E7%B7%AC%E7%94%B8%E6%96%B0%E6%8C%91%E6%88%B0-144203600.html)
-* [啟翔緬甸營運報導] https://news.pchome.com.tw/finance/newstaiwandigi/20231013/index-69720812303558279003.html
-* [啟翔緬甸營運報導] (https://morningtaiwan.org/139276/)
+* [啟翔緬甸營運報導](https://tw.news.yahoo.com/%E5%95%9F%E7%BF%94%E8%BC%95%E9%87%91%E5%B1%AC%E8%91%A3%E4%BA%8B%E9%95%B7%E9%99%B3%E7%99%BE%E6%AC%BD-%E7%AA%81%E7%A0%B4%E6%A5%AD%E7%95%8C%E7%95%8C%E9%99%90-%E5%8B%87%E9%97%96%E7%B7%AC%E7%94%B8%E6%96%B0%E6%8C%91%E6%88%B0-144203600.html)
+* [啟翔緬甸營運報導](https://news.pchome.com.tw/finance/newstaiwandigi/20231013/index-69720812303558279003.html)
+* [啟翔緬甸營運報導](https://morningtaiwan.org/139276/)
 * [外交部:啟翔緬甸工廠開幕典禮](https://www.roc-taiwan.org/mm/post/1327.html)
 * [啟翔15%哲學概念,於緬甸營運使用](https://www.gvm.com.tw/article/84665)
 * [陳百欽永續經營概念](https://vocus.cc/article/64d4909ffd89780001aef0ad)

+ 47 - 0
static/css/style.css

@@ -49,6 +49,32 @@ body {
   font-weight: 400 !important;
 }
 
+.cover-img {
+  height: 270px;
+  -o-object-fit: cover;
+     object-fit: cover;
+}
+@media (max-width: 1400px) {
+  .cover-img {
+    height: 230px;
+  }
+}
+@media (max-width: 1200px) {
+  .cover-img {
+    height: 170px;
+  }
+}
+@media (max-width: 767px) {
+  .cover-img {
+    height: 38vw;
+  }
+}
+@media (max-width: 575px) {
+  .cover-img {
+    height: 52vw;
+  }
+}
+
 .navbar {
   background-color: var(--main-color) !important;
 }
@@ -417,8 +443,23 @@ body {
 
 .news-featured img,
 .focus-content img {
+  height: 200px;
   -o-object-fit: cover;
      object-fit: cover;
+  -o-object-position: top;
+     object-position: top;
+}
+@media (max-width: 1400px) {
+  .news-featured img,
+  .focus-content img {
+    height: 160px;
+  }
+}
+@media (max-width: 1200px) {
+  .news-featured img,
+  .focus-content img {
+    height: 130px;
+  }
 }
 @media (max-width: 991px) {
   .news-featured img,
@@ -432,5 +473,11 @@ body {
     height: 300px;
   }
 }
+@media (max-width: 575px) {
+  .news-featured img,
+  .focus-content img {
+    height: 52vw;
+  }
+}
 
 /* news-featured.html End *//*# sourceMappingURL=style.css.map */

文件差異過大導致無法顯示
+ 0 - 0
static/css/style.css.map


+ 36 - 0
static/css/style.scss

@@ -49,6 +49,27 @@ body {
   font-weight: 400 !important;
 }
 
+.cover-img {
+  height: 270px;
+  object-fit: cover;
+
+  @media (max-width: 1400px) {
+    height: 230px;
+  }
+
+  @media (max-width: 1200px) {
+    height: 170px;
+  }
+
+  @media (max-width: 767px) {
+    height: 38vw;
+  }
+
+  @media (max-width: 575px) {
+    height: 52vw;
+  }
+}
+
 .navbar {
   background-color: var(--main-color) !important;
 
@@ -88,6 +109,7 @@ body {
   a {
     font-size: 50px;
     font-weight: 600;
+
     @media (max-width: 991px) {
       font-size: 36px;
     }
@@ -484,7 +506,17 @@ body {
 .news-featured,
 .focus-content {
   img {
+    height: 200px;
     object-fit: cover;
+    object-position: top;
+
+    @media (max-width: 1400px) {
+      height: 160px;
+    }
+
+    @media (max-width: 1200px) {
+      height: 130px;
+    }
 
     @media (max-width: 991px) {
       height: 370px;
@@ -493,6 +525,10 @@ body {
     @media (max-width: 767px) {
       height: 300px;
     }
+
+    @media (max-width: 575px) {
+      height: 52vw;
+    }
   }
 }
 

+ 1 - 1
themes/hugo-bootstrap-5/layouts/_default/taxonomy.html

@@ -8,7 +8,7 @@
           <div class="row">
             <div class="col-12 col-md-6">
               <a href="{{ .Permalink }}">
-                <img class="img-fluid" src="{{ .Params.image | relURL }}" alt="" />
+                <img class="img-fluid cover-img" src="{{ .Params.image | relURL }}" alt="" />
               </a>
             </div>
             <div class="col-12 col-md-6 d-flex">

+ 17 - 2
themes/hugo-bootstrap-5/layouts/partials/taxonomies.html

@@ -12,7 +12,7 @@
   </h3>
   {{ end }}
 
-  <p>
+  <!-- <p>
     {{ range $name, $value := $taxonomy }}
     <a class="btn btn-small badge tags" href="{{ printf  $taxonomyname | relLangURL }}/{{ $name | urlize }}/">
       <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-tag-fill"
@@ -23,7 +23,22 @@
       {{ $name }}
     </a>
     {{ end }}
-  </p>
+  </p> -->
+
+  <p>
+    {{ $count := 0 }}
+    {{ range $name, $value := $taxonomy }}
+        {{ if lt $count 20 }}
+            <a class="btn btn-small badge tags" href="{{ printf $taxonomyname | relLangURL }}/{{ $name | urlize }}/">
+                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-tag-fill" viewBox="0 0 16 16">
+                    <path d="M2 1a1 1 0 0 0-1 1v4.586a1 1 0 0 0 .293.707l7 7a1 1 0 0 0 1.414 0l4.586-4.586a1 1 0 0 0 0-1.414l-7-7A1 1 0 0 0 6.586 1H2zm4 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z" />
+                </svg>
+                {{ $name }}
+            </a>
+            {{ $count = add $count 1 }}
+        {{ end }}
+    {{ end }}
+</p>
   {{ end }}
   {{ end }}
 </section>

部分文件因文件數量過多而無法顯示