article.styl 6.7 KB

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