article.styl 6.1 KB

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