_components.sass 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. %upcaret
  2. width: 0
  3. height: 0
  4. border-left: 0.33rem solid transparent
  5. border-right: 0.33rem solid transparent
  6. top: -0.5rem
  7. left: 1rem
  8. .nav
  9. color: $haze
  10. display: flex
  11. justify-content: space-between
  12. @include content
  13. &_active
  14. background-color: rgba($light, 0.05)
  15. border-radius: 0.25rem
  16. &, &_body
  17. &_icon
  18. width: 0.7rem
  19. margin: 0.8rem 0.2rem
  20. transition: transform 0.3s var(--ease)
  21. transform-origin: 50% 50%
  22. &_body
  23. display: flex
  24. flex: 1
  25. &_header
  26. background-color: $bg
  27. padding: 0.25rem 2.2rem
  28. position: fixed
  29. width: 100%
  30. z-index: 99
  31. left: 0
  32. // border-bottom: 3px solid #44CCFF;
  33. box-shadow: 0.05rem 0.05rem 0.25rem rgba(100, 100, 100, 0.5)
  34. &_item
  35. padding: 0 1rem
  36. display: inline-flex
  37. align-items: center
  38. white-space: nowrap
  39. &_sub
  40. width: 100%
  41. left: 0
  42. position: absolute
  43. z-index: 20
  44. border-radius: 0 0 0.5rem 0.5rem
  45. top: 3rem
  46. transition: height 0.3s ease-in-out
  47. height: 0
  48. overflow: hidden
  49. padding: 0.96rem 0 0
  50. background: transparent
  51. &_parent
  52. position: relative
  53. display: flex
  54. align-items: center
  55. margin: 0.25rem 0
  56. border-radius: 0.5rem
  57. &_open + &_sub &_child
  58. padding-top: 0.5rem
  59. padding-bottom: 0.5rem
  60. z-index: 3
  61. & + a
  62. @media screen and (min-width: 769px)
  63. padding-top: 0
  64. &:not(:first-child)
  65. position: relative
  66. &:first-child::before
  67. position: absolute
  68. content: ""
  69. @extend %upcaret
  70. border-bottom: 0.5rem solid var(--translucent-light)
  71. z-index: 2
  72. &_open + &_sub
  73. height: initial
  74. z-index: 999
  75. overflow: initial
  76. border-radius: 0.5rem
  77. padding-bottom: 0.5rem
  78. @media screen and (min-width: 769px)
  79. color: var(--text)
  80. &::before, &::after
  81. content: ""
  82. position: absolute
  83. &::before
  84. @extend %upcaret
  85. z-index: 1
  86. @media screen and (min-width: 769px)
  87. border-bottom: 0.5rem solid var(--choice-bg)
  88. &::after
  89. top: 0
  90. left: 0
  91. right: 0
  92. bottom: 0
  93. background: var(--translucent-light)
  94. border-radius: 0.5rem
  95. box-shadow: 0 1rem 3rem rgba(0,0,0,0.25)
  96. @media screen and (min-width: 769px)
  97. background: var(--choice-bg)
  98. width: auto
  99. white-space: nowrap;
  100. &_open &_icon
  101. transform: rotate(180deg)
  102. &_sub &_item
  103. &:not(.nav_child)
  104. position: relative
  105. z-index: 5
  106. display: block
  107. padding-top: 0.75rem
  108. padding-bottom: 0.75rem
  109. transition: background 0.3s ease-out
  110. margin: 0
  111. &_brand
  112. .site-title
  113. display: none
  114. @media screen and (min-width: 300px)
  115. .site-title
  116. display: initial
  117. img
  118. max-width: 2.6rem
  119. margin: 0
  120. margin-right: 0.5rem
  121. @media screen and (min-width: 769px)
  122. padding-left: 0
  123. // margin-left: -16rem
  124. // transform: translateX(50rem)
  125. img.logo
  126. background: transparent !important
  127. max-height: 2.6rem;
  128. margin-bottom: -0.1rem;
  129. box-shadow: 0.1rem 0.1rem 0.5rem #002538;
  130. border-radius: 50%;
  131. border: 2px solid #002538;
  132. margin-right: 0.5rem;
  133. &:hover
  134. -o-transform: scale(1.2)
  135. -webkit-transform: scale(1.2)
  136. -ms-transform: scale(1.2)
  137. transform: scale(1.2) rotate(360deg)
  138. left: -2rem
  139. transition: all 0.3s
  140. &_center
  141. display: none
  142. @media screen and (min-width: 769px)
  143. display: flex
  144. flex: 1
  145. align-items: center
  146. justify-content: center
  147. + .follow
  148. flex: initial
  149. &_hide
  150. @media screen and (min-width: 769px)
  151. display: none
  152. &_close
  153. display: none
  154. .content, .footer
  155. padding: 0.5rem
  156. @media screen and (min-width: 1441px)
  157. padding: 1.5rem 0
  158. .content
  159. max-width: 1024px
  160. padding-top: 4rem
  161. @media screen and (min-width: 768px)
  162. padding-left: 3rem
  163. padding-bottom: 3rem
  164. @include content
  165. @media screen and (min-width: 800px)
  166. .content
  167. padding-top: 5rem
  168. .content.without-toc
  169. margin-left: auto
  170. margin-right: auto
  171. display: block
  172. max-width: 800px
  173. @media screen and (min-width: 1366px)
  174. .content
  175. max-width: 1500px
  176. .content.without-toc
  177. max-width: 1200px
  178. .footer
  179. border-top: 1px solid $xhaze
  180. background: var(--footer-bg)
  181. margin-top: 2rem
  182. font-size: 0.9rem
  183. &_inner
  184. @include content
  185. display: grid
  186. grid-template-columns: 4rem 1fr
  187. align-items: center
  188. position: relative
  189. .button
  190. background-color: $theme
  191. color: $light
  192. display: inline-flex
  193. padding: 0.5rem 1.0rem
  194. text-transform: uppercase
  195. border: 1px solid $theme
  196. border-radius: 0.5rem
  197. font-size: 0.9rem
  198. align-items: center
  199. user-select: none
  200. &:hover, &:focus
  201. background-color: darken($theme, 20%)
  202. color: $light
  203. border: 1px solid darken($theme, 20%)
  204. &_translucent
  205. background-color: rgba($theme, 0.15)
  206. color: $theme
  207. border: 1px solid transparent
  208. &_tally
  209. padding: 0 0.75rem
  210. border-radius: 0.5rem
  211. background-color: $theme
  212. display: inline-flex
  213. justify-content: center
  214. align-items: center
  215. color: $light
  216. margin: 0.1rem 0 0.1rem 0.2rem
  217. font-size: 0.7rem
  218. .post
  219. &_link, &_title
  220. margin-bottom: 0
  221. &s
  222. margin-top: 2rem
  223. &_header
  224. height: 50vh
  225. max-height: 35rem
  226. background-color: $bg
  227. // background-image: url(/images/island.jpg)
  228. background-size: cover
  229. background-position: center
  230. margin-top: 4.2rem
  231. @media screen and (max-width: 992px)
  232. height: 40vh
  233. margin-top: 3rem
  234. @media screen and (max-width: 667px)
  235. height: 30vh
  236. & + .content
  237. padding-top: 0
  238. &_item
  239. box-shadow: 0 4px 8px 0 var(--shadow)
  240. margin-top: 0.5rem
  241. margin-bottom: 0.2rem
  242. border-radius: 0.5rem
  243. background: var(--post-bg)
  244. @media screen and (min-width: 664px)
  245. margin-top: 1.5rem
  246. &_tag
  247. padding: 0.2rem 0.8rem
  248. font-size: 0.8rem
  249. &s
  250. display: none
  251. &.jswidgetopen
  252. display: initial
  253. position: fixed
  254. top: 0
  255. left: 0
  256. height: 100vh
  257. overflow-y: auto
  258. width: 100vw
  259. padding: 5rem 1.5rem
  260. background: var(--translucent-light)
  261. cursor: pointer
  262. z-index: 999
  263. overflow-y: auto
  264. &_toggle
  265. margin-top: 0.5rem
  266. margin-left: 0.5rem
  267. cursor: pointer
  268. &_tag, &_share
  269. margin: 0.5rem
  270. &_share
  271. display: inline-flex
  272. &_meta
  273. display: inline-flex
  274. flex-flow: row wrap
  275. align-items: center
  276. .button
  277. margin-bottom: 0
  278. &_date
  279. margin-right: 0.5rem
  280. margin-left: 0.25rem
  281. &_content
  282. overflow-x: auto
  283. a
  284. color: $theme
  285. ul, ol
  286. list-style: initial
  287. padding: 0.5rem 1.25rem
  288. li
  289. padding-top: 0.25rem
  290. ol
  291. list-style: decimal
  292. img
  293. display: block
  294. margin-left: auto
  295. margin-right: auto
  296. background-color: #fff
  297. padding: 0.5rem
  298. h2
  299. color: #0061bb
  300. border-bottom: 2px solid #ddd
  301. font-weight: bolder
  302. h3
  303. font-weight: 400
  304. &::before
  305. content: "● "
  306. color: #8ed08e
  307. h4
  308. font-weight: 400
  309. &::before
  310. content: "+ "
  311. color: #ff5e00
  312. h3.post_link
  313. font-weight: bolder
  314. .scrollable
  315. display: grid
  316. width: 100%
  317. max-width: 100%
  318. overflow-x: auto
  319. .to-top
  320. position: fixed
  321. bottom: 2rem
  322. @media screen and (max-width: 667px)
  323. bottom: 2.25rem
  324. right: 1.5rem
  325. height: 2.25rem
  326. width: 2.25rem
  327. background-color: $theme
  328. display: flex
  329. align-items: center
  330. justify-content: center
  331. border: none
  332. -webkit-appearance: none
  333. border-radius: 50%
  334. color: $light !important
  335. text-decoration: none !important
  336. font-size: 1.25rem
  337. cursor: pointer
  338. &, &:focus
  339. outline: none
  340. .mb-0
  341. margin-bottom: 0 !important
  342. .tag
  343. &s
  344. &_list
  345. cursor: initial
  346. background: var(--choice-bg)
  347. padding: 4.5rem 1.5rem 1.5rem 1.5rem
  348. border-radius: 1rem
  349. max-width: 720px
  350. margin: 0 auto
  351. box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.12)
  352. position: relative
  353. display: flex
  354. flex-flow: row wrap
  355. &_nav
  356. position: relative
  357. &_hide
  358. position: absolute
  359. top: 1rem
  360. right: 1.5rem
  361. padding: 0.5rem
  362. border-radius: 50%
  363. cursor: pointer
  364. @media screen and (min-width: 992px)
  365. display: none
  366. &_sort
  367. font-size: 1rem
  368. color: var(--light)
  369. background: var(--theme)
  370. position: absolute
  371. top: 1.5rem
  372. left: 1.5rem
  373. border-radius: 1.5rem
  374. padding: 0.1rem
  375. &, span
  376. user-select: none
  377. span
  378. display: inline-flex
  379. justify-content: center
  380. align-items: center
  381. height: 2rem
  382. position: relative
  383. z-index: 5
  384. cursor: pointer
  385. width: 5rem
  386. font-weight: 500
  387. &::before
  388. content: ""
  389. position: absolute
  390. width: 4.5rem
  391. top: 0.25rem
  392. bottom: 0.25rem
  393. left: 0.25rem
  394. z-index: 3
  395. background: var(--bg)
  396. opacity: 0.5
  397. border-radius: 1.5rem
  398. transition: 0.25s transform var(--ease)
  399. &.sorted
  400. &::before
  401. transform: translateX(5rem)
  402. &-title
  403. border-bottom: none !important
  404. display: inline-block !important
  405. position: relative
  406. font-size: 2rem
  407. margin-bottom: -1rem
  408. &::after
  409. content: attr(data-count)
  410. margin-left: 1.5rem
  411. background-color: #eee
  412. padding: 0.25rem 1rem
  413. border-radius: 15%
  414. font-size: 1.5rem
  415. .icon
  416. display: inline-flex
  417. justify-content: center
  418. align-items: center
  419. margin: 0 1.0rem
  420. &, img, svg
  421. width: 1.1rem
  422. height: 1.1rem
  423. &_2
  424. width: 2.2rem
  425. height: 2.2rem
  426. .link
  427. opacity: 0
  428. position: relative
  429. &_yank
  430. opacity: 1
  431. &ed
  432. position: absolute
  433. right: -1rem
  434. top: -2rem
  435. background-color: $theme
  436. color: $light
  437. width: 7rem
  438. padding: 0.25rem 0.5rem
  439. font-size: 0.9rem
  440. border-radius: 1rem
  441. text-align: center
  442. &::after
  443. position: absolute
  444. top: 1rem
  445. content: ""
  446. border-color: $theme transparent
  447. border-style: solid
  448. border-width: 1rem 1rem 0 1rem
  449. height: 0
  450. width: 0
  451. transform-origin: 50% 50%
  452. transform: rotate(145deg)
  453. right: 0.45rem
  454. .excerpt
  455. &_header, &_footer
  456. padding: 1rem
  457. &_header .post_link
  458. margin-top: 0
  459. &_footer
  460. padding: 0 1rem 2.25rem 1rem
  461. padding-bottom: 0.5rem;
  462. &_thumbnail
  463. min-height: 10rem
  464. display: none
  465. @media screen and (min-width: 769px)
  466. display: block
  467. border-radius: 0.5rem
  468. &_footer
  469. &.partition
  470. display: grid
  471. @media screen and (min-width: 769px)
  472. grid-template-columns: 2fr 7fr
  473. grid-gap: 1rem
  474. .sidebar
  475. margin-top: 1rem
  476. @media screen and (min-width: 672px)
  477. margin-top: 0
  478. &_inner
  479. position: relative
  480. &::before
  481. content: ""
  482. padding: 0.5px
  483. top: 0
  484. bottom: 0
  485. // background: var(--light)
  486. background: linear-gradient(to bottom, var(--haze), var(--light), var(--haze))
  487. position: absolute
  488. left: -2rem
  489. .intro
  490. margin-bottom: 2rem
  491. h2
  492. margin-top: 0
  493. margin-bottom: 0
  494. font-weight: bold
  495. p
  496. margin-top: 0
  497. margin-bottom: 0
  498. padding-bottom: 0
  499. h2.widget-title
  500. background: rgba(100, 100, 100, 0.1)
  501. border-left: 8px solid var(--header-text)
  502. font-size: 1.4rem
  503. padding-left: 1rem
  504. border-radius: 0.5rem
  505. font-weight: bold
  506. .pagination
  507. display: flex
  508. margin-top: 1.5rem
  509. .page
  510. &-item
  511. padding: 0.2rem
  512. &.disabled
  513. opacity: 0.7
  514. &:first-child, &:last-child
  515. display: none
  516. &.active a
  517. background-color: darken($theme, 20%)
  518. &-link
  519. padding: 0.25rem 0.75rem
  520. background-color: $theme
  521. color: $light
  522. border-radius: 1rem
  523. .float
  524. &_left
  525. float: left
  526. margin-right: 1rem
  527. + p
  528. padding-top: 0
  529. &_right
  530. float: right
  531. margin-left: 1rem
  532. &_left, &_right
  533. &::after
  534. clear: both
  535. .follow
  536. display: flex
  537. align-items: center
  538. flex: 1
  539. justify-content: flex-end
  540. svg
  541. fill: $haze
  542. margin-left: 0.75rem
  543. .img
  544. &_alt
  545. font-style: italic
  546. padding-top: 0rem
  547. opacity: 0.67
  548. font-size: 0.9rem
  549. .to
  550. &_top
  551. background-color: $theme
  552. width: 2.75rem
  553. height: 2.75rem
  554. display: flex
  555. justify-content: center
  556. align-items: center
  557. cursor: pointer
  558. border-radius: 50%
  559. position: fixed
  560. bottom: 1.5rem
  561. right: 1.5rem
  562. z-index: 9999
  563. &.ios
  564. position: absolute
  565. bottom: 0.75rem
  566. right: 0
  567. &:hover
  568. background-color: $theme
  569. svg
  570. fill: $light
  571. opacity: 0.5
  572. transition: 0.3s opacity var(--ease)
  573. &:hover svg
  574. opacity: 1
  575. .color
  576. &_mode
  577. // width: 3rem
  578. height: 1.5rem
  579. display: grid
  580. align-items: center
  581. margin: 0 0.5rem
  582. @media screen and (min-width: 769px)
  583. margin: 0 1.5rem
  584. grid-template-columns: 1fr
  585. &_choice
  586. width: 3rem
  587. background-color: var(--translucent-light)
  588. border-radius: 1rem
  589. height: 1.5rem
  590. outline: none
  591. border: none
  592. -webkit-appearance: none
  593. cursor: pointer
  594. position: relative
  595. position: relative
  596. overflow: hidden
  597. box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.15)
  598. &::after
  599. content: ""
  600. position: absolute
  601. top: 0.1rem
  602. left: 0.1rem
  603. width: 1.3rem
  604. height: 1.3rem
  605. background-image: url("#{$images}sun.svg")
  606. background-position: center
  607. background-size: cover
  608. border-radius: 50%
  609. z-index: 2
  610. &_animate
  611. transition: transform 0.5s cubic-bezier(0.075, 0.82, 0.165, 1)
  612. &::after
  613. transition: transform 0.5s cubic-bezier(.19,1,.22,1)
  614. will-change: transform
  615. .taxonomy
  616. text-transform: capitalize
  617. .image
  618. &-scale
  619. position: fixed
  620. z-index: 999999
  621. left: 0
  622. right: 0
  623. height: 100vh
  624. top: 0
  625. padding: 1.5rem
  626. background-color: var(--bg)
  627. display: grid
  628. align-items: center
  629. overflow: auto
  630. &-scale &-scalable
  631. background-color: var(--text)
  632. &-scalable
  633. cursor: pointer
  634. transition: transform 0.3s var(--ease)
  635. &_featured
  636. display: block
  637. margin-left: auto !important
  638. margin-right: auto !important
  639. #posts
  640. margin-top: 0
  641. .page-title
  642. margin-top: 0
  643. margin-bottom: 0
  644. .page-description
  645. padding-top: 0
  646. // Auto hide navbar when scrolling down
  647. #top-navbar
  648. top: 0
  649. transition: top 0.5s