From: Benjamin Auder Date: Wed, 23 Jan 2019 15:33:21 +0000 (+0100) Subject: Advance on client side X-Git-Url: https://git.auder.net/game/vendor/js/img/pieces/cn.svg?a=commitdiff_plain;h=98db2082fd31e7a7bc0348e31ce119f39dbc31b3;p=vchess.git Advance on client side --- diff --git a/client/TODO b/client/TODO deleted file mode 100644 index 58732706..00000000 --- a/client/TODO +++ /dev/null @@ -1,10 +0,0 @@ -En dev, faire tourner les deux serveurs 3000 et 8080, server + client -En prod, client est statique ==> juste serveur, comme d'hab - -index.js ne va rien chercher sur serveur, pas même les trucs indispensables comme variant ou variantArray -==> ils sont demandés au serveur en arrivant sur la page (avec éventuellement "Variant does not exist") - -https://alligator.io/vuejs/lazy-loading-vue-cli-3-webpack/ -https://webpack.js.org/guides/code-splitting/#dynamic-imports -https://vue-loader.vuejs.org/guide/pre-processors.html#pug -https://cli.vuejs.org/guide/webpack.html#simple-configuration diff --git a/client/client_OLD/javascripts/contactForm.js b/client/client_OLD/javascripts/contactForm.js deleted file mode 100644 index 8b1a079f..00000000 --- a/client/client_OLD/javascripts/contactForm.js +++ /dev/null @@ -1,32 +0,0 @@ -// Note: not using Vue, but would be possible -function trySendMessage() -{ - let email = document.getElementById("userEmail"); - let subject = document.getElementById("mailSubject"); - let content = document.getElementById("mailContent"); - const error = checkNameEmail({email: email}); - if (!!error) - return alert(error); - if (content.value.trim().length == 0) - return alert("Empty message"); - if (subject.value.trim().length == 0 && !confirm("No subject. Send anyway?")) - return; - - // Message sending: - ajax( - "/messages", - "POST", - { - email: email.value, - subject: subject.value, - content: content.value, - }, - () => { - subject.value = ""; - content.value = ""; - let emailSent = document.getElementById("emailSent"); - emailSent.style.display = "inline-block"; - setTimeout(() => { emailSent.style.display = "none"; }, 2000); - } - ); -} diff --git a/client/client_OLD/javascripts/shared/challengeCheck.js b/client/client_OLD/javascripts/data/challengeCheck.js similarity index 100% rename from client/client_OLD/javascripts/shared/challengeCheck.js rename to client/client_OLD/javascripts/data/challengeCheck.js diff --git a/client/client_OLD/javascripts/shared/nbPlayers.js b/client/client_OLD/javascripts/data/nbPlayers.js similarity index 100% rename from client/client_OLD/javascripts/shared/nbPlayers.js rename to client/client_OLD/javascripts/data/nbPlayers.js diff --git a/client/client_OLD/javascripts/shared/userCheck.js b/client/client_OLD/javascripts/data/userCheck.js similarity index 100% rename from client/client_OLD/javascripts/shared/userCheck.js rename to client/client_OLD/javascripts/data/userCheck.js diff --git a/client/client_OLD/javascripts/utils/misc.js b/client/client_OLD/javascripts/utils/misc.js deleted file mode 100644 index 287c0ea6..00000000 --- a/client/client_OLD/javascripts/utils/misc.js +++ /dev/null @@ -1,47 +0,0 @@ -// Source: https://www.quirksmode.org/js/cookies.html -function setCookie(name, value) -{ - var date = new Date(); - date.setTime(date.getTime()+(183*24*60*60*1000)); //6 months - var expires = "; expires="+date.toGMTString(); - document.cookie = name+"="+value+expires+"; path=/"; -} - -function getCookie(name, defaut) { - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - for (var i=0;i < ca.length;i++) - { - var c = ca[i]; - while (c.charAt(0)==' ') - c = c.substring(1,c.length); - if (c.indexOf(nameEQ) == 0) - return c.substring(nameEQ.length,c.length); - } - return defaut; //cookie not found -} - -// Random (enough) string for socket and game IDs -function getRandString() -{ - return (Date.now().toString(36) + Math.random().toString(36).substr(2, 7)) - .toUpperCase(); -} - -// Used both on index and variant page, to switch language -function setLanguage(e) -{ - setCookie("lang", e.target.value); - location.reload(); //to include the right .pug file -} - -// Shortcut for an often used click (on a modal) -function doClick(elemId) -{ - document.getElementById(elemId).click(); //or ".checked = true" -} - -function translate(msg) -{ - return translations[msg]; -} diff --git a/client/client_OLD/javascripts/variant.js b/client/client_OLD/javascripts/variant.js index 5920c0c7..c45de0ac 100644 --- a/client/client_OLD/javascripts/variant.js +++ b/client/client_OLD/javascripts/variant.js @@ -33,13 +33,6 @@ new Vue({ this.conn.onclose = socketCloseListener; }, methods: { - updateSettings: function(event) { - const propName = - event.target.id.substr(3).replace(/^\w/, c => c.toLowerCase()) - localStorage[propName] = ["highlight","coords"].includes(propName) - ? event.target.checked - : event.target.value; - }, // Game is over, clear storage and put it in indexedDB archiveGame: function() { // TODO: ... diff --git a/client/client_OLD/views/app.pug b/client/client_OLD/views/app.pug index fb9853a3..c2469602 100644 --- a/client/client_OLD/views/app.pug +++ b/client/client_OLD/views/app.pug @@ -1,60 +1,9 @@ doctype html html - - head - meta(charset="UTF-8") - title vchess - club - meta(name="viewport" content="width=device-width, initial-scale=1") - meta(name="msapplication-config" - content="/images/favicon/browserconfig.xml") - meta(name="theme-color" content="#ffffff") - link(rel="stylesheet" - href="//cdnjs.cloudflare.com/ajax/libs/mini.css/3.0.0/mini-default.min.css") - link(rel="stylesheet" - href="//fonts.googleapis.com/css?family=Open+Sans:400,700") - link(rel="apple-touch-icon" sizes="180x180" - href="/images/favicon/apple-touch-icon.png") - link(rel="icon" type="image/png" sizes="32x32" - href="/images/favicon/favicon-32x32.png") - link(rel="icon" type="image/png" sizes="16x16" - href="/images/favicon/favicon-16x16.png") - link(rel="manifest" href="/images/favicon/manifest.json") - link(rel="mask-icon" href="/images/favicon/safari-pinned-tab.svg" - color="#5bbad5") - link(rel="shortcut icon" href="/images/favicon/favicon.ico") - link(rel="stylesheet" href="/stylesheets/app.css") - - // TODO: on-demand components, do not load all at startup - body - - - var langName = { - "en": "English", - "es": "Español", - "fr": "Français", - }; - case lang - when "en" - include translations/en - include welcome/en - when "es" - include translations/es - include welcome/es - when "fr" - include translations/fr - include welcome/fr - include modals main#VueElement my-upsert-user .container - // Header (on index only) .row(v-show="display=='index'") - .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 - header - img(src="/images/index/unicorn.svg") - .info-container - p vchess.club - img(src="/images/index/wildebeest.svg") - // Menu (top of page) .row .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 label.drawer-toggle(for="drawerControl") diff --git a/client/client_OLD/views/modals.pug b/client/client_OLD/views/modals.pug deleted file mode 100644 index e24a7389..00000000 --- a/client/client_OLD/views/modals.pug +++ /dev/null @@ -1,66 +0,0 @@ -input#modalLang.modal(type="checkbox") -div(role="dialog") - #language.card - label.modal-close(for="modalLang") - form - fieldset - label(for="langSelect")= translations["Language"] - select#langSelect - each language,langCode in langName - option(value=langCode selected=(lang==langCode)) - =language - -input#modalSettings.modal(type="checkbox") -div(role="dialog" aria-labelledby="settingsTitle") - .card.smallpad(@change="updateSettings") - label.modal-close(for="modalSettings") - h3#settingsTitle.section= translations["Preferences"] - fieldset - label(for="setSqSize")= translations["Square size (in pixels). 0 for 'adaptative'"] - input#setSqSize(type="number" v-model="settings.sqSize") - fieldset - label(for="selectHints")= translations["Show move hints?"] - select#setHints(v-model="settings.hints") - option(value="0")= translations["None"] - option(value="1")= translations["Moves from a square"] - option(value="2")= translations["Pieces which can move"] - fieldset - label(for="setHighlight")= translations["Highlight squares? (Last move & checks)"] - input#setHighlight(type="checkbox" v-model="settings.highlight") - fieldset - label(for="setCoords")= translations["Show board coordinates?"] - input#setCoords(type="checkbox" v-model="settings.coords") - fieldset - label(for="selectColor")= translations["Board colors"] - select#setBcolor(v-model="settings.bcolor") - option(value="lichess") - = translations["brown"] - option(value="chesscom") - = translations["green"] - option(value="chesstempo") - = translations["blue"] - fieldset - label(for="selectSound")= translations["Play sounds?"] - select#setSound(v-model="settings.sound") - option(value="0")= translations["None"] - option(value="1")= translations["New game"] - option(value="2")= translations["All"] - -input#modalContact.modal(type="checkbox") -div(role="dialog" aria-labelledby="contactTitle") - form.card.smallpad - label.modal-close(for="modalContact") - h3#contactTitle.section= translations["Contact form"] - fieldset - label(for="userEmail")= translations["Email"] - input#userEmail(type="email") - fieldset - label(for="mailSubject")= translations["Subject"] - input#mailSubject(type="text") - fieldset - label(for="mailContent")= translations["Content"] - br - textarea#mailContent - fieldset - button(type="button" onClick="trySendMessage()") Send - p#emailSent= translations["Email sent!"] diff --git a/client/client_OLD/views/translations/en.pug b/client/client_OLD/views/translations/en.pug deleted file mode 100644 index 611236c7..00000000 --- a/client/client_OLD/views/translations/en.pug +++ /dev/null @@ -1,97 +0,0 @@ -- - var translations = - { - "Language": "Language", - "Contact form": "Contact form", - "Email": "Email", - "Subject": "Subject", - "Content": "Content", - "Email sent!": "Email sent!", - "Hall": "Hall", - "My games": "My games", - - // Index page: - "Help": "Help", - "First visit?": "First visit?", - ">>> Please read this <<<": ">>> Please read this <<<", - // Variants boxes: - "Both sides of the mirror": "Both sides of the mirror", - "Keep antiking in check": "Keep antiking in check", - "Explosive captures": "Explosive captures", - "Shared pieces": "Shared pieces", - "Standard rules": "Standard rules", - "Captures reborn": "Captures reborn", - "Capture all of a kind": "Capture all of a kind", - "Big board": "Big board", - "Lose all pieces": "Lose all pieces", - "Laws of attraction": "Laws of attraction", - "Exchange pieces positions": "Exchange pieces positions", - "Exotic captures": "Exotic captures", - "Balanced sliders & leapers": "Balanced sliders & leapers", - "Reverse captures": "Reverse captures", - "Pawns move diagonally": "Pawns move diagonally", - "In the shadow": "In the shadow", - "Move twice": "Move twice", - "Board upside down": "Board upside down", - - // Variant page: - "New game": "New game", - "Waiting for opponent...": "Waiting for opponent...", - "Rules": "Rules", - "Play": "Play", - "Problems": "Problems", - "White win": "White win", - "Black win": "Black win", - "Draw": "Draw", - "New live game": "New live game", - "New game versus computer": "New game versus computer", - "Analysis mode": "Analysis mode", - "Start chat": "Start chat", - "Clear current game": "Clear current game", - "Settings": "Settings", - "Resign": "Resign", - "Undo": "Undo", - "Flip board": "Flip board", - "Game state (FEN):": "Game state (FEN):", - "Ok": "Ok", - "Random": "Random", - "Preferences": "Preferences", - "My name is...": "My name is...", - "Show hints?": "Show hints?", - "Board colors": "Board colors", - "brown": "brown", - "green": "green", - "blue": "blue", - "Play sounds?": "Play sounds?", - "None": "None", - "All": "All", - "Chat with ": "Chat with ", - "Type here": "Type here", - "Send": "Send", - "Download PGN": "Download PGN", - "Show solution": "Show solution", - "Load previous problems": "Load previous problems", - "Load next problems": "Load next problems", - "New": "New", - "Add a problem": "Add a problem", - "Full FEN description": "Full FEN description", - "Safe HTML tags allowed": "Safe HTML tags allowed", - "Instructions": "Instructions", - "Describe the problem goal": "Describe the problem goal", - "Solution": "Solution", - "How to solve the problem?": "How to solve the problem?", - "Preview": "Preview", - "Cancel": "Cancel", - "Solve": "Solve", - "Bad FEN description": "Bad FEN description", - "Empty instructions": "Empty instructions", - "Empty solution": "Empty solution", - "Already playing a game in this variant on another tab!": - "Already playing a game in this variant on another tab!", - "Finish your ": "Finish your ", - " game first!": " game first!", - ": unfinished computer game will be erased": - ": unfinished computer game will be erased", - ": current analysis will be erased": - ": current analysis will be erased", - }; diff --git a/client/client_OLD/views/translations/es.pug b/client/client_OLD/views/translations/es.pug deleted file mode 100644 index ce219666..00000000 --- a/client/client_OLD/views/translations/es.pug +++ /dev/null @@ -1,90 +0,0 @@ -- - var translations = - { - "Language": "Idioma", - - // Index page: - "Help": "Ayuda", - "First visit?": "¿ Primera visita ?", - ">>> Please read this <<<": ">>> Por favor lee esto <<<", - // Variants boxes: - "Both sides of the mirror": "Ambos lados del espejo", - "Keep antiking in check": "Mantener el antirey en jaque", - "Explosive captures": "Capturas explosivas", - "Shared pieces": "Piezas compartidas", - "Standard rules": "Reglas estandar", - "Captures reborn": "Las capturas renacen", - "Capture all of a kind": "Capturar todo del mismo tipo", - "Big board": "Gran tablero", - "Lose all pieces": "Perder todas las piezas", - "Laws of attraction": "Las leyes de las atracciones", - "Exchange pieces positions": "Intercambiar las posiciones de las piezas", - "Exotic captures": "Capturas exóticas", - "Balanced sliders & leapers": "Modos de desplazamiento equilibrados", - "Reverse captures": "Capturas invertidas", - "Pawns move diagonally": "Peones se mueven en diagonal", - "In the shadow": "En la sombra", - "Move twice": "Mover dos veces", - "Board upside down": "Tablero al revés", - - // Variant page: - "New game": "Nueva partida", - "Waiting for opponent...": "Esperando a un oponente...", - "Rules": "Reglas", - "Play": "Jugar", - "Problems": "Problemas", - "White win": "Las blancas ganan", - "Black win": "Las negras ganan", - "Draw": "Empate", - "New live game": "Nueva partida en vivo", - "New game versus computer": "Nueva partida contra la computadora", - "Analysis mode": "Modo de análisis", - "Start chat": "Iniciar chat", - "Clear current game": "Borrar la partida actual", - "Settings": "Ajustes", - "Resign": "Abandonar", - "Undo": "Deshacer", - "Flip board": "Girar el tablero", - "Game state (FEN):": "Estado del juego (FEN) :", - "Ok": "Ok", - "Random": "Aleatorio", - "Preferences": "Preferencias", - "My name is...": "Mi nombre es...", - "Show hints?": "Ayudas visuales ?", - "Board colors": "Colores del tablero", - "brown": "marrón", - "green": "verde", - "blue": "azul", - "Play sounds?": "¿ Tocar los sonidos ?", - "None": "No", - "All": "Todos", - "Chat with ": "Hablar con ", - "Type here": "Escribe aqui", - "Send": "Enviar", - "Download PGN": "Descargar el PGN", - "Show solution": "Mostrar la solucion", - "Load previous problems": "Cargar los problemas anteriores", - "Load next problems": "Cargar los siguientes problemas", - "New": "Nuevo", - "Add a problem": "Añadir un problema", - "Full FEN description": "Descripción FEN completa", - "Safe HTML tags allowed": "HTML 'seguro' autorizado", - "Instructions": "Instrucciones", - "Describe the problem goal": "Describe el objetivo del problema", - "Solution": "Solución", - "How to solve the problem?": "¿ Como resolver el problema ?", - "Preview": "Previsualizar", - "Cancel": "Anular", - "Solve": "Resolver", - "Bad FEN string": "Mala descripción FEN", - "Empty instructions": "Instrucciones vacias", - "Empty solution": "Solución vacía", - "Already playing a game in this variant on another tab!": - "¡ Una partida está en progreso en esta variante en otra pestaña !", - "Finish your ": "¡ Termina tu ", - " game first!": " partida primero !", - ": unfinished computer game will be erased": - " : una partida inconclusa contra la computadora será borrado", - ": current analysis will be erased": - " : el análisis actual será borrado", - }; diff --git a/client/client_OLD/views/translations/fr.pug b/client/client_OLD/views/translations/fr.pug deleted file mode 100644 index 3f3b1fe0..00000000 --- a/client/client_OLD/views/translations/fr.pug +++ /dev/null @@ -1,90 +0,0 @@ -- - var translations = - { - "Language": "Langue", - - // Index page: - "Help": "Aide", - "First visit?": "Première visite ?", - ">>> Please read this <<<": ">>> SVP lisez ceci <<<", - // Variants boxes: - "Both sides of the mirror": "Les deux côté du miroir", - "Keep antiking in check": "Gardez l'antiroi en échec", - "Explosive captures": "Captures explosives", - "Shared pieces": "Pièces partagées", - "Standard rules": "Règles usuelles", - "Captures reborn": "Les captures renaissent", - "Capture all of a kind": "Capturez tout d'un même type", - "Big board": "Grand échiquier", - "Lose all pieces": "Perdez toutes les pièces", - "Laws of attraction": "Les lois de l'attraction", - "Exchange pieces positions": "Échangez les positions des pièces", - "Exotic captures": "Captures exotiques", - "Balanced sliders & leapers": "Modes de déplacement équilibrés", - "Reverse captures": "Captures inversées", - "Pawns move diagonally": "Les pions vont en diagonale", - "In the shadow": "Dans l'ombre", - "Move twice": "Jouer deux coups", - "Board upside down": "Échiquier à l'envers", - - // Variant page: - "New game": "Nouvelle partie", - "Waiting for opponent...": "En attente d'un adversaire...", - "Rules": "Règles", - "Play": "Jouer", - "Problems": "Problèmes", - "White win": "Les blancs gagnent", - "Black win": "Les noirs gagnent", - "Draw": "Match nul", - "New live game": "Nouvelle partie en direct", - "New game versus computer": "Nouvelle partie contre l'ordinateur", - "Analysis mode": "Mode analyse", - "Start chat": "Démarrer le chat", - "Clear current game": "Effacer la partie courante", - "Settings": "Réglages", - "Resign": "Abandonner", - "Undo": "Annuler", - "Flip board": "Tourner l'échiquier", - "Game state (FEN):": "État de la partie (FEN) :", - "Ok": "Ok", - "Random": "Aléatoire", - "Preferences": "Préférences", - "My name is...": "Je m'appelle...", - "Show hints?": "Aides visuelles ?", - "Board colors": "Couleurs de l'échiquier", - "brown": "marron", - "green": "vert", - "blue": "bleu", - "Play sounds?": "Jouer les sons ?", - "None": "Aucun", - "All": "Tous", - "Chat with ": "Discuter avec ", - "Type here": "Écrivez ici", - "Send": "Envoyer", - "Download PGN": "Télécharger le PGN", - "Show solution": "Montrer la solution", - "Load previous problems": "Charger les problèmes précédents", - "Load next problems": "Charger les problèmes suivants", - "New": "Nouveau", - "Add a problem": "Ajouter un problème", - "Full FEN description": "Description FEN complète", - "Safe HTML tags allowed": "HTML 'sûr' autorisé", - "Instructions": "Instructions", - "Describe the problem goal": "Décrire le but du problème", - "Solution": "Solution", - "How to solve the problem?": "Comment résoudre le problème ?", - "Preview": "Prévisualiser", - "Cancel": "Annuler", - "Solve": "Résoudre", - "Bad FEN string": "Mauvaise description FEN", - "Empty instructions": "Instructions vides", - "Empty solution": "Solution vide", - "Already playing a game in this variant on another tab!": - "Une partie est en cours sur cette variante dans un autre onglet !", - "Finish your ": "Terminez votre ", - " game first!": " partie d'abord !", - ": unfinished computer game will be erased": - " : une partie inachevée contre l'ordinateur sera effacée", - ": current analysis will be erased": - " : l'analyse en cours sera effacée", - }; diff --git a/client/client_OLD/views/welcome/en.pug b/client/client_OLD/views/welcome/en.pug deleted file mode 100644 index 06a9ca84..00000000 --- a/client/client_OLD/views/welcome/en.pug +++ /dev/null @@ -1,49 +0,0 @@ -input#modalWelcome.modal(type="checkbox") -div(role="dialog") - #welcome.card.text-center - label.modal-close(for="modalWelcome") - h3.blue.section Welcome to v[ariant]chess.club! - .section - p A fun place to play chess variants in real time. - p But wait... what is a chess variant? - img(src="/images/Hexagonal_chess.svg") - p. - As suggested by the picture, a variant setup generally looks - more or less like a chessboard with regular pieces - (otherwise it's no longer a variant but a whole new game). - p.emphasis.purple However... - p Each variant has its own new rules, which can involve - table.list-table - tbody - tr - td * different pieces movements - tr - td * different chessboard(s) - tr - td * new pieces - tr - td * moves side effects - tr - td ...and so on - .section - p. - Example: imagine that a capture is an atomic explosion, wiping all - adjacent squares – except the pawns, which as cockroaches can - resist this kind of event. - p Also state a goal: make the opponent's king explode. - p → Congrats, you defined Atomic chess! (Playable here) - .section - p.emphasis.purple - | OK, this all sounds interesting, but why would that be fun? - p. - Because all games here start with a random setup: no more boring - openings memorization, you have to rely on your chess skills only. - No game is like another one. - - - var wikipediaUrl = "https://en.wikipedia.org/wiki/" + - "List_of_chess_variants#/media/File:Hexagonal_chess.svg"; - p. - For informations about hundreds (if not thousands) of variants, you - can visit the excellent - #[a(href="https://www.chessvariants.com/") chessvariants] website. - p.smallfont Image credit: #[a(href=wikipediaUrl) Wikipedia] diff --git a/client/client_OLD/views/welcome/es.pug b/client/client_OLD/views/welcome/es.pug deleted file mode 100644 index 0c561bc2..00000000 --- a/client/client_OLD/views/welcome/es.pug +++ /dev/null @@ -1,52 +0,0 @@ -input#modalWelcome.modal(type="checkbox") -div(role="dialog") - #welcome.card.text-center - label.modal-close(for="modalWelcome") - h3.blue.section ¡ Bienvenido a v[ariant]chess.club ! - .section - p Un sitio donde jugar variantes del juego de ajedrez en vivo. - p Pero espera... ¿ qué es una "variante" ? - img(src="/images/Hexagonal_chess.svg") - p. - Como lo sugiere la imagen, el punto de inicio de una variante generalmente - se ve como un tablero de ajedrez con las piezas habituales. - (sino ya no es una variante, pero un nuevo juego). - p.emphasis.purple Sin embargo... - p Cada variante tiene sus propias reglas, que pueden definir - table.list-table - tbody - tr - td * diferentes desplazamientos de piezas - tr - td * differentes(s) tablero(s) - tr - td * nuevas piezas - tr - td * efectos de borde en los movimientos - tr - td ...etc - .section - p. - Ejemplo : Imagina que una captura es una explosión atómica que destruye - todo en los 8 hexes cercanos, excepto los peones, que como las cucarachas - se resisten a este tipo de cosas. - p Define también un objetivo : hacer explotar al rey del adversario. - p. - → ¡ Bien hecho, acabas de describir el ajedrez atómico ! - (Se puede jugar aquí) - .section - p.emphasis.purple - | OK, parece interesante, pero ¿ por qué sería divertido ?! - p. - Como todas las partidas comienzan con una posición aleatoria : - ¡ terminadas las laboriosas memorizaciones de aperturas, puedes expresar - tus habilidades de ajedrez desde el primer movimiento ! Ninguna partida - es como otra. - - - var wikipediaUrl = "https://en.wikipedia.org/wiki/" + - "List_of_chess_variants#/media/File:Hexagonal_chess.svg"; - p. - Pour s'informer sur des centaines de variantes (au moins), je vous invite à - visiter l'excellent site - #[a(href="https://www.chessvariants.com/") chessvariants]. - p.smallfont Credito de imagen : #[a(href=wikipediaUrl) Wikipedia] diff --git a/client/client_OLD/views/welcome/fr.pug b/client/client_OLD/views/welcome/fr.pug deleted file mode 100644 index d650a739..00000000 --- a/client/client_OLD/views/welcome/fr.pug +++ /dev/null @@ -1,49 +0,0 @@ -input#modalWelcome.modal(type="checkbox") -div(role="dialog") - #welcome.card.text-center - label.modal-close(for="modalWelcome") - h3.blue.section Bienvenue sur v[ariant]chess.club! - .section - p Un site où jouer à des variantes du jeu d'échecs en direct. - p Mais attendez... c'est quoi une "variante" ? - img(src="/images/Hexagonal_chess.svg") - p. - Comme suggéré par l'image, le point de départ d'une variante - ressemble en général à un échiquier avec les pièces habituelles - (sinon ce n'est plus une variante, mais un nouveau jeu). - p.emphasis.purple Cependant... - p Chaque variante a ses propres règles, qui peuvent définir - table.list-table - tbody - tr - td * différents déplacements de pièces - tr - td * différent(s) échiquier(s) - tr - td * de nouvelles pièces - tr - td * des effets de bord sur les coups - tr - td ...etc - .section - p. - Exemple: imaginez qu'une capture soit une explosion atomique, - détruisant tout ce qui se trouve sur les 8 cases à proximité – - sauf les pions, qui tels les cafards résistent à ce genre de truc. - p Définissez également un but : faire exploser le roi adverse. - p → Bravo, vous venez de décrire les échecs atomiques ! (Jouable ici) - .section - p.emphasis.purple - | OK ça a l'air intéressant, mais pourquoi ce serait amusant ?! - p. - Car toutes les parties démarrent avec une position aléatoire : terminées - les laborieuses mémorisations d'ouverture, vous pouvez exprimer vos talents - échiquéens dès le premier coup ! Aucune partie ne ressemble à une autre. - - - var wikipediaUrl = "https://en.wikipedia.org/wiki/" + - "List_of_chess_variants#/media/File:Hexagonal_chess.svg"; - p. - Pour s'informer sur des centaines de variantes (au moins), je vous invite à - visiter l'excellent site - #[a(href="https://www.chessvariants.com/") chessvariants]. - p.smallfont Crédit image : #[a(href=wikipediaUrl) Wikipedia] diff --git a/client/package-lock.json b/client/package-lock.json index 3a6f0fc1..fe7eae3d 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -8994,6 +8994,35 @@ } } }, + "raw-loader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-1.0.0.tgz", + "integrity": "sha512-Uqy5AqELpytJTRxYT4fhltcKPj0TyaEpzJDcGz7DFJi+pQOOi3GjR/DOdxTkTsF+NzhnldIoG6TORaBlInUuqA==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^1.0.0" + }, + "dependencies": { + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, "read-pkg": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", diff --git a/client/package.json b/client/package.json index a074534e..7f51be97 100644 --- a/client/package.json +++ b/client/package.json @@ -22,6 +22,7 @@ "node-sass": "^4.9.0", "pug": "^2.0.3", "pug-plain-loader": "^1.0.0", + "raw-loader": "^1.0.0", "sass-loader": "^7.0.1", "vue-template-compiler": "^2.5.21" }, diff --git a/server/favicon/SOURCE b/client/public/SOURCE similarity index 60% rename from server/favicon/SOURCE rename to client/public/SOURCE index 7d25d193..5565b455 100644 --- a/server/favicon/SOURCE +++ b/client/public/SOURCE @@ -1,3 +1,2 @@ -Generated using https://realfavicongenerator.net/ , -with an image from here: +Favicon image from here: https://www.freefavicon.com/freefavicons/objects/iconinfo/chess-piece-silhouette---red-king--rey-rojo-152-275290.html diff --git a/client/public/index.html b/client/public/index.html index 0115e9f5..6549d7a7 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -1,11 +1,15 @@ - + vchess - club + +
diff --git a/client/src/App.vue b/client/src/App.vue index 0199db21..1ece7921 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,14 +1,50 @@ + +