Skip to content

Commit

Permalink
Merge pull request #3 from begmuhommet/new-landing
Browse files Browse the repository at this point in the history
New landing
  • Loading branch information
begmuhommet authored Nov 18, 2024
2 parents 737477d + f7499bb commit 477d79a
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 204 deletions.
4 changes: 0 additions & 4 deletions .env

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Deploy Next.js site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ['new-landing']
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -28,6 +28,10 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_EMAIL_PUBLIC_KEY: ${{ secrets.NEXT_PUBLIC_EMAIL_PUBLIC_KEY }}
NEXT_PUBLIC_EMAIL_SERVICE_ID: ${{ secrets.NEXT_PUBLIC_EMAIL_SERVICE_ID }}
NEXT_PUBLIC_EMAIL_TEMPLATE_ID: ${{ secrets.NEXT_PUBLIC_EMAIL_TEMPLATE_ID }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.env
388 changes: 194 additions & 194 deletions src/assets/hero-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/logo.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Footer = () => {
};

return (
<footer className="w-full h-[108px] sm:h-[88px] flex items-center justify-center">
<footer className="w-full h-[68px] flex items-center justify-center">
<div className="container flex flex-col-reverse sm:flex-row items-center justify-between gap-5">
<span className="text-sm text-gray-500 font-light">
© Copyright Low-Ops. All rights Reserved
Expand Down
35 changes: 33 additions & 2 deletions src/sections/form/FormSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ import email from '@emailjs/browser';
import { Loader } from 'lucide-react';
import React, { ChangeEvent, FormEvent, useEffect, useState } from 'react';

const initialData = { name: '', email: '', message: '' };
const initialData = {
name: '',
email: '',
message: '',
username: '',
gender: '',
};

const FormSection: React.FC = () => {
// States
Expand Down Expand Up @@ -57,7 +63,15 @@ const FormSection: React.FC = () => {
const serviceId = process.env.NEXT_PUBLIC_EMAIL_SERVICE_ID;
const templateId = process.env.NEXT_PUBLIC_EMAIL_TEMPLATE_ID;

if (!serviceId || !templateId) return;
if (!serviceId || !templateId) {
console.log(`serviceId or templateId is undefined`);
return;
}

if (!!data.username || !!data.gender) {
console.log('Unvisible fields are not empty');
return;
}

setLoading(true);

Expand Down Expand Up @@ -124,6 +138,23 @@ const FormSection: React.FC = () => {
/>
</div>

<div style={{ display: 'none' }}>
<label>
<input
type="text"
value={data.username}
onChange={(e) => handleDataChange(e, 'username')}
/>
</label>
<label>
<input
type="text"
value={data.gender}
onChange={(e) => handleDataChange(e, 'gender')}
/>
</label>
</div>

<Button type="submit" aria-label="Send message" disabled={loading}>
<Loader
className={cn('mr-2 h-4 w-4 animate-spin hidden', {
Expand Down
3 changes: 1 addition & 2 deletions src/sections/hero/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ const HeroSection: FC = () => {
return (
<section
className={cn(
'hero-section w-full pt-[140px] md:pt-[170px] bg-no-repeat bg-top',
`bg-[url('../assets/hero-bg.svg')]`
"hero-section w-full pt-[140px] md:pt-[170px] bg-no-repeat bg-top bg-[url('../assets/hero-bg.svg')]"
)}
id="hero"
>
Expand Down

0 comments on commit 477d79a

Please sign in to comment.