article.styl 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. .article
  2. margin: block-margin 0
  3. .article-inner
  4. @extend $block
  5. overflow: hidden
  6. .article-banner
  7. width:100%
  8. height:auto
  9. .article-header
  10. padding: article-padding article-padding 0
  11. .article-title
  12. display: block
  13. margin-bottom: 14px
  14. .article-title
  15. font-size: 2em
  16. color: color-default
  17. text-decoration: none
  18. line-height: line-height-title
  19. a&:visited
  20. color: color-default
  21. a&:hover
  22. color: color-link
  23. @media mq-mini
  24. font-size: 1.6em
  25. @media mq-mobile
  26. font-size: 1.6em
  27. .article-meta
  28. @extend $block-caption
  29. clearfix()
  30. line-height: 1.6em
  31. & > div
  32. float: left
  33. margin-right: 10px
  34. .fa
  35. margin-right: 3px
  36. a
  37. color: color-default
  38. &:hover
  39. color: color-link
  40. .article-category
  41. .fa-angle-right
  42. margin: 0 5px
  43. .article-tag
  44. .tag-link
  45. &:before
  46. content: "#"
  47. .article-entry
  48. @extend $base-style
  49. clearfix()
  50. color: color-default
  51. padding: 0 article-padding
  52. line-height: line-height
  53. p, table
  54. line-height: line-height
  55. margin: line-height 0
  56. text-align:justify
  57. h1, h2, h3, h4, h5, h6
  58. font-weight: bold
  59. h1, h2, h3, h4, h5, h6
  60. line-height: line-height-title
  61. margin: line-height-title 0
  62. a
  63. color: color-link
  64. text-decoration: none
  65. &:hover
  66. text-decoration: underline
  67. ul, ol, dl
  68. margin-top: line-height
  69. margin-bottom: line-height
  70. img, video
  71. max-width: 100%
  72. height: auto
  73. display: block
  74. margin: auto
  75. iframe
  76. border: none
  77. table
  78. width: 100%
  79. border-collapse: collapse
  80. border-spacing: 0
  81. th
  82. font-weight: bold
  83. border-bottom: 3px solid color-border
  84. padding-bottom: 0.5em
  85. td
  86. border-bottom: 1px solid color-border
  87. padding: 10px 0
  88. blockquote
  89. position: relative
  90. font-family: font-serif
  91. font-size: 1.1em
  92. margin: 0 -20px
  93. padding: 10px 20px 10px 54px
  94. background: #fcfcfc
  95. border-left: 4px solid #eee
  96. &:before
  97. top: 20px
  98. left: 10px
  99. content: "\f10d"
  100. color: #e2e2e2
  101. font-size: 32px;
  102. font-family: FontAwesome
  103. text-align: center
  104. position: absolute
  105. footer
  106. font-size: font-size
  107. margin: line-height 0
  108. font-family: font-sans
  109. cite
  110. &:before
  111. content: "—"
  112. padding: 0 0.5em
  113. .pullquote
  114. text-align: left
  115. width: 45%
  116. margin: 0
  117. &.left
  118. margin-left: 0.5em
  119. margin-right: 1em
  120. &.right
  121. margin-right: 0.5em
  122. margin-left: 1em
  123. .caption
  124. color: color-grey
  125. display: block
  126. font-size: 0.9em
  127. margin-top: 0.5em
  128. position: relative
  129. text-align: center
  130. // http://webdesignerwall.com/tutorials/css-elastic-videos
  131. .video-container
  132. position: relative
  133. padding-top: (9 / 16 * 100)% // 16:9 ratio
  134. height: 0
  135. overflow: hidden
  136. iframe, object, embed
  137. position: absolute
  138. top: 0
  139. left: 0
  140. width: 100%
  141. height: 100%
  142. margin-top: 0
  143. .article-more-link a
  144. display: inline-block
  145. line-height: 1em
  146. padding: 6px 15px
  147. border-radius: 15px
  148. background: color-background
  149. color: color-grey
  150. text-shadow: 0 1px #fff
  151. text-decoration: none
  152. &:hover
  153. background: color-link
  154. color: #fff
  155. text-decoration: none
  156. text-shadow: 0 1px darken(color-link, 20%)
  157. .article-footer, .article-meta-extra
  158. clearfix()
  159. font-size: 0.85em
  160. line-height: line-height
  161. border-top: 1px solid color-border
  162. padding-top: line-height
  163. margin: 0 article-padding article-padding
  164. a
  165. color: color-grey
  166. text-decoration: none
  167. &:hover
  168. color: color-default
  169. .article-comment-link
  170. float: right
  171. &:before
  172. content: "\f075"
  173. font-family: FontAwesome
  174. padding-right: 5px
  175. .share-container
  176. float: left
  177. .article-share-link
  178. float: right
  179. cursor: pointer
  180. margin-left: 20px
  181. .fa-share
  182. margin-right: 5px
  183. #article-nav
  184. clearfix()
  185. position: relative
  186. @media mq-normal
  187. margin: block-margin 0
  188. &:before
  189. absolute-center(8px)
  190. content: ""
  191. border-radius: 50%
  192. background: color-default + #222
  193. .article-nav-link-wrap
  194. text-decoration: none
  195. color: color-grey
  196. box-sizing: border-box
  197. margin-top: block-margin
  198. text-align: center
  199. display: block
  200. &:hover
  201. color: color-default
  202. @media mq-normal
  203. width: 50%
  204. margin-top: 0
  205. #article-nav-newer
  206. @media mq-normal
  207. float: left
  208. text-align: right
  209. padding-right: 20px
  210. #article-nav-older
  211. @media mq-normal
  212. float: right
  213. text-align: left
  214. padding-left: 20px
  215. .article-nav-caption
  216. letter-spacing: 2px
  217. line-height: 1em
  218. font-weight: bold
  219. color: color-default
  220. text-transform: uppercase
  221. #article-nav-newer &
  222. margin-right: -2px
  223. .article-nav-title
  224. font-size: 0.85em
  225. margin-top: 0.5em
  226. color: color-default
  227. line-height: line-height
  228. .article-share-box
  229. position: absolute
  230. display: none
  231. background: #fff
  232. box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1)
  233. border-radius: 3px
  234. margin-left: -145px
  235. overflow: hidden
  236. z-index: 1
  237. &.on
  238. display: block
  239. .article-share-input
  240. width: 100%
  241. background: none
  242. box-sizing: border-box
  243. font: 14px font-sans
  244. padding: 0 15px
  245. color: color-default
  246. outline: none
  247. border: 1px solid color-border
  248. border-radius: 3px 3px 0 0
  249. height: 36px
  250. line-height: 36px
  251. .article-share-links
  252. clearfix()
  253. background: color-background
  254. $article-share-link
  255. width: 50px
  256. height: 36px
  257. display: block
  258. float: left
  259. position: relative
  260. color: #999
  261. text-shadow: 0 1px #fff
  262. &:before
  263. font-size: 20px
  264. absolute-center(@font-size)
  265. text-align: center
  266. &:hover
  267. color: #fff
  268. .article-share-twitter
  269. @extend $article-share-link
  270. &:hover
  271. background: color-twitter
  272. text-shadow: 0 1px darken(color-twitter, 20%)
  273. .article-share-facebook
  274. @extend $article-share-link
  275. &:hover
  276. background: color-facebook
  277. text-shadow: 0 1px darken(color-facebook, 20%)
  278. .article-share-pinterest
  279. @extend $article-share-link
  280. &:hover
  281. background: color-pinterest
  282. text-shadow: 0 1px darken(color-pinterest, 20%)
  283. .article-share-google
  284. @extend $article-share-link
  285. &:hover
  286. background: color-google
  287. text-shadow: 0 1px darken(color-google, 20%)
  288. .article-gallery
  289. background: #000
  290. position: relative
  291. .article-gallery-photos
  292. position: relative
  293. overflow: hidden
  294. .article-gallery-img
  295. display: none
  296. max-width: 100%
  297. &:first-child
  298. display: block
  299. &.loaded
  300. position: absolute
  301. display: block
  302. img
  303. display: block
  304. max-width: 100%
  305. margin: 0 auto
  306. /* toc */
  307. .toc-article
  308. background #F9F9F9
  309. margin 2em 0 0 0.2em
  310. padding 1em
  311. border-radius 0px
  312. .toc-title
  313. font-size 120%
  314. strong
  315. padding 0.3em 1
  316. ol.toc
  317. width 100%
  318. margin 1em 2em 0 0
  319. #toc
  320. line-height 1em
  321. font-size 0.8em
  322. float right
  323. .toc
  324. padding 0
  325. li
  326. list-style-type none
  327. .toc-child
  328. padding-left 0em
  329. #toc.toc-aside
  330. display none
  331. width 13%
  332. position fixed
  333. right 2%
  334. top 320px
  335. overflow hidden
  336. line-height 1.5em
  337. font-size 1em
  338. color color-heading
  339. opacity .6
  340. transition opacity 1s ease-out
  341. strong
  342. padding 0.3em 0
  343. color color-font
  344. &:hover
  345. transition opacity .3s ease-out
  346. opacity 1
  347. a
  348. transition color 1s ease-out
  349. &:hover
  350. color color-theme
  351. transition color .3s ease-out