Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 888a81a

Browse files
committedMay 13, 2024·
resolved merge conflicts
2 parents f3f3057 + e1aa0fd commit 888a81a

File tree

8 files changed

+561
-14
lines changed

8 files changed

+561
-14
lines changed
 

‎.github/pull_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Issue number
44
<!-- Please make sure issue number is mention in Pull Request else PR will not be merged.
5-
eg : Issue No. : #4 -->
5+
eg : Fixes #4 -->
66

7-
Issue No. :
7+
Fixes #
88

99

1010
## Video/Screenshots (mandatory)
@@ -18,4 +18,4 @@ Issue No. :
1818
- [ ] I have gone through the `contributing.md` file before contributing
1919
<!-- [X] - put a cross/X inside [] to check the box -->
2020

21-
## Additional context:
21+
## Additional context:

‎CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
PranavBarthwal.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

‎assets/favicon.png

38.6 KB
Loading

‎index.html

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@
2121
</head>
2222

2323
<body>
24+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
25+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
26+
<link rel="stylesheet" href="./style.css">
27+
<link rel="icon" type="image/png" href="./assets/favicon.png">
28+
29+
<style>
30+
@keyframes float {
31+
0% {
32+
transform: translateY(0);
33+
}
34+
35+
50% {
36+
transform: translateY(-10px);
37+
}
38+
39+
100% {
40+
transform: translateY(0);
41+
}
42+
}
43+
</style>
44+
</head>
45+
<body>
46+
2447
<div id="bg"></div>
2548

2649
<!-- NAVBAR -->
@@ -64,6 +87,34 @@
6487
</div>
6588
</nav>
6689

90+
<nav class="navbar navbar-expand-lg fixed-top navbar_background">
91+
<div class="container-fluid">
92+
<a class="navbar-brand" href="#">
93+
<img src="./assets/logo_white.png" alt="Bootstrap" width="370">
94+
</a>
95+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
96+
<span class="navbar-toggler-icon "></span>
97+
</button>
98+
<div class="collapse navbar-collapse pe-5" id="navbarSupportedContent">
99+
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
100+
<li class="nav-item">
101+
<a class="nav-link text-light decorate-text" href="#">Home</a>
102+
</li>
103+
<li class="nav-item">
104+
<a class="nav-link text-light decorate-text" href="#apod">APoD</a>
105+
</li>
106+
<li class="nav-item ">
107+
<a class="nav-link text-light decorate-text" href="#mars">MartianImagery</a>
108+
</li>
109+
<li class="nav-item">
110+
<a href="#contact"> <button class="btn btn-outline-light rounded-pill decorate-text" type="submit">Contact Us</button></a>
111+
</li>
112+
</div>
113+
</div>
114+
</nav>
115+
116+
117+
67118
<!-- HERO SECTION -->
68119
<div class="container col-xxl-8 px-4 py-5">
69120
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
@@ -102,6 +153,23 @@ <h1 class="display-2 fw-bold text-light">
102153
</div>
103154
</div>
104155
</div>
156+
<!-- HERO SECTION -->
157+
<div class="container col-xxl-9 px-3 py-5">
158+
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
159+
<div class="col-10 col-sm-8 col-lg-6">
160+
<img src="./assets/A letter tech logo.png" class="d-block mx-lg-auto img-fluid hero_img" alt="Bootstrap Themes"
161+
width="700" height="500" loading="lazy" style="animation: float 3s ease-in-out infinite;">
162+
</div>
163+
<div class="col-lg-6 ">
164+
<h1 class="display-2 fw-bold text-light">Let's embark on a Cosmic <span class="highlight">X</span><span class="auto-typed"></span></h1>
165+
<p class="lead text-light">Welcome to CosmoXplore, where the celestial canvas unfolds its mysteries before your eyes. Immerse yourself in a cosmic odyssey, as we harness the power of NASA's API to bring you a symphony of space resources. From breathtaking images to cutting-edge astronomical data, embark on a journey that transcends the limits of earthly imagination.</p>
166+
<div class="d-grid gap-5 d-md-flex justify-content-md-start pt-2">
167+
<a href="#apod"><button type="button" class="btn btn-primary btn-lg px-4 me-md-2">Explore</button></a>
168+
169+
</div>
170+
</div>
171+
</div>
172+
</div>
105173

106174
<br />
107175
<br />
@@ -145,6 +213,20 @@ <h5 id="copyright" align="center"></h5>
145213
<h6 id="date" align="center"></h6>
146214
</div>
147215
</div>
216+
<p id="apod_info" class="lead">NASA's Astronomy Picture of the Day (APoD) showcases captivating celestial images accompanied by brief explanations. Each day, NASA features astronomical wonders, ranging from stunning nebulae and galaxies to snapshots of our solar system, providing a daily dose of cosmic beauty and scientific insight. APoD serves as a valuable resource for both astronomy enthusiasts and those seeking to explore the wonders of the universe.</p>
217+
218+
</div>
219+
220+
<div class="apod_img_container">
221+
<div class="img">
222+
<img src="./assets/64e4e4aabd98a600197c0ca3.webp" id="apod_img" width="100%" height="100%">
223+
</div>
224+
<div class="video" id="apod_video">
225+
</div>
226+
<div class="info">
227+
<h5 id="copyright" align="center" > </h5>
228+
<h6 id="date" align="center"> </h6>
229+
148230
</div>
149231
</div>
150232

@@ -197,6 +279,26 @@ <h1 align="center" class="section_title" id="mars">Mars Rover Imagery</h1>
197279
</p>
198280
</div>
199281
</div>
282+
<!-- Default display -->
283+
<div class="rover_container">
284+
<div class="rover_section_img">
285+
<img src="./assets/mars.png" class="mars_illus" style="animation: float 3s ease-in-out infinite;">
286+
</div>
287+
<div class="rover_section_text">
288+
<p class="">Welcome to an extraordinary adventure into the Martian landscape, where we invite you to explore the wonders of the Red Planet through the lens of various rovers that have traversed its surface. Our journey takes us deep into the photographic archives, a treasure trove of captivating images captured by these robotic explorers. Each rover, armed with sophisticated cameras, has documented the Martian terrain, unveiling its mysteries one snapshot at a time.
289+
290+
The heart of this exploration lies in a comprehensive database meticulously organized to offer you an unparalleled visual chronicle of Mars' exploration. This repository is a testament to the marvels of technology and the spirit of scientific curiosity that drives humanity to push the boundaries of exploration.
291+
292+
But how do you, the explorer, access this vast collection? Fear not, for we present a user-friendly approach that allows you to effortlessly navigate through the visual wonders of Mars. By simply entering the Earth date corresponding to a specific photo, you unlock a portal to the Red Planet's past, witnessing moments frozen in time by the lenses of our robotic companions.
293+
294+
The convenience of this method provides unparalleled flexibility, enabling you to tailor your exploration based on your interests. Whether you're drawn to the intricate geological formations that dot the Martian surface, mesmerized by the dance of atmospheric phenomena in the thin Martian air, or captivated by the milestones achieved by the rovers themselves, our immersive experience ensures that your curiosity is rewarded.
295+
296+
This journey offers a deeper understanding of Mars' unique features and the scientific endeavors that drive these robotic explorers. From the striking landscapes to the subtle details that tell the story of a planet's evolution, each image contributes to our collective knowledge of the Red Planet.
297+
298+
Join us in unlocking the mysteries of Mars as we navigate through the cutting-edge technology and unparalleled exploration that has brought us face to face with the enigmatic Red Planet.</p>
299+
</div>
300+
</div>
301+
200302

201303
<!-- display on enetering a date -->
202304
<div class="rover_display">
@@ -393,3 +495,4 @@ <h1 align="center" class="section_title" id="contact">Contact Us</h1>
393495
</script>
394496
</body>
395497
</html>
498+

‎js/app.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ fetch(
119119
return response.json()
120120
})
121121
.then(data => {
122-
123-
console.log("fetching")
122+
console.log('fetching')
124123

125124
displayData(
126125
data.url,
@@ -180,6 +179,12 @@ function updateDom (img_src, date, roverName, camera, launch, land, status) {
180179
document.querySelector('.status').textContent = status
181180
}
182181

182+
// added closeRover function
183+
function closeRoverDisplay (e) {
184+
document.querySelector('.rover_container').style.display = 'flex'
185+
document.querySelector('.rover_display').style.display = 'none'
186+
}
187+
183188
// API CALL 3 : NASA Photo Video Gallery
184189
fetch('https://images-api.nasa.gov/search?q=apollo')
185190
.then(response => {

‎js/gallery.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ function htmlMedia (data, childrenHTML, nasa_id, media_type) {
7676
elem.id = nasa_id
7777
elem.type = media_type
7878

79-
8079
childrenHTML[0] += elem.outerHTML
8180
}
8281

8382
// when user clicks on a media, the function redirects them to detail page for that media
84-
function openDetailPage (id) {
83+
function openDetailPage (id, mediaURL) {
84+
console.log(mediaURL)
8585
window.location.href = '/mediaDetail.html'
8686
window.sessionStorage.setItem('nasa_id', id)
87-
// window.sessionStorage.setItem('mediaURL', mediaURL)
87+
window.sessionStorage.setItem('mediaURL', mediaURL)
8888
}
8989

9090
// when user search, this function makes API request for that query.

‎js/mediaDetail.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function putDataInHTML (src, data) {
3333
if (data['AVAIL:MediaType'] === 'image') {
3434
let img = document.createElement('img')
3535
img.src = src
36+
console.log(src)
3637
media.appendChild(img)
3738
} else {
3839
// search for mp4 url of video
@@ -41,17 +42,16 @@ function putDataInHTML (src, data) {
4142
return response.json()
4243
})
4344
.then(data => {
44-
let count=2
45+
let count = 2
4546
for (i = 0; i < data.collection.items.length; i++) {
4647
console.log('hello')
4748
let url = String(data.collection.items[i].href)
4849
if (url.endsWith('mp4')) {
49-
if(count!=0)
50-
{
51-
let video = document.createElement('video')
50+
if (count != 0) {
51+
let video = document.createElement('video')
5252
video.src = url
53-
video.setAttribute("controls", '')
54-
video.style.width = "45vw"
53+
video.setAttribute('controls', '')
54+
video.style.width = '45vw'
5555
media.appendChild(video)
5656
}
5757
count--

0 commit comments

Comments
 (0)
Please sign in to comment.