Pecetowicz

Tekst wyświetla się tylko responsywnie

Jan 3rd, 2024 (edited)
1,013
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 11.57 KB | Source Code | 0 0
  1. @font-face {
  2.     font-family: 'Karla', sans-serif;
  3.     src: url('theme/fonts/Karla/Karla-Regular.ttf') format('truetype');
  4.     src: url('theme/fonts/Karla/Karla-Regular.woff2') format('woff2');
  5.     font-weight: normal;
  6.     font-style: normal;
  7. }
  8. *{
  9.     padding: 0;
  10.     margin: 0;
  11.     text-decoration: none;
  12.     list-style: none;
  13.     font-family: 'Karla', sans-serif;
  14. }
  15.  
  16. body{
  17.     min-height: 100vh;
  18.     width: 100%;
  19.     box-sizing: border-box;
  20.     display: flex;
  21.     flex-direction: column;
  22.     font-family: var(--body-font);
  23.     font-size: var(--normal-font-size);
  24.     background-color: white;
  25.     font-family: 'Karla';
  26.     font-size: 16px;
  27. }
  28. footer{
  29.   position: fixed;
  30.   background: black;
  31.   width: 100%;
  32.   bottom: 0;
  33.   left: 0;
  34.   margin-top: auto;
  35. }
  36. footer::before{
  37.   content: '';
  38.   position: absolute;
  39.   left: 0;
  40.   top: 100px;
  41.   height: 1px;
  42.   width: 100%;
  43.   background: #AFAFB6;
  44. }
  45. footer .content{
  46.   max-width: 1250px;
  47.   margin: auto;
  48.   padding: 30px 40px 40px 40px;
  49. }
  50. footer .content .top{
  51.   display: flex;
  52.   align-items: center;
  53.   justify-content: space-between;
  54.   margin-bottom: 50px;
  55. }
  56. .content .top .logo-details{
  57.   color: #fff;
  58.   font-size: 20px;
  59. }
  60. .content .top .media-icons{
  61.   display: flex;
  62. }
  63. .content .top .media-icons a{
  64.   height: 40px;
  65.   width: 40px;
  66.   margin: 0 8px;
  67.   border-radius: 50%;
  68.   text-align: center;
  69.   line-height: 40px;
  70.   color: #fff;
  71.   font-size: 17px;
  72.   text-decoration: none;
  73.   transition: all 0.4s ease;
  74. }
  75. .top .media-icons a:nth-child(1){
  76.   background: #4267B2;
  77. }
  78. .top .media-icons a:nth-child(1):hover{
  79.   color: #4267B2;
  80.   background: #fff;
  81. }
  82. .top .media-icons a:nth-child(2){
  83.   background: #1DA1F2;
  84. }
  85. .top .media-icons a:nth-child(2):hover{
  86.   color: #1DA1F2;
  87.   background: #fff;
  88. }
  89. .top .media-icons a:nth-child(3){
  90.   background: #E1306C;
  91. }
  92. .top .media-icons a:nth-child(3):hover{
  93.   color: #E1306C;
  94.   background: #fff;
  95. }
  96. .top .media-icons a:nth-child(4){
  97.   background: #0077B5;
  98. }
  99. .top .media-icons a:nth-child(4):hover{
  100.   color: #0077B5;
  101.   background: #fff;
  102. }
  103. .top .media-icons a:nth-child(5){
  104.   background: #FF0000;
  105. }
  106. .top .media-icons a:nth-child(5):hover{
  107.   color: #FF0000;
  108.   background: #fff;
  109. }
  110. footer .content .link-boxes{
  111.   width: 100%;
  112.   display: flex;
  113.   justify-content: space-between;
  114. }
  115. footer .content .link-boxes .box{
  116.   width: calc(100% / 5 - 10px);
  117. }
  118. .content .link-boxes .box .link_name{
  119.   color: #fff;
  120.   font-size: 18px;
  121.   font-weight: 400;
  122.   margin-bottom: 10px;
  123.   position: relative;
  124. }
  125. .link-boxes .box .link_name::before{
  126.   content: '';
  127.   position: absolute;
  128.   left: 0;
  129.   bottom: -2px;
  130.   height: 2px;
  131.   width: 35px;
  132.   background: #fff;
  133. }
  134. .content .link-boxes .box li{
  135.   margin: 6px 0;
  136.   list-style: none;
  137. }
  138. .content .link-boxes .box li a{
  139.   color: #fff;
  140.   font-size: 14px;
  141.   font-weight: 400;
  142.   text-decoration: none;
  143.   opacity: 0.8;
  144.   transition: all 0.4s ease
  145. }
  146. .content .link-boxes .box li a:hover{
  147.   opacity: 1;
  148.   text-decoration: underline;
  149. }
  150. .content .link-boxes .input-box{
  151.   margin-right: 55px;
  152. }
  153. .link-boxes .input-box input{
  154.   height: 40px;
  155.   width: calc(100% + 55px);
  156.   outline: none;
  157.   border: 2px solid #AFAFB6;
  158.   background: #140B5C;
  159.   border-radius: 4px;
  160.   padding: 0 15px;
  161.   font-size: 15px;
  162.   color: #fff;
  163.   margin-top: 5px;
  164. }
  165. .link-boxes .input-box input::placeholder{
  166.   color: #AFAFB6;
  167.   font-size: 16px;
  168. }
  169. .link-boxes .input-box input[type="button"]{
  170.   background: #fff;
  171.   color: #140B5C;
  172.   border: none;
  173.   font-size: 18px;
  174.   font-weight: 500;
  175.   margin: 4px 0;
  176.   opacity: 0.8;
  177.   cursor: pointer;
  178.   transition: all 0.4s ease;
  179. }
  180. .input-box input[type="button"]:hover{
  181.   opacity: 1;
  182. }
  183. footer .bottom-details{
  184.   width: 100%;
  185.   background: rgb(24, 23, 23);
  186.   text-align: center;
  187. }
  188. footer .bottom-details .bottom_text{
  189.   max-width: 1250px;
  190.   margin: auto;
  191.   padding: 20px 40px;
  192.   display: flex;
  193.   justify-content: space-between;
  194. }
  195. .bottom-details .bottom_text span,
  196. .bottom-details .bottom_text a{
  197.   font-size: 14px;
  198.   font-weight: 300;
  199.   color: #fff;
  200.   opacity: 0.8;
  201.   text-decoration: none;
  202. }
  203. .bottom-details .bottom_text a:hover{
  204.   opacity: 1;
  205.   text-decoration: underline;
  206. }
  207. .bottom-details .bottom_text a{
  208.   margin-right: 10px;
  209. }
  210. @media (max-width: 900px) {
  211.   footer .content .link-boxes{
  212.     flex-wrap: wrap;
  213.   }
  214.   footer .content .link-boxes .input-box{
  215.     width: 40%;
  216.     margin-top: 10px;
  217.   }
  218. }
  219. @media (max-width: 700px){
  220.   footer{
  221.     position: relative;
  222.   }
  223.   .content .top .logo-details{
  224.     font-size: 26px;
  225.   }
  226.   .content .top .media-icons a{
  227.     height: 35px;
  228.     width: 35px;
  229.     font-size: 14px;
  230.     line-height: 35px;
  231.   }
  232.   footer .content .link-boxes .box{
  233.     width: calc(100% / 3 - 10px);
  234.   }
  235.   footer .content .link-boxes .input-box{
  236.     width: 60%;
  237.   }
  238.   .bottom-details .bottom_text span,
  239.   .bottom-details .bottom_text a{
  240.     font-size: 12px;
  241.   }
  242. }
  243. @media (max-width: 520px){
  244.   footer::before{
  245.     top: 120px;
  246.   }
  247.   footer .content .top{
  248.     flex-direction: column;
  249.     display: flex;
  250.   }
  251.   .content .top .media-icons{
  252.     margin-top: 16px;
  253.   }
  254.   footer .content .link-boxes .box{
  255.     width: calc(100% / 2 - 10px);
  256.   }
  257.   footer .content .link-boxes .input-box{
  258.     width: 100%;
  259.   }
  260. }
  261.  
  262.  
  263. /*=============== VARIABLES CSS ===============*/
  264. :root {
  265.   --header-height: 3.5rem;
  266.  
  267.   /*========== Colors ==========*/
  268.   /*Color mode HSL(hue, saturation, lightness)*/
  269.   --black-color: white;
  270.   --black-color-light: white;
  271.   --black-color-lighten: white;
  272.   --white-color: black;
  273.   --body-color: hsl(220, 100%, 97%);
  274.  
  275.   /*========== Font and typography ==========*/
  276.   /*.5rem = 8px | 1rem = 16px ...*/
  277.   --body-font: "Montserrat", sans-serif;
  278.   --normal-font-size: .938rem;
  279.  
  280.   /*========== Font weight ==========*/
  281.   --font-regular: 400;
  282.   --font-semi-bold: 600;
  283.  
  284.   /*========== z index ==========*/
  285.   --z-tooltip: 10;
  286.   --z-fixed: 100;
  287. }
  288.  
  289. /*========== Responsive typography ==========*/
  290. @media screen and (min-width: 1024px) {
  291.   :root {
  292.     --normal-font-size: 1rem;
  293.   }
  294. }
  295.  
  296. /*=============== BASE ===============*/
  297. * {
  298.   box-sizing: border-box;
  299.   padding: 0;
  300.   margin: 0;
  301. }
  302.  
  303.  
  304. ul {
  305.   list-style: none;
  306.   /* Color highlighting when pressed on mobile devices */
  307.   /*-webkit-tap-highlight-color: transparent;*/
  308. }
  309.  
  310. a {
  311.   text-decoration: none;
  312. }
  313.  
  314. /*=============== REUSABLE CSS CLASSES ===============*/
  315. .container {
  316.   max-width: 1120px;
  317.   margin-inline: 1.5rem;
  318. }
  319.  
  320. /*=============== HEADER ===============*/
  321. .header {
  322.   position: fixed;
  323.   top: 0;
  324.   left: 0;
  325.   width: 100%;
  326.   background-color: var(--black-color);
  327.   box-shadow: 0 2px 16px hsla(220, 32%, 8%, .3);
  328.   z-index: var(--z-fixed);
  329. }
  330.  
  331. /*=============== NAV ===============*/
  332. .nav {
  333.   height: var(--header-height);
  334. }
  335.  
  336. .nav__logo,
  337. .nav__burger,
  338. .nav__close {
  339.   color: var(--white-color);
  340. }
  341.  
  342. .nav__data {
  343.   height: 100%;
  344.   display: flex;
  345.   justify-content: space-between;
  346.   align-items: center;
  347. }
  348.  
  349. .nav__logo {
  350.   display: inline-flex;
  351.   align-items: center;
  352.   column-gap: .25rem;
  353.   font-weight: var(--font-semi-bold);
  354.   /* Color highlighting when pressed on mobile devices */
  355.   /*-webkit-tap-highlight-color: transparent;*/
  356. }
  357.  
  358. .nav__logo i {
  359.   font-weight: initial;
  360.   font-size: 1.25rem;
  361. }
  362.  
  363. .nav__toggle {
  364.   position: relative;
  365.   width: 32px;
  366.   height: 32px;
  367. }
  368.  
  369. .nav__burger,
  370. .nav__close {
  371.   position: absolute;
  372.   width: max-content;
  373.   height: max-content;
  374.   inset: 0;
  375.   margin: auto;
  376.   font-size: 1.25rem;
  377.   cursor: pointer;
  378.   transition: opacity .1s, transform .4s;
  379. }
  380.  
  381. .nav__close {
  382.   opacity: 0;
  383. }
  384.  
  385. /* Navigation for mobile devices */
  386. @media screen and (max-width: 1118px) {
  387.   .nav__menu {
  388.     position: absolute;
  389.     left: 0;
  390.     top: 2.5rem;
  391.     width: 100%;
  392.     height: calc(100vh - 3.5rem);
  393.     overflow: auto;
  394.     pointer-events: none;
  395.     opacity: 0;
  396.     transition: top .4s, opacity .3s;
  397.    
  398.   }
  399.   .nav__menu::-webkit-scrollbar {
  400.     width: 0;
  401.   }
  402.   .nav__list {
  403.     background-color: var(--black-color);
  404.     padding-top: 1rem;
  405.   }
  406. }
  407.  
  408. .nav__link {
  409.   color: var(--white-color);
  410.   background-color: var(--black-color);
  411.   font-weight: var(--font-semi-bold);
  412.   padding: 1.25rem 1.5rem;
  413.   display: flex;
  414.   justify-content: space-between;
  415.   align-items: center;
  416.   transition: background-color .3s;
  417.  
  418. }
  419.  
  420. .nav__link:hover {
  421.   background-color: var(--black-color-light);
  422. }
  423.  
  424. /* Show menu */
  425. .show-menu {
  426.   opacity: 1;
  427.   top: 3.5rem;
  428.   pointer-events: initial;
  429.  
  430. }
  431.  
  432. /* Show icon */
  433. .show-icon .nav__burger {
  434.   opacity: 0;
  435.   transform: rotate(90deg);
  436. }
  437. .show-icon .nav__close {
  438.   opacity: 1;
  439.   transform: rotate(90deg);
  440. }
  441.  
  442. /*=============== DROPDOWN ===============*/
  443. .dropdown__item {
  444.   cursor: pointer;
  445. }
  446.  
  447. .dropdown__arrow {
  448.   font-size: 1.25rem;
  449.   font-weight: initial;
  450.   transition: transform .4s;
  451. }
  452.  
  453. .dropdown__link,
  454. .dropdown__sublink {
  455.   padding: 1.25rem 1.25rem 0.45rem 2.5rem;
  456.   color: var(--white-color);
  457.   background-color: var(--black-color-light);
  458.   display: flex;
  459.   align-items: center;
  460.   column-gap: .5rem;
  461.   font-weight: var(--font-semi-bold);
  462.   transition: background-color .3s;
  463.   width: 250px;
  464.  
  465.  
  466. }
  467.  
  468. .dropdown__link i,
  469. .dropdown__sublink i {
  470.   font-size: 1.25rem;
  471.   font-weight: initial;
  472.  
  473. }
  474.  
  475. .dropdown__link:hover,
  476. .dropdown__sublink:hover {
  477.   background-color: var(--black-color);
  478.  
  479. }
  480.  
  481. .dropdown__menu,
  482. .dropdown__submenu {
  483.   max-height: 0;
  484.   overflow: hidden;
  485.   transition: max-height .4s ease-out;
  486.  
  487. }
  488.  
  489. /* Show dropdown menu & submenu */
  490. .dropdown__item:hover .dropdown__menu,
  491. .dropdown__subitem:hover > .dropdown__submenu {
  492.   max-height: 1000px;
  493.   transition: max-height .4s ease-in;
  494.   box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
  495. }
  496.  
  497. /* Rotate dropdown icon */
  498. .dropdown__item:hover .dropdown__arrow {
  499.   transform: rotate(180deg);
  500. }
  501.  
  502. /*=============== DROPDOWN SUBMENU ===============*/
  503. .dropdown__add {
  504.   margin-left: auto;
  505.  
  506. }
  507.  
  508. .dropdown__sublink {
  509.   background-color: var(--black-color-lighten);
  510.  
  511. }
  512.  
  513. /*=============== BREAKPOINTS ===============*/
  514. /* For small devices */
  515. @media screen and (max-width: 340px) {
  516.   .container {
  517.     margin-inline: 1rem;
  518.   }
  519.  
  520.   .nav__link {
  521.     padding-inline: 1rem;
  522.   }
  523. }
  524.  
  525. /* For large devices */
  526. @media screen and (min-width: 1118px) {
  527.   .container {
  528.     margin-inline: auto;
  529.   }
  530.  
  531.   .nav {
  532.     height: calc(var(--header-height) + 2rem);
  533.     display: flex;
  534.     justify-content: space-between;
  535.   }
  536.   .nav__toggle {
  537.     display: none;
  538.   }
  539.   .nav__list {
  540.     height: 100%;
  541.     display: flex;
  542.     column-gap: 3rem;
  543.   }
  544.   .nav__link {
  545.     height: 100%;
  546.     padding: 0;
  547.     justify-content: initial;
  548.     column-gap: .25rem;
  549.   }
  550.   .nav__link:hover {
  551.     background-color: transparent;
  552.   }
  553.  
  554.   .dropdown__item,
  555.   .dropdown__subitem {
  556.     position: relative;
  557.   }
  558.  
  559.   .dropdown__menu,
  560.   .dropdown__submenu {
  561.     max-height: initial;
  562.     overflow: initial;
  563.     position: absolute;
  564.     left: 0;
  565.     top: 6rem;
  566.     opacity: 0;
  567.     pointer-events: none;
  568.     transition: opacity .3s, top .3s;
  569.   }
  570.  
  571.   .dropdown__link,
  572.   .dropdown__sublink {
  573.     padding-inline: 1rem 3.5rem;
  574.   }
  575.  
  576.   .dropdown__subitem .dropdown__link {
  577.     padding-inline: 1rem;
  578.   }
  579.  
  580.   .dropdown__submenu {
  581.     position: absolute;
  582.     left: 100%;
  583.     top: .5rem;
  584.   }
  585.  
  586.   /* Show dropdown menu */
  587.   .dropdown__item:hover .dropdown__menu {
  588.     opacity: 1;
  589.     top: 5.5rem;
  590.     pointer-events: initial;
  591.     transition: top .5s;
  592.   }
  593.  
  594.   /* Show dropdown submenu */
  595.   .dropdown__subitem:hover > .dropdown__submenu {
  596.     opacity: 1;
  597.     top: 0;
  598.     pointer-events: initial;
  599.     transition: top .5s;
  600.   }
  601. }
Tags: CSS
Advertisement
Add Comment
Please, Sign In to add comment