Page d'introduction sans image

This commit is contained in:
Didictateur 2025-03-29 23:35:03 +01:00
parent 6feaefef2c
commit 4504545ef8
4 changed files with 47 additions and 2 deletions

View file

@ -66,7 +66,7 @@
<body> <body>
<nav class="menu"> <nav class="menu">
<ul class="menu-item"> <ul class="menu-item">
<a href="#" onclick="loadScript('')">Introduction</a> <a href="#" onclick="loadScript('dp0.js')">Introduction</a>
</ul> </ul>
<ul class="menu-item"> <ul class="menu-item">
<a href="#">Riichi Mahjong</a> <a href="#">Riichi Mahjong</a>
@ -158,7 +158,7 @@
} }
//script initial //script initial
loadScript('dp4.js'); loadScript('dp0.js');
</script> </script>
</body> </body>
</html> </html>

0
src/display/dp0.ts Normal file
View file

18
src/text/txt0.ts Normal file
View file

@ -0,0 +1,18 @@
import { drawText } from "./parse"
const CANVAS_ID = "myTextCanvas";
const BG_RECT = { x: 0, y: 0, w: 800, h: 1050, color: "#007733" };
const canvas = document.getElementById(CANVAS_ID) as HTMLCanvasElement;
const ctx = canvas.getContext("2d") as NonNullable<CanvasRenderingContext2D>;
canvas.width = BG_RECT.w;
canvas.height = BG_RECT.h;
const path = "../src/text/";
ctx.fillStyle = BG_RECT.color;
ctx.fillRect(BG_RECT.x, BG_RECT.y, BG_RECT.w, BG_RECT.h);
drawText(path + "txt0.txt", ctx).catch(error => console.error(error));
export {};

27
src/text/txt0.txt Normal file
View file

@ -0,0 +1,27 @@
Bienvenu sur ce site dédié au *Mahjong* !
Ce site est principalement destiné aux personnes découvrant ce
formidable jeu.
De nombreux services sont proposés:
- *Introduction riichi majhong* dans l'onglet #ff00ff{Riichi Mahjong}
- *Explication d'une partie en physique* dans l'onglet #ff00ff{Partie
réelle} pour comprendre comment y jouer dans la vraie vie
- *Introduction à une variante* dans l'onglet #ff00ff{Riichi à trois}
- *Un entrainement aux différents Yakus* dans l'onglet #ff00ff{Yaku
trainer}
- *Une introduction au MCR*, la variante chinoise dans l'onglet
#ff00ff{MCR}
Evidemment, ce site n'est pas encore fini, et possède encore
beaucoup de problème. Pour le moindre retour, ne pas hésiter
à le faire savoir directement sur le Github pour pour aider
à l'améliorer.