From aa288d524b94cda8bc15db9c40ea4e3dbd0c68db Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 15 Apr 2016 22:33:13 -0700 Subject: [PATCH] Styling --- ext/bg/js/templates.js | 21 ++++++++++++++++----- ext/fg/css/popup.css | 20 ++++++++++++++++++-- util/tmpl/term.html | 11 +++++++---- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index dfe52cd5..a8889fb7 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -34,14 +34,25 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial + container.escapeExpression(((helper = (helper = helpers.expression || (depth0 != null ? depth0.expression : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"expression","hash":{},"data":data}) : helper))) + "\n"; },"5":function(container,depth0,helpers,partials,data) { - var helper; + var stack1; - return container.escapeExpression(((helper = (helper = helpers.rules || (depth0 != null ? depth0.rules : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"rules","hash":{},"data":data}) : helper))) + return "
\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.rules : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
\n"; +},"6":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + container.escapeExpression(container.lambda(depth0, depth0)) + + "\n " + + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : {},(data && data.last),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "\n"; },"7":function(container,depth0,helpers,partials,data) { - return "
  • " + return " « "; +},"9":function(container,depth0,helpers,partials,data) { + return "
  • " + container.escapeExpression(container.lambda(depth0, depth0)) - + "
  • \n"; + + "\n"; },"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { var stack1, alias1=depth0 != null ? depth0 : {}; @@ -49,7 +60,7 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial + "\n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.rules : depth0),{"name":"if","hash":{},"fn":container.program(5, 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(7, 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(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
    \n
    \n"; },"useData":true}); })(); \ No newline at end of file diff --git a/ext/fg/css/popup.css b/ext/fg/css/popup.css index 3eba23ee..55daa25a 100644 --- a/ext/fg/css/popup.css +++ b/ext/fg/css/popup.css @@ -17,15 +17,31 @@ */ body { - font-family: sans-serif; - font-size: 12pt; + background-color: #fff; + color: #000; + font-family: sans-serif; + font-size: 12pt; } .expression { font-family: serif; font-size: 18pt; + display: inline-block; +} + +.rules { + color: #777; + display: inline-block; } .glossary { font-size: 12pt; } + +li { + color: #777; +} + +li span { + color: #000; +} diff --git a/util/tmpl/term.html b/util/tmpl/term.html index bd414f26..62183e31 100644 --- a/util/tmpl/term.html +++ b/util/tmpl/term.html @@ -4,16 +4,19 @@
    {{expression}}
    {{/if}} +{{#if rules}}
    - {{#if rules}} - {{rules}} - {{/if}} + {{#each rules}} + {{.}} + {{#unless @last}} « {{/unless}} + {{/each}}
    +{{/if}}
      {{#each glossary}} -
    1. {{.}}
    2. +
    3. {{.}}
    4. {{/each}}