瀏覽代碼

TYHLOH0U4P

makstravm 3 年之前
父節點
當前提交
d53e580d37
共有 6 個文件被更改,包括 1252 次插入82 次删除
  1. 1 0
      package.json
  2. 0 38
      src/App.css
  3. 305 17
      src/App.js
  4. 414 0
      src/App.scss
  5. 0 13
      src/index.css
  6. 532 14
      yarn.lock

+ 1 - 0
package.json

@@ -6,6 +6,7 @@
     "@testing-library/jest-dom": "^5.11.4",
     "@testing-library/react": "^11.1.0",
     "@testing-library/user-event": "^12.1.10",
+    "node-sass": "4.14.1",
     "react": "^17.0.2",
     "react-dom": "^17.0.2",
     "react-scripts": "4.0.3",

+ 0 - 38
src/App.css

@@ -1,38 +0,0 @@
-.App {
-  text-align: center;
-}
-
-.App-logo {
-  height: 40vmin;
-  pointer-events: none;
-}
-
-@media (prefers-reduced-motion: no-preference) {
-  .App-logo {
-    animation: App-logo-spin infinite 20s linear;
-  }
-}
-
-.App-header {
-  background-color: #282c34;
-  min-height: 100vh;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  font-size: calc(10px + 2vmin);
-  color: white;
-}
-
-.App-link {
-  color: #61dafb;
-}
-
-@keyframes App-logo-spin {
-  from {
-    transform: rotate(0deg);
-  }
-  to {
-    transform: rotate(360deg);
-  }
-}

+ 305 - 17
src/App.js

@@ -1,24 +1,312 @@
-import logo from './logo.svg';
-import './App.css';
+import './App.scss';
 
 function App() {
-  return (
-    <div className="App">
-      <header className="App-header">
-        <img src={logo} className="App-logo" alt="logo" />
-        <p>
-          Edit <code>src/App.js</code> and save to reload.
+
+  const Header = ({ children }) =>
+    <div className='header'>
+      <div className='container'>
+        {children}
+      </div>
+    </div>
+
+  const HeaderTop = ({ logo, children }) =>
+    <div className='header__top'>
+      <a className='logo' href='index.html'>
+        <img src={logo} alt='logo' />
+      </a>
+      {children}
+    </div>
+
+  const Menu = ({ children }) =>
+    <ul className='menu__list'>
+      {children}
+    </ul>
+
+  const MenuItem = ({ link, title }) =>
+    <li className='menu__item'>
+      <a className='menu__link' href={link}>{title}</a>
+    </li>
+
+  const Address = ({ phone, address }) =>
+    <address className='address'>
+      <a className='address__phone' href={`'tel:${phone}'`}>{phone}</a>
+      <p className='address__text'>{address}</p>
+    </address >
+
+  const HeaderContent = ({ children }) =>
+    <div className='header__content'>
+      {children}
+    </div>
+
+  const HeaderContentTop = ({ subtitle, title, text }) =>
+    <div className='header__content-top'>
+      <span className='header__subtitle'>{subtitle}</span>
+      <h1 className='header__title'>{title}</h1>
+      <span className='header__subtitle'>{text}</span>
+    </div>
+
+  const HeaderContentInner = ({ children }) =>
+    <div className='header__content-inner'>
+      {children}
+    </div>
+
+  const HeaderContentItem = ({ title, text }) =>
+    <div className='header__content-item'>
+      <div className='header__item-title'>{title}</div>
+      <div className='header__item-text'>{text}</div>
+    </div>
+
+  const About = ({ children }) =>
+    <div className='about container'>
+      {children}
+    </div >
+
+  const AboutInner = ({ image, children }) =>
+    <div className='about__inner'>
+      <img src={image} alt='about image' />
+      {children}
+    </div>
+
+  const AboutContent = ({ title, children }) =>
+    <div className='about__content'>
+      <h2 className='about__title title'>{title}</h2>
+      {children}
+    </div>
+
+  const AboutText = ({ text }) =>
+    <p className='about__text'>
+      {text}
+    </p>
+
+  const AbouSubtitleText = ({ subtitle, children }) =>
+    <p className='about__text'>
+      <strong>{subtitle}  </strong>
+      <ul>
+        {children}
+      </ul>
+    </p>
+
+  const AbouTextlist = ({ text }) => <li>{text}</li>
+
+  const Price = ({ children }) =>
+    <div className='price container'>
+      <div className='price__inner'>
+        {children}
+      </div>
+    </div >
+
+  const PriceBooking = ({ text }) =>
+    <div className='price__booking'>
+      <p className='price__booking-text'>
+        {text}
+      </p>
+      <a className='price__booking-box' href='#'>
+        <div className='price__booking-link'>Онлайн запись</div>
+      </a>
+    </div>
+
+  const PriceContent = ({ title, children }) =>
+    <div className='price__content'>
+      <h2 className='price__title title'>
+        {title}
+      </h2>
+      <div className='price__content-inner'>
+        {children}
+      </div>
+    </div>
+
+  const PriceContentText = ({ text, number }) =>
+    <p className='price__text-box'>
+      <span className='price__text'>
+        {text}
+      </span>
+      <strong>{number}</strong>
+    </p>
+
+  const Team = ({ title, children }) =>
+    <div className='team'>
+      <div className=' container'>
+        <h2 className='team__title title'>
+          {title}
+        </h2>
+        <div className='team__inner'>
+          {children}
+        </div>
+      </div >
+    </div>
+
+  const TeamPerson = ({ name, image, text }) =>
+    <div className='team__inner'>
+      <div className='team__item _anim-items _anim-no-hide'>
+        <p className='team__name'>
+          {name}
         </p>
-        <a
-          className="App-link"
-          href="https://reactjs.org"
-          target="_blank"
-          rel="noopener noreferrer"
-        >
-          Learn React
-        </a>
-      </header>
+        <div className='team__item-box'>
+          <img src={image} alt='photo img' />
+        </div>
+        <p className='team__text'>
+          {text}
+        </p>
+      </div>
+    </div>
+
+  const Gallery = ({ title, children }) =>
+    <div className='gallery'>
+      <div className='container'>
+        <h2 className=' gallery__title title'>
+          {title}
+        </h2>
+        <div className='gallery__inner'>
+          {children}
+        </div>
+      </div>
     </div>
+
+  const GalleryImage = ({ image }) =>
+    <img src={image} alt='gallery image' />
+
+  const Footer = ({ children, text }) =>
+    <div className='footer'>
+      <div className='container'>
+        <div className='footer__inner'>
+          <a className='logo' href='#'>
+            <img src='http://chicago-barbershop.mykulenko.com.ua/images/logo.svg' alt='logo image' />
+          </a>
+          {children}
+        </div>
+        <div class="footer__bottom">
+          <p class="footer__bottom-text">
+            {text}
+          </p>
+        </div>
+      </div>
+    </div>
+
+  const FooterItem = ({ subtitle, children }) =>
+    <div className='footer__item-box'>
+      <div className='footer__subtitle'>
+        {subtitle}
+      </div>
+      <ul className='footer__list'>
+        {children}
+      </ul>
+    </div >
+
+  const FooterListItem = ({ link, text }) =>
+    <li className='footer__item'>
+      <a className='footer__link' href={link}>
+        {text}
+      </a>
+    </li>
+
+  return (
+    <div className='App'>
+      <Header>
+        <HeaderTop logo={'http://chicago-barbershop.mykulenko.com.ua/images/logo.svg'}>
+          <Menu>
+            <MenuItem link={'index.html'} title={'BarberShop Chicago'} />
+            <MenuItem link={'sevices.html'} title={'Цены и бонусы'} />
+            <MenuItem link={'team.html'} title={'Команда'} />
+            <MenuItem link={'gallery.html'} title={'Галерея'} />
+            <MenuItem link={'contact.html'} title={'Контакты'} />
+          </Menu>
+          <Address phone={'+380930014789'} address={'ул. Цементная, 8, Харьков'} />
+        </HeaderTop>
+        <HeaderContent>
+          <HeaderContentTop subtitle={'LEGENDARY BARBERSHOP'} title={'CHICAGO'} text={'KHARKOV'} />
+          <HeaderContentInner>
+            <HeaderContentItem title={'CASHBACK'} text={'Возвращаем до 30% на следующие посещения'} />
+            <HeaderContentItem title={'ЗАБОТА'} text={'Бесплатная коррекция окантовки в течение 10 дней'} />
+            <HeaderContentItem title={'Уверенность'} text={'Опыт мастеров от 3х лет'} />
+            <HeaderContentItem title={'Комфорт'} text={'FREE BAR, Безналичный расчет'} />
+          </HeaderContentInner>
+        </HeaderContent>
+      </Header>
+
+      <About>
+        <AboutInner image={'http://chicago-barbershop.mykulenko.com.ua/images/about.jpg'}>
+          <AboutContent title={'барбершоп chicago'}>
+            <AboutText text={'Философия нашего барбершопа строится не только на сохранении, но и на создании традиций. Мы считаем, что легендарными становятся и Вы можете присоединиться к этой концепции!'} />
+            <AboutText text={'Модные прически, мужские стрижки усов, бороды или бритьё опасной бритвой в Санкт-Петербурге – это именно то, чем мы занимаемся. Мы уверены, что бреем и стрижем лучше всех. Даже не обсуждается!'} />
+            <AbouSubtitleText subtitle={'Мы знаем, что земля круглая, а дважды два четыре, но мы уверены в том, что:'}>
+              <AbouTextlist text={'Мы побреем или пострижем тебя на высшем уровне!'} />
+              <AbouTextlist text={' Мы обязательно угостим тебя чаем, кофе или более "горячими" напитками - решать тебе.'} />
+              <AbouTextlist text={'Когда ты уйдешь, то захочешь вернуться.'} />
+            </AbouSubtitleText>
+          </AboutContent>
+        </AboutInner>
+      </About >
+
+      <Price>
+        <PriceBooking text={' Для всех наших гостей мы предоставляем бесплатную коррекцию окантовки в течение 10 дней после стрижки.'} />
+        <PriceContent title={' Прайс на мужские стрижки'}>
+          <PriceContentText text={'CASHBACK с каждой услуги'} number={'5%'} />
+          <PriceContentText text={'CASHBACK с каждого друга*'} number={'1%'} />
+          <PriceContentText text={'СТРИЖКА МАШИНКОЙ'} number={'700'} />
+          <PriceContentText text={'СТРИЖКА УСОВ И БОРОДЫ'} number={'900'} />
+          <PriceContentText text={'СТРИЖКА'} number={'1500'} />
+          <PriceContentText text={'БРИТЬЕ'} number={'1300'} />
+          <PriceContentText text={'СТРИЖКА + БОРОДА'} number={'1900'} />
+          <PriceContentText text={'ДЕТСКАЯ СТРИЖКА (с 7 до 11 лет)'} number={'900'} />
+        </PriceContent>
+      </Price>
+
+      <Team title={'Наша Команда'}>
+        <TeamPerson
+          name={'Барбер Анатолий'}
+          image={'http://chicago-barbershop.mykulenko.com.ua/images/team/1.jpg'}
+          text={'Старший барбер, сооснователь "Chicago Barbershop". Приверженец классических стрижек "старой школы". Считает,что стрижка должна подчеркивать внутреннее состояние.'} />
+        <TeamPerson
+          name={'Barber Мурат'}
+          image={'http://chicago-barbershop.mykulenko.com.ua/images/team/2.jpg'}
+          text={'Он же профессор, он же барбер и просто неплохой парень. Душой и сердцем отдаётся искусству цирюльника. Барбер - его карма.'} />
+        <TeamPerson
+          name={'Barber Крис'}
+          image={'http://chicago-barbershop.mykulenko.com.ua/images/team/3.jpg'}
+          text={'Ответственно и умело подходит к выбору и оформлению стрижки. Стричь для нее- это не только работа, но и реализация творческого потенциала.'} />
+        <TeamPerson
+          name={'Barber Владимир'}
+          image={'http://chicago-barbershop.mykulenko.com.ua/images/team/4.jpg'}
+          text={'Ответственно и умело подходит к выбору и оформлению стрижки.'} />
+        <TeamPerson
+          name={'Подготовка команды'}
+          image={'http://chicago-barbershop.mykulenko.com.ua/images/team/5.jpg'}
+          text={'Все мастера проходят внутреннее обучение, прежде чем приступить к работе, вне зависимости от их прошлого опыта.'} />
+      </Team>
+
+      <Gallery title={'Наши работы'}>
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/1.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/2.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/3.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/4.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/5.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/6.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/7.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/8.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/9.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/10.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/11.jpg'} />
+        <GalleryImage image={'http://chicago-barbershop.mykulenko.com.ua/images/gallery/12.jpg'} />
+      </Gallery>
+      
+      <Footer text={' © 2021 «CHICAGO» BARBERSHOP.'}>
+        <FooterItem subtitle={'Наши услуги'}>
+          <FooterListItem link={'#'} text={'Стрижка с укладкой'} />
+          <FooterListItem link={'#'} text={'Детская стрижка'} />
+          <FooterListItem link={'#'} text={'Стрижка машинкой'} />
+          <FooterListItem link={'#'} text={'Стрижка усов и бороды'} />
+          <FooterListItem link={'#'} text={'Бритьё опасной бритвой'} />
+          <FooterListItem link={'#'} text={'Моделирование бороды'} />
+          <FooterListItem link={'#'} text={'Комплексные услуги'} />
+        </FooterItem>
+        <FooterItem subtitle={'Для посетителей'}>
+          <FooterListItem link={'#'} text={'Выбираем бороду'} />
+          <FooterListItem link={'#'} text={'Выбираем стрижку'} />
+          <FooterListItem link={'#'} text={'Интересно о бороде'} />
+          <FooterListItem link={'#'} text={'Любителям бриться'} />
+        </FooterItem>
+      </Footer>
+    </div >
   );
 }
 

+ 414 - 0
src/App.scss

@@ -0,0 +1,414 @@
+html {
+  box-sizing: border-box;
+}
+
+*,
+*::after,
+*::before {
+  box-sizing: inherit;
+}
+
+ul[class],
+ol[class] {
+  padding: 0;
+}
+
+body,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+ul[class],
+ol[class],
+li,
+figure,
+figcaption,
+blockquote,
+dl,
+dd {
+  margin: 0;
+}
+
+ul[class] {
+  list-style: none;
+}
+
+img {
+  max-width: 100%;
+  display: block;
+}
+
+input,
+button,
+textarea,
+select {
+  font: inherit;
+}
+
+body {
+  font-size: 10px;
+  font-family: sans-serif;
+}
+
+.container {
+  max-width: 1230px;
+  padding: 0 15px;
+  margin: 0 auto;
+}
+
+.title {
+  font-size: 48px;
+  line-height: 62px;
+  text-transform: uppercase;
+  margin-bottom: 25px;
+}
+
+.header {
+  background-image: url(http://chicago-barbershop.mykulenko.com.ua/images/home-bg.jpg);
+  background-position: center bottom;
+  background-repeat: no-repeat;
+  background-size: cover;
+  min-height: 100vh;
+  color: #fff;
+  &__top {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding-top: 15px;
+  }
+  &__content {
+    align-items: center;
+    margin: 12vh auto 100px;
+    max-width: 600px;
+    width: 100%;
+  }
+  &__content-top {
+    width: 100%;
+    margin-bottom: 15px;
+    padding: 40px;
+    text-align: center;
+  }
+  &__content-top,
+  &__content-item {
+    border: 5px solid rgba(255, 255, 255, 0.5);
+    background: rgba(0, 0, 0, 0.6);
+  }
+  &__subtitle {
+    text-transform: uppercase;
+    font-size: 20px;
+    line-height: 28px;
+  }
+  &__title {
+    font-size: 50px;
+    line-height: 64px;
+    letter-spacing: 5.5px;
+  }
+  &__content-inner {
+    display: flex;
+    justify-content: space-between;
+  }
+  &__content-item {
+    width: 150px;
+    text-align: center;
+    padding: 15px 10px;
+    & + .header__content-item {
+      margin-left: 15px;
+    }
+  }
+  &__item-title {
+    text-transform: uppercase;
+    font-size: 16px;
+    line-height: 24px;
+    position: relative;
+    margin-bottom: 15px;
+    padding-bottom: 5px;
+    &::after {
+      content: "";
+      position: absolute;
+      bottom: 0;
+      left: 50%;
+      transform: translate(-50%);
+      height: 1px;
+      width: 60px;
+      background-color: #fff;
+    }
+  }
+  &__item-text {
+    font-size: 14px;
+    line-height: 20px;
+  }
+}
+
+.menu {
+  &__list {
+    display: flex;
+  }
+  &__item {
+    & + .menu__item {
+      margin-left: 25px;
+    }
+  }
+  &__link {
+    color: #fff;
+    text-decoration: none;
+    padding-bottom: 5px;
+    font-size: 1.2rem;
+    border-bottom: 1px solid transparent;
+    transition: all 0.3s;
+    &:hover {
+      border-bottom: 1px solid #fff;
+    }
+  }
+}
+.address {
+  &__phone,
+  &__link {
+    color: #fff;
+    text-decoration: none;
+    display: block;
+    font-size: 1.2rem;
+  }
+  &__phone {
+    margin-bottom: 5px;
+  }
+}
+
+.about {
+  padding: 10vh 0;
+  &__inner {
+    display: flex;
+    justify-content: space-between;
+  }
+  img {
+    margin-top: -25px;
+    max-width: 370px;
+    width: 100%;
+    height: 450px;
+    object-fit: cover;
+  }
+  &__content {
+    margin-left: 35px;
+  }
+  &__title {
+    padding-bottom: 20px;
+    display: inline-block;
+    border-bottom: 1px solid #ececec;
+  }
+  &__text {
+    margin-bottom: 15px;
+    font-size: 1.6rem;
+    line-height: 2.2rem;
+  }
+}
+
+.price {
+  padding: 50px 0;
+  &__inner {
+    display: flex;
+  }
+  &__booking {
+    margin-top: 15px;
+    max-width: 370px;
+  }
+  &__booking-text {
+    font-size: 1rem;
+    line-height: 1rem;
+    margin-bottom: 25px;
+  }
+  &__booking-box {
+    background-color: #ed4b2b;
+    padding: 25px 50px;
+    display: inline-block;
+    transition: all 0.3s;
+    &:hover {
+      background-color: #ed9b3b;
+    }
+  }
+  &__booking-link {
+    display: inline-block;
+    text-decoration: none;
+    font-size: 20px;
+    color: #fff;
+    border-bottom: 1px dotted #fff;
+  }
+  &__content {
+    margin-left: 35px;
+  }
+  &__content-inner {
+    background-color: #414141;
+    color: #fff;
+    padding: 35px 20px;
+  }
+  &__text {
+    font-size: 1.6rem;
+    line-height: 2rem;
+    padding-right: 5px;
+    background-color: #414141;
+  }
+  &__text-box {
+    background-image: url(http://chicago-barbershop.mykulenko.com.ua/images/bg-text.svg);
+    background-repeat: repeat;
+    background-position: center center;
+    strong {
+      float: right;
+      background-color: #414141;
+      padding-left: 5px;
+      font-size: 1.6rem;
+      line-height: 2rem;
+    }
+  }
+}
+
+.team {
+  background-image: url(http://chicago-barbershop.mykulenko.com.ua/images/bg-team.jpg);
+  background-repeat: no-repeat;
+  background-position: center center;
+  background-size: cover;
+  padding: 100px 0;
+  color: #fff;
+  position: relative;
+  z-index: 1;
+  &::before,
+  &::after {
+    content: "";
+    position: absolute;
+    background-image: url(http://chicago-barbershop.mykulenko.com.ua/images/bg-section-before.png);
+    background-repeat: no-repeat;
+    background-size: cover;
+    z-index: 2;
+    left: 0;
+    height: 95px;
+    right: 0;
+  }
+  &::before {
+    top: -5px;
+  }
+  &::after {
+    bottom: -5px;
+    transform: scale(-1);
+  }
+  &__title {
+    text-align: center;
+  }
+  &__inner {
+    display: grid;
+    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
+    grid-gap: 35px;
+  }
+  &__item {
+    width: 350px;
+    margin: 0 auto;
+  }
+  &__item-box {
+    margin-bottom: 25px;
+    img {
+      height: 425px;
+      object-fit: cover;
+      margin: 0 auto;
+    }
+  }
+  &__name {
+    display: inline-block;
+    font-size: 36px;
+    line-height: 48px;
+    text-transform: uppercase;
+    margin-bottom: 25px;
+    text-decoration: none;
+    color: #fff;
+    position: relative;
+  }
+  &__name-link {
+    &::after {
+      content: "";
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      right: 0;
+      height: 2px;
+      width: 100%;
+      background-color: transparent;
+      transition: all 0.3s;
+    }
+    &:hover::after {
+      background-color: #fff;
+    }
+  }
+  &__text {
+    font-size: 20px;
+    font-size: 1.4rem;
+  }
+}
+
+.gallery {
+  padding: 75px 0;
+  &-page {
+    padding-top: 150px;
+  }
+  &__inner {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center;
+  }
+  img {
+    width: 24%;
+    margin: 1px;
+    object-fit: cover;
+    height: 350px;
+  }
+}
+
+.footer {
+  background-image: url(http://chicago-barbershop.mykulenko.com.ua/images/footer-bg.jpg);
+  background-repeat: no-repeat;
+  background-size: cover;
+  background-position: center center;
+  position: relative;
+  color: #fff;
+  padding: 100px 0 50px;
+  &::before {
+    content: "";
+    position: absolute;
+    top: -5px;
+    left: 0;
+    right: 0;
+    background-image: url(http://chicago-barbershop.mykulenko.com.ua/images/bg-section-before.png);
+    height: 95px;
+    background-size: cover;
+    background-repeat: no-repeat;
+    z-index: 2;
+  }
+  &__inner {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 25px;
+  }
+  &__item-box {
+    margin-top: 25px;
+  }
+  &__subtitle {
+    text-transform: uppercase;
+    font-size: 2.2rem;
+    line-height: 36px;
+    margin-bottom: 35px;
+  }
+  &__link {
+    display: inline-block;
+    font-size: 1.4rem;
+    color: #fff;
+    text-decoration: none;
+    padding-bottom: 5px;
+    margin-bottom: 5px;
+    border-bottom: 1px solid transparent;
+    transition: all 0.3s;
+    &:hover {
+      border-bottom: 1px solid #fff;
+    }
+  }
+  &__bottom {
+    text-align: center;
+    font-size: 1.2rem;
+  }
+}

+ 0 - 13
src/index.css

@@ -1,13 +0,0 @@
-body {
-  margin: 0;
-  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
-    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
-    sans-serif;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-code {
-  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
-    monospace;
-}

文件差異過大導致無法顯示
+ 532 - 14
yarn.lock