mirror of
https://github.com/Starlio-app/StarlioX
synced 2025-02-24 23:31:26 +03:00
Refactoring of the code and add function for favorites
This commit is contained in:
parent
ae354ff5d1
commit
20a1bdb2b3
2 changed files with 161 additions and 33 deletions
|
@ -26,6 +26,9 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="/">Gallery</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/favorite">Favorite</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/settings">Settings</a>
|
||||
</li>
|
||||
|
@ -70,7 +73,26 @@
|
|||
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.10.0/lottie.min.js"></script>
|
||||
<script src="/static/scripts/gallery.js" type="application/javascript"></script>
|
||||
<script src="/static/scripts/analytics.js" type="module" id="analytics"></script>
|
||||
<script type="application/javascript">
|
||||
startDate.setDate(startDate.getUTCDate() - 17);
|
||||
$(document).ready(function() {
|
||||
$.ajax({
|
||||
url: "https://api.nasa.gov/planetary/apod",
|
||||
type: "GET",
|
||||
data: {
|
||||
api_key: apiKEY,
|
||||
start_date: `${startDate.getUTCFullYear()}-${startDate.getUTCMonth() + 1}-${startDate.getUTCDate()}`,
|
||||
end_date: `${endDate.getUTCFullYear()}-${endDate.getUTCMonth() + 1}-${endDate.getUTCDate()}`,
|
||||
},
|
||||
success: function(data) {
|
||||
data.reverse();
|
||||
wallpaperLoad(data);
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue