Skip to content

Commit

Permalink
Merge pull request #65 from chingu-voyages/33/feature/fetch-data/seb
Browse files Browse the repository at this point in the history
dinosaurs data added in json and script for importing the data created
  • Loading branch information
mnichols08 authored Mar 22, 2024
2 parents aeb4e0d + 9df71c8 commit b31ac9d
Show file tree
Hide file tree
Showing 6 changed files with 1,146 additions and 36 deletions.
1,127 changes: 1,127 additions & 0 deletions assets/dinosaurs.json

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions index.html

This file was deleted.

File renamed without changes.
21 changes: 11 additions & 10 deletions pages/index.html → public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h2>Chingu Raptors</h2>
<h2>Dinosaur Index</h2>
<ul>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src="https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/Euhelopus.jpg"
alt="Euhelopus" />
Expand All @@ -54,7 +54,7 @@ <h5>Euhelopus</h5>
</div>
</li>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src="https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/triceratops.jpg"
alt="triceratops" />
Expand All @@ -69,7 +69,7 @@ <h5>Triceratops</h5>
</div>
</div>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src="https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/tyran.jpg"
alt="Tyrannosaurus" />
Expand All @@ -85,7 +85,7 @@ <h5>Tyrannosaurus</h5>
</div>
</li>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src="https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/veloc.jpg"
alt="Velociraptor" />
Expand All @@ -101,7 +101,7 @@ <h5>Velociraptor</h5>
</div>
</li>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src=https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/struthio.jpg
alt="struthiosaurus" />
Expand All @@ -117,7 +117,7 @@ <h5>Struthiosaurus</h5>
</div>
</li>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src=https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/Stygimoloch.jpg
alt="Stygimoloch" />
Expand All @@ -133,7 +133,7 @@ <h5>Stygimoloch</h5>
</div>
</li>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src=https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/Spinosaurus.jpg
alt="Spinosaurus" />
Expand All @@ -149,7 +149,7 @@ <h5>Spinosaurus</h5>
</div>
</li>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src=https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/Staurikosaurus.jpg
alt="Staurikosaurus" />
Expand All @@ -165,7 +165,7 @@ <h5>Staurikosaurus</h5>
</div>
</li>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src="https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/Scutellosaurus.jpg"
alt="Scutellosaurus" />
Expand All @@ -181,7 +181,7 @@ <h5>Scutellosaurus</h5>
</div>
</li>
<li class="dino">
<a href="../dinosaur-details.html">
<a href="./dinosaur-details.html">
<img
src="https://www.nhm.ac.uk/resources/nature-online/life/dinosaurs/dinosaur-directory/images/reconstruction/small/Sauropelta.jpg"
alt="Sauropelta" />
Expand Down Expand Up @@ -212,6 +212,7 @@ <h5>Sauropelta</h5>
href="https://chingu-voyages.github.io/v48-tier1-team-04/" target="_blank">Learn More</a></span> | <a href="#"
id="teamPage">Chingu Raptors</a>
</footer>
<script type="module" src="../scripts/main.js"></script>
</body>

</html>
4 changes: 4 additions & 0 deletions scripts/json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import dinosaur_data from '../assets/dinosaurs.json' assert { type: 'json'};
var data = dinosaur_data;

export default data
4 changes: 4 additions & 0 deletions scripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import data from './json.js'


console.log(data);

0 comments on commit b31ac9d

Please sign in to comment.