Advertisement
dfghgfhplkjbv

src/components/Home/Item.module.scss

Feb 21st, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. @import 'src/styles/utility';
  2.  
  3. .root {
  4. display: flex;
  5. margin: 0 0 25px 0;
  6. position: relative;
  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: 562px;
  18.  
  19. &:after {
  20. @include base-transition;
  21. // background: rgba(0, 0, 0, 0.4);
  22. content: '';
  23. height: 100%;
  24. left: 0;
  25. position: absolute;
  26. bottom: 0;
  27. right: 0;
  28. top: 0;
  29. width: 100%;
  30. mix-blend-mode: color;
  31. background-color: transparent;
  32. }
  33.  
  34. @media(max-width: 1024px){
  35. width: 485px;
  36. }
  37.  
  38. @media (max-width: $lg) {
  39. flex-direction: column;
  40. height: 360px;
  41. max-width: 100%;
  42. width: 100%;
  43. }
  44.  
  45. @media (max-width: $sm) {
  46. height: 280px;
  47. }
  48. }
  49.  
  50. .coverWithoutPreview {
  51. height: 464px;
  52. object-fit: cover;
  53. position: relative;
  54. width: 570px;
  55.  
  56. &:after {
  57. // @include base-transition;
  58. background: rgba(0, 0, 0, 0.4);
  59. content: '';
  60. height: 100%;
  61. left: 0;
  62. position: absolute;
  63. bottom: 0;
  64. right: 0;
  65. top: 0;
  66. width: 100%;
  67. }
  68.  
  69. @media (max-width: $lg) {
  70. flex-direction: column;
  71. height: 360px;
  72. max-width: 100%;
  73. width: 100%;
  74. }
  75.  
  76. @media (max-width: $sm) {
  77. height: 280px;
  78. }
  79. }
  80. .innerWithoutPreview {
  81. color: white;
  82. display: flex;
  83. flex-direction: column;
  84. justify-content: space-between;
  85. padding: 32px;
  86. width: 100%;
  87. position: absolute;
  88. bottom: 0;
  89.  
  90. h3 {
  91. @include reset-webkit-margin();
  92. color: #333;
  93.  
  94. font-size: 1.25rem;
  95. font-weight: normal;
  96. line-height: 1.5;
  97.  
  98. @media (max-width: $lg) {
  99. margin-bottom: 48px;
  100. margin-top: 48px;
  101. }
  102.  
  103. @media (max-width: $sm) {
  104. font-size: 1rem;
  105. }
  106. }
  107. }
  108.  
  109. .title {
  110. @include reset-webkit-margin();
  111. @include base-font();
  112. font-size: 2.1875rem;
  113. position: relative;
  114. bottom: 10px;
  115. width: 85%;
  116. font-weight: 700;
  117. color: black;
  118. text-decoration: none;
  119. @media (max-width: $sm) {
  120. font-size: 1.5rem;
  121. bottom: 5px;
  122. width: 90%;
  123. }
  124. }
  125.  
  126. .inner {
  127. background-color: #fff;
  128. color: #000;
  129. display: flex;
  130. flex-direction: column;
  131. justify-content: space-between;
  132. padding: 32px 32px 32px 46px;
  133. width: 100%;
  134. margin-left: 15px;
  135. @media (max-width: 768px) {
  136. margin-top: 20px;
  137. margin-left: 0px;
  138. }
  139.  
  140. h2 {
  141. @include reset-webkit-margin();
  142. @include base-font();
  143. font-size: 2.1875rem;
  144.  
  145. font-weight: 700;
  146.  
  147. @media (max-width: $sm) {
  148. font-size: 1.7rem;
  149. }
  150. }
  151.  
  152. h3 {
  153. @include reset-webkit-margin();
  154. color: #333;
  155.  
  156. font-size: 1.25rem;
  157. font-weight: normal;
  158. line-height: 1.5;
  159.  
  160. @media (max-width: $lg) {
  161. margin-bottom: 48px;
  162. margin-top: 48px;
  163. }
  164.  
  165. @media (max-width: $sm) {
  166. font-size: 1rem;
  167. }
  168. }
  169. @media (max-width: $sm) {
  170. padding: 24px 18px;
  171. }
  172. }
  173.  
  174. .tags {
  175. align-items: center;
  176. display: flex;
  177. justify-content: space-between;
  178. flex-wrap: wrap;
  179. .date,
  180. .tag {
  181. @include base-font();
  182. color: $green;
  183. font-size: 1rem;
  184.  
  185. font-weight: 600;
  186. letter-spacing: 0.1rem;
  187. }
  188. .tagWithoutContent {
  189. @include base-font();
  190. color: white;
  191. font-weight: normal;
  192. font-size: 0.9rem;
  193. border-bottom: 1px solid white;
  194. }
  195. .date {
  196. color: #aaa;
  197. }
  198. }
  199.  
  200. .link {
  201. display: block;
  202. text-decoration: none;
  203. // &:hover {
  204. // .coverWithoutPreview,
  205. // .cover {
  206. // &:after {
  207. // background-color: #64629e;
  208. // mix-blend-mode: color;
  209. // }
  210. // }
  211. // }
  212. }
  213.  
  214. .callToAction {
  215. position: absolute;
  216. top: 25px;
  217. left: 35px;
  218. display: flex;
  219. align-items: center;
  220. .tag {
  221. @include base-font();
  222. color: $green;
  223. font-size: 1rem;
  224.  
  225. font-weight: 600;
  226. letter-spacing: 0.1rem;
  227. @media (max-width: $sm) {
  228. display: none;
  229. }
  230. }
  231. @media (max-width: $sm) {
  232. top: 15px;
  233. left: 0;
  234. }
  235. }
  236.  
  237. .offline-mode {
  238. opacity: 0.3;
  239. pointer-events: none;
  240. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement