Advertisement
thotfrnk

landingpage.scss

Oct 27th, 2024
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. //main.scss
  2. @import 'abstracts/variables';
  3. @import 'abstracts/mixins';
  4.  
  5. @import 'base/reset';
  6. @import 'base/typography';
  7. @import 'base/animations';
  8.  
  9. @import 'components/buttons';
  10. @import 'components/cards';
  11.  
  12. @import 'layout/grid';
  13. @import 'layout/header';
  14.  
  15. @import 'pages/home';
  16.  
  17.  
  18. //abstracts/_mixins.scss
  19.  
  20. @mixin transition($time) {
  21. transition: all $time ease;
  22. }
  23.  
  24. @mixin respond($breakpoint) {
  25. @if $breakpoint == "tablet" {
  26. @media (max-width: 768px) {
  27. @content;
  28. }
  29. } @else if $breakpoint == "phone" {
  30. @media (max-width: 600px) {
  31. @content;
  32. }
  33. }
  34. }
  35.  
  36.  
  37. //abstracts/_variables.scss
  38.  
  39. $font-primary: 'Arial', sans-serif;
  40. $color-primary: #ffb6c1;
  41. $color-secondary: #1e90ff;
  42. $color-bg-light: #fafaf5;
  43. $color-bg-dark: #f4f4f4;
  44. $color-text: #333;
  45. $color-white: #fff;
  46. $color-black: #000;
  47.  
  48.  
  49. //base/_animations.scss
  50.  
  51. @keyframes fadeIn {
  52. 0% {
  53. opacity: 0;
  54. }
  55. 100% {
  56. opacity: 1;
  57. }
  58. }
  59.  
  60. @keyframes slideIn {
  61. 0% {
  62. transform: translateY(3rem);
  63. opacity: 0;
  64. }
  65. 100% {
  66. transform: translateY(0);
  67. opacity: 1;
  68. }
  69. }
  70.  
  71.  
  72. //base/_reset.scss
  73.  
  74. *,
  75. *::before,
  76. *::after {
  77. margin: 0;
  78. padding: 0;
  79. box-sizing: border-box;
  80. }
  81.  
  82.  
  83. //base/_typography.scss
  84.  
  85. body {
  86. font-family: $font-primary;
  87. line-height: 1.6;
  88. background-color: $color-bg-light;
  89. }
  90.  
  91.  
  92. //components/_buttons.scss
  93.  
  94. .btn {
  95. padding: 1rem 2.5rem;
  96. text-transform: uppercase;
  97. border-radius: 5rem;
  98. text-decoration: none;
  99. font-size: 1.5rem;
  100. @include transition(0.3s);
  101.  
  102. &--white {
  103. background-color: $color-white;
  104. color: $color-black;
  105. }
  106.  
  107. &--animated {
  108. animation: slideIn 1.5s ease-out;
  109. }
  110. }
  111.  
  112.  
  113. //components/_cards.scss
  114.  
  115. .room-card {
  116. background-color: $color-white;
  117. border-radius: 0.625rem;
  118. overflow: hidden;
  119. box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.1);
  120. @include transition(0.3s);
  121.  
  122. &:hover {
  123. transform: scale(1.05);
  124. }
  125.  
  126. &__img {
  127. width: 100%;
  128. height: 18.75rem;
  129. object-fit: cover;
  130. }
  131.  
  132. &__title {
  133. font-size: 1.8rem;
  134. margin-top: 1.5rem;
  135. }
  136.  
  137. &__price {
  138. font-size: 1.4rem;
  139. margin-bottom: 1.5rem;
  140. }
  141. }
  142.  
  143. .activity-card {
  144. background-color: #f7f7f7;
  145. padding: 2rem;
  146. border-radius: 0.625rem;
  147. transition: transform 0.3s ease;
  148. box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  149.  
  150. &:hover {
  151. transform: translateY(-0.625rem);
  152. }
  153.  
  154. &__title {
  155. font-size: 1.5rem;
  156. font-weight: bold;
  157. color: $color-text;
  158. }
  159.  
  160. &__img {
  161. width: 100%;
  162. height: 18.75rem;
  163. object-fit: cover;
  164. }
  165. }
  166.  
  167.  
  168. // layout/_grid.scss
  169. .grid-container {
  170. display: grid;
  171. grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
  172. gap: 2rem;
  173. }
  174.  
  175. .activities__grid {
  176. display: grid;
  177. grid-template-columns: repeat(auto-fit, minmax(21.875rem, 1fr));
  178. gap: 2rem;
  179. }
  180.  
  181.  
  182. // layout/_header.scss
  183. .header {
  184. height: 100vh;
  185. background: linear-gradient(
  186. to right bottom,
  187. rgba($color-primary, 0.8),
  188. rgba($color-secondary, 0.7)
  189. ),
  190. url('../img/pexels-jess-vide.jpg') center/cover no-repeat;
  191. clip-path: polygon(0 0, 100% 0, 100% 80%, 75% 100%, 25% 100%, 0 80%);
  192. display: flex;
  193. justify-content: center;
  194. align-items: center;
  195. animation: fadeIn 2s ease-out;
  196.  
  197. &__text-box {
  198. text-align: center;
  199. color: $color-white;
  200.  
  201. .heading-primary {
  202. font-size: 3.5rem;
  203. text-transform: uppercase;
  204. margin-bottom: 4rem;
  205.  
  206. &--main {
  207. display: block;
  208. font-size: calc(2rem + 2vw);
  209. }
  210.  
  211. &--sub {
  212. display: block;
  213. font-size: calc(1rem + 1vw);
  214. }
  215. }
  216. }
  217. }
  218.  
  219.  
  220. //pages/_home.scss
  221.  
  222. .section-rooms {
  223. padding: 5rem 2rem;
  224. background-color: $color-bg-dark;
  225. text-align: center;
  226.  
  227. .heading-secondary {
  228. font-size: 2.5rem;
  229. margin-bottom: 3rem;
  230. color: $color-text;
  231. }
  232. }
  233.  
  234. .section-activities {
  235. padding: 5rem 2rem;
  236. background-color: $color-bg-light;
  237. text-align: center;
  238. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement