style.scss 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  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. .post-title {
  245. a {
  246. font-size: 34px;
  247. }
  248. }
  249. img {
  250. height: 100%;
  251. object-fit: cover;
  252. }
  253. .news-info {
  254. a {
  255. font-size: 16px;
  256. }
  257. }
  258. }
  259. /* content.html End */
  260. /* focus.html Start */
  261. .focus-content {
  262. position: sticky;
  263. top: 20px;
  264. }
  265. .focus-content,
  266. .news-featured {
  267. img {
  268. height: 175px;
  269. object-fit: cover;
  270. }
  271. .post-title {
  272. // 超過則省略
  273. overflow: hidden;
  274. text-overflow: ellipsis;
  275. display: -webkit-box;
  276. -webkit-line-clamp: 2;
  277. -webkit-box-orient: vertical;
  278. line-break: after-white-space;
  279. }
  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. .col-5 {
  342. img {
  343. height: 150px;
  344. }
  345. }
  346. }
  347. /* news-tab.html End */
  348. /* news-all.html Start */
  349. .news-all {
  350. .post-title {
  351. margin: 5px auto;
  352. a {
  353. font-size: 36px;
  354. line-height: 1.5;
  355. }
  356. }
  357. .news-info {
  358. a {
  359. font-size: 18px;
  360. }
  361. }
  362. hr {
  363. margin: 1.5rem 0;
  364. }
  365. .first-img {
  366. height: 50vh;
  367. object-fit: cover;
  368. }
  369. .line {
  370. padding: 0 12px;
  371. }
  372. .cover-img {
  373. width: 100%;
  374. height: 220px;
  375. object-fit: cover;
  376. }
  377. }
  378. /* news-all.html End */
  379. /* news-featured.html Start */
  380. .news-featured {
  381. position: sticky;
  382. top: 20px;
  383. }
  384. /* news-featured.html End */