article.styl 6.1 KB

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