diff --git a/src/components/Header.vue b/src/components/Header.vue index a53601ceb63ded85012a6b5b0c4df9ecd2e11c42..d1716c4045e05eb1974a112121072a43f0f6c28e 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -3,8 +3,9 @@ <div> <h1 class="article_header" v-for="(lemma, index) in lemmas" :key="index"> {{lemma.lemma}}{{index+1 < lemmas.length ? ',' : ''}} </h1> + {{group_list}} <details title="Klikk for å se bøyninger" @toggle="toggle()"> - <summary>{{group_list}}</summary> + <summary>{{dictionary == 'bob' ? 'Bøyning' : 'Bøying'}}</summary> <div class="inflection"> <div v-for="(lemma, index) in inflection_groups_by_lemma" :key="index"> <h4>{{lemma.lemma}}</h4> @@ -119,14 +120,45 @@ h1 { font-variant-caps: all-small-caps; } +details { + margin-top: 10px; +} + +details[open] summary:after { + content: "▼"; +} + details > summary { - padding: 2px 6px; - width: 15em; - border: none; - cursor: help; + position: relative; + max-width: 90px; list-style: none; - text-decoration: underline; - text-decoration-style: dashed; + border: solid 2px #BC477B; + border-radius: 4px; + padding: 3px; + color: #BC477B; + cursor: pointer; +} + +details > summary:after { + content: "▶"; + font-weight: bold; + position: absolute; + right: 0; + top: 1px; + margin-right: 3px; +} + +@keyframes open { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +details[open] summary ~ * { + animation: open 0.3s ease-in-out; } .inflection table {