Skip to content
Extraits de code Groupes Projets
Valider c3a3ddda rédigé par Steel's avatar Steel
Parcourir les fichiers

feat: favicon

parent 58eb6ec4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -4,6 +4,19 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
<meta name="apple-mobile-web-app-title" content="Qui est-ce ?" />
<meta name="application-name" content="Qui est-ce ?" />
<meta name="msapplication-TileColor" content="#2b5797" />
<meta name="theme-color" content="#ffffff" />
<title>Qui est-ce ?</title>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
......
......@@ -16,10 +16,13 @@ type BaseLevel = {
type Level = BaseLevel & {
size: number;
disabled: boolean;
};
const VIIEUX_YEAR = 20;
const MINIMUM_SIZE = 15;
export async function load(event) {
const game = new Game(event.cookies);
......@@ -72,13 +75,15 @@ export async function load(event) {
];
const promoSizes = await Promise.all(
Array.from(new Array(VIIEUX_YEAR), (_, i) => getPromotion(i + 1).then((promo) => promo.size))
Array.from(new Array(VIIEUX_YEAR+1), (_, i) => getPromotion(i).then((promo) => promo.size))
);
const levels: Level[] = baseLevels.map((level) => {
const end = (level.maxYear ?? level.year) + 1;
const size = promoSizes.slice(level.year, end).reduce(sum, 0);
return {
size: promoSizes.slice(level.year, end).reduce(sum, 0),
size,
disabled: size < MINIMUM_SIZE,
...level
};
});
......@@ -95,6 +100,11 @@ export const actions = {
return fail(400, { form });
}
const promotion = await getPromotion(form.data.year);
if (promotion.size < MINIMUM_SIZE) {
return fail(400, { form });
}
const state = new Game(event.cookies);
state.state.year = form.data.year;
......
......@@ -32,7 +32,8 @@
</Field>
<button
type="submit"
class="col-span-1 flex h-36 w-36 flex-col divide-y divide-gray-200 rounded-2xl border-6 border-solid border-zinc-800 bg-slate-100 text-center shadow transition-[0.45s] hover:translate-y-[-3px] hover:bg-slate-300 focus:border-indigo-500 sm:h-72 sm:w-72"
disabled={level.disabled}
class="col-span-1 flex h-36 w-36 flex-col divide-y divide-gray-200 rounded-2xl border-6 border-solid border-zinc-800 bg-red-300 cursor-not-allowed enabled:cursor-pointer enabled:bg-slate-100 text-center shadow transition-[0.45s] enabled:hover:translate-y-[-3px] enabled:hover:bg-slate-300 enabled:focus:border-indigo-500 sm:h-72 sm:w-72"
>
<div class="flex flex-1 flex-col p-2 sm:p-8">
<img class="mx-auto h-16 flex-shrink-0 sm:h-32 sm:w-32" src={level.image} alt="" />
......
static/android-chrome-192x192.png

10,1 ko

static/android-chrome-256x256.png

10,3 ko

static/apple-touch-icon.png

8,92 ko

<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#2b5797</TileColor>
</tile>
</msapplication>
</browserconfig>
static/favicon-16x16.png

982 octets

static/favicon-32x32.png

1,78 ko

static/favicon.ico

14,7 ko

static/icon.png

8,02 ko

static/mstile-150x150.png

6,83 ko

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="256.000000pt" height="256.000000pt" viewBox="0 0 256.000000 256.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,256.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M1101 2309 c-29 -5 -95 -23 -145 -40 -362 -121 -624 -435 -686 -821
-18 -113 -8 -342 19 -438 28 -95 107 -258 160 -330 162 -216 381 -356 646
-411 77 -16 293 -16 370 0 331 69 591 269 735 566 73 148 91 224 97 393 6 160
-5 251 -44 377 -104 331 -360 581 -698 681 -77 22 -113 27 -245 30 -85 1 -179
-1 -209 -7z m350 -371 c207 -98 286 -310 191 -511 -30 -65 -108 -169 -206
-274 l-58 -63 -134 0 c-74 0 -134 2 -134 5 0 3 41 53 90 111 157 183 196 259
179 351 -11 55 -38 95 -87 125 -30 19 -51 23 -112 23 -65 0 -85 -5 -141 -32
-36 -18 -86 -51 -111 -72 l-45 -40 -6 137 c-6 159 -6 158 96 213 99 53 176 70
298 66 97 -3 112 -6 180 -39z m-129 -1054 c14 -8 37 -28 50 -46 31 -45 33
-143 2 -184 -33 -45 -70 -67 -121 -71 -113 -11 -202 90 -173 198 28 104 143
153 242 103z"/>
</g>
</svg>
{
"name": "Qui est-ce ?",
"short_name": "Qui est-ce ?",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter