diff --git a/creuille.js b/creuille.js
index c03d462..2819fdc 100644
--- a/creuille.js
+++ b/creuille.js
@@ -42,6 +42,29 @@ function sansAccents(mot) {
.replace("ü", "u");
}
+function htmlifier(mot, langue){
+ var res = '' + mot[langue] + '';
+ if (langue == "francais") {
+ if ("genre" in mot){
+ var genre = 'N' + mot["genre"].toUpperCase();
+ res += ' ' + genre + '';
+ }
+ if ("classe" in mot){
+ var classe = "";
+ if (mot["classe"] == "groupe nominal") {
+ classe = "GN";
+ }
+ if (mot["classe"] == "proposition") {
+ classe = "Prop";
+ }
+ if (classe != ""){
+ res += ' ' + classe + '';
+ }
+ }
+ }
+ return res;
+}
+
function construitListe(traductions) {
var langue = $( "#mots" ).attr("data-langue");
@@ -84,8 +107,6 @@ function construitListe(traductions) {
);
}
- var langueSource = langue;
- var langueDestination = reciproque[langue];
$( "#mots" )
.children()
.last()
@@ -94,13 +115,9 @@ function construitListe(traductions) {
.attr("class", "definition")
.html(
'· '
- + ''
- + mot[langueSource]
- + ''
+ + htmlifier(mot, langue)
+ ' : '
- + ''
- + mot[langueDestination]
- + ''
+ + htmlifier(mot, reciproque[langue])
)
);
}
diff --git a/feuille_de_style.css b/feuille_de_style.css
index e3f8866..426a619 100644
--- a/feuille_de_style.css
+++ b/feuille_de_style.css
@@ -56,6 +56,16 @@ h3
color: #905050;
}
+.genre
+{
+ display: None;
+}
+
+.classe
+{
+ display: None;
+}
+
#intro
{
font-size: larger;