article.styl 6.0 KB

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