Advertisement
dfghgfhplkjbv

src/components/Home/ItemWithoutPreview.module.scss

Feb 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. @import 'src/styles/utility';
  2.  
  3. .root {
  4. margin: 0 0 16px 0;
  5. position: relative;
  6. overflow: hidden;
  7.  
  8. @media (max-width: $lg) {
  9. flex-direction: column;
  10. }
  11. }
  12.  
  13. .cover {
  14. height: 464px;
  15. object-fit: cover;
  16. position: relative;
  17. width: 570px;
  18. // transition: all 0.3s ease;
  19. &:after {
  20. @include base-transition;
  21. content: '';
  22. height: 100%;
  23. left: 0;
  24. position: absolute;
  25. bottom: 0;
  26. right: 0;
  27. top: 0;
  28. width: 100%;
  29. // mix-blend-mode: color;
  30. // background-color: transparent;
  31. transition: all 0.3s ease;
  32. }
  33.  
  34. @media (max-width: $lg) {
  35. flex-direction: column;
  36. height: 360px;
  37. max-width: 100%;
  38. width: 100%;
  39. }
  40.  
  41. @media (max-width: $sm) {
  42. height: 280px;
  43. }
  44. }
  45.  
  46. .coverWithoutPreview {
  47. height: 464px;
  48. object-fit: cover;
  49. position: relative;
  50. width: 570px;
  51. transition: all 0.3s ease;
  52. &:after {
  53. // background-color: rgba(0, 0, 0, 0.8);
  54. content: '';
  55. height: 100%;
  56. left: 0;
  57. position: absolute;
  58. bottom: 0;
  59. right: 0;
  60. top: 0;
  61. width: 100%;
  62. // mix-blend-mode: color;
  63. // transition: all 0.3s ease;
  64. }
  65.  
  66. @media (max-width: $lg) {
  67. flex-direction: column;
  68. height: 360px;
  69. max-width: 100%;
  70. width: 100%;
  71. }
  72.  
  73. @media (max-width: $sm) {
  74. height: 280px;
  75. }
  76. }
  77.  
  78. .innerWithoutPreview {
  79. color: white;
  80. display: flex;
  81. flex-direction: column;
  82. justify-content: space-between;
  83. padding: 32px;
  84. width: 100%;
  85. position: absolute;
  86. bottom: 0;
  87.  
  88. h3 {
  89. @include reset-webkit-margin();
  90. color: #333;
  91.  
  92. font-size: 1.25rem;
  93. font-weight: normal;
  94. line-height: 1.5;
  95.  
  96. @media (max-width: $lg) {
  97. margin-bottom: 48px;
  98. margin-top: 48px;
  99. }
  100.  
  101. @media (max-width: $sm) {
  102. font-size: 1rem;
  103. }
  104. }
  105. @media (max-width: $md) {
  106. padding: 18px;
  107. }
  108. }
  109.  
  110. .title {
  111. @include reset-webkit-margin();
  112. @include base-font();
  113. font-size: 2.1875rem;
  114. position: relative;
  115. bottom: 10px;
  116. width: 85%;
  117. font-weight: 700;
  118. font-size: 2.1875rem;
  119. position: relative;
  120. bottom: 10px;
  121. width: 85%;
  122. font-weight: 700;
  123. color: white;
  124. text-decoration: none;
  125.  
  126. @media (max-width: $lg) {
  127. font-size: 1.9rem;
  128. }
  129.  
  130. @media (max-width: $md) {
  131. font-size: 2.1875rem;
  132. }
  133. @media (max-width: $sm) {
  134. font-size: 1.5rem;
  135. bottom: 5px;
  136. width: 90%;
  137. }
  138. }
  139.  
  140. .inner {
  141. background-color: #fff;
  142. color: #000;
  143. display: flex;
  144. flex-direction: column;
  145. justify-content: space-between;
  146. padding: 32px;
  147. width: 100%;
  148.  
  149. h2 {
  150. @include reset-webkit-margin();
  151. @include base-font();
  152. font-size: 2.1875rem;
  153.  
  154. font-weight: 700;
  155.  
  156. @media (max-width: $sm) {
  157. font-size: 1.7rem;
  158. }
  159. }
  160.  
  161. h3 {
  162. @include reset-webkit-margin();
  163. color: #333;
  164.  
  165. font-size: 1.25rem;
  166. font-weight: normal;
  167. line-height: 1.5;
  168.  
  169. @media (max-width: $lg) {
  170. margin-bottom: 48px;
  171. margin-top: 48px;
  172. }
  173.  
  174. @media (max-width: $sm) {
  175. font-size: 1rem;
  176. }
  177. }
  178. @media (max-width: $sm) {
  179. padding: 32px 24px;
  180. }
  181. }
  182.  
  183. .tags {
  184. align-items: center;
  185. display: flex;
  186. justify-content: space-between;
  187. flex-wrap: wrap;
  188.  
  189. .date,
  190. .tag {
  191. @include base-font();
  192. color: $green;
  193. font-size: 1rem;
  194.  
  195. font-weight: 600;
  196. letter-spacing: 0.1rem;
  197. }
  198. .tagWithoutContent {
  199. @include base-font();
  200. font-weight: normal;
  201. font-size: 0.9rem;
  202. border-bottom: 1px solid white;
  203. }
  204. .date {
  205. color: #aaa;
  206. }
  207. a {
  208. @include base-transition();
  209.  
  210. text-decoration: none;
  211. color: #fff;
  212. &:hover {
  213. color: #00d280;
  214. }
  215. }
  216. }
  217.  
  218. .link {
  219. display: block;
  220. text-decoration: none;
  221. width: calc(50% - 8px);
  222. // &:nth-child(even) {
  223. // margin-left: 8px;
  224. // }
  225. // &:nth-child(odd) {
  226. // margin-right: 8px;
  227. // }
  228. // &:hover {
  229. // .coverWithoutPreview,
  230. // .cover {
  231. // &:after {
  232. // background-color: #64629e;
  233. // mix-blend-mode: color;
  234. // }
  235. // }
  236. // }
  237.  
  238. .coverWithoutPreview,
  239. .cover {
  240. &:after {
  241. background-color: #161616;
  242. opacity: 0.4;
  243. }
  244. }
  245. @media (max-width: $md) {
  246. &:nth-child(n) {
  247. width: 100%;
  248. margin-left: 0;
  249. margin-right: 0;
  250. }
  251. }
  252. }
  253.  
  254. .link2 {
  255. @extend .link;
  256. width: calc(100% - 8px);
  257. &:nth-child(n) {
  258. margin-right: 0;
  259. margin-left: 0;
  260. }
  261. }
  262.  
  263. .callToAction {
  264. position: absolute;
  265. top: 25px;
  266. left: 35px;
  267. display: flex;
  268. align-items: center;
  269. cursor: pointer;
  270. .tag {
  271. @include base-font();
  272. color: $green;
  273. font-size: 1rem;
  274.  
  275. font-weight: 600;
  276. letter-spacing: 0.1rem;
  277. @media (max-width: $sm) {
  278. display: none;
  279. }
  280. }
  281. @media (max-width: $sm) {
  282. top: 15px;
  283. left: 0;
  284. }
  285. }
  286. .offline-mode {
  287. opacity: 0.3;
  288. pointer-events: none;
  289. }
  290.  
  291. .isFullWidth {
  292. width: 98.6%;
  293. @media(max-width: 1024px){
  294. width: 98.4%;
  295. }
  296.  
  297. &:nth-child(even) {
  298. margin-left: 0px;
  299. }
  300. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement