Skip to content

Commit

Permalink
Merge pull request #56 from TyronNIKO/fixing
Browse files Browse the repository at this point in the history
fixed about me, swiper and projects.
  • Loading branch information
TyronNIKO authored Jul 10, 2024
2 parents a18f408 + 86c5296 commit cd9680c
Show file tree
Hide file tree
Showing 25 changed files with 266 additions and 311 deletions.
53 changes: 23 additions & 30 deletions src/css/about-me.css
Original file line number Diff line number Diff line change
@@ -1,57 +1,50 @@
/* style accordion */
.about-me{/* margin-top: 64px; */padding-top:64px}
.about-me{padding-top:64px}
.about-me .accordion li.ac{box-sizing:border-box;margin-top:0;border:none;border-bottom:solid 1px rgba(250, 250, 250, 0.2)}
.about-me .accordion .title{height:36px;color:rgba(250, 250, 250, 0.4);font-weight:600;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:24px;line-height:1.5;letter-spacing:-0.02em;text-transform:uppercase;}
.about-me .accordion .ac-trigger{ display: flex; justify-content: space-between; align-items: start;padding:0;background-color:#1c1d20;color:rgba(250, 250, 250, 0.4);font-weight:600;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:1.5;letter-spacing:-0.02em;text-transform:uppercase;}
.about-me .accordion .title{height:36px;color:rgba(250, 250, 250, 0.4);font-weight:600;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:24px;line-height:1.5;letter-spacing:-0.02em;text-transform:uppercase}
.about-me .accordion .ac-trigger{display:flex;justify-content:space-between;align-items:start;padding:0;background-color:#1c1d20;color:rgba(250, 250, 250, 0.4);font-weight:600;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:1.5;letter-spacing:-0.02em;text-transform:uppercase}
.about-me .accordion .ac-trigger::after{display:none}

.about-me .icon {display:block;min-width:34px;min-height:34px;padding:7px;border:1px solid rgba(250, 250, 250, 0.1);border-radius:100px;background:transparent;cursor:pointer;stroke:#fafafa;transition:ease-in 0.3s}
.about-me .is-active .icon {
transform: rotate(180deg);
}

.about-me .icon{display:block;min-width:34px;min-height:34px;padding:7px;border:1px solid rgba(250, 250, 250, 0.1);border-radius:100px;background:transparent;cursor:pointer;stroke:#fafafa;transition:ease-in 0.3s}
.about-me .is-active .icon{transform:rotate(180deg)}
.about-me .accordion .ac-panel .ac-text{margin:0;padding:0;color:#fafafa;font-weight:500;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:24px;line-height:1.5;letter-spacing:-0.02em}
/* classys from me */
.about-me .about-container:not(:last-child){margin-bottom:32px}

/* style speech */
.about-me .speech{/* max-width: 375px; */border-radius:24px}
.about-me .accordion .item{width:100%;padding-bottom:20px;background-color:#1c1d20}
.about-me .accordion .list{display:flex;flex-direction:column;gap:20px;justify-content:flex-start;align-items:flex-start;color:#fafafa;font-weight:500;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:24px;line-height:1.5;letter-spacing:-0.02em}
.about-me .accordion .text{color:#fafafa;font-weight:500;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:24px;line-height:1.5;letter-spacing:-0.02em}
.about-me .speech{display:flex;flex-direction:column;gap:16px;margin-bottom:32px}
.about-me .speech .text{height:500px;padding:32px 32px 0;border-radius:24px;background:#242527;color:#fafafa;font-weight:500;font-size:24px;font-family:'Inter Tight',sans-serif;line-height:28px;line-height:1.16667;letter-spacing:-0.03em;text-transform:uppercase}
.about-me .functional{color:#ed3b44}
.about-me .websites{color:rgba(250, 250, 250, 0.4)}
.about-me .pictures{border-radius:24px;background:#1c1d20}
.about-me .about-container.accordion{}
.about-me .about-container.accordion .list{display:flex;flex-direction:column;gap:20px;justify-content:flex-start;align-items:flex-start;color:#fafafa;font-weight:500;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:24px;line-height:1.5;letter-spacing:-0.02em}
.about-me .about-container.accordion .item{width:100%;padding-bottom:20px;background-color:#1c1d20}
.about-me .accordion{margin-bottom:32px}
.about-me .container-presentation{display:flex;flex-direction:column;gap:32px;justify-content:flex-start;align-items:flex-start}
.about-me .accordion .text{color:#fafafa;font-weight:500;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:24px;line-height:1.5;letter-spacing:-0.02em}
.about-me .ac-text{width:auto}
.about-me-img{width:100%;border-radius:24px}
/* swiper */
.about-me .about-swiper{position:relative;overflow:hidden;max-width:275px;margin:0 32px}
.about-me .swiper-slide{width:130px;height:130px;border:none;border-radius:100%;background-color:#ed3b44}
.about-me .about-swiper .btn-round{display:flex;justify-content:center;align-items:center}
.about-me .swiper-button-next{position:absolute;right:-10px;width:28px;height:28px}
.about-me .about-swiper{--offset:83px;padding-right:var(--offset)}
.about-me .about-swiper .next{position:absolute;top:0;right:0;bottom:0;z-index:2;display:flex;justify-content:end;align-items:center;width:var(--offset);padding:0;background:rgba(var(--color-black), 1)}
.about-me .about-swiper .next .arrow{--color:#3b3b3b;opacity:1}
.about-me .about-swiper .swiper-slide{width:fit-content;height:100%}
.about-me .about-swiper .swiper-slide .btn{display:flex;justify-content:center;align-items:center;width:130px;max-width:100%;padding:0}
.about-me .about-swiper .swiper-slide.swiper-slide-active .btn{background:rgba(var(--color-red), 1)}
/* media */
@media only screen and (min-width: 768px){
.about-me .speech{max-width:768px}
.about-me .speech{margin-bottom:64px}
.about-me .speech .text{height:700px;padding:64px 64px 0 64px;font-size:38px;line-height:40px;line-height:1.05263;letter-spacing:-0.03em}
.about-me .accordion{margin-bottom:64px}
.about-me .accordion .title{height:40px}
.about-me .about-container.accordion .item{padding-bottom:32px}
.about-me .accordion .item{padding-bottom:32px}
.about-me .container-presentation{gap:16px}
.about-me .ac-text{width:auto}
/* swiper */
.about-me .about-swiper{}
.about-me .about-swiper{max-width:600px;height:200px;margin:0;margin:0 32px;padding-right:104px}
.about-me .about-swiper .btn-round{max-width:200px}
.about-me .about-swiper{--offset:104px}
.about-me .about-swiper .swiper-slide .btn{width:200px}
}
@media only screen and (min-width: 1440px){
.about-me .about-container:not(:last-child){margin-bottom:96px}
.about-me{padding-top:96px}
.about-me .speech{display:flex;flex-direction:row;flex-wrap:nowrap;max-width:1440px}
.about-me .speech{display:flex;flex-direction:row;flex-wrap:nowrap}
.about-me .speech .text{order:1;width:calc(100% / 2);height:700px;padding:64px 64px 0}
.about-me .speech .pictures{order:2;width:calc(100% / 2)}
.about-me .container-presentation.ac-panel{width:100%;width:612px;height:320px;margin-left:696px}
/* swiper */
.about-me .about-swiper{padding-right:112px}
.about-me .about-swiper{--offset:112px;margin:0 32px}
}
5 changes: 2 additions & 3 deletions src/css/benefits.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
.benefits-icon{fill:#fafafa}
.benefits-item-title{margin-top:64px;margin-bottom:8px;color:#fafafa;font-weight:600;font-size:20px}
.benefits-item-text{color:rgba(250, 250, 250, 0.6);font-size:16px}
.benefits-btn{margin-top:32px;padding:18px 36px;border:1px solid rgba(250, 250, 250, 0.2);border-radius:60px;background-color:#1c1d20}
.benefits-btn:hover{border:1px solid #fafafa}
.benefits-btn-text{color:#fafafa;font-weight:500;font-size:16px;font-family:"Inter Tight",sans-serif;letter-spacing:-0.02em}
.benefits-btn{ display: block;margin-top:32px;}

/* table */
@media only screen and (min-width: 768px){
.benefits{margin-top:96px;margin-bottom:96px}
Expand Down
1 change: 1 addition & 0 deletions src/css/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ button:disabled {
cursor: not-allowed;
}
.btn {
width: fit-content;
padding: 18px 24px;
border: 1px rgba(var(--color-white), 0.2) solid;
border-radius: 60px;
Expand Down
2 changes: 1 addition & 1 deletion src/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
html{scroll-behavior:smooth}
body{background-color:rgba(var(--color-black), 1);color:rgba(var(--color-white), 1);font-weight:500;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:1.5;letter-spacing:-0.02em;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}
/* Mobile */
.container{width:100%;min-width:320px;max-width:375px;margin:0 auto;padding:0 16px}
.container{width:100%;min-width:320px;max-width:375px;height: 100%;margin:0 auto;padding:0 16px;}
@media only screen and (min-width: 375px){
/* .container{max-width:100%} */
}
Expand Down
3 changes: 2 additions & 1 deletion src/css/hero.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.hero-container{position:relative;z-index:1;display:flex;flex-direction:column;height:100dvh;padding:16px}
.section-hero {position: relative;height:100dvh;}
.hero-container{position:relative;z-index:1;display:flex;flex-direction:column;height:100%;padding:16px 0;}
.hero-page-title{margin:auto;color:rgba(var(--color-white),1);font-weight:500;font-size:50px;line-height:1;letter-spacing:-0.08em;text-transform:uppercase}
.hero-contact{display:flex;gap:4px;justify-content:space-between;align-items:center}
.hero-social-list{display:flex;gap:4px;justify-content:space-between;align-items:center}
Expand Down
11 changes: 6 additions & 5 deletions src/css/projects.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
.projects .project-swiper-slide{overflow:hidden;border-radius:24px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}
.projects .projects-intro{margin-bottom:32px;color:rgba(250, 250, 250, 0.4);font-weight:600;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:150%;letter-spacing:-0.02em;text-transform:uppercase}
.projects .project-top-screen{padding:32px 32px 0 32px;background-color:#fafafa;}
.projects .project-top-screen{padding:32px;background-color:#fafafa;}
.projects .project-img-bg{height:auto;padding:100px 16px;background-color:#242527}
.projects .project-img{min-width:311px}
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
.projects .project-one-skill{display:flex;justify-content:center;align-items:center;padding:13px 18px;border:1px solid rgba(28, 29, 32, 0.2);border-radius:60px;color:#1c1d20;font-weight:500;font-size:16px;font-family:'Inter Tight',sans-serif;letter-spacing:-0.02em/* height: 45px; */}
.projects .project-lang-skill{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:96px}
.projects .project-style-h3{color:#1c1d20;font-weight:500;font-size:24px;font-family:'Inter Tight',sans-serif;line-height:117%;letter-spacing:-0.03em}
.projects .project-btn-style{margin:32px 0;padding:13px 32px}
.projects .project-btn-style{display: block;padding:13px 32px;}
.pb-style{padding-bottom:64px}
.projects .text-style {display: flex;flex-direction: column;gap: 32px;}
/*buttons*/
.projects .btns-style{display:flex;gap:12px;justify-content:center;padding:32px 0 0 0}
.projects .team-icon{display:inline-block;width:32px;height:32px;background-size:32px 32px;background-repeat:no-repeat}
Expand All @@ -20,11 +21,11 @@
}
@media screen and (min-width: 768px){
.projects .projects-intro{color:rgba(250, 250, 250, 0.4);font-weight:600;font-size:16px;font-family:'Inter Tight',sans-serif;line-height:150%;letter-spacing:-0.02em;text-transform:uppercase}
.projects .project-top-screen{padding:64px 64px 0 64px}
.projects .project-top-screen{padding:64px}
.projects .project-img-bg{padding:120px 45px;background-color:#242527}
.projects .btns-style{display:flex;gap:20px;justify-content:center;padding:64px 0 0 0}
.projects .div-icon-item{width:68px;height:68px;padding:18px}
.projects .project-btn-style{margin:32px 0 64px 0;padding:18px 50px;border-radius:60px}
.projects .project-btn-style{padding:18px 50px;border-radius:60px}
.projects .project-lang-skill{margin-bottom:164px}
.projects .project-style-h3{font-weight:500;font-size:44px;line-height:100%}
.projects .project-one-skill{padding:18px;border:1px solid rgba(28, 29, 32, 0.2);border-radius:60px}
Expand All @@ -34,6 +35,6 @@
.projects .project-swiper-slide{display:flex}
.projects .project-img{min-width:614px}
.projects .project-lang-skill{margin-bottom:223px}
.projects .project-top-screen{min-width:50%;padding:64px 64px 0 64px}
.projects .project-top-screen{min-width:50%;}
.projects .project-img-bg{min-width:50%;padding:120px 37px}
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
65 changes: 39 additions & 26 deletions src/js/about-me.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
import Accordion from 'accordion-js';
import 'accordion-js/dist/accordion.min.css';
import Swiper from 'swiper/bundle';
import { Navigation } from 'swiper/modules';
import { Mousewheel, Keyboard } from 'swiper/modules';
// import Swiper styles
import 'swiper/css';
// import 'swiper/css';
// import 'swiper/css/navigation';
function aboutMeInit() {
new Accordion('.about-me .accordion-container', {
showMultiple: true,
openOnInit: [0],
});

new Accordion('.about-me .accordion-container', {
showMultiple: true,
openOnInit: [0],
});
var swiper = new Swiper('.about-me .about-swiper', {
modules: [Mousewheel, Keyboard],

// var swiper = new Swiper('.about-swiper', {
// modules: [Navigation],
// slidesPerView: 2, // Кількість слайдів, які видно одночасно
// spaceBetween: 0, // Відступ між слайдами
// loop: true, // Безкінечна прокрутка
// navigation: {
// nextEl: '.swiper-button-next', // Кнопка "Вперед"
// },
// keyboard: {
// enabled: true, // Взаємодія з клавіатурою
// },
// breakpoints: {
// 768: {
// slidesPerView: 3,
// },
// 1440: {
// slidesPerView: 6,
// },
// },
// });
// slidesPerView: 2, // Кількість слайдів, які видно одночасно
slidesPerView: 'auto', // Кількість слайдів, які видно одночасно
spaceBetween: 0, // Відступ між слайдами
loop: true, // Безкінечна прокрутка
updateOnWindowResize: true,

mousewheel: {
invert: false,
},
navigation: {
nextEl: '.about-me .about-swiper .next',
preventClicks: false,
},
keyboard: {
enabled: true,
onlyInViewport: true,
},
});
document.addEventListener('keydown', function (event) {
if (event.key === 'Tab') {
event.preventDefault();
if (event.shiftKey) {
swiper.slidePrev();
} else {
swiper.slideNext();
}
}
});
}
aboutMeInit();
72 changes: 34 additions & 38 deletions src/partials/about-me.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
<section class="about-me" id="about-me">
<div class="container">
<h2 class="visually-hidden">About me</h2>
<div class="about-container speech">
<div class="speech">
<p class="text"> I work with people all over the world to create impressive and <span class="functional">functional</span>
<span class="websites">websites</span> that reflect each client's unique personality.
</p>
<div class="pictures">
<picture>
<source
media="(max-width: 768px)"
srcset="
./img/covers/about-me/phone.jpg 1x,
./img/covers/about-me/[email protected] 2x
" />
srcset="./img/about-me/phone.jpg,
./img/about-me/[email protected] 2x" />
<source
media="(max-width: 1440px)"
srcset="
./img/covers/about-me/tablet.jpg 1x,
./img/covers/about-me/[email protected] 2x
" />
srcset="./img/about-me/tablet.jpg,
./img/about-me/[email protected] 2x" />
<source
media="(min-width: 1440px)"
srcset="
./img/covers/about-me/desctop.jpg 1x,
./img/covers/about-me/[email protected] 2x
" />
srcset="./img/about-me/desctop.jpg,
./img/about-me/[email protected] 2x"/>
<img
src="./img/covers/about-me/phone.jpg"
src="./img/about-me/phone.jpg"
alt="about-me-image-phone"
class="about-me-img" />
</picture>
</div>
</div>
<div class="about-container accordion">
<div class="accordion">
<ul class="list accordion-container">
<li class="item ac is-active">
<h3 class="title ac-header">
Expand Down Expand Up @@ -75,28 +69,30 @@ <h3 class="title ac-header">
</li>
</ul>
</div>
<!-- <div class="about-container skills about-swiper swiper">
<ul class="skills-list swiper-wrapper">
<li class="swiper-slide">
<div class="btn btn-round">HTML/CSS</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">JavaScript</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">React</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">Node.js</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">React Native</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">Soft skills</div>
</li>
</ul>
<div class="swiper-button-next">arrow icon</div>
</div> -->
<div class="swiper about-swiper">
<ul class="swiper-wrapper">
<li class="swiper-slide">
<div class="btn btn-round">HTML/CSS</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">JavaScript</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">React</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">Node.js</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">React Native</div>
</li>
<li class="swiper-slide">
<div class="btn btn-round">Soft skills</div>
</li>
</ul>
<button type="button" class="swiper-button-next next">
<span class="arrow arrow-right"></span>
</button>
</div>
</div>
</section>
4 changes: 1 addition & 3 deletions src/partials/benefits.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ <h3 class="benefits-item-title">Urgent execution</h3>
<p class="benefits-item-text"> I understand how important time is to you. Ready to work quickly and efficiently, without reducing the quality of work. </p>
</li>
</ul>
<button class="benefits-btn" type="button">
<a class="benefits-btn-text" href="#order"> Order the project</a>
</button>
<a class="benefits-btn btn" href="#order"> Order the project</a>
</div>
</div>
</section>
Loading

0 comments on commit cd9680c

Please sign in to comment.