Skip to content
Snippets Groups Projects
Commit def84689 authored by Petr Kalashnikov's avatar Petr Kalashnikov
Browse files

Move article reference line

parent 36742962
No related branches found
No related tags found
No related merge requests found
<template> <template>
<li :class="['definition', 'level'+level]" :ref="'def' + body.id" :id="'def' + body.id"> <li :class="['definition', 'level'+level]" :ref="'def' + body.id" :id="'def' + body.id">
<ul class="explanations"> <ul class="explanations">
<DefElement :body="explanation" :dictionary="dictionary" v-for="(explanation, index) in explanations" :key="index" @article-click="article_link_click" /> <DefElement :body="explanation" :dictionary="dictionary" :has_article_ref=has_article_ref(explanation) v-for="(explanation, index) in explanations" :key="index" @article-click="article_link_click" />
</ul> </ul>
<div v-if="examples.length"> <div v-if="examples.length">
<h4>{{example_header}}</h4> <h4>{{example_header}}</h4>
...@@ -64,7 +64,16 @@ var Definition = { ...@@ -64,7 +64,16 @@ var Definition = {
methods: { methods: {
article_link_click: function(item) { article_link_click: function(item) {
this.$emit('article-click', item) this.$emit('article-click', item)
} },
has_article_ref: function(item){
if(item.items.length && item.items[0].type_ == "article_ref")
{
return "true";
}
else{
return "false";
}
}
}, },
watch:{ watch:{
$route(to, from) { $route(to, from) {
...@@ -96,4 +105,10 @@ h4 { ...@@ -96,4 +105,10 @@ h4 {
padding-left: 12px; padding-left: 12px;
padding-top: 6px; padding-top: 6px;
} }
li[has_article_ref="true"] {
margin-top: 8px;
margin-left: -25px;
}
</style> </style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment