From 24957748918403a387fbae47f593001ce361891a Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Mon, 18 Apr 2016 19:59:56 -0700 Subject: Better tag rendering --- ext/bg/js/templates.js | 17 +++++++++++++---- ext/fg/css/popup.css | 17 ++++++++++++++++- 2 files changed, 29 insertions(+), 5 deletions(-) (limited to 'ext') diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index 1609cc97..ae7c4a0d 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -77,14 +77,23 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.tags : depth0),{"name":"each","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "\n"; },"11":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - return " " + alias4(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + "\n"; -},"13":function(container,depth0,helpers,partials,data) { +},"12":function(container,depth0,helpers,partials,data) { + var helper; + + return "tag-" + + container.escapeExpression(((helper = (helper = helpers["class"] || (depth0 != null ? depth0["class"] : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"class","hash":{},"data":data}) : helper))); +},"14":function(container,depth0,helpers,partials,data) { + return "tag-default"; +},"16":function(container,depth0,helpers,partials,data) { return "
  • " + container.escapeExpression(container.lambda(depth0, depth0)) + "
  • \n"; @@ -97,7 +106,7 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial + "\n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.tags : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "\n
    \n
      \n" - + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
    \n
    \n"; },"useData":true}); templates['term-list.html'] = template({"1":function(container,depth0,helpers,partials,data) { diff --git a/ext/fg/css/popup.css b/ext/fg/css/popup.css index 1c40bdfd..b10c06f2 100644 --- a/ext/fg/css/popup.css +++ b/ext/fg/css/popup.css @@ -43,7 +43,6 @@ body { } .tag { - background-color: #777; border-radius: 0.25em; color: #fff; cursor: default; @@ -57,6 +56,22 @@ body { white-space: nowrap; } +.tag-default { + background-color: #8a8a91; +} + +.tag-name { + background-color: #5cb85c; +} + +.tag-expression { + background-color: #f0ad4e; +} + +.tag-popular { + background-color: #0275d8; +} + ol { padding-left: 1.2em; } -- cgit v1.2.3