From 59989cd78c60b4c8d089b3bed070b11eb62622b6 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 24 Apr 2016 16:18:47 -0700 Subject: File management --- ext/bg/js/templates.js | 8 +++-- ext/fg/css/frame.css | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ ext/fg/css/popup.css | 86 -------------------------------------------------- ext/fg/js/frame.js | 19 +++++++++++ ext/manifest.json | 2 +- 5 files changed, 112 insertions(+), 89 deletions(-) create mode 100644 ext/fg/css/frame.css delete mode 100644 ext/fg/css/popup.css create mode 100644 ext/fg/js/frame.js (limited to 'ext') diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index 6c424225..f6c6025a 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -1,14 +1,18 @@ (function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['footer.html'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return " \n\n"; + var helper; + + return " \n \n\n"; },"useData":true}); templates['header.html'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { var helper; return "\n\n \n \n \n \n \n \n"; + + "/css/frame.css\">\n \n \n"; },"useData":true}); templates['kanji.html'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; diff --git a/ext/fg/css/frame.css b/ext/fg/css/frame.css new file mode 100644 index 00000000..893f4e4a --- /dev/null +++ b/ext/fg/css/frame.css @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2016 Alex Yatskov + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; +} + +.term { + font-family: serif; + font-size: 24px; + display: inline-block; +} + +.term a { + border-bottom: 1px #777 dashed; + color: #333; + text-decoration: none; +} + +.rules { + color: #777; + display: inline-block; +} + +.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; +} + +.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; +} + +li { + color: #777; +} + +li span { + color: #000; +} diff --git a/ext/fg/css/popup.css b/ext/fg/css/popup.css deleted file mode 100644 index 893f4e4a..00000000 --- a/ext/fg/css/popup.css +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2016 Alex Yatskov - * 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -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; -} - -.term { - font-family: serif; - font-size: 24px; - display: inline-block; -} - -.term a { - border-bottom: 1px #777 dashed; - color: #333; - text-decoration: none; -} - -.rules { - color: #777; - display: inline-block; -} - -.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; -} - -.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; -} - -li { - color: #777; -} - -li span { - color: #000; -} diff --git a/ext/fg/js/frame.js b/ext/fg/js/frame.js new file mode 100644 index 00000000..868f07ce --- /dev/null +++ b/ext/fg/js/frame.js @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2016 Alex Yatskov + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + diff --git a/ext/manifest.json b/ext/manifest.json index b454fd97..e766c140 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -20,7 +20,7 @@ "background": {"page": "bg/background.html"}, "options_page": "bg/options.html", "permissions": ["storage"], - "web_accessible_resources": ["fg/css/popup.css"], + "web_accessible_resources": ["fg/css/frame.css", "fg/css/frame.js"], "content_scripts": [{ "matches": ["*://*/*"], -- cgit v1.2.3