-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
173 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package fr.shikkanime.dtos | ||
|
||
data class WeeklyEpisodesDto( | ||
val dayOfWeek: String, | ||
val episodes: List<EpisodeDto> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<#import "_navigation.ftl" as navigation /> | ||
|
||
<@navigation.display> | ||
<div class="table-responsive"> | ||
<table class="table table-dark table-borderless my-5"> | ||
<thead> | ||
<tr> | ||
<#list weeklyEpisodes as dailyEpisodes> | ||
<th scope="col" class="text-center" style="width: 14.28%"> | ||
${dailyEpisodes.dayOfWeek} | ||
</th> | ||
</#list> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<#list weeklyEpisodes as dailyEpisodes> | ||
<td style="background-color: #060606"> | ||
<#list dailyEpisodes.episodes as episode> | ||
<article x-data="{ hover: false }"> | ||
<a href="/animes/${episode.anime.slug}" class="text-decoration-none text-white" | ||
@mouseenter="hover = true" | ||
@mouseleave="hover = false"> | ||
<div class="position-relative"> | ||
<div class="position-relative"> | ||
<img src="https://api.shikkanime.fr/v1/attachments?uuid=${episode.anime.uuid}&type=banner" | ||
alt="${su.sanitizeXSS(episode.anime.shortName)} anime banner" | ||
class="img-fluid" width="640" | ||
height="360"> | ||
|
||
<div class="position-absolute bottom-0 start-0 p-1 px-md-3 bg-black" | ||
id="${episode.uuid}" | ||
data-release-date-time="${episode.releaseDateTime}"> | ||
</div> | ||
</div> | ||
|
||
<div class="mt-2 d-flex align-items-center"> | ||
<img src="https://www.shikkanime.fr/assets/img/platforms/${episode.platform.image}" | ||
alt="${episode.platform.name} platform image" | ||
class="rounded-circle me-2" width="20" | ||
height="20"> | ||
|
||
<span class="h6 text-truncate-2"> | ||
${episode.anime.shortName} | ||
</span> | ||
</div> | ||
|
||
<div class="bg-black bg-opacity-75 position-absolute top-0 start-0 w-100 h-100 mh-100 p-3" | ||
x-show="hover"> | ||
<#if episode.anime.description??> | ||
<div class="text-truncate-6"> | ||
${episode.anime.description} | ||
</div> | ||
</#if> | ||
</div> | ||
</div> | ||
</a> | ||
</article> | ||
</#list> | ||
</td> | ||
</#list> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<script> | ||
<#-- Get release date and time and convert it to the user's timezone --> | ||
const releaseDateTimeElements = document.querySelectorAll('[data-release-date-time]'); | ||
releaseDateTimeElements.forEach(element => { | ||
const releaseDateTime = new Date(element.getAttribute('data-release-date-time')); | ||
element.innerHTML = releaseDateTime.toLocaleTimeString().split(':').slice(0, 2).join(':'); | ||
}); | ||
</script> | ||
</@navigation.display> |