add back to top for independent column
parent
97d1fafe18
commit
34b0ef1a6d
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
<div class="footer">
|
||||
<div class="container">
|
||||
<p>
|
||||
<a href="#top" class="button is-primary is-small">{{ $t('templates.footer.backToTop') }}</a>
|
||||
<button type="button" class="button is-primary is-small" @click="handleScrollToTop">{{ $t('templates.footer.backToTop') }}</button>
|
||||
</p>
|
||||
<p>
|
||||
{{ $t('templates.footer.thisToolIs') }}
|
||||
|
@ -68,5 +68,14 @@ THE SOFTWARE.
|
|||
components: {
|
||||
ExternalLink,
|
||||
},
|
||||
methods: {
|
||||
handleScrollToTop: () => {
|
||||
window.scrollTo({top: 0});
|
||||
|
||||
const columns = document.querySelectorAll('.column-scroll-y');
|
||||
|
||||
columns.forEach(column => column.scrollTo({top: 0}));
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue