diff --git a/django/frontend/static/js/imgs/ponge.gif b/django/frontend/static/js/imgs/ponge.gif new file mode 100644 index 0000000..c565ce8 Binary files /dev/null and b/django/frontend/static/js/imgs/ponge.gif differ diff --git a/django/frontend/static/js/index.js b/django/frontend/static/js/index.js index b4cfba3..5329cd8 100644 --- a/django/frontend/static/js/index.js +++ b/django/frontend/static/js/index.js @@ -12,6 +12,7 @@ import { TicTacToeOfflineView } from "./views/TicTacToeOfflineView.js" import PageNotFoundView from './views/PageNotFoundView.js' ; +import DashboardView from "./views/DashboardView.js"; import AbstractRedirectView from "./views/abstracts/AbstractRedirectView.js"; import SettingsView from "./views/SettingsView.js"; import ProfilePageView from "./views/ProfilePageView.js"; @@ -74,7 +75,7 @@ async function renderView(view) const router = async(uri) => { const routes = [ - { path: "/", view: HomeView}, + { path: "/", view: DashboardView}, { path: "/profiles/:username", view: ProfilePageView }, { path: "/login", view: AuthenticationView }, { path: "/register", view: AuthenticationView }, diff --git a/django/frontend/static/js/lang/cr.json b/django/frontend/static/js/lang/cr.json index 95176c2..0e3919d 100644 --- a/django/frontend/static/js/lang/cr.json +++ b/django/frontend/static/js/lang/cr.json @@ -1,6 +1,7 @@ { "navbarSearch": "cherchbeh", "navbarHome": "Quoicoubouse", + "navbarDashboard" : "Quoicouaccueil", "navbarLogin": "Quoicouconnec", "navbarRegister": "Quoicougistré", "navbarProfile": "Mon crampté Profile", diff --git a/django/frontend/static/js/lang/en.json b/django/frontend/static/js/lang/en.json index a9dfeb7..3a6240f 100644 --- a/django/frontend/static/js/lang/en.json +++ b/django/frontend/static/js/lang/en.json @@ -1,6 +1,7 @@ { "navbarSearch": "Search", "navbarHome": "Home", + "navbarDashboard" : "Homepage", "navbarLogin": "Login", "navbarRegister": "Register", "navbarProfile": "My Profile", diff --git a/django/frontend/static/js/lang/fr.json b/django/frontend/static/js/lang/fr.json index 2ed1c73..dc432fb 100644 --- a/django/frontend/static/js/lang/fr.json +++ b/django/frontend/static/js/lang/fr.json @@ -1,6 +1,7 @@ { "navbarSearch": "Recherche", "navbarHome": "Maison", + "navbarDashboard" : "Accueil", "navbarLogin": "Connexion", "navbarRegister": "S'inscrire", "navbarProfile": "Mon Profil", @@ -40,6 +41,7 @@ "ticTacToeTitle": "Morpion", "gamemodeChoice" : "Mode de jeu", "ruleTitle" : "Règles", + "DashboardTitle": "Accueil", "ruleBase" : "1. Vous devez gagner sur une des 9 grilles pour gagner la partie", "ruleMovement" : "2. Vous commencez sur le morpion central, et jouez sur le morpion correspondant a votre choix a votre prochain tour", "ruleDraw" : "3. Si votre choix rempli entièrement un morpion et provoque une égalité, vous perdez", diff --git a/django/frontend/static/js/lang/tp.json b/django/frontend/static/js/lang/tp.json index 4d45c00..5e7fccb 100644 --- a/django/frontend/static/js/lang/tp.json +++ b/django/frontend/static/js/lang/tp.json @@ -1,6 +1,7 @@ { "navbarSearch": "Lukin", "navbarHome": "Tomo", + "navbarDashboard": "Sina", "navbarLogin": "Open", "navbarRegister": "Sitelen", "navbarProfile": "Sitelen mi", diff --git a/django/frontend/static/js/views/DashboardView.js b/django/frontend/static/js/views/DashboardView.js new file mode 100644 index 0000000..f72ca57 --- /dev/null +++ b/django/frontend/static/js/views/DashboardView.js @@ -0,0 +1,43 @@ +import { lang } from "../index.js"; +import AbstractView from './abstracts/AbstractView.js' + +export default class extends AbstractView { + constructor(params) + { + super(params, 'DashboardTitle'); + } + + async getHtml() + { + let textList = ["On push demain les gars", "Cacamille", "kroussar powered", "Fait avec convictions", "Conviction et panache", "Etienne met pas de caleçon", "🍆🍆💧"]; + let text = textList[Math.floor(Math.random() * textList.length)]; + return /* HTML */ ` + +
BOZO PONG
+