Index: gc_lang/fr/webext/content_scripts/panel_lxg.css ================================================================== --- gc_lang/fr/webext/content_scripts/panel_lxg.css +++ gc_lang/fr/webext/content_scripts/panel_lxg.css @@ -10,74 +10,70 @@ margin: 5px 0 10px 0; padding: 10px; background-color: hsla(0, 0%, 96%, 1); border-radius: 2px; } -.grammalecte_lxg_list_of_tokens .num { + +.grammalecte_lxg_list_num { float: right; margin: -12px 0 5px 10px; padding: 5px 10px; font-weight: bold; border-radius: 0 0 4px 4px; background-color: hsl(0, 50%, 50%); color: hsl(0, 10%, 96%); } -.grammalecte_token { - padding: 4px 0; -} -.grammalecte_token .separator { + +.grammalecte_lxg_separator { margin: 20px 0; padding: 5px 5px; background-color: hsla(0, 0%, 75%, 1); color: hsla(0, 0%, 96%, 1); border-radius: 5px; text-align: center; font-size: 20px; } -.grammalecte_token ul { - margin: 0 0 5px 5px; + +.grammalecte_lxg_token_block { + margin: 4px 0; } -.grammalecte_token b { - background-color: hsla(150, 10%, 50%, 1); - color: hsla(0, 0%, 96%, 1); +.grammalecte_lxg_token { + display: inline-block; + background-color: hsl(150, 0%, 50%); + color: hsl(0, 0%, 96%); padding: 2px 5px; border-radius: 2px; text-decoration: none; + font-weight: bold; +} +.grammalecte_lxg_token_colon { + display: inline-block; + padding: 2px 5px; + color: hsl(0, 0%, 50%); +} +.grammalecte_lxg_morph_list { + padding: 2px 0 10px 20px; +} +.grammalecte_lxg_morph_elem { + color: hsl(0, 0%, 0%); } -.grammalecte_token b.WORD { +.grammalecte_lxg_token_WORD { background-color: hsla(150, 50%, 50%, 1); } -.grammalecte_token b.ELPFX { +.grammalecte_lxg_token_ELPFX { background-color: hsla(150, 30%, 50%, 1); } -.grammalecte_token b.UNKNOWN { +.grammalecte_lxg_token_UNKNOWN { background-color: hsla(0, 50%, 50%, 1); } -.grammalecte_token b.NUM { +.grammalecte_lxg_token_NUM { background-color: hsla(180, 50%, 50%, 1); } -.grammalecte_token b.COMPLEX { +.grammalecte_lxg_token_COMPLEX { background-color: hsla(60, 50%, 50%, 1); } -.grammalecte_token b.SEPARATOR { +.grammalecte_lxg_token_SEPARATOR { background-color: hsla(210, 50%, 50%, 1); } -.grammalecte_token b.LINK { +.grammalecte_lxg_token_LINK { background-color: hsla(270, 50%, 50%, 1); } -.grammalecte_token s { - color: hsla(0, 0%, 60%, 1); - text-decoration: none; -} -.grammalecte_token .textline { - text-decoration: bold; -} - -.grammalecte_token p.message { - margin-top: 20px; - padding: 10px 10px; - background-color: hsla(240, 10%, 50%, 1); - font-size: 18px; - color: hsla(240, 0%, 96%, 1); - border-radius: 3px; - text-align: center; -} Index: gc_lang/fr/webext/content_scripts/panel_lxg.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel_lxg.js +++ gc_lang/fr/webext/content_scripts/panel_lxg.js @@ -31,11 +31,11 @@ addListOfTokens (lTokens) { try { if (lTokens) { this._nCount += 1; let xNodeDiv = createNode("div", {className: "grammalecte_lxg_list_of_tokens"}); - xNodeDiv.appendChild(createNode("div", {className: "num", textContent: this._nCount})); + xNodeDiv.appendChild(createNode("div", {className: "grammalecte_lxg_list_num", textContent: this._nCount})); for (let oToken of lTokens) { xNodeDiv.appendChild(this._createTokenNode(oToken)); } this._xContentNode.appendChild(xNodeDiv); } @@ -44,19 +44,19 @@ showError(e); } } _createTokenNode (oToken) { - let xTokenNode = createNode("div", {className: "grammalecte_token"}); - xTokenNode.appendChild(createNode("b", {className: oToken.sType, textContent: oToken.sValue})); - xTokenNode.appendChild(createNode("s", {textContent: " : "})); + let xTokenNode = createNode("div", {className: "grammalecte_lxg_token_block"}); + xTokenNode.appendChild(createNode("div", {className: "grammalecte_lxg_token grammalecte_lxg_token_" + oToken.sType, textContent: oToken.sValue})); + xTokenNode.appendChild(createNode("div", {className: "grammalecte_lxg_token_colon", textContent: ":"})); if (oToken.aLabel.length === 1) { xTokenNode.appendChild(document.createTextNode(oToken.aLabel[0])); } else { - let xTokenList = document.createElement("ul"); + let xTokenList = createNode("div", {className: "grammalecte_lxg_morph_list"}); for (let sLabel of oToken.aLabel) { - xTokenList.appendChild(createNode("li", {textContent: sLabel})); + xTokenList.appendChild(createNode("div", {className: "grammalecte_lxg_morph_elem", textContent: "• " + sLabel})); } xTokenNode.appendChild(xTokenList); } return xTokenNode; }