style.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  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. line-height: 30px;
  90. a {
  91. color: #000;
  92. text-decoration: none;
  93. font-size: 22px;
  94. font-weight: 500;
  95. }
  96. }
  97. .post-block-title {
  98. margin-bottom: 20px;
  99. position: relative;
  100. font-size: 22px;
  101. &::after {
  102. position: absolute;
  103. z-index: -10;
  104. top: 15px;
  105. left: 0;
  106. width: 100%;
  107. height: 0px;
  108. content: "";
  109. border-bottom: 1px solid #929292;
  110. bottom: 5px;
  111. }
  112. span {
  113. font-weight: 500;
  114. background: #fff;
  115. }
  116. }
  117. .news-info {
  118. margin-top: 10px;
  119. line-height: 20px;
  120. a {
  121. font-size: 14px;
  122. font-weight: 500;
  123. color: var(--gray-color);
  124. text-decoration: none;
  125. transition: all 0.3s;
  126. &:hover {
  127. opacity: 0.8;
  128. }
  129. }
  130. small {
  131. color: var(--gray-color);
  132. }
  133. }
  134. .news-thumbnail {
  135. height: 100%;
  136. object-fit: cover;
  137. }
  138. // 文字省略
  139. .line-clamp {
  140. max-width: 150px;
  141. display: -webkit-box;
  142. -webkit-line-clamp: 2;
  143. -webkit-box-orient: vertical;
  144. overflow: hidden;
  145. text-overflow: ellipsis;
  146. }
  147. .post-depiction {
  148. // max-width: 350px;
  149. margin: 10px 0;
  150. display: -webkit-box;
  151. -webkit-line-clamp: 2;
  152. -webkit-box-orient: vertical;
  153. overflow: hidden;
  154. text-overflow: ellipsis;
  155. line-height: 26px;
  156. a {
  157. color: #7a7a7a;
  158. text-decoration: none;
  159. }
  160. }
  161. .top-btn {
  162. position: fixed;
  163. bottom: 15px;
  164. right: 15px;
  165. z-index: 10;
  166. opacity: 0; // scrollTop = 0
  167. transition: all .5s;
  168. button {
  169. border: none;
  170. background: var(--sub-color);
  171. border-radius: 100px;
  172. width: 55px;
  173. height: 55px;
  174. }
  175. }
  176. .show {
  177. opacity: 1; // scrollTop > 100
  178. }
  179. /* sidebar.html Start */
  180. .news-sidebar {
  181. position: sticky;
  182. top: 15px;
  183. .news-featured {
  184. position: unset;
  185. }
  186. }
  187. .search-btn {
  188. border: 1px solid var(--main-color) !important;
  189. svg {
  190. color: var(--main-color);
  191. }
  192. &:hover {
  193. background-color: var(--main-color) !important;
  194. svg {
  195. color: #fff;
  196. }
  197. }
  198. }
  199. .tags {
  200. margin: 0 5px 5px 0;
  201. padding: 7px 10px !important;
  202. font-size: 14px !important;
  203. font-weight: 400 !important;
  204. color: var(--main-color) !important;
  205. border: 1px solid var(--main-color) !important;
  206. &:hover {
  207. color: #fff !important;
  208. background-color: var(--main-color);
  209. }
  210. }
  211. /* sidebar.html End */
  212. /* single.html Start */
  213. .blog-post.content {
  214. h2 {
  215. line-height: 46px;
  216. }
  217. h4 {
  218. font-size: 16px;
  219. font-weight: 300;
  220. line-height: 32px;
  221. a {
  222. padding: 5px 8px;
  223. margin-right: 3px;
  224. border: 1px solid #000;
  225. border-radius: 5px;
  226. font-size: 14px;
  227. &:hover {
  228. color: #fff !important;
  229. }
  230. }
  231. }
  232. .back-link {
  233. color: #000;
  234. display: block;
  235. text-align: center;
  236. text-decoration: none;
  237. transition: all 0.3s;
  238. &:hover {
  239. opacity: 0.7;
  240. }
  241. }
  242. }
  243. /* single.html End */
  244. /* content.html Start */
  245. .news-main {
  246. height: 100%;
  247. overflow: hidden;
  248. @media (max-width: 991px) {
  249. display: flex;
  250. flex-direction: column-reverse;
  251. margin-top: 8px;
  252. }
  253. .post-title {
  254. line-height: 46px;
  255. @media (max-width: 991px) {
  256. line-height: 30px;
  257. }
  258. a {
  259. font-size: 34px;
  260. @media (max-width: 991px) {
  261. font-size: 22px;
  262. }
  263. }
  264. }
  265. img {
  266. height: 100%;
  267. object-fit: cover;
  268. }
  269. .news-info {
  270. a {
  271. font-size: 16px;
  272. }
  273. }
  274. }
  275. /* content.html End */
  276. /* focus.html Start */
  277. .focus-content {
  278. position: sticky;
  279. top: 20px;
  280. }
  281. /* focus.html End */
  282. /* recent.html Start */
  283. .recent-content {
  284. .news-list {
  285. margin: 0;
  286. li {
  287. margin: 15px 0;
  288. img {
  289. width: 140px;
  290. height: 105px;
  291. object-fit: cover;
  292. }
  293. small {
  294. display: block;
  295. }
  296. .news-info {
  297. margin-top: 0px;
  298. }
  299. }
  300. li:last-child {
  301. margin: 0;
  302. }
  303. }
  304. }
  305. /* recent.html End */
  306. /* news-tab.html Start */
  307. .tab-category {
  308. .nav-link {
  309. color: var(--main-color);
  310. font-weight: 500;
  311. }
  312. .nav-pills .nav-link.active,
  313. .nav-pills .show>.nav-link {
  314. color: var(--sub-color);
  315. background-color: var(--main-color);
  316. }
  317. }
  318. .tab-content {
  319. .bg-img {
  320. position: relative;
  321. height: 370px;
  322. // 設置背景混和模式為相乘模式
  323. background-blend-mode: multiply;
  324. background-size: cover;
  325. background-position: center center;
  326. cursor: pointer;
  327. section {
  328. padding: 10px 25px;
  329. position: absolute;
  330. bottom: 0;
  331. color: #fff;
  332. a {
  333. color: #fff;
  334. text-decoration: none;
  335. }
  336. small {
  337. font-size: 12px;
  338. }
  339. }
  340. }
  341. }
  342. /* news-tab.html End */
  343. /* news-all.html Start */
  344. .news-all {
  345. img {
  346. object-fit: cover;
  347. max-height: 300px;
  348. @media (max-width: 575px) {
  349. max-height: 180px;
  350. }
  351. }
  352. .post-title {
  353. margin: 5px auto;
  354. line-height: 46px;
  355. @media (max-width: 767px) {
  356. line-height: 40px;
  357. }
  358. a {
  359. font-size: 30px;
  360. @media (max-width: 767px) {
  361. font-size: 26px;
  362. }
  363. }
  364. }
  365. .news-info {
  366. a {
  367. font-size: 18px;
  368. }
  369. }
  370. hr {
  371. margin: 1.5rem 0;
  372. }
  373. .first-img {
  374. max-height: 50vh;
  375. object-fit: cover;
  376. }
  377. .line {
  378. padding: 0 12px;
  379. }
  380. }
  381. /* news-all.html End */
  382. /* news-featured.html Start */
  383. .news-featured {
  384. position: sticky;
  385. top: 20px;
  386. }
  387. /* news-featured.html End */