James Peret's blog. Built with Jekyll and the Mikey theme.

_content.scss 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. //
  2. // Content
  3. // --------------------------------------------------
  4. // Post
  5. .postWrapper {
  6. position: relative;
  7. width: 100%;
  8. z-index: $zIndex-4--post-wrapper;
  9. -webkit-transition: padding 100ms cubic-bezier(0.565, 1, 0.765, 0.88);
  10. -webkit-transition: padding 100ms cubic-bezier(0.565, 1.65, 0.765, 0.88);
  11. -moz-transition: padding 100ms cubic-bezier(0.565, 1.65, 0.765, 0.88);
  12. -o-transition: padding 100ms cubic-bezier(0.565, 1.65, 0.765, 0.88);
  13. transition: padding 100ms cubic-bezier(0.565, 1.65, 0.765, 0.88);
  14. @media (max-width: $screen-xs-max) {
  15. overflow-y: hidden;
  16. }
  17. }
  18. .meta {
  19. margin-bottom: 2 * $leading;
  20. }
  21. // Blocks
  22. .section--postsWrapper {
  23. width: 100%;
  24. background: $frontpage-body-bg;
  25. padding-top: 0;
  26. position: relative;
  27. clear: both;
  28. z-index: $zIndex-4--posts-wrapper;
  29. }
  30. .blockGroup {
  31. margin: 0;
  32. padding: 0;
  33. }
  34. // Inspired by Squareup.com
  35. .blockGroup-list {
  36. list-style: none;
  37. padding: 0;
  38. margin-top: -3*$leading;
  39. margin-left: -10px;
  40. margin-right: -10px;
  41. display: -webkit-box;
  42. display: -webkit-flex;
  43. display: -ms-flexbox;
  44. display: flex;
  45. -webkit-flex-wrap: wrap;
  46. -ms-flex-wrap: wrap;
  47. flex-wrap: wrap;
  48. -webkit-box-align: stretch;
  49. -webkit-align-items: stretch;
  50. -ms-flex-align: stretch;
  51. align-items: stretch;
  52. clear: both;
  53. li {
  54. padding: 0 10px;
  55. }
  56. .block {
  57. display: block;
  58. width: 25%;
  59. margin-bottom: $leading;
  60. font-family: $title-secondary-font;
  61. display: -webkit-flex;
  62. display: -ms-flexbox;
  63. display: flex;
  64. @media (max-width: $screen-xs-max) {
  65. width: 100%;
  66. }
  67. }
  68. li:nth-child(1).block {
  69. width: 100%;
  70. .postArticle-image {
  71. padding-top: 30%;
  72. @media (max-width: $screen-xs-max) {
  73. padding-top: 50%;
  74. }
  75. }
  76. .postArticle-title {
  77. font-size: $font-S;
  78. }
  79. }
  80. li:nth-child(2).block,
  81. li:nth-child(3).block {
  82. width: 50%;
  83. .postArticle-image {
  84. padding-top: 50%;
  85. }
  86. .postArticle-title {
  87. font-size: $font-S;
  88. }
  89. @media (max-width: $screen-xs-max) {
  90. width: 100%;
  91. }
  92. }
  93. li {
  94. .postArticle-title {
  95. font-size: $font-XS;
  96. line-height: 1.5;
  97. }
  98. }
  99. .postArticle-wrapper {
  100. position: relative;
  101. background: $white;
  102. width: 100%;
  103. padding-bottom: 2*$leading;
  104. box-shadow: 0 1px 4px rgba(0,0,0,.2);
  105. &:hover {
  106. transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  107. box-shadow: 0 4px 10px 1px rgba(0,0,0,.2);
  108. }
  109. }
  110. .postArticle a {
  111. color: $black;
  112. background: transparent;
  113. }
  114. .postArticle-title {
  115. display: block;
  116. margin-top: 0.5*$leading;
  117. font-weight: 300;
  118. }
  119. .postArticle-image {
  120. background-size: cover;
  121. background-position: center;
  122. padding-top: 100%;
  123. -webkit-transition-property: all, left, top, width;
  124. -webkit-transition-duration: .5s, .1s, .1s, .1s;
  125. -webkit-transition-timing-function: cubic-bezier(.33,0,.2,1);
  126. -webkit-transition-delay: 0;
  127. -moz-transition-property: all, left, top, width;
  128. -moz-transition-duration: .5s, .1s, .1s, .1s;
  129. -moz-transition-timing-function: cubic-bezier(.33,0,.2,1);
  130. -moz-transition-delay: 0;
  131. -ms-transition-property: all, left, top, width;
  132. -ms-transition-duration: .5s, .1s, .1s, .1s;
  133. -ms-transition-timing-function: cubic-bezier(.33,0,.2,1);
  134. -ms-transition-delay: 0;
  135. -o-transition-property: all, left, top, width;
  136. -o-transition-duration: .5s, .1s, .1s, .1s;
  137. -o-transition-timing-function: cubic-bezier(.33,0,.2,1);
  138. -o-transition-delay: 0;
  139. transition-property: all, left, top, width;
  140. transition-duration: .5s, .1s, .1s, .1s;
  141. transition-timing-function: cubic-bezier(.33,0,.2,1);
  142. @media (max-width: $screen-xs-max) {
  143. padding-top: 50%;
  144. }
  145. }
  146. .block-postMeta {
  147. position: absolute;
  148. bottom: 0;
  149. padding-bottom: 10px;
  150. color: #ccc;
  151. font-size: 16px;
  152. text-transform: uppercase;
  153. }
  154. .postArticle-title,
  155. .block-postMeta {
  156. padding-left: 15px;
  157. padding-right: 15px;
  158. }
  159. }
  160. .desaturate {
  161. opacity: 0.8;
  162. -moz-filter: contrast(1.5) url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
  163. -o-filter: contrast(1.5) url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
  164. -webkit-filter: contrast(1.5) grayscale(100%);
  165. filter: gray;
  166. filter: contrast(1.5) url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
  167. }
  168. .block:hover .desaturate {
  169. filter: none;
  170. }
  171. // Newsletter subscription area
  172. .section--subscribe {
  173. width: 100%;
  174. background: $white;
  175. padding: $leading 0 0;
  176. position: relative;
  177. z-index: $zIndex-4--posts-wrapper;
  178. h3 {
  179. margin-top: $leading;
  180. }
  181. }
  182. .newsletterForm-wrapper {
  183. padding: $leading 0;
  184. }
  185. // Footer
  186. .section--footer {
  187. width: 100%;
  188. background: $white;
  189. padding: $leading 0 2*$leading;
  190. position: relative;
  191. z-index: $zIndex-4--posts-wrapper;
  192. font-family: $title-secondary-font;
  193. font-size: $font-XS;
  194. text-align: center;
  195. a:not(.socialAccount) {
  196. background-position: 0 16px;
  197. }
  198. }
  199. .socialAccountList {
  200. @include clearfix();
  201. list-style: none;
  202. margin: $leading auto;
  203. padding-left: 0;
  204. width: 50%;
  205. }
  206. .socialAccount {
  207. display: block;
  208. float: left;
  209. margin: 0;
  210. padding: 0 15px;
  211. width: 14.2%;
  212. height: 25px;
  213. text-decoration: none;
  214. background-repeat: no-repeat;
  215. background-position: center center;
  216. background-size: contain;
  217. opacity: 0.8;
  218. &:hover {
  219. opacity: 1;
  220. }
  221. }
  222. .socialAccount--twitter {
  223. background-image: url(../images/twitter--black.svg);
  224. }
  225. .socialAccount--facebook {
  226. background-image: url(../images/facebook--black.svg);
  227. }
  228. .socialAccount--linkedin {
  229. background-image: url(../images/linkedin--black.svg);
  230. }
  231. .socialAccount--dribbble {
  232. background-image: url(../images/dribbble--black.svg);
  233. }
  234. .socialAccount--pinterest {
  235. background-image: url(../images/pinterest--black.svg);
  236. }
  237. .socialAccount--kiva {
  238. background-image: url(../images/kiva--black.svg);
  239. }
  240. .socialAccount--rss {
  241. background-image: url(../images/rss--black.svg);
  242. }
  243. .socialAccount--github {
  244. background-image: url(../images/github--black.svg);
  245. }
  246. .socialAccount--youtube {
  247. background-image: url(../images/youtube--black.svg);
  248. }
  249. .socialAccount--vimeo {
  250. background-image: url(../images/vimeo--black.svg);
  251. }
  252. // Sections
  253. //// Post content area
  254. .section--last {
  255. position: relative;
  256. clear: both;
  257. padding: 1*$leading 0 4*$leading;
  258. background: $white;
  259. }
  260. .content-author {
  261. border-top: 1px solid $gray-lighter;
  262. margin-top: 2*$leading;
  263. padding-top: 1*$leading;
  264. }
  265. .content-comments {
  266. margin-top: 2*$leading;
  267. }
  268. //// Post footer area
  269. .postFooter {
  270. text-align: center;
  271. }
  272. .section--prePost {
  273. width: 100%;
  274. top: 0;
  275. position: relative;
  276. }
  277. .section--prePost .section-title a {
  278. background: transparent;
  279. color: rgba($white, 0.9);
  280. &:hover {
  281. color: rgba($white, 1);
  282. }
  283. }
  284. .section--prePost .section-title h2 {
  285. margin: $leading auto 0;
  286. display: inline-block;
  287. }
  288. .section--prePost,
  289. .section--prePost .section-backgroundImage {
  290. height: 11 * $leading;
  291. }
  292. .section--prePost .section-backgroundImage img {
  293. min-height: 11 * $leading;
  294. position: relative !important;
  295. top: 0;
  296. }