From 775804b58d453d50d982d8f8af77f720c2d61ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Volds=C3=A6ter?= <ole.voldsater@uib.no> Date: Wed, 11 Mar 2020 10:24:59 +0100 Subject: [PATCH] =?UTF-8?q?fixes=20meta#60=20st=C3=B8tte=20for=20elementer?= =?UTF-8?q?=20av=20type=20quote=5Finset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DefElement.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/DefElement.vue b/src/components/DefElement.vue index cd11441..3483ee7 100644 --- a/src/components/DefElement.vue +++ b/src/components/DefElement.vue @@ -2,13 +2,12 @@ <li :is="tag" :class="body.type_"><!-- --><span :is="item.tag || 'span'" v-for="(item, index) in assemble_text" :class="item.type" - :key="index"><!-- + :key="index" + v-bind="item.props"><!-- -->{{item.html}}<!-- --><router-link v-if="item.type == 'article_ref'" :to="item.ref" @click.native="article_link_click(item)"><!-- --><span class="homograph" :key="index">{{item.lemmas[0].hgno ? String.fromCharCode(0x215f + item.lemmas[0].hgno) + ' ' : ''}}</span>{{item.lemmas[0].lemma}} {{item.definition_order ? ` (${item.definition_order})` : ''}}<!-- --></router-link><!-- - --><sup v-if="item.type == 'subscript'">{{item.text}}</sup><!-- - --><sup v-if="item.type == 'superscript'">{{item.text}}</sup><!-- --></span></li> </template> @@ -42,6 +41,7 @@ export default { else if (item.type_ == 'pronunciation') return {type: item.type_, html: item.string} else if (item.type_ == 'superscript') return {type: item.type_, html: item.text, tag: 'sup'} else if (item.type_ == 'subscript') return {type: item.type_, html: item.text, 'tag': 'sub'} + else if (item.type_ == 'quote_inset') return {type: item.type_, body: item, html: '', tag: 'DefElement', props: {body: item, tag: 'i'}} else if (item.id) return {type: item.type_, html: entities[item.id] || languages[item.id] || item.id} else return {type: item.type_ || 'plain', html: item} } @@ -83,6 +83,11 @@ span.language { font-weight: bold; } +i { + font-style: normal; + font-family: monospace; +} + .homograph { vertical-align: sub; } -- GitLab