Skip to content

Commit

Permalink
Merge branch 'PranavBarthwal:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Tejashri-Taral authored Jun 26, 2024
2 parents efca4b2 + 8b366e9 commit 7dda883
Show file tree
Hide file tree
Showing 29 changed files with 313 additions and 55 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/autocomment-iss-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Notify on Issue Close

on:
issues:
types: [closed]

jobs:
notify-on-close:
runs-on: ubuntu-latest

steps:
- name: Notify Issue Creator
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { issue } = context.payload.issue;
const { login } = issue.user.login;
const { number } = issue.number;
const message = `Hello @${login}! Your issue #${number} has been closed. Thank you for your contribution!`;
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: number,
body: message
});
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha384-k6RqeWeci5ZR/Lv4MR0sA0FfDOMTnhhFUM4JT6FG0HkqS2f5nQpAI8PwvE4j1cAJ" crossorigin="anonymous">

</head>

<body>
Expand Down
Binary file added public/Earth_1_12756.glb
Binary file not shown.
Binary file added public/Mars_1_6792.glb
Binary file not shown.
Binary file added public/Neptune_1_49528.glb
Binary file not shown.
4 changes: 2 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function App() {
<BackGround setIsPreLoading={setIsPreLoading} />
<Toast />
<Navbar />
<Outlet />
<ScrollToTop/>
<Outlet setIsPreLoading={setIsPreLoading} />
<ScrollToTop />
<Footer />
<Chatbot />
</>
Expand Down
Binary file added src/assets/Rocket-rafiki (1).gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
51 changes: 51 additions & 0 deletions src/components/3D_Models/Earth/Earth.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

import React, { useRef, memo, useState, useEffect } from 'react'
import { OrbitControls, useGLTF } from '@react-three/drei'
import { Canvas, useFrame } from '@react-three/fiber'
import Styles from './Earth.module.css'


function Scene(props) {
const { nodes, materials } = useGLTF('/Earth_1_12756.glb')

const ref = useRef()


useFrame(() => {
ref.current.rotation.y -= 0.001
ref.current.rotation.z -= 0.001
})



return (
<group {...props} dispose={null} ref={ref}>
<mesh
castShadow
receiveShadow
geometry={nodes.Cube001.geometry}
material={materials['Default OBJ']}
/>
</group>
)
}

const Earth = memo(function Earth(props) {

return (
<Canvas id={Styles.canvas} >
<OrbitControls enableZoom={false} enablePan={false} />
<ambientLight intensity={7} />
<pointLight position={[0, 10, 0]} intensity={100} />
<pointLight position={[0, -10, 0]} intensity={100} />
<pointLight position={[10, -7, 0]} intensity={100} />
<pointLight position={[-10, -7, 0]} intensity={100} />
<Scene props={props} scale={0.006} />
</Canvas>
)

})

useGLTF.preload('/Earth_1_12756.glb')

export default Earth
17 changes: 17 additions & 0 deletions src/components/3D_Models/Earth/Earth.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#canvas {
filter: drop-shadow(0 0 100px rgba(40, 102, 110, 0.589));
width: 500px;
}

#canvas canvas {
height: 500px;
width: 500px;
}


@media (max-width:500px) {
#canvas canvas {
height: 400px;
width: 400px;
}
}
43 changes: 43 additions & 0 deletions src/components/3D_Models/Mars/Mars.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React, { memo, useMemo, useRef } from 'react'
import { OrbitControls, useGLTF } from '@react-three/drei'
import { Canvas, useFrame } from '@react-three/fiber'
import Styles from './Mars.module.css'

function Scene(props) {
const { nodes, materials } = useGLTF('/Mars_1_6792.glb')

const ref = useRef()

useFrame(() => {
ref.current.rotation.y -= 0.001
ref.current.rotation.z -= 0.001
})

return (
<group {...props} dispose={null} ref={ref}>

<mesh
castShadow
receiveShadow
geometry={nodes.Cube008.geometry}
material={materials['Default OBJ.005']}
/>
</group>
)
}

const Mars = memo(function Mars(props) {
return (
<Canvas style={{ height: '400px', width: '400px' }} id={Styles.canvas} >
<OrbitControls enableZoom={false} enablePan={false} maxPolarAngle={1} minPolarAngle={1} />
<ambientLight intensity={1} />
<pointLight position={[10, 10, 10]} />
<Scene props={props} scale={0.006} />
</Canvas>
)

})

useGLTF.preload('/Mars_1_6792.glb')

export default Mars
3 changes: 3 additions & 0 deletions src/components/3D_Models/Mars/Mars.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#canvas {
filter: drop-shadow(0 0 50px rgba(255, 72, 0, 0.349));
}
44 changes: 44 additions & 0 deletions src/components/3D_Models/Neptune/Neptune.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

import React, { useRef, memo, useState, useEffect } from 'react'
import { OrbitControls, useGLTF } from '@react-three/drei'
import { Canvas, useFrame } from '@react-three/fiber'
import Styles from './Neptune.module.css'

function Scene(props) {
const { nodes, materials } = useGLTF('/Neptune_1_49528.glb')

const ref = useRef()

useFrame(() => {
ref.current.rotation.y -= 0.001
ref.current.rotation.z -= 0.001
})

return (
<group {...props} dispose={null} ref={ref}>
<mesh
castShadow
receiveShadow
geometry={nodes.Neptune.geometry}
material={materials['Default OBJ.001']}
rotation={[Math.PI / 2, 0, 0]}
/>
</group>
)
}

const Earth = memo(function Earth(props) {

return (
<Canvas id={Styles.canvas} >
<OrbitControls enableZoom={false} enablePan={false} />
<ambientLight intensity={5} color={'rgb(0, 153, 255)'} />
<Scene props={props} scale={0.006} />
</Canvas>
)

})

useGLTF.preload('/Neptune_1_49528.glb')

export default Earth
4 changes: 4 additions & 0 deletions src/components/3D_Models/Neptune/Neptune.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#canvas canvas {
height: 300px;
width: 300px;
}
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions src/components/Chatbot/chatbot.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ filter: drop-shadow(0 0 6px currentColor);
transform: translate3d(104em, 0, 0);
animation: fall var(--fall-duration) var(--fall-delay) linear infinite, tail-fade var(--tail-fade-duration) var(--fall-delay) ease-out infinite;


@include sp-layout {
// For mobile performance, tail-fade animation will be removed QAQ
animation: fall var(--fall-duration) var(--fall-delay) linear infinite;
Expand Down Expand Up @@ -269,3 +270,20 @@ to {
font-size: 20px;
}

@media screen and ( max-width: 429px ) {
.chat-popup-container{
width: 80%;
}
.chat-popup-footer{
width: 77%;
}
.chat-popup-input{
width: 80%;
}
.chat-popup-send{
display: flex;
align-items: center;
justify-content: center;
width: 25%;
}
}
4 changes: 2 additions & 2 deletions src/components/Chatbot/chatbot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const Chatbot = () => {
<div className="chat-popup-container">
<div className="chat-popup-header">
<h5>SpaceBot</h5>
<i className="fas fa-sync refresh-icon" onClick={handleRefresh}></i>
<i className="fas fa-times close-icon" onClick={toggleChatbot}></i>
<i style={{marginTop:'1.5%'}} className="fas fa-sync refresh-icon" onClick={handleRefresh}></i>
<i style={{marginTop:'5%'}} className="fas fa-times close-icon" onClick={toggleChatbot}></i>
</div>
<div className="chat-popup-body">
<div className="chat-messages">
Expand Down
3 changes: 2 additions & 1 deletion src/components/ContactForm/ContactForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import img from '../../assets/original-5fcdc62f8266e353ea97ca56731ad804.png';
import Styles from "./ContactForm.module.css"
import emailjs from '@emailjs/browser';
import { toastify } from "../Toast/Toast.jsx"
import Neptune from "../3D_Models/Neptune/Neptune.jsx"


function ContactForm() {
Expand Down Expand Up @@ -74,7 +75,7 @@ function ContactForm() {
<h1 align="center" className={Styles["section_title"]} id="contact">Contact Us</h1>
<div className={Styles["contact-form"]}>
<div className={Styles["left"]}>
<img src={img} className={Styles["contact_img"]} alt="Contact Image" style={{ maxWidth: "100%" }} />
<Neptune />
</div>
<div className={Styles["right"]}>
<form className={Styles["form"]}>
Expand Down
49 changes: 28 additions & 21 deletions src/components/ContactForm/ContactForm.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
display: flex;
align-items: center;
justify-content: center;
height: 500px;
}

.contact-form .right {
Expand Down Expand Up @@ -45,72 +46,77 @@
animation: leviate 2s ease-in-out infinite;
animation-delay: 2ms;
}

@keyframes leviate {
50% {
transform: translateY(-20px);
}
}

.right form{
.right form {
width: 30vw;
padding: 30px;
background-color:transparent;
background-color: transparent;
backdrop-filter: blur(25px);
border: 2px solid #40019a;
box-sizing: content-box;
border-radius:10px;
border-radius: 10px;
animation: circle 4s ease-in-out infinite;
}

@keyframes circle {
0%{
0% {
box-shadow: 10px 10px 10px #8400ff;
}
25%{

25% {
box-shadow: -10px 10px 10px #8400ff;
}
50%{

50% {
box-shadow: -10px -10px 10px #8400ff;
}
75%{

75% {
box-shadow: 10px -10px 10px #8400ff;
}
100%{

100% {
box-shadow: 10px 10px 10px #8400ff;
}
}

.right .form-control{
.right .form-control {
outline: none;
border: 2px solid #9000ff;
border-radius:40px;
border-radius: 40px;
background: transparent;
border-radius:10px;
border-radius: 10px;
color: white;
resize: none;
}

.right .form-control::placeholder{
.right .form-control::placeholder {
color: white;
}


.right .form-control:focus{
.right .form-control:focus {
outline: none;
border: none;
background-color:#7805e39d;
background-color: #7805e39d;
box-shadow: none;
color:white ;
color: white;
}

.right button{
.right button {
outline: none;
border:none;
border: none;
border-radius: 30px;
background-color:#8400ff;
background-color: #8400ff;
}

.right button:hover{
.right button:hover {
background: #40019a;
color: white;
transform: scale(1.1);
Expand All @@ -133,7 +139,8 @@
justify-content: center;
align-items: center;
}
.contact-form .form{
width:60%;

.contact-form .form {
width: 60%;
}
}
Loading

0 comments on commit 7dda883

Please sign in to comment.