aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/display-templates.html
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-24 19:06:29 -0500
committerGitHub <noreply@github.com>2020-11-24 19:06:29 -0500
commit02d9f7c736b55e22631c7ad29fa60df729a0f05b (patch)
treea3d13c29d01c5c6596e1590b7f196eae3cd1f18d /ext/mixed/display-templates.html
parent0b00de3c0f0cab64529f18a477120ab9362581fc (diff)
Improve html templates (#1061)
* Add template pre-processing * Remove whitespace * Add labels * Reuse tag template for search tags * Add space
Diffstat (limited to 'ext/mixed/display-templates.html')
-rw-r--r--ext/mixed/display-templates.html22
1 files changed, 15 insertions, 7 deletions
diff --git a/ext/mixed/display-templates.html b/ext/mixed/display-templates.html
index 7416b223..3b8d97a2 100644
--- a/ext/mixed/display-templates.html
+++ b/ext/mixed/display-templates.html
@@ -1,6 +1,7 @@
<!DOCTYPE html><html><head></head><body>
-<template id="term-entry-template"><div class="entry" data-type="term">
+<!-- Term entry templates -->
+<template id="term-entry-template" data-remove-whitespace-text="true"><div class="entry" data-type="term">
<div class="entry-current-indicator" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)"></div>
<div class="entry-header1">
<div class="entry-header2">
@@ -23,17 +24,23 @@
</div>
<div class="debug-info"><a class="debug-log-link">Log debug info to console</a></div>
</div></template>
-<template id="term-expression-template"><div class="term-expression"><span class="term-expression-text source-text"></span><div class="term-expression-details">
- <button class="action-button action-play-audio" data-icon="play-audio" title="Play audio"></button>
- <div class="tags tag-list"></div>
- <div class="frequencies tag-list"></div>
-</div></div></template>
+<template id="term-expression-template" data-remove-whitespace-text="true"><div class="term-expression">
+ <div class="term-expression-text-container">
+ <span class="term-expression-text source-text"></span>
+ </div>
+ <div class="term-expression-details">
+ <button class="action-button action-play-audio" data-icon="play-audio" title="Play audio"></button>
+ <div class="tags tag-list"></div>
+ <div class="frequencies tag-list"></div>
+ </div>
+</div></template>
<template id="term-definition-item-template"><li class="term-definition-item"><div class="term-definition-tag-list tag-list"></div><div class="term-definition-disambiguation-list"></div><ul class="term-glossary-list"></ul></li></template>
<template id="term-definition-disambiguation-template"><span class="term-definition-disambiguation"></span></template>
<template id="term-glossary-item-template"><li class="term-glossary-item"><span class="term-glossary-separator"> </span><span class="term-glossary"></span></li></template>
<template id="term-glossary-item-image-template"><li class="term-glossary-item" data-has-image="true"><span class="term-glossary-separator"> </span><span class="term-glossary"><a class="term-glossary-image-link" target="_blank" rel="noreferrer noopener"><span class="term-glossary-image-container"><span class="term-glossary-image-aspect-ratio-sizer"></span><img class="term-glossary-image" alt="" /><span class="term-glossary-image-container-overlay"></span></span><span class="term-glossary-image-link-text">Image</span></a> <span class="term-glossary-image-description"></span></span></li></template>
<template id="term-reason-template"><span class="term-reason"></span><span class="term-reason-separator"> </span></template>
+<!-- Pitch accent templates -->
<template id="term-pitch-accent-static-template"><svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<defs>
<g id="term-pitch-accent-graph-dot"><circle cx="0" cy="0" r="15" /></g>
@@ -46,6 +53,7 @@
<template id="term-pitch-accent-template"><li class="term-pitch-accent"><span class="term-pitch-accent-tag-list tag-list"></span><span class="term-pitch-accent-disambiguation-list"></span><span class="term-pitch-accent-characters"></span><span class="term-pitch-accent-position"></span><span class="term-pitch-accent-details"><svg class="term-pitch-accent-graph" xmlns="http://www.w3.org/2000/svg"><path class="term-pitch-accent-graph-line" /><path class="term-pitch-accent-graph-line-tail" /></svg></span></li></template>
<template id="term-pitch-accent-character-template"><span class="term-pitch-accent-character"><span class="term-pitch-accent-character-inner"></span></span></template>
+<!-- Kanji entry templates -->
<template id="kanji-entry-template"><div class="entry" data-type="kanji">
<div class="entry-current-indicator" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)"></div>
<div class="entry-header1">
@@ -87,8 +95,8 @@
<template id="kanji-glossary-item-template"><li class="kanji-glossary-item"><span class="kanji-glossary"></span></li></template>
<template id="kanji-reading-template"><dd class="kanji-reading"></dd></template>
+<!-- Tag templates -->
<template id="tag-template"><span class="tag"><span class="tag-inner"></span></span></template>
<template id="tag-frequency-template"><span class="tag" data-category="frequency"><span class="tag-inner"><span class="term-frequency-disambiguation"><span class="term-frequency-disambiguation-expression"></span><span class="term-frequency-disambiguation-separator"></span><span class="term-frequency-disambiguation-reading"></span></span><span class="term-frequency-dictionary-name"></span><span class="term-frequency-separator"></span><span class="term-frequency-value"></span></span></span></template>
-<template id="tag-search-template"><span class="tag" data-category="search"></span></template>
</body></html>