style.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941
  1. /* 共通樣式 */
  2. :root {
  3. --main-color: #000;
  4. --sub-color: #e47140;
  5. --gray-color: #727272;
  6. }
  7. * {
  8. letter-spacing: 1px;
  9. font-weight: 400;
  10. font-family: "Noto Sans TC", sans-serif !important;
  11. }
  12. p,
  13. li {
  14. line-height: 32px;
  15. overflow-wrap: break-word;
  16. word-break: break-word;
  17. }
  18. ul {
  19. list-style: none;
  20. }
  21. img {
  22. max-width: 100%;
  23. height: auto;
  24. }
  25. html,
  26. body {
  27. height: 100%;
  28. margin: 0;
  29. }
  30. body {
  31. display: flex;
  32. flex-direction: column;
  33. overflow-y: scroll;
  34. }
  35. .btn:focus,
  36. .form-control:focus {
  37. border-color: var(--main-color) !important;
  38. box-shadow: none !important;
  39. outline: 0 none !important;
  40. }
  41. .badge {
  42. font-weight: 400 !important;
  43. }
  44. .navbar {
  45. background-color: var(--main-color) !important;
  46. .navbar-collapse {
  47. flex-grow: 0;
  48. }
  49. .navbar-brand {
  50. font-size: 50px;
  51. font-weight: 500;
  52. font-family: "Roboto Slab", serif !important;
  53. color: var(--sub-color);
  54. transition: all 0.3s;
  55. @media (max-width: 575px) {
  56. padding-left: 1rem;
  57. font-size: 35px;
  58. }
  59. &:hover {
  60. opacity: 0.9;
  61. color: var(--sub-color);
  62. }
  63. }
  64. }
  65. .blog-post-tags {
  66. .badge {
  67. background-color: var(--main-color);
  68. &:hover {
  69. color: var(--main-color);
  70. background-color: #fff;
  71. border: 1px solid var(--main-color);
  72. }
  73. }
  74. }
  75. .blog-post-title {
  76. margin: 10px 0 20px;
  77. a {
  78. font-size: 40px;
  79. font-weight: 500;
  80. @media (max-width: 575px) {
  81. font-size: 35px;
  82. }
  83. }
  84. }
  85. .pagination {
  86. justify-content: center;
  87. .page-link {
  88. color: var(--main-color);
  89. }
  90. .page-item.active .page-link {
  91. z-index: 3;
  92. color: #fff;
  93. background-color: var(--main-color);
  94. border-color: var(--main-color);
  95. }
  96. }
  97. .post-title {
  98. a {
  99. color: #000;
  100. text-decoration: none;
  101. font-size: 22px;
  102. font-weight: 500;
  103. }
  104. }
  105. .post-block-title {
  106. margin-bottom: 25px;
  107. position: relative;
  108. font-size: 20px;
  109. &::after {
  110. position: absolute;
  111. z-index: -10;
  112. top: 30px;
  113. left: 0;
  114. width: 100%;
  115. height: 0px;
  116. content: "";
  117. border-bottom: 1px solid var(--sub-color);
  118. bottom: 5px;
  119. }
  120. span {
  121. padding: 5px 20px;
  122. // font-weight: 500;
  123. color: #fff;
  124. font-weight: 300;
  125. background: var(--sub-color);
  126. }
  127. }
  128. .news-info {
  129. margin-top: 10px;
  130. line-height: 20px;
  131. a {
  132. font-size: 14px;
  133. font-weight: 500;
  134. color: var(--gray-color);
  135. text-decoration: none;
  136. transition: all 0.3s;
  137. &:hover {
  138. opacity: 0.8;
  139. }
  140. }
  141. small {
  142. color: var(--gray-color);
  143. }
  144. }
  145. .news-thumbnail {
  146. height: 100%;
  147. object-fit: cover;
  148. }
  149. // 文字省略
  150. .line-clamp {
  151. max-width: 150px;
  152. display: -webkit-box;
  153. -webkit-line-clamp: 2;
  154. -webkit-box-orient: vertical;
  155. overflow: hidden;
  156. text-overflow: ellipsis;
  157. }
  158. .post-depiction {
  159. // max-width: 350px;
  160. margin: 10px 0;
  161. display: -webkit-box;
  162. -webkit-line-clamp: 2;
  163. -webkit-box-orient: vertical;
  164. overflow: hidden;
  165. text-overflow: ellipsis;
  166. line-height: 26px;
  167. a {
  168. color: #7a7a7a;
  169. text-decoration: none;
  170. }
  171. }
  172. .top-btn {
  173. position: fixed;
  174. bottom: 15px;
  175. right: 15px;
  176. z-index: 10;
  177. opacity: 0; // scrollTop = 0
  178. transition: all 0.5s;
  179. button {
  180. border: none;
  181. background: var(--sub-color);
  182. border-radius: 100px;
  183. width: 55px;
  184. height: 55px;
  185. }
  186. }
  187. .show {
  188. opacity: 1; // scrollTop > 100
  189. }
  190. .blog-header {
  191. .nav-item {
  192. padding: 0 0.3rem;
  193. @media (max-width: 575px) {
  194. padding: 0 1rem;
  195. }
  196. }
  197. }
  198. /* sidebar.html Start */
  199. .news-sidebar {
  200. position: sticky;
  201. top: 15px;
  202. .news-featured {
  203. position: unset;
  204. }
  205. }
  206. .search-btn {
  207. border: 1px solid var(--main-color) !important;
  208. svg {
  209. color: var(--main-color);
  210. }
  211. &:hover {
  212. background-color: var(--main-color) !important;
  213. svg {
  214. color: #fff;
  215. }
  216. }
  217. }
  218. .tags {
  219. margin: 0 5px 5px 0;
  220. padding: 7px 10px !important;
  221. font-size: 14px !important;
  222. font-weight: 400 !important;
  223. color: var(--main-color) !important;
  224. border: 1px solid var(--main-color) !important;
  225. &:hover {
  226. color: #fff !important;
  227. background-color: var(--main-color);
  228. }
  229. }
  230. /* sidebar.html End */
  231. /* single.html Start */
  232. .blog-post.content {
  233. .content {
  234. padding-bottom: 3rem;
  235. img {
  236. max-height: 500px;
  237. object-fit: contain;
  238. }
  239. }
  240. .toc-container {
  241. padding: 1.5rem;
  242. margin: 3rem 0;
  243. background: #f9f9f9;
  244. border: 1px solid #aaa;
  245. border-radius: 5px;
  246. ul {
  247. margin-bottom: 0;
  248. list-style: disc;
  249. a {
  250. color: var(--sub-color);
  251. text-decoration: none;
  252. }
  253. }
  254. .title {
  255. display: block;
  256. margin-left: 1rem;
  257. margin-bottom: 0.5rem !important;
  258. font-size: 1.25rem;
  259. color: #000;
  260. }
  261. }
  262. h2 {
  263. padding-left: 1rem;
  264. margin: 5rem 0 1.5rem;
  265. border-left: 7px solid var(--sub-color);
  266. }
  267. h4 {
  268. margin-top: 3rem;
  269. font-size: 1.25rem;
  270. font-weight: 500;
  271. line-height: 32px;
  272. a {
  273. padding: 5px 8px;
  274. margin-right: 3px;
  275. border: 1px solid #000;
  276. border-radius: 5px;
  277. font-size: 14px;
  278. &:hover {
  279. color: #fff !important;
  280. }
  281. }
  282. }
  283. }
  284. .back-link {
  285. color: #000;
  286. display: block;
  287. text-align: center;
  288. text-decoration: none;
  289. transition: all 0.3s;
  290. &:hover {
  291. opacity: 0.7;
  292. }
  293. }
  294. /* single.html End */
  295. /* content.html Start */
  296. .news-main {
  297. height: 100%;
  298. overflow: hidden;
  299. a {
  300. text-decoration: none;
  301. }
  302. .title-info {
  303. position: absolute;
  304. bottom: 0;
  305. left: 0;
  306. right: 0;
  307. z-index: 10;
  308. padding: 1rem;
  309. background: linear-gradient(to top,
  310. rgba(0, 0, 0, 0.95) 0%,
  311. rgba(0, 0, 0, 0.7) 50%,
  312. rgba(0, 0, 0, 0.3) 80%,
  313. transparent 100%);
  314. a,
  315. h2,
  316. small {
  317. color: #fff;
  318. letter-spacing: 1px;
  319. }
  320. h2 {
  321. line-height: 1.5;
  322. a {
  323. font-weight: 500;
  324. font-size: 1.25rem;
  325. display: -webkit-box;
  326. -webkit-box-orient: vertical;
  327. -webkit-line-clamp: 2; // 顯示兩行
  328. overflow: hidden;
  329. text-overflow: ellipsis;
  330. word-break: break-word;
  331. @media (max-width: 991px) {
  332. font-size: 1.25rem;
  333. }
  334. }
  335. }
  336. .badge-link {
  337. display: inline-block;
  338. padding: 1px 20px;
  339. margin-bottom: 10px;
  340. background-color: var(--sub-color);
  341. font-weight: 500;
  342. }
  343. }
  344. .post-title {
  345. a {
  346. font-size: 34px;
  347. }
  348. }
  349. img {
  350. height: 100%;
  351. object-fit: cover;
  352. }
  353. // .main-img {
  354. // @media (max-width: 991px) {
  355. // height: 50vw;
  356. // }
  357. // }
  358. .news-info {
  359. a {
  360. font-size: 16px;
  361. }
  362. }
  363. }
  364. // .news-main {
  365. // height: 100%;
  366. // overflow: hidden;
  367. // .post-title {
  368. // a {
  369. // font-size: 34px;
  370. // @media (max-width: 991px) {
  371. // font-size: 22px;
  372. // }
  373. // }
  374. // }
  375. // img {
  376. // height: 100%;
  377. // object-fit: cover;
  378. // }
  379. // .news-info {
  380. // a {
  381. // font-size: 16px;
  382. // }
  383. // }
  384. // }
  385. /* content.html End */
  386. /* focus.html Start */
  387. .focus-content {
  388. position: sticky;
  389. top: 20px;
  390. }
  391. .focus-content,
  392. .news-featured {
  393. img {
  394. width: 100%;
  395. height: 5vw;
  396. object-fit: cover;
  397. @media (max-width: 991px) {
  398. height: 15vw;
  399. }
  400. }
  401. .post-title {
  402. // 超過則省略
  403. overflow: hidden;
  404. text-overflow: ellipsis;
  405. display: -webkit-box;
  406. -webkit-line-clamp: 2;
  407. -webkit-box-orient: vertical;
  408. line-break: after-white-space;
  409. font-size: 1.125rem;
  410. }
  411. }
  412. /* focus.html End */
  413. /* recent.html Start */
  414. .recent-content {
  415. .news-list {
  416. margin: 0;
  417. li {
  418. margin: 15px 0;
  419. img {
  420. width: 140px;
  421. height: 105px;
  422. object-fit: cover;
  423. }
  424. small {
  425. display: block;
  426. }
  427. .news-info {
  428. margin-top: 0px;
  429. }
  430. }
  431. li:last-child {
  432. margin: 0;
  433. }
  434. }
  435. }
  436. /* recent.html End */
  437. /* news-tab.html Start */
  438. .tab-category {
  439. .nav-link {
  440. color: var(--main-color);
  441. font-weight: 500;
  442. }
  443. .nav-pills .nav-link.active,
  444. .nav-pills .show>.nav-link {
  445. color: var(--sub-color);
  446. background-color: var(--main-color);
  447. }
  448. }
  449. .tab-content {
  450. .bg-img {
  451. position: relative;
  452. height: 370px;
  453. // 設置背景混和模式為相乘模式
  454. background-blend-mode: multiply;
  455. background-size: cover;
  456. background-position: center center;
  457. cursor: pointer;
  458. @media (max-width: 991px) {
  459. height: 50vw;
  460. }
  461. section {
  462. padding: 10px 25px;
  463. position: absolute;
  464. bottom: 0;
  465. color: #fff;
  466. a {
  467. color: #fff;
  468. text-decoration: none;
  469. }
  470. small {
  471. font-size: 12px;
  472. }
  473. }
  474. }
  475. .post-title {
  476. line-height: 1;
  477. }
  478. .col-5 {
  479. img {
  480. width: 100%;
  481. height: 150px;
  482. }
  483. }
  484. }
  485. /* news-tab.html End */
  486. /* news-all.html Start */
  487. .news-all {
  488. .post-title {
  489. margin: 5px auto;
  490. a {
  491. font-size: 1.5rem;
  492. display: -webkit-box;
  493. -webkit-box-orient: vertical;
  494. -webkit-line-clamp: 2; // 顯示兩行
  495. overflow: hidden;
  496. text-overflow: ellipsis;
  497. word-break: break-word;
  498. }
  499. }
  500. .news-info {
  501. a {
  502. font-size: 14px;
  503. }
  504. }
  505. hr {
  506. margin: 1.5rem 0;
  507. }
  508. img {
  509. width: 100%;
  510. height: 12vw;
  511. object-fit: cover;
  512. @media (max-width: 991px) {
  513. height: 20vw;
  514. }
  515. @media (max-width: 575px) {
  516. height: 50vw;
  517. }
  518. }
  519. .line {
  520. padding: 0 12px;
  521. }
  522. // .first-img {
  523. // height: 50vh;
  524. // object-fit: cover;
  525. // }
  526. }
  527. /* news-all.html End */
  528. /* news-featured.html Start */
  529. .news-featured {
  530. position: sticky;
  531. top: 20px;
  532. .post-title {
  533. a {
  534. font-size: 18px;
  535. }
  536. }
  537. }
  538. /* news-featured.html End */
  539. /* news-video.html Start */
  540. .news-video,
  541. .local-video {
  542. .post-block-title {
  543. span {
  544. display: block;
  545. width: 100%;
  546. text-align: center;
  547. }
  548. }
  549. .post-title {
  550. a {
  551. font-size: 18px;
  552. display: -webkit-box;
  553. -webkit-line-clamp: 2;
  554. -webkit-box-orient: vertical;
  555. overflow: hidden;
  556. text-overflow: ellipsis;
  557. }
  558. }
  559. .news-info {
  560. a {
  561. font-size: 14px;
  562. }
  563. }
  564. }
  565. /* news-video.html End */
  566. .local-video {
  567. img {
  568. width: 100%;
  569. height: 140px;
  570. }
  571. }
  572. .news-main {
  573. .left-content {
  574. height: 30vh;
  575. }
  576. .right-content {
  577. height: 56.6vh;
  578. }
  579. .bottom-content {
  580. height: 35vh;
  581. }
  582. .left-content,
  583. .right-content,
  584. .bottom-content {
  585. @media (max-width: 991px) {
  586. height: 50vw;
  587. }
  588. }
  589. // /* 限制輪播高度 */
  590. // .video-swiper {
  591. // height: 650px;
  592. // /* 固定高度,讓 vertical 不會跑版 */
  593. // overflow: hidden;
  594. // /* 確保 slide 高度自適應 */
  595. // .swiper-slide {
  596. // height: auto !important;
  597. // .cover-img {
  598. // height: auto;
  599. // }
  600. // }
  601. // }
  602. }
  603. .tags-list {
  604. .cover-img {
  605. height: 230px;
  606. object-fit: cover;
  607. object-position: 0 25%;
  608. }
  609. }
  610. .feature-article {
  611. .float-right {
  612. float: right;
  613. max-width: 60%;
  614. margin: 1rem 0 1rem 1rem;
  615. border-radius: 12px;
  616. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  617. }
  618. .float-left {
  619. float: left;
  620. max-width: 60%;
  621. margin: 1rem 1.5rem 0 0;
  622. border-radius: 12px;
  623. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  624. }
  625. .float-right,
  626. .float-left {
  627. @media (max-width: 768px) {
  628. float: none;
  629. display: block;
  630. max-width: 100%;
  631. margin: 1rem auto;
  632. /* 圖片置中 */
  633. }
  634. }
  635. figure {
  636. margin: 2rem 0;
  637. text-align: center;
  638. }
  639. figure img {
  640. width: 100%;
  641. height: auto;
  642. box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  643. }
  644. h1 {
  645. font-size: 3rem;
  646. margin: 3rem auto;
  647. padding-top: 1.5rem;
  648. border-top: 12px solid var(--sub-color);
  649. }
  650. h2 {
  651. padding: 1.5rem 0;
  652. margin: 2.5rem auto;
  653. border-top: 1px solid var(--sub-color);
  654. border-bottom: 1px solid var(--sub-color);
  655. text-align: center;
  656. color: var(--sub-color);
  657. font-size: 2.5rem;
  658. font-weight: 500;
  659. // position: relative;
  660. // display: inline-block;
  661. // line-height: 1.2;
  662. // isolation: isolate;
  663. // &::after {
  664. // content: "";
  665. // position: absolute;
  666. // left: -10px;
  667. // right: -2px;
  668. // bottom: -4px;
  669. // height: 20px;
  670. // background: rgba(255, 234, 0, 0.4);
  671. // transform: skewX(-30deg);
  672. // transform-origin: left bottom;
  673. // z-index: -1;
  674. // pointer-events: none;
  675. // }
  676. }
  677. h3,
  678. h4 {
  679. margin-bottom: 1rem;
  680. color: var(--sub-color);
  681. line-height: 1.5;
  682. }
  683. h3 {
  684. font-size: 1.625rem;
  685. }
  686. h4 {
  687. font-size: 1.5rem;
  688. }
  689. hr {
  690. margin: 3rem 0;
  691. }
  692. .feature-body {
  693. div,
  694. p {
  695. margin: 1.5rem 0 0;
  696. line-height: 2;
  697. font-size: 1.05rem;
  698. color: #222;
  699. }
  700. }
  701. .lead {
  702. display: inline-block;
  703. padding: 0.5rem 1.5rem;
  704. margin-bottom: 1.5rem;
  705. background-color: #f8f8f8;
  706. border-left: 5px solid var(--sub-color);
  707. border: 2px dotted #ccc;
  708. }
  709. ul {
  710. list-style: disc;
  711. li {
  712. margin-top: .5rem;
  713. }
  714. }
  715. ol {
  716. list-style: auto;
  717. }
  718. b,
  719. strong {
  720. font-weight: 700;
  721. }
  722. .toc {
  723. margin: 3rem 0;
  724. background: #f9f9f9;
  725. padding: 1rem 1.5rem;
  726. border-left: 4px solid var(--sub-color);
  727. font-size: 0.95rem;
  728. .toc-title {
  729. font-size: 1.25rem;
  730. font-weight: bold;
  731. margin: 1rem 0;
  732. }
  733. ul {
  734. list-style: none;
  735. padding-left: 0;
  736. li {
  737. margin: 0.15rem 0;
  738. font-size: 1rem;
  739. a {
  740. text-decoration: none;
  741. color: var(--sub-color);
  742. &:hover {
  743. text-decoration: underline;
  744. }
  745. }
  746. // 解決空 li 造成的空白
  747. &:empty {
  748. display: none;
  749. }
  750. }
  751. }
  752. }
  753. .quote-accent {
  754. display: flex;
  755. align-items: flex-start;
  756. gap: 0.5rem;
  757. padding: 1rem 0;
  758. font-size: 2rem;
  759. font-weight: 600;
  760. border-top: 4px solid var(--sub-color);
  761. &::before {
  762. content: "“";
  763. flex: 0 0 auto;
  764. font-family: Georgia, "Times New Roman", serif;
  765. font-size: 2.8em;
  766. line-height: 0.6;
  767. color: var(--sub-color);
  768. margin-top: 0.1em;
  769. }
  770. &>p {
  771. margin: 0;
  772. }
  773. }
  774. }