Advertisement
thotfrnk

presspage.scss

Oct 27th, 2024
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. //main.scss
  2.  
  3. @import 'abstracts/variables';
  4. @import 'base/base';
  5. @import 'layout/grid';
  6. @import 'components/buttons';
  7. @import 'pages/press-page';
  8.  
  9.  
  10. //abstracts/_variables.scss
  11.  
  12. $primary-color: #d6e3f8;
  13. $secondary-color: #ebe8e8;
  14. $background-color: #131212;
  15. $background-color-article: #313131;
  16. $font-family: 'Helvetica, Arial, sans-serif';
  17. $spacing-unit: 1rem;
  18. $transition-time: 0.3s;
  19. $border-radius: 10px;
  20.  
  21.  
  22. //base/_base.scss
  23.  
  24. body {
  25. font-family: $font-family;
  26. margin: 0;
  27. padding: 0;
  28. background-color: $background-color;
  29. color: $secondary-color;
  30. }
  31.  
  32. h1, h2, h3 {
  33. margin-bottom: $spacing-unit;
  34. }
  35.  
  36. a {
  37. color: $primary-color;
  38. text-decoration: none;
  39. }
  40.  
  41. .container {
  42. max-width: 1200px;
  43. margin: 0 auto;
  44. padding: 0 $spacing-unit;
  45. }
  46.  
  47.  
  48. //components/_buttons.scss
  49.  
  50. .button {
  51. padding: $spacing-unit calc($spacing-unit * 2);
  52. background-color: $primary-color;
  53. color: #000;
  54. border: none;
  55. border-radius: $border-radius;
  56. cursor: pointer;
  57. transition: background-color $transition-time, transform $transition-time;
  58.  
  59. &:hover {
  60. background-color: darken($primary-color, 10%);
  61. transform: scale(1.05);
  62. }
  63. }
  64.  
  65.  
  66. // layout/_grid.scss
  67.  
  68. .grid--2x2 {
  69. display: grid;
  70. grid-template-columns: repeat(2, 1fr);
  71. // Defines two equal-width columns
  72. grid-gap: $spacing-unit;
  73. // Adds gap between grid items
  74.  
  75. @media (max-width: 768px) {
  76. grid-template-columns: 1fr; // On smaller screens, make the grid 1 column
  77. }
  78. }
  79.  
  80.  
  81. //pages/_press-page.scss
  82.  
  83. .press-page {
  84. padding: $spacing-unit calc($spacing-unit * 2);
  85.  
  86. &__header {
  87. position: relative;
  88. height: 100vh; // Takes up 1/4 of the screen height
  89. background-color: $primary-color;
  90. clip-path: polygon(0 14%, 99% 0, 100% 78%, 0 100%);
  91. margin-bottom: calc($spacing-unit * 3);
  92. display: flex;
  93. justify-content: center;
  94. align-items: center;
  95. text-align: center;
  96. color: #000;
  97. background-image: url('../img/headerimg.jpg');
  98. background-size: cover;
  99. background-position: center;
  100.  
  101. &__overlay {
  102. position: absolute;
  103. top: 0;
  104. left: 0;
  105. right: 0;
  106. bottom: 0;
  107. background-color: rgba(0, 0, 0, 0.5); // Dark overlay for better text visibility
  108. }
  109.  
  110. }
  111.  
  112. &__grid {
  113. @extend .grid--2x2; // Apply 2x2 grid layout
  114. margin: 0 auto;
  115. width: 100%;
  116. max-width: 1200px;
  117. }
  118.  
  119. &__article {
  120. background-color: $background-color-article;
  121. padding: $spacing-unit;
  122. border-radius: $border-radius;
  123. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  124. transition: transform $transition-time;
  125. display: flex;
  126. flex-direction: column;
  127.  
  128. &:hover {
  129. transform: translateY(-10px);
  130. }
  131.  
  132. &-image {
  133. width: 100%;
  134. height: 200px;
  135. border-radius: $border-radius $border-radius 0 0;
  136. object-fit: cover;
  137. }
  138.  
  139. &-content {
  140. padding: $spacing-unit;
  141. }
  142.  
  143. &-title {
  144. font-size: 1.5rem;
  145. margin-bottom: $spacing-unit;
  146. font-weight: bold;
  147. }
  148.  
  149. &-excerpt {
  150. font-size: 1rem;
  151. color: lighten($secondary-color, 20%);
  152. margin-bottom: $spacing-unit;
  153. }
  154.  
  155. &-link {
  156. font-size: 1rem;
  157. font-weight: bold;
  158. color: $primary-color;
  159. text-transform: uppercase;
  160. }
  161. }
  162.  
  163. &__contact {
  164. padding: calc($spacing-unit * 4) calc($spacing-unit * 2);
  165. text-align: center;
  166.  
  167. &-title {
  168. font-size: 2rem;
  169. margin-bottom: calc($spacing-unit * 2);
  170. font-weight: bold;
  171. }
  172.  
  173. &-logo {
  174. display: flex;
  175. justify-content: center;
  176. margin-bottom: $spacing-unit * 2;
  177.  
  178. &-image {
  179. width: 350px;
  180. height: auto;
  181. border-radius: $border-radius;
  182. }
  183. }
  184.  
  185. &-info {
  186. &-title {
  187. font-size: 1.5rem;
  188. font-weight: bold;
  189. margin-bottom: $spacing-unit;
  190. }
  191.  
  192. p {
  193. font-size: 1rem;
  194. //color: $text-color;
  195. margin-bottom: $spacing-unit;
  196.  
  197. a {
  198. color: $primary-color;
  199. text-decoration: none;
  200. font-weight: bold;
  201.  
  202. &:hover {
  203. text-decoration: underline;
  204. }
  205. }
  206. }
  207. }
  208. }
  209.  
  210. &__about {
  211. padding: calc($spacing-unit * 4) calc($spacing-unit * 2);
  212. background-color: $secondary-color;
  213. text-align: center;
  214. color: #000;
  215.  
  216. &-title {
  217. font-size: 2.5rem;
  218. font-weight: bold;
  219. margin-bottom: calc($spacing-unit * 2);
  220. }
  221.  
  222. &-text {
  223. font-size: 1.2rem;
  224. max-width: 800px;
  225. margin: 0 auto;
  226. margin-bottom: calc($spacing-unit * 4);
  227. }
  228.  
  229. &-stats {
  230. display: grid;
  231. grid-template-columns: repeat(2, 1fr);
  232. gap: $spacing-unit * 4;
  233. justify-content: center;
  234.  
  235. &-stat {
  236. text-align: center;
  237.  
  238. &-icon {
  239. width: 3.125rem;
  240. height: auto;
  241. margin-bottom: $spacing-unit * 2;
  242. }
  243.  
  244. &-title {
  245. font-size: 1.8rem;
  246. font-weight: bold;
  247. margin-bottom: $spacing-unit;
  248. }
  249.  
  250. p {
  251. font-size: 1rem;
  252. // color: $text-color-light;
  253. }
  254. }
  255. }
  256. }
  257. }
  258.  
  259.  
  260. .heading-main {
  261. position:relative;
  262. z-index: 1;
  263.  
  264. &__title {
  265. font-size: 2.5rem;
  266. animation: slideIn 0.8s ease-in-out;
  267. text-align: center;
  268. }
  269. }
  270.  
  271.  
  272.  
  273. @keyframes slideIn {
  274. from {
  275. opacity: 0;
  276. transform: translateY(-20px);
  277. }
  278. to {
  279. opacity: 1;
  280. transform: translateY(0);
  281. }
  282. }
  283.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement