Advertisement
Guest User

CollectionCard.styled.js

a guest
Nov 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. import styled from 'styled-components'
  2. import { resetButton, media } from 'src/assets/style-utils'
  3.  
  4. export const Card = styled.div`
  5. position: relative;
  6. display: flex;
  7. flex-direction: column;
  8. justify-content: space-between;
  9. width: 97%;
  10. height: 400px;
  11. padding: 24px;
  12. border-radius: 5px;
  13. border: solid 2px rgba(177, 187, 195, 0.5);
  14. background: url('${({ background }) => background}');
  15. background-size: cover;
  16. background-repeat: no-repeat;
  17. background-position: center center;
  18.  
  19.  
  20. &:after {
  21. content: "";
  22. position: absolute;
  23. z-index: 0;
  24. width: 100%;
  25. height: 50%;
  26. bottom: 0;
  27. left: 0;
  28. right: 0;
  29. background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(225, 225, 225, 0) 6%, rgba(0, 0, 0, 0.45) 54%, #000000, #000000);
  30. border-radius: 5px;
  31. }
  32.  
  33. ${media.lg`
  34. width: 100%;
  35. `}
  36.  
  37. ${media.md`
  38. width: 100%;
  39. `}
  40. `
  41.  
  42. export const Inner = styled.div`
  43. position: relative;
  44. z-index: 5;
  45. display: flex;
  46. flex-direction: column;
  47. justify-content: flex-end;
  48. `
  49.  
  50. export const Title = styled.h3`
  51. color: #fff;
  52. font-size: 1.125rem;
  53. margin-bottom: 16px;
  54. `
  55.  
  56. export const Social = styled.div`
  57. display: flex;
  58. justify-content: space-between;
  59. `
  60.  
  61. export const Likes = styled.button`
  62. ${resetButton()}
  63. display: flex;
  64. align-items: center;
  65. color: #cccccc;
  66. font-size: 0.75rem;
  67.  
  68. span {
  69. margin-left: 8px;
  70. }
  71. `
  72.  
  73. export const Share = styled.button`
  74. ${resetButton()}
  75. display: flex;
  76. align-items: center;
  77. color: #cccccc;
  78. font-size: 0.75rem;
  79.  
  80. span {
  81. margin-left: 8px;
  82. }
  83. `
  84.  
  85. export const Shares = styled.span`
  86. display: flex;
  87. align-items: center;
  88. color: #ccc;
  89. font-size: 0.75rem;
  90.  
  91. span {
  92. margin-left: 8px;
  93. }
  94. `
  95.  
  96. export const Header = styled.div`
  97. display: flex;
  98. justify-content: space-between;
  99. align-items: center;
  100. `
  101.  
  102. export const Place = styled.div`
  103. position: relative;
  104. margin-left: -26px;
  105. padding-left: 26px;
  106. height: 26px;
  107. background-color: #fff;
  108. display: flex;
  109. align-items: center;
  110.  
  111. span {
  112. margin-left: 6px;
  113. color: #666666;
  114. font-size: 0.75rem;
  115. }
  116.  
  117. &:after {
  118. position: absolute;
  119. content: '';
  120. right: -24px;
  121. top: 0;
  122. height: 26px;
  123. width: 24px;
  124. background-color: #fff;
  125. border-top-right-radius: 50%;
  126. border-bottom-right-radius: 50%;
  127. }
  128. `
  129.  
  130. export const AuthorWrap = styled.div`
  131. display: flex;
  132. justify-content: flex-end;
  133.  
  134. &:hover {
  135. cursor: pointer;
  136. }
  137. `
  138.  
  139. export const AuthorPhoto = styled.figure`
  140. margin-bottom: 0;
  141. background: url('${({ image }) => image}');
  142. background-size: cover;
  143. background-repeat: no-repeat;
  144. background-position: center center;
  145. width: 35px;
  146. height: 35px;
  147. border: solid 1px rgba(255, 255, 255, 0.75);
  148. border-radius: 50%;
  149. `
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement