style.scss 7.3 KB

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