From acb0bc2e9e9c7be173366f4c05f477bfdaaf8a01 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 3 Mar 2017 20:25:14 -0800 Subject: style fixes --- ext/bg/js/templates.js | 42 ++++++------ ext/fg/css/client.css | 19 +++--- ext/fg/css/frame.css | 174 +++++++++++++++++-------------------------------- ext/fg/frame.html | 29 +++++---- tmpl/kanji.html | 22 +++---- tmpl/terms.html | 24 +++---- 6 files changed, 130 insertions(+), 180 deletions(-) diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index 5fb894c1..ed6d3dd8 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -284,19 +284,19 @@ templates['fields.html'] = template({"1":function(container,depth0,helpers,parti templates['kanji.html'] = template({"1":function(container,depth0,helpers,partials,data) { var stack1, helper, alias1=depth0 != null ? depth0 : {}; - return "
\n
\n" + return "

\n

\n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.addable : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
\n\n
" + + "
\n\n
" + container.escapeExpression(((helper = (helper = helpers.character || (depth0 != null ? depth0.character : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"character","hash":{},"data":data}) : helper))) - + "
\n\n
\n \n \n \n \n \n
Kunyomi:\n" + + "\n\n
\n \n \n \n \n \n \n \n \n \n
Kunyomi:\n" + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.kunyomi : depth0),{"name":"each","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
Onyomi:\n" + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.onyomi : depth0),{"name":"each","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
\n
\n\n
\n" + + "
\n
\n\n
\n" + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.tags : depth0),{"name":"each","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
\n\n
\n" + + "
\n\n
\n" + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.glossary : depth0)) != null ? stack1["1"] : stack1),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : "") - + "
\n
\n"; + + "
\n

\n"; },"2":function(container,depth0,helpers,partials,data) { var helper; @@ -315,7 +315,7 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia },"7":function(container,depth0,helpers,partials,data) { var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - return " \n" + return "
    \n" + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
\n"; },"10":function(container,depth0,helpers,partials,data) { var stack1, helper, options, buffer = - "
  • "; + "
  • "; stack1 = ((helper = (helper = helpers.multiLine || (depth0 != null ? depth0.multiLine : depth0)) != null ? helper : helpers.helperMissing),(options={"name":"multiLine","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},options) : helper)); if (!helpers.multiLine) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } @@ -339,7 +339,7 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia return container.escapeExpression(container.lambda(depth0, depth0)); },"13":function(container,depth0,helpers,partials,data) { var stack1, helper, options, buffer = - "
    "; + "
    "; stack1 = ((helper = (helper = helpers.multiLine || (depth0 != null ? depth0.multiLine : depth0)) != null ? helper : helpers.helperMissing),(options={"name":"multiLine","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},options) : helper)); if (!helpers.multiLine) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } @@ -402,13 +402,13 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia },"2":function(container,depth0,helpers,partials,data) { var stack1; - return "
    \n" + return "
    \n" + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.tags : depth0),{"name":"each","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
    \n"; },"3":function(container,depth0,helpers,partials,data) { var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - return " \n" + return "
      \n" + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.glossary : 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, helper, options, buffer = - "
  • "; + "
  • "; stack1 = ((helper = (helper = helpers.multiLine || (depth0 != null ? depth0.multiLine : depth0)) != null ? helper : helpers.helperMissing),(options={"name":"multiLine","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},options) : helper)); if (!helpers.multiLine) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } @@ -432,7 +432,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia return container.escapeExpression(container.lambda(depth0, depth0)); },"9":function(container,depth0,helpers,partials,data) { var stack1, helper, options, buffer = - "
    "; + "
    "; stack1 = ((helper = (helper = helpers.multiLine || (depth0 != null ? depth0.multiLine : depth0)) != null ? helper : helpers.helperMissing),(options={"name":"multiLine","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},options) : helper)); if (!helpers.multiLine) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } @@ -444,16 +444,16 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia },"12":function(container,depth0,helpers,partials,data) { var stack1, alias1=depth0 != null ? depth0 : {}; - return "
    \n
    \n" + return "

    \n

    \n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.addable : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.playback : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
    \n\n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.reading : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.program(20, data, 0),"data":data})) != null ? stack1 : "") + "\n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.reasons : depth0),{"name":"if","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n
    \n" + + "\n
    \n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.grouped : depth0),{"name":"if","hash":{},"fn":container.program(26, data, 0),"inverse":container.program(32, data, 0),"data":data})) != null ? stack1 : "") - + "
    \n
    \n"; + + "
    \n

    \n"; },"13":function(container,depth0,helpers,partials,data) { var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; @@ -470,7 +470,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia + "\">\n"; },"17":function(container,depth0,helpers,partials,data) { var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", buffer = - "
    "; + "
    "; stack1 = ((helper = (helper = helpers.kanjiLinks || (depth0 != null ? depth0.kanjiLinks : depth0)) != null ? helper : alias2),(options={"name":"kanjiLinks","hash":{},"fn":container.program(18, data, 0),"inverse":container.noop,"data":data}),(typeof helper === alias3 ? helper.call(alias1,options) : helper)); if (!helpers.kanjiLinks) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } @@ -483,7 +483,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia return 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))); },"20":function(container,depth0,helpers,partials,data) { var stack1, helper, options, buffer = - "
    "; + "
    "; stack1 = ((helper = (helper = helpers.kanjiLinks || (depth0 != null ? depth0.kanjiLinks : depth0)) != null ? helper : helpers.helperMissing),(options={"name":"kanjiLinks","hash":{},"fn":container.program(18, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},options) : helper)); if (!helpers.kanjiLinks) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } @@ -491,7 +491,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia },"22":function(container,depth0,helpers,partials,data) { var stack1; - return "
    \n" + return "
    \n" + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.reasons : depth0),{"name":"each","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
    \n"; },"23":function(container,depth0,helpers,partials,data) { diff --git a/ext/fg/css/client.css b/ext/fg/css/client.css index 29871daf..5289392a 100644 --- a/ext/fg/css/client.css +++ b/ext/fg/css/client.css @@ -16,15 +16,16 @@ * along with this program. If not, see . */ + iframe#yomichan-popup { - all: initial; + all: initial; background-color: #fff; - border: 1px solid #999; - box-shadow: 0 0 10px rgba(0, 0, 0, .5); - height: 250px; - position: fixed; - resize: both; - visibility: hidden; - width: 400px; - z-index: 2147483647; + border: 1px solid #999; + box-shadow: 0 0 10px rgba(0, 0, 0, .5); + height: 250px; + position: fixed; + resize: both; + visibility: hidden; + width: 400px; + z-index: 2147483647; } diff --git a/ext/fg/css/frame.css b/ext/fg/css/frame.css index 27aaadb6..9697ba2e 100644 --- a/ext/fg/css/frame.css +++ b/ext/fg/css/frame.css @@ -3,7 +3,7 @@ * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by + * it under the entrys of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * @@ -16,41 +16,47 @@ * along with this program. If not, see . */ -/* common styles */ + +/* + * Fonts + */ @font-face { font-family: kanji-stroke-orders; - src: url('../ttf/kanji-stroke-orders.ttf'); + src: url('../ttf/kanji-stroke-orders.ttf'); } + @font-face { font-family: vl-gothic-regular; - src: url('../ttf/vl-gothic-regular.ttf'); + src: url('../ttf/vl-gothic-regular.ttf'); } -body { - background-color: #fff; - color: #333; - font-family: helvetica neue, helvetica, arial, sans-serif; - font-size: 14px; - line-height: 1.42857143; - overflow-y: auto; - padding: 5px; + +/* + * General + */ + +hr { + margin-top: 0.8em; + margin-bottom: 0.8em; } -.tag { - border-radius: 0.25em; - color: #fff; - cursor: default; - display: inline; - font-size: 75%; - font-weight: 700; - line-height: 1; - padding: 0.2em 0.6em 0.3em; - text-align: center; - vertical-align: baseline; - white-space: nowrap; +.spinner { + bottom: 5px; + display: none; + position: fixed; + right: 5px; +} + +#orphan { + display: none; } + +/* + * Entries + */ + .tag-default { background-color: #8a8a91; } @@ -79,126 +85,64 @@ body { background-color: #aa66cc; } -.action-bar { - float: right; -} - -.action-bar:after { - clear: both; - content: ''; - display: block; -} - -.action-bar .disabled { +.actions .disabled { pointer-events: none; - cursor: default; + cursor: default; } -.action-bar .disabled img { +.actions .disabled img { -webkit-filter: grayscale(100%); - opacity: 0.25; + opacity: 0.25; } -.action-bar .pending { +.actions .pending { visibility: hidden; } -.spinner { - bottom: 5px; - display: none; - position: fixed; - right: 5px; -} - -hr { - background-color: #fff; - border: none; - border-top: 1px dotted #ccc; - margin-top: 0.8em; - margin-bottom: 0.8em; - height: 1px; +.actions { + display: inline-block; + float: right; } -#orphan { - display: none; +.actions:after { + clear: both; + content: ''; + display: block; } -/* term styles */ - -.term-expression { - display: inline-block; +.expression { + display: inline-block; font-family: vl-gothic-regular; - font-size: 24px; + font-size: 24px; } -.term-expression a { - border-bottom: 1px #777 dashed; - color: #333; +.expression a { + border-bottom: 1px #777 dashed; + color: #333; text-decoration: none; } -.term-reasons { - color: #777; +.reasons { + color: #777; display: inline-block; } -.term-glossary ol, .term-glossary ul { +.glossary ol, .glossary ul { padding-left: 1.4em; } -.term-glossary li { +.glossary li { color: #777; } -.term-glossary-group { - margin-top: 0.4em; - margin-bottom: 0.4em; -} - -.term-glossary-item { - color: #000; - font-family: vl-gothic-regular; -} - -/* kanji styles */ - -.kanji-glyph { - font-family: kanji-stroke-orders; - font-size: 120px; - line-height: 120px; - padding: 0.01em; - vertical-align: top; -} - -.kanji-reading table { - padding: 0.3em, 0.3em; +.glossary-item { + color: #000; } -.kanji-reading th { - color: #777; - font-weight: bold; - text-align: right; +.glyph { + font-family: kanji-stroke-orders; + font-size: 120px; + line-height: 120px; + padding: 0.01em; vertical-align: top; } - -.kanji-reading td { - font-family: vl-gothic-regular; -} - -.kanji-glossary ol { - padding-left: 1.4em; -} - -.kanji-glossary li { - color: #777; -} - -.kanji-glossary-group { - padding-bottom: 0.7em; - padding-top: 0.7em; -} - -.kanji-glossary-item { - color: #000; - font-family: vl-gothic-regular; -} diff --git a/ext/fg/frame.html b/ext/fg/frame.html index bf7f0f7b..14fd63c1 100644 --- a/ext/fg/frame.html +++ b/ext/fg/frame.html @@ -3,22 +3,27 @@ + + -
    - -
    +
    +
    + +
    -
    -
    -

    Yomichan Updated!

    -

    The Yomichan extension has been updated to a new version! In order to continue viewing definitions on this page you must reload this tab or restart your browser.

    -
    +
    - - - - +
    +

    Yomichan Updated!

    +

    The Yomichan extension has been updated to a new version! In order to continue viewing definitions on this page you must reload this tab or restart your browser.

    +
    + + + + + +
    diff --git a/tmpl/kanji.html b/tmpl/kanji.html index 3f6d8084..43c57aed 100644 --- a/tmpl/kanji.html +++ b/tmpl/kanji.html @@ -1,14 +1,14 @@ {{#*inline "kanji"}} -
    -
    +

    +

    {{#if addable}} {{/if}}
    -
    {{character}}
    +
    {{character}}
    -
    +
    @@ -29,24 +29,24 @@
    Kunyomi:
    -
    +
    {{#each tags}} - {{name}} + {{name}} {{/each}}
    -
    +
    {{#if glossary.[1]}} -
      +
        {{#each glossary}} -
      1. {{#multiLine}}{{.}}{{/multiLine}}
      2. +
      3. {{#multiLine}}{{.}}{{/multiLine}}
      4. {{/each}}
      {{else}} -
      {{#multiLine}}{{glossary.[0]}}{{/multiLine}}
      +
      {{#multiLine}}{{glossary.[0]}}{{/multiLine}}
      {{/if}}
    -
    +

    {{/inline}} {{#if definitions}} diff --git a/tmpl/terms.html b/tmpl/terms.html index aae365c7..036aa465 100644 --- a/tmpl/terms.html +++ b/tmpl/terms.html @@ -1,25 +1,25 @@ {{#*inline "definition"}} {{#if tags}} -
    +
    {{#each tags}} - {{name}} + {{name}} {{/each}}
    {{/if}} {{#if glossary.[1]}} -
      +
        {{#each glossary}} -
      • {{#multiLine}}{{.}}{{/multiLine}}
      • +
      • {{#multiLine}}{{.}}{{/multiLine}}
      • {{/each}}
      {{else}} -
      {{#multiLine}}{{glossary.[0]}}{{/multiLine}}
      +
      {{#multiLine}}{{glossary.[0]}}{{/multiLine}}
      {{/if}} {{/inline}} {{#*inline "term"}} -
      -
      +

      +

      {{#if addable}} @@ -30,20 +30,20 @@
      {{#if reading}} -
      {{#kanjiLinks}}{{expression}}{{/kanjiLinks}}{{reading}}
      +
      {{#kanjiLinks}}{{expression}}{{/kanjiLinks}}{{reading}}
      {{else}} -
      {{#kanjiLinks}}{{expression}}{{/kanjiLinks}}
      +
      {{#kanjiLinks}}{{expression}}{{/kanjiLinks}}
      {{/if}} {{#if reasons}} -
      +
      {{#each reasons}} {{.}} {{#unless @last}}«{{/unless}} {{/each}}
      {{/if}} -
      +
      {{#if grouped}} {{#if definitions.[1]}}
        @@ -58,7 +58,7 @@ {{> definition}} {{/if}}
      -
      +

      {{/inline}} {{#if definitions}} -- cgit v1.2.3