style.scss 7.3 KB

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