style.scss 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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.html End */
  266. /* recent.html Start */
  267. .recent-content {
  268. .news-list {
  269. margin: 0;
  270. li {
  271. margin: 15px 0;
  272. img {
  273. width: 140px;
  274. height: 105px;
  275. object-fit: cover;
  276. }
  277. small {
  278. display: block;
  279. }
  280. .news-info {
  281. margin-top: 0px;
  282. }
  283. }
  284. li:last-child {
  285. margin: 0;
  286. }
  287. }
  288. }
  289. /* recent.html End */
  290. /* news-tab.html Start */
  291. .tab-category {
  292. .nav-link {
  293. color: var(--main-color);
  294. font-weight: 500;
  295. }
  296. .nav-pills .nav-link.active,
  297. .nav-pills .show > .nav-link {
  298. color: var(--sub-color);
  299. background-color: var(--main-color);
  300. }
  301. }
  302. .tab-content {
  303. .bg-img {
  304. position: relative;
  305. height: 370px;
  306. // 設置背景混和模式為相乘模式
  307. background-blend-mode: multiply;
  308. background-size: cover;
  309. background-position: center center;
  310. cursor: pointer;
  311. section {
  312. padding: 10px 25px;
  313. position: absolute;
  314. bottom: 0;
  315. color: #fff;
  316. a {
  317. color: #fff;
  318. text-decoration: none;
  319. }
  320. small {
  321. font-size: 12px;
  322. }
  323. }
  324. }
  325. }
  326. /* news-tab.html End */
  327. /* news-all.html Start */
  328. .news-all {
  329. .post-title {
  330. margin: 5px auto;
  331. a {
  332. font-size: 36px;
  333. }
  334. }
  335. .news-info {
  336. a {
  337. font-size: 18px;
  338. }
  339. }
  340. hr {
  341. margin: 1.5rem 0;
  342. }
  343. .first-img {
  344. height: 50vh;
  345. object-fit: cover;
  346. }
  347. .line {
  348. padding: 0 12px;
  349. }
  350. }
  351. /* news-all.html End */
  352. /* news-featured.html Start */
  353. .news-featured {
  354. position: sticky;
  355. top: 20px;
  356. }
  357. /* news-featured.html End */