article.styl 6.2 KB

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