summaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-04-17 18:20:39 -0700
committerAlex Yatskov <alex@foosoft.net>2016-04-17 18:20:39 -0700
commit6f45cc287112030387f33169c762ee9448c0c65c (patch)
tree6c6effd9305e14569b5222c6a58f00724c6029fc /ext/fg
parentf079db0471424a873f22315c7911571d467e97ad (diff)
Splitting out header and footer templates
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/footer.html21
-rw-r--r--ext/fg/header.html21
-rw-r--r--ext/fg/js/client.js2
3 files changed, 43 insertions, 1 deletions
diff --git a/ext/fg/footer.html b/ext/fg/footer.html
new file mode 100644
index 00000000..3f37d8bd
--- /dev/null
+++ b/ext/fg/footer.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title></title>
+ <link rel="stylesheet" href="{{root}}/css/popup.css">
+ </head>
+ <body>
+ <div class="dictionary">
+ <a href="javascript:setActiveDict('edict');">単</a><a href="javascript:setActiveDict('enamdict')">名</a><a href="javascript:setActiveDict('kanjidic');">漢</a>
+ </div>
+
+ {{#each defs}}
+ <div class="definition">
+ {{> term.html}}
+ </div>
+ {{/each}}
+
+ <script src="{{root}}/js/popup.js"></script>
+ </body>
+</html>
diff --git a/ext/fg/header.html b/ext/fg/header.html
new file mode 100644
index 00000000..3f37d8bd
--- /dev/null
+++ b/ext/fg/header.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title></title>
+ <link rel="stylesheet" href="{{root}}/css/popup.css">
+ </head>
+ <body>
+ <div class="dictionary">
+ <a href="javascript:setActiveDict('edict');">単</a><a href="javascript:setActiveDict('enamdict')">名</a><a href="javascript:setActiveDict('kanjidic');">漢</a>
+ </div>
+
+ {{#each defs}}
+ <div class="definition">
+ {{> term.html}}
+ </div>
+ {{/each}}
+
+ <script src="{{root}}/js/popup.js"></script>
+ </body>
+</html>
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js
index 4df19594..aae051fa 100644
--- a/ext/fg/js/client.js
+++ b/ext/fg/js/client.js
@@ -119,7 +119,7 @@ class Client {
this.hidePopup();
} else {
const params = {defs: results, root: chrome.extension.getURL('fg'), activeDict: this.activeDict};
- renderText(params, 'defs.html', (html) => this.showPopup(range, html, popupQuery, length));
+ renderText(params, 'term-list.html', (html) => this.showPopup(range, html, popupQuery, length));
}
});
}