[web-src] Move option "up" button out from IndexButtonList component

This commit is contained in:
chme 2020-10-06 17:15:02 +02:00
parent ee4ec0c9eb
commit 1384aef891
2 changed files with 16 additions and 5 deletions

View File

@ -1,11 +1,8 @@
<template>
<section>
<nav class="buttons is-centered fd-is-square" style="margin-bottom: 48px;" v-if="filtered_index.length > 1">
<nav class="buttons is-centered fd-is-square" style="margin-bottom: 16px;">
<a v-for="char in filtered_index" :key="char" class="button is-small" @click="nav(char)">{{ char }}</a>
</nav>
<nav class="buttons is-centered" style="margin-bottom: 6px;" v-if="filtered_index.length > 1">
<a class="button is-small is-white" @click="scroll_to_top"><span class="icon is-small"><i class="mdi mdi-chevron-up"></i></span></a>
</nav>
</section>
</template>

View File

@ -3,7 +3,12 @@
<div class="container">
<div class="columns is-centered">
<div class="column is-four-fifths">
<slot name="options"></slot>
<section v-if="$slots['options']">
<slot name="options"></slot>
<nav class="buttons is-centered" style="margin-bottom: 6px; margin-top: 16px;">
<a class="button is-small is-white" @click="scroll_to_top"><span class="icon is-small"><i class="mdi mdi-chevron-up"></i></span></a>
</nav>
</section>
<nav class="level" id="top">
<!-- Left side -->
<div class="level-left">
@ -30,6 +35,15 @@
</template>
<script>
export default {
name: 'ContentWithHeading',
methods: {
scroll_to_top: function () {
window.scrollTo({ top: 0, behavior: 'smooth' })
}
}
}
</script>
<style>