midcreative site update

This commit is contained in:
Sergejs Kozinecs 2024-07-16 17:12:11 +03:00
parent d171e96a7e
commit a591115ec5
35 changed files with 4649 additions and 5057 deletions

View file

@ -12,30 +12,35 @@
"start": "gatsby develop",
"build": "gatsby build",
"serve": "gatsby serve",
"clean": "gatsby clean"
"clean": "gatsby clean",
"lint:prettier": "yarn prettier ./src --check",
"format:prettier": "yarn prettier ./src -w"
},
"dependencies": {
"@splidejs/react-splide": "^0.6.12",
"axios": "^0.27.2",
"gatsby": "^4.1.0",
"gatsby-plugin-google-analytics": "^4.1.0",
"gatsby-plugin-image": "^2.1.0",
"gatsby-plugin-manifest": "^4.1.0",
"gatsby-plugin-react-helmet": "^5.1.0",
"gatsby-plugin-sass": "^5.1.0",
"gatsby-plugin-sharp": "^4.1.0",
"gatsby-plugin-sitemap": "^5.1.0",
"gatsby-source-filesystem": "^4.1.0",
"gatsby-transformer-sharp": "^4.1.0",
"i18next": "^21.8.16",
"i18next-browser-languagedetector": "^6.1.4",
"@splidejs/react-splide": "^0.7.12",
"axios": "^1.6.5",
"gatsby": "^5.13.3",
"gatsby-plugin-google-analytics": "^5.13.0",
"gatsby-plugin-image": "^3.13.0",
"gatsby-plugin-manifest": "^5.13.0",
"gatsby-plugin-react-helmet": "^6.13.0",
"gatsby-plugin-sass": "^6.13.0",
"gatsby-plugin-sharp": "^5.13.0",
"gatsby-plugin-sitemap": "^6.13.0",
"gatsby-source-filesystem": "^5.13.0",
"gatsby-transformer-sharp": "^5.13.0",
"i18next": "^23.7.16",
"i18next-browser-languagedetector": "^7.2.0",
"path": "^0.12.7",
"path-browserify": "^1.0.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-i18next": "^11.18.3",
"sass": "^1.43.4",
"swiper": "^7.2.0"
"react-i18next": "^14.0.0",
"sass": "^1.70.0",
"swiper": "^11.0.5"
},
"devDependencies": {
"prettier": "^3.3.2"
}
}

View file

@ -10,7 +10,6 @@
}
}
@mixin for-max-width {
@media all and (max-width: 1224px) {
@content;

View file

@ -1,4 +1,4 @@
$color-text-primary: #FFFFFF;
$color-text-primary: #ffffff;
$color-text-secondary: rgba(255, 255, 255, 60%);
$color-accent-primary: #C16B6B;
$color-accent-secondary: #B46F8E;
$color-accent-primary: #c16b6b;
$color-accent-secondary: #b46f8e;

View file

@ -1,6 +1,6 @@
@use '../abstracts/functions' as *;
@use '../abstracts/mixins' as *;
@use './colors' as *;
@use "../abstracts/functions" as *;
@use "../abstracts/mixins" as *;
@use "./colors" as *;
// @import url("https://use.typekit.net/ryt1jvs.css");
* {
@ -47,7 +47,6 @@ h5 {
font-size: px2rem(30px);
}
h6 {
font-size: px2rem(18px);
text-transform: uppercase;

View file

@ -23,6 +23,19 @@
grid-column: 1 / 7;
}
}
&-mobile {
@include for-mobile {
padding: 0 20px;
display: grid;
grid-template-columns: repeat(6, 1fr);
max-width: 100%;
width: auto;
> * {
grid-column: 1 / 7;
}
}
}
}
section.container {
padding-right: 20px;

View file

@ -1,10 +1,14 @@
@use 'abstracts/functions';
@use 'abstracts/mixins';
@use 'base/colors';
@use 'base/reset';
@use 'base/typography';
@use 'layout/grid';
@use "abstracts/functions";
@use "abstracts/mixins";
@use "base/colors";
@use "base/reset";
@use "base/typography";
@use "layout/grid";
body {
background-color: #111111;
}
html {
scroll-behavior: smooth;
}

View file

@ -2,8 +2,6 @@ import React from "react";
import "./about.style.scss";
import { useTranslation } from "react-i18next";
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";
import Rocket from "../../assets/images/main/about-us/rocket.png";
@ -19,27 +17,6 @@ const About = () => {
<h5>{t("about_us.sub_title")}</h5>
<p className="text">{t("about_us.text")}</p>
<Swiper
loop={false}
slideToClickedSlide={true}
// spaceBetween={16}
slidesPerView={2.1}
className={"stats"}
>
<SwiperSlide>
<h4>30+</h4>
<p>Completed projects</p>
</SwiperSlide>
<SwiperSlide>
<h4>400+</h4>
<p>Web Pages created</p>
</SwiperSlide>
<SwiperSlide>
<h4>6+</h4>
<p>Years experience</p>
</SwiperSlide>
</Swiper>
<div className="stats">
<div>
<h4>{t("about_us.amount_completed")}</h4>

View file

@ -3,8 +3,13 @@
@use "../../assets/stylesheets/abstracts/variables" as *;
@use "../../assets/stylesheets/abstracts/mixins" as *;
#about-us {
scroll-margin-block-start: 120px;
}
.about-us {
margin-top: -80px;
> div {
&:first-child {
grid-column: 1/7;
@ -35,19 +40,11 @@
}
@include for-mobile {
display: none;
text-align: center;
& > div {
padding: 4px;
}
}
.swiper {
display: none;
margin-left: -20px;
margin-right: -20px;
@include for-mobile {
display: flex;
margin: 64px auto 0;
}
}
@include for-mobile {

View file

@ -9,25 +9,14 @@ import YellowPlanet from "../../assets/images/main/contact-form/Planet Yellow.sv
import FormInput from "../form-input/form-input.component";
import CustomButton from "../custom-button/custom-button.component";
const postForm = async (data) => {
const newPost = async (data) => {
return axios
.post(
"https://api.midcreative.eu/api/email/",
{
to: "sergei.kozinecs@gmail.com",
from: "info@midcreative.eu",
subject: "Midcreative Submit Form",
html: `<b>Name: </b>${data.name} <br><b>Email: </b>${data.email} <b><br>Phone: </b> ${data.phone}<br>`,
},
{
.post("http://127.0.0.1:3000/mail/", data, {
headers: {
"Content-Type": "application/json",
},
}
)
.then(() => {
return true;
})
.then((res) => true)
.catch((err) => err);
};
@ -67,7 +56,7 @@ const ContactForm = () => {
const handlePost = (e) => {
e.preventDefault();
postForm(formData).then((res) => {
newPost(formData).then((res) => {
if (res === true) {
cleanFields();
setError(false);

View file

@ -9,10 +9,10 @@ const Contacts = () => {
return (
<div className="container contacts">
<div>
<a href="tel:+37126620770">
<a href="tel:+37125704038">
<img src={Phone} alt="phone" />
</a>
<a href="tel:+37126620770">+371 2662 0770</a>
<a href="tel:+37125704038">+371 25704038</a>
</div>
<div>
<a href="mailto:info@midcreative.eu">
@ -29,10 +29,10 @@ const Contacts = () => {
</a>
</div>
<div>
<a href="https://wa.me/37126620770" target="_blank" rel="noreferrer">
<a href="https://wa.me/37125704038" target="_blank" rel="noreferrer">
<img src={Whatsapp} alt="whatsapp" />
</a>
<a href="https://wa.me/37126620770" target="_blank" rel="noreferrer">
<a href="https://wa.me/37125704038" target="_blank" rel="noreferrer">
WhatsApp
</a>
</div>

View file

@ -1,6 +1,10 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
// @use "../../assets/stylesheets/abstracts/variables";
#contact-us {
scroll-margin-block-start: 120px;
}
.contacts {
display: flex;
flex-direction: row;

View file

@ -1,11 +1,15 @@
import React from "react";
import "./footer.style.scss";
import { useTranslation } from "react-i18next";
import Contacts from "../contacts/contacts.component";
import TopLine from "../../assets/images/main/footer/top-line.png";
import Logo from "../../assets/images/main/footer/logo.svg";
const MidFooter = () => {
const { t } = useTranslation();
return (
<footer>
<img className="line" src={TopLine} alt="" />
@ -14,27 +18,37 @@ const MidFooter = () => {
<div className="container info">
<div>
<h6>Company</h6>
<h6>{t("footer.company")}</h6>
<p className="gray">SIA MID Creative</p>
<h6>Registation nr.</h6>
<h6>{t("footer.registration_nr")}</h6>
<p className="gray">40203288612</p>
<h6>Adress</h6>
<h6>{t("footer.address")}</h6>
<p className="gray">Rīga, Gaiļezera iela 11 - 5, LV-1079</p>
</div>
<nav>
<h6>Navigation</h6>
<a href="#top" className="gray mobile">Home</a>
<a href="#services" className="gray">Services</a>
<a href="#about-us" className="gray">About us</a>
<a href="#projects" className="gray">Projects</a>
<a href="#contact-us" className="gray">Contact us</a>
<h6>{t("footer.navigation")}</h6>
<a href="#top" className="gray mobile">
{t("menu.home")}
</a>
<a href="#services" className="gray">
{t("menu.services")}
</a>
<a href="#about-us" className="gray">
{t("menu.about_us")}
</a>
<a href="#projects" className="gray">
{t("menu.projects")}
</a>
<a href="#contact-us" className="gray">
{t("menu.contact_us")}
</a>
</nav>
<div>
<img src={Logo} alt="" />
</div>
</div>
</footer>
)
}
);
};
export default MidFooter
export default MidFooter;

View file

@ -1,7 +1,11 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
footer {
background: radial-gradient(62.99% 90.27% at 50% 0%, rgba(225, 104, 154, 0.32) 0%, rgba(141, 162, 243, 0) 65.06%);
background: radial-gradient(
62.99% 90.27% at 50% 0%,
rgba(225, 104, 154, 0.32) 0%,
rgba(141, 162, 243, 0) 65.06%
);
margin-top: 192px;
.line {
@ -10,7 +14,6 @@ footer {
transform: translateY(-50px);
}
.info {
margin-top: 68px;
padding-bottom: 237px;
@ -57,7 +60,9 @@ footer {
padding-bottom: 110px;
justify-items: center;
div:first-child, div:last-child, nav {
div:first-child,
div:last-child,
nav {
grid-column: 1/7;
grid-row: unset;
text-align: center;

View file

@ -36,7 +36,7 @@ const FormInput = forwardRef(
/>
</div>
);
}
},
);
export default FormInput;

View file

@ -12,7 +12,7 @@
position: absolute;
top: 6px;
opacity: 0.5;
color: #FFF;
color: #fff;
text-transform: uppercase;
transition: 300ms ease all;
@ -41,11 +41,8 @@
@include shrinkLabel();
}
}
}
input:autofill,
input:utofill:hover,
input:autofill:focus {
@ -55,4 +52,3 @@ input:autofill:focus {
-webkit-box-shadow: 0 0 0px 1000px #111 inset;
// transition: background-color 5000s ease-in-out 0s;
}

View file

@ -91,11 +91,11 @@ const MidHeader = () => {
<img src={Logo2} alt="MID Creative Digital Agency" />
<nav className="navigation">
<a href="#top">Home</a>
<a href="#services">Services</a>
<a href="#about-us">About Us</a>
<a href="#projects">Featured Projects</a>
<a href="#contact-us">Contact Us</a>
<a href="#top">{t("menu.home")}</a>
<a href="#services">{t("menu.services")}</a>
<a href="#about-us">{t("menu.about_us")}</a>
<a href="#projects">{t("menu.portfolio")}</a>
<a href="#contact-us">{t("menu.contact_us")}</a>
</nav>
<div className="header-contacts">
@ -110,6 +110,8 @@ const MidHeader = () => {
</a>
<a href="mailto:info@midcreative.eu">info@midcreative.eu</a>
</div>
<LanguageSwitch />
</div>
</div>
</header>

View file

@ -9,10 +9,6 @@ header {
left: 0;
right: 0;
@include for-mobile {
backdrop-filter: none;
}
.container {
padding: 44px 0;
max-width: 1224px;
@ -49,10 +45,6 @@ header {
display: none;
cursor: pointer;
&:focus {
outline: 1px solid #fff;
}
span {
background-color: #fff;
height: 5px;
@ -166,6 +158,12 @@ header {
img {
margin: 0 auto;
}
@include for-mobile {
a:first-child {
margin-bottom: 6px;
}
}
}
&.open {

View file

@ -55,7 +55,6 @@
@media all and (max-width: 1350px) {
transform: translateX(50px);
}
}
.rocket {
grid-column: 1/13;

View file

@ -5,7 +5,7 @@ import "./projects.style.scss";
const Projects = () => {
return (
<div id="projects">
<ProjectsSwiper key="wtf"/>
<ProjectsSwiper key="wtf" />
</div>
);
};

View file

@ -0,0 +1,3 @@
#projects {
scroll-margin-block-start: 120px;
}

View file

@ -4,7 +4,10 @@ import "./section.style.scss";
const MidSection = (props) => {
return (
<section className="container content" id={props.id}>
<section
className={`content container${props.mobileContainer ? "-mobile" : ""}`}
id={props.id}
>
{props.title ? <h2>{props.title}</h2> : null}
{props.children}
</section>

View file

@ -1,5 +1,9 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
#services {
scroll-margin-block-start: 120px;
}
.services {
background: radial-gradient(
48.62% 45.5% at 50% 50%,

View file

@ -1,15 +1,12 @@
import React, { useState } from "react";
import "./swiper.style.scss";
import React from "react";
import "./swiper-test.style.scss";
import { useTranslation } from "react-i18next";
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";
import "swiper/css/effect-coverflow";
import SwiperCore, { EffectCoverflow, Pagination } from "swiper";
import { Autoplay } from "swiper";
SwiperCore.use([EffectCoverflow, Pagination]);
import { EffectCoverflow, Pagination, Autoplay } from "swiper/modules";
const getImage = (image) => {
return require(`../../assets/images/main/projects/${image}`).default;
@ -17,46 +14,31 @@ const getImage = (image) => {
const ProjectsSwiper = () => {
const { t } = useTranslation();
const [activeSlide, setSlide] = useState("");
const projects = t("projects", { returnObjects: true });
// const swiperProjects = ;
return (
<Swiper
loop={true}
loopAdditionalSlides={5}
effect={"coverflow"}
grabCursor={true}
centeredSlides={true}
slidesPerView={"auto"}
coverflowEffect={{
rotate: 50,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: true,
}}
pagination={true}
modules={[EffectCoverflow, Pagination, Autoplay]}
autoplay={{
delay: 2500,
disableOnInteraction: true,
}}
speed={1200}
effect={"coverflow"}
coverflowEffect={{
scale: 1,
rotate: 0,
stretch: 100,
depth: 500,
modifier: 1,
slideShadows: false,
}}
centeredSlides={true}
slideToClickedSlide={true}
onSlideChange={(swiper) => {
setSlide(swiper.realIndex);
}}
breakpoints={{
0: {
slidesPerView: 1,
},
1200: {
slidesPerView: 2,
},
}}
modules={[Autoplay]}
id={`active-slide-${activeSlide}`}
key={`our-swiper`}
speed={800}
className="mySwiper"
>
{projects &&
projects.map((project, i) => (

View file

@ -0,0 +1,73 @@
@use "../../assets/stylesheets/base/colors" as *;
@use "../../assets/stylesheets/abstracts/mixins" as *;
.swiper {
width: 100%;
padding-top: 50px;
padding-bottom: 50px;
}
.swiper-slide {
background-position: center;
background-size: cover;
width: 80%;
height: 60%;
max-width: 860px;
@include for-mobile {
max-width: 80%;
}
}
.swiper-slide img {
display: block;
width: 100%;
object-fit: cover;
}
#projects {
.swiper-slide {
p {
&:last-of-type {
text-align: center;
color: $color-text-secondary;
padding-top: 6px;
}
}
.project-info {
div {
display: flex;
flex-direction: row;
justify-content: space-evenly;
padding-top: 33px;
margin: 0 auto;
width: 50%;
white-space: nowrap;
@include for-mobile {
width: 100%;
}
p {
margin: 0 29px;
text-transform: uppercase;
color: $color-accent-primary;
padding: 0;
@include for-mobile {
margin: 0 12px;
}
}
}
}
&:not(.swiper-slide-active) {
h2 {
opacity: 0;
}
.project-info {
opacity: 0;
}
}
}
}

View file

@ -4,7 +4,8 @@
#projects {
.swiper {
width: 100%;
padding-top: 50px;
padding-bottom: 50px;
@include for-mobile {
background-size: 150%;
background-position: 50%;
@ -66,21 +67,21 @@
}
}
&:before {
content: "";
width: 100%;
height: 100%;
position: absolute;
background: linear-gradient(
90deg,
rgba(17, 17, 17, 1) 0%,
rgba(255, 255, 255, 0) 10%,
rgba(255, 255, 255, 0) 90%,
rgba(17, 17, 17, 1) 100%
);
z-index: 4;
pointer-events: none;
}
// &:before {
// content: "";
// width: 100%;
// height: 100%;
// position: absolute;
// background: linear-gradient(
// 90deg,
// rgba(17, 17, 17, 1) 0%,
// rgba(255, 255, 255, 0) 10%,
// rgba(255, 255, 255, 0) 90%,
// rgba(17, 17, 17, 1) 100%
// );
// z-index: 4;
// pointer-events: none;
// }
}
.swiper-container {
@ -88,9 +89,20 @@
padding-bottom: 50px;
}
.swiper-slide {
width: 50%;
// width: 50%;
background-position: center;
background-size: cover;
width: 300px;
height: 300px;
transition: all 0.5s;
img {
display: block;
width: 100%;
}
h2 {
width: max-content;
margin-left: auto;
@ -99,16 +111,6 @@
.img-wrap {
position: relative;
.img-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
z-index: 1;
}
}
p {

View file

@ -28,7 +28,7 @@ const MidMainPage = () => {
<MidSection title={t("about_us.title")} id="about-us">
<About />
</MidSection>
<MidSection id="projects">
<MidSection id="projects" mobileContainer>
<Projects />
</MidSection>

View file

@ -9,5 +9,4 @@
rgba(23, 23, 23, 0) 100%
);
}
}

View file

@ -1,5 +1,4 @@
import * as React from "react";
import { Script } from "gatsby";
import { Seo } from "../components/seo";
import "../assets/stylesheets/style.scss";

View file

@ -4,7 +4,8 @@
"about_us": "About Us",
"portfolio": "Portfolio",
"pricing": "Pricing",
"contact_us": "Contact Us"
"contact_us": "Contact Us",
"home": "Home"
},
"intro": {
"creating": "We are creating",
@ -137,5 +138,11 @@
"message": "The User can send comments or questions about the privacy statement of the Website to the e-mail address: info@garmtech.com or to the postal address: Garmtech LP GARMTECH LP, Suite 3087, 15 Bell street, St.Andrews, Fife, KY16 9UR, United Kingdom."
}
]
},
"footer": {
"company": "Company",
"registration_nr": "Registration nr.",
"address": "Address",
"navigation": "Navigation"
}
}

View file

@ -4,7 +4,8 @@
"about_us": "Par mums",
"portfolio": "Portfolio",
"pricing": "Cenas",
"contact_us": "Sazināties"
"contact_us": "Sazināties",
"home": "Mājas"
},
"intro": {
"creating": "Mēs izstrādājam",
@ -91,5 +92,11 @@
"send": "Nosūtīt",
"success": "Paldies ",
"error": "Izskatās, ka kautkas nestrādā :( Uzrakstiet mums uz "
},
"footer": {
"company": "Kompānija",
"registration_nr": "Reģistrācijas nr.",
"address": "Adrese",
"navigation": "Navigācija"
}
}

9004
yarn.lock

File diff suppressed because it is too large Load diff