Skip to content
Snippets Groups Projects
Article.vue 1.41 KiB
Newer Older
Ole Voldsæter's avatar
Ole Voldsæter committed
<template>
Ole Voldsæter's avatar
Ole Voldsæter committed
  <div class="article" v-show="article.lemmas.length">
    <Header :lemmas="article.lemmas" />
Ole Voldsæter's avatar
Ole Voldsæter committed
    <div class="" v-if="article.pronounciation.length">
      <h3>Uttale</h3>
        <ul>
          <DefElement v-for="(element, index) in article.pronounciation" :key="index" :body='element' v-if="element.content" />
        </ul>
    </div>
Ole Voldsæter's avatar
Ole Voldsæter committed
    <div class="" v-if="article.etymology">
Ole Voldsæter's avatar
Ole Voldsæter committed
      <h3>Etymologi</h3>
        <ul>
          <DefElement v-for="(element, index) in article.etymology" :key="index" :body='element' v-if="element.content" />
Ole Voldsæter's avatar
Ole Voldsæter committed
        </ul>
    </div>
    <div class="">
      <h3>Definisjoner</h3>
      <ol>
        <Definition v-for="(definition, index) in article.definitions" :key="index" :body='definition' />
      </ol>
Ole Voldsæter's avatar
Ole Voldsæter committed
    </div>
Ole Voldsæter's avatar
Ole Voldsæter committed
  </div>
</template>

<script>
import axios from "axios";
Ole Voldsæter's avatar
Ole Voldsæter committed
import DefElement from './DefElement.vue'
import Definition from './Definition.vue'
import Header from './Header.vue'
Ole Voldsæter's avatar
Ole Voldsæter committed
export default {
  name: 'Article',
  props: {
    article: Object
Ole Voldsæter's avatar
Ole Voldsæter committed
  components: {
    Definition,
    Header
Ole Voldsæter's avatar
Ole Voldsæter committed
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
.article {
  margin-top: 30px;
}

Ole Voldsæter's avatar
Ole Voldsæter committed
h3 {
  margin: 40px 0 0;
}
Ole Voldsæter's avatar
Ole Voldsæter committed
a {
  //color: #42b983;
}

ol > li {
  padding-bottom: 2em;
}

ul {
  padding-top: 8px;
}

ul li {
list-style:none;
}

li ul .definition ul {
Ole Voldsæter's avatar
Ole Voldsæter committed
  padding-left: 6px;
}

ul li.definition {
  list-style: disc;
Ole Voldsæter's avatar
Ole Voldsæter committed
}
</style>