Skip to content

Commit

Permalink
Merge pull request #325 from Shikkanime/dev
Browse files Browse the repository at this point in the history
Fix some AHREFS alerts
  • Loading branch information
Ziedelth committed Mar 29, 2024
2 parents c674712 + c12f584 commit dbaab49
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 19 deletions.
10 changes: 4 additions & 6 deletions src/main/kotlin/fr/shikkanime/utils/FirebaseNotification.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ package fr.shikkanime.utils
import com.google.auth.oauth2.GoogleCredentials
import com.google.firebase.FirebaseApp
import com.google.firebase.FirebaseOptions
import com.google.firebase.messaging.*
import com.google.firebase.messaging.AndroidConfig
import com.google.firebase.messaging.FirebaseMessaging
import com.google.firebase.messaging.Message
import com.google.firebase.messaging.Notification
import fr.shikkanime.dtos.EpisodeDto
import java.io.File
import java.io.FileInputStream
Expand Down Expand Up @@ -43,11 +46,6 @@ object FirebaseNotification {
.setPriority(AndroidConfig.Priority.HIGH)
.build()
)
.setApnsConfig(
ApnsConfig.builder()
.putHeader("apns-priority", "5")
.build()
)
.setTopic("global")
.build()
)
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/site/anime.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>

<div class="col-md-8 col-12 text-start mt-md-0 mt-5 d-flex flex-column justify-content-center">
<h6 class="h6">${anime.shortName?upper_case}</h6>
<h1 class="h6">${anime.shortName?upper_case}</h1>
<p class="text-muted">${anime.name}</p>

<#if (anime.simulcasts?size > 1)>
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/templates/site/calendar.ftl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<#import "_navigation.ftl" as navigation />

<@navigation.display>
<#assign canonicalUrl = "<link rel=\"canonical\" href=\"https://www.shikkanime.fr/calendar\"/>" />

<@navigation.display header="${canonicalUrl}">
<div class="table-responsive">
<table class="table table-dark table-borderless my-5">
<thead>
Expand Down
26 changes: 17 additions & 9 deletions src/main/resources/templates/site/catalog.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@
<#import "components/episode.ftl" as episodeComponent />
<#import "components/anime.ftl" as animeComponent />

<@navigation.display>
<#assign canonicalUrl = "<link rel=\"canonical\" href=\"https://www.shikkanime.fr/catalog/${selectedSimulcast.slug}\"/>" />

<@navigation.display header="${canonicalUrl}">
<div class="mt-3">
<#if selectedSimulcast??>
<button class="btn btn-dark dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
${selectedSimulcast.label}
</button>
<div class="d-flex align-items-center">
<h1 class="h3 me-3 mb-0">Simulcast par saison</h1>

<ul class="dropdown-menu dropdown-menu-dark" style="max-height: 300px; overflow-y: auto;">
<#list simulcasts as simulcast>
<li><a class="dropdown-item" href="/catalog/${simulcast.slug}">${simulcast.label}</a></li>
</#list>
</ul>
<div>
<button class="btn btn-dark dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
${selectedSimulcast.label}
</button>

<ul class="dropdown-menu dropdown-menu-dark" style="max-height: 300px; overflow-y: auto;">
<#list simulcasts as simulcast>
<li><a class="dropdown-item" href="/catalog/${simulcast.slug}">${simulcast.label}</a></li>
</#list>
</ul>
</div>
</div>

<div class="row mt-3 justify-content-center">
<#list animes as anime>
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/templates/site/home.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<#import "components/episode.ftl" as episodeComponent />
<#import "components/anime.ftl" as animeComponent />

<@navigation.display>
<#assign canonicalUrl = "<link rel=\"canonical\" href=\"https://www.shikkanime.fr\"/>" />

<@navigation.display header="${canonicalUrl}">
<h1 class="h3 my-3">Nouveaux épisodes</h1>

<#if episodes?? && episodes?size != 0>
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/templates/site/search.ftl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<#import "_navigation.ftl" as navigation />

<@navigation.display>
<#assign canonicalUrl = "<link rel=\"canonical\" href=\"https://www.shikkanime.fr/search\"/>" />

<@navigation.display header="${canonicalUrl}">
<div class="container my-3">
<input type="text" id="search" class="form-control-lg w-100 bg-dark text-white"
placeholder="Rechercher" value="<#if query??>${query}</#if>" autofocus>
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/templates/site/seo/sitemap.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
<loc>${baseUrl}/</loc>
<lastmod>${episode.releaseDateTime?replace("Z", "+00:00")}</lastmod>
</url>
<url>
<loc>${baseUrl}/calendar</loc>
<lastmod>${episode.releaseDateTime?replace("Z", "+00:00")}</lastmod>
</url>
</#if>
<url>
<loc>${baseUrl}/search</loc>
<lastmod>2024-03-20T17:00:00+00:00</lastmod>
</url>
<#list simulcasts as simulcast>
<url>
<loc>${baseUrl}/catalog/${simulcast.slug}</loc>
Expand Down

0 comments on commit dbaab49

Please sign in to comment.