style.scss 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. /* 共通樣式 */
  2. :root {
  3. --main-color: #000;
  4. --sub-color: #e47140;
  5. --gray-color: #727272;
  6. }
  7. * {
  8. letter-spacing: 1px;
  9. font-weight: 300;
  10. font-family: "Noto Sans TC", sans-serif !important;
  11. }
  12. p,
  13. li {
  14. line-height: 32px;
  15. }
  16. ul {
  17. list-style: none;
  18. }
  19. img {
  20. width: 100%;
  21. height: auto;
  22. }
  23. html,
  24. body {
  25. height: 100%;
  26. margin: 0;
  27. }
  28. body {
  29. display: flex;
  30. flex-direction: column;
  31. overflow-y: scroll;
  32. }
  33. .btn:focus,
  34. .form-control:focus {
  35. border-color: var(--main-color) !important;
  36. box-shadow: none !important;
  37. outline: 0 none !important;
  38. }
  39. .badge {
  40. font-weight: 400 !important;
  41. }
  42. .navbar {
  43. background-color: var(--main-color) !important;
  44. .navbar-collapse {
  45. flex-grow: 0;
  46. }
  47. .navbar-brand {
  48. font-size: 50px;
  49. font-weight: 500;
  50. font-family: "Roboto Slab", serif !important;
  51. color: var(--sub-color);
  52. transition: all 0.3s;
  53. &:hover {
  54. opacity: 0.9;
  55. color: var(--sub-color);
  56. }
  57. }
  58. }
  59. .blog-post-tags {
  60. .badge {
  61. background-color: var(--main-color);
  62. &:hover {
  63. color: var(--main-color);
  64. background-color: #fff;
  65. border: 1px solid var(--main-color);
  66. }
  67. }
  68. }
  69. .blog-post-title {
  70. margin: 10px 0 20px;
  71. a {
  72. font-size: 50px;
  73. font-weight: 600;
  74. }
  75. }
  76. .pagination {
  77. justify-content: center;
  78. .page-link {
  79. color: var(--main-color);
  80. }
  81. .page-item.active .page-link {
  82. z-index: 3;
  83. color: #fff;
  84. background-color: var(--main-color);
  85. border-color: var(--main-color);
  86. }
  87. }
  88. .post-title {
  89. a {
  90. color: #000;
  91. text-decoration: none;
  92. font-size: 22px;
  93. font-weight: 500;
  94. }
  95. }
  96. .post-block-title {
  97. margin-bottom: 20px;
  98. position: relative;
  99. font-size: 22px;
  100. &::after {
  101. position: absolute;
  102. z-index: -10;
  103. top: 15px;
  104. left: 0;
  105. width: 100%;
  106. height: 0px;
  107. content: "";
  108. border-bottom: 1px solid #929292;
  109. bottom: 5px;
  110. }
  111. span {
  112. font-weight: 500;
  113. background: #fff;
  114. }
  115. }
  116. .news-info {
  117. margin-top: 10px;
  118. line-height: 20px;
  119. a {
  120. font-size: 14px;
  121. font-weight: 500;
  122. color: var(--gray-color);
  123. text-decoration: none;
  124. transition: all 0.3s;
  125. &:hover {
  126. opacity: 0.8;
  127. }
  128. }
  129. small {
  130. color: var(--gray-color);
  131. }
  132. }
  133. .news-thumbnail {
  134. height: 100%;
  135. object-fit: cover;
  136. }
  137. // 文字省略
  138. .line-clamp {
  139. max-width: 150px;
  140. display: -webkit-box;
  141. -webkit-line-clamp: 2;
  142. -webkit-box-orient: vertical;
  143. overflow: hidden;
  144. text-overflow: ellipsis;
  145. }
  146. .post-depiction {
  147. // max-width: 350px;
  148. margin: 10px 0;
  149. display: -webkit-box;
  150. -webkit-line-clamp: 2;
  151. -webkit-box-orient: vertical;
  152. overflow: hidden;
  153. text-overflow: ellipsis;
  154. line-height: 26px;
  155. a {
  156. color: #7a7a7a;
  157. text-decoration: none;
  158. }
  159. }
  160. .top-btn {
  161. position: fixed;
  162. bottom: 15px;
  163. right: 15px;
  164. z-index: 10;
  165. opacity: 0; // scrollTop = 0
  166. transition: all .5s;
  167. button {
  168. border: none;
  169. background: var(--sub-color);
  170. border-radius: 100px;
  171. width: 55px;
  172. height: 55px;
  173. }
  174. }
  175. .show {
  176. opacity: 1; // scrollTop > 100
  177. }
  178. /* sidebar.html Start */
  179. .news-sidebar {
  180. position: sticky;
  181. top: 15px;
  182. .news-featured {
  183. position: unset;
  184. }
  185. }
  186. .search-btn {
  187. border: 1px solid var(--main-color) !important;
  188. svg {
  189. color: var(--main-color);
  190. }
  191. &:hover {
  192. background-color: var(--main-color) !important;
  193. svg {
  194. color: #fff;
  195. }
  196. }
  197. }
  198. .tags {
  199. margin: 0 5px 5px 0;
  200. padding: 7px 10px !important;
  201. font-size: 14px !important;
  202. font-weight: 400 !important;
  203. color: var(--main-color) !important;
  204. border: 1px solid var(--main-color) !important;
  205. &:hover {
  206. color: #fff !important;
  207. background-color: var(--main-color);
  208. }
  209. }
  210. /* sidebar.html End */
  211. /* single.html Start */
  212. .blog-post.content {
  213. h4 {
  214. font-size: 16px;
  215. font-weight: 300;
  216. line-height: 32px;
  217. a {
  218. padding: 5px 8px;
  219. margin-right: 3px;
  220. border: 1px solid #000;
  221. border-radius: 5px;
  222. font-size: 14px;
  223. &:hover {
  224. color: #fff !important;
  225. }
  226. }
  227. }
  228. .back-link {
  229. color: #000;
  230. display: block;
  231. text-align: center;
  232. text-decoration: none;
  233. transition: all 0.3s;
  234. &:hover {
  235. opacity: 0.7;
  236. }
  237. }
  238. }
  239. /* single.html End */
  240. /* content.html Start */
  241. .news-main {
  242. height: 100%;
  243. overflow: hidden;
  244. a {
  245. text-decoration: none;
  246. }
  247. .title-info {
  248. position: absolute;
  249. bottom: 0;
  250. left: 0;
  251. right: 0;
  252. z-index: 10;
  253. padding: 1rem;
  254. background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.3) 80%, transparent 100%);
  255. a,
  256. h2,
  257. small {
  258. color: #fff;
  259. letter-spacing: 1px;
  260. }
  261. h2 {
  262. line-height: 1.5;
  263. a {
  264. font-weight: 500;
  265. font-size: 1.5rem;
  266. display: -webkit-box;
  267. -webkit-box-orient: vertical;
  268. -webkit-line-clamp: 2; // 顯示兩行
  269. overflow: hidden;
  270. text-overflow: ellipsis;
  271. word-break: break-word;
  272. @media (max-width: 991px) {
  273. font-size: 1.25rem;
  274. }
  275. }
  276. }
  277. .badge-link {
  278. display: inline-block;
  279. padding: 1px 20px;
  280. margin-bottom: 10px;
  281. background-color: var(--sub-color);
  282. font-weight: 500;
  283. }
  284. }
  285. .post-title {
  286. a {
  287. font-size: 34px;
  288. }
  289. }
  290. img {
  291. height: 100%;
  292. object-fit: cover;
  293. }
  294. .main-img {
  295. @media (max-width: 991px) {
  296. height: 50vw;
  297. }
  298. }
  299. .news-info {
  300. a {
  301. font-size: 16px;
  302. }
  303. }
  304. }
  305. // .news-main {
  306. // height: 100%;
  307. // overflow: hidden;
  308. // .post-title {
  309. // a {
  310. // font-size: 34px;
  311. // }
  312. // }
  313. // img {
  314. // height: 100%;
  315. // object-fit: cover;
  316. // }
  317. // .news-info {
  318. // a {
  319. // font-size: 16px;
  320. // }
  321. // }
  322. // }
  323. /* content.html End */
  324. /* focus.html Start */
  325. .focus-content {
  326. position: sticky;
  327. top: 20px;
  328. }
  329. /* focus.html End */
  330. /* recent.html Start */
  331. .recent-content {
  332. .news-list {
  333. margin: 0;
  334. li {
  335. margin: 15px 0;
  336. img {
  337. width: 140px;
  338. height: 105px;
  339. object-fit: cover;
  340. }
  341. small {
  342. display: block;
  343. }
  344. .news-info {
  345. margin-top: 0px;
  346. }
  347. }
  348. li:last-child {
  349. margin: 0;
  350. }
  351. }
  352. }
  353. /* recent.html End */
  354. /* news-tab.html Start */
  355. .tab-category {
  356. .nav-link {
  357. color: var(--main-color);
  358. font-weight: 500;
  359. }
  360. .nav-pills .nav-link.active,
  361. .nav-pills .show>.nav-link {
  362. color: var(--sub-color);
  363. background-color: var(--main-color);
  364. }
  365. }
  366. .tab-content {
  367. .bg-img {
  368. position: relative;
  369. height: 370px;
  370. // 設置背景混和模式為相乘模式
  371. background-blend-mode: multiply;
  372. background-size: cover;
  373. background-position: center center;
  374. cursor: pointer;
  375. section {
  376. padding: 10px 25px;
  377. position: absolute;
  378. bottom: 0;
  379. color: #fff;
  380. a {
  381. color: #fff;
  382. text-decoration: none;
  383. }
  384. small {
  385. font-size: 12px;
  386. }
  387. }
  388. }
  389. }
  390. /* news-tab.html End */
  391. /* news-all.html Start */
  392. .news-all {
  393. .post-title {
  394. margin: 5px auto;
  395. a {
  396. font-size: 36px;
  397. }
  398. }
  399. .news-info {
  400. a {
  401. font-size: 18px;
  402. }
  403. }
  404. hr {
  405. margin: 1.5rem 0;
  406. }
  407. .first-img {
  408. height: 50vh;
  409. object-fit: cover;
  410. }
  411. .line {
  412. padding: 0 12px;
  413. }
  414. }
  415. /* news-all.html End */
  416. /* news-featured.html Start */
  417. .news-featured {
  418. position: sticky;
  419. top: 20px;
  420. }
  421. /* news-featured.html End */