article.styl 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  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: font-icon
  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: font-icon
  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-border
  177. box-shadow: 0 1px 2px #fff
  178. .article-nav-link-wrap
  179. text-decoration: none
  180. text-shadow: 0 1px #fff
  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. text-transform: uppercase
  203. letter-spacing: 2px
  204. color: color-border
  205. line-height: 1em
  206. font-weight: bold
  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
  291. /*
  292. $article-gallery-ctrl
  293. position: absolute
  294. top: 0
  295. height: 100%
  296. width: 60px
  297. color: #fff
  298. text-shadow: 0 0 3px rgba(0, 0, 0, 0.3)
  299. opacity: 0.3
  300. transition: opacity 0.2s
  301. cursor: pointer
  302. &:hover
  303. opacity: 0.8
  304. &:before
  305. font-size: 30px
  306. font-family: font-icon
  307. position: absolute
  308. top: 50%
  309. margin-top: @font-size * -0.5
  310. .article-gallery-prev
  311. @extend $article-gallery-ctrl
  312. left: 0
  313. &:before
  314. content: "\f053"
  315. left: 15px
  316. .article-gallery-next
  317. @extend $article-gallery-ctrl
  318. right: 0
  319. &:before
  320. content: "\f054"
  321. right: 15px*/