sticky nav better position

This commit is contained in:
Mathieu Jaumotte 2021-05-21 23:45:48 +02:00
parent ad6519fb87
commit bb677152c9
2 changed files with 18 additions and 5 deletions

View File

@ -11,6 +11,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
span.badge { span.badge {
font-size: 100%;
margin-bottom: 5px;
margin-right: 1em; margin-right: 1em;
} }
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<teleport to="#content_conainter"> <teleport to="#content_conainter .container.content .container">
<div class="sticky-section"> <div class="sticky-section" id="navmap">
<nav> <nav>
<a href="#top"> <a href="#top">
<i class="fa fa-fw fa-square-o"></i> <i class="fa fa-fw fa-square-o"></i>
@ -44,11 +44,22 @@
</template> </template>
<script> <script>
const stickyNav = document.querySelector('#navmap');
export default { export default {
name: "StickyNav", name: "StickyNav",
computed: { computed: {
accompanyingCourse() { accompanyingCourse() {
return this.$store.state.accompanyingCourse return this.$store.state.accompanyingCourse
},
},
mounted() {
this.bing();
},
methods: {
bing() {
console.log('coucou');
} }
} }
} }
@ -56,9 +67,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
div.sticky-section { div.sticky-section {
position: fixed; position: absolute;
top: 250px; top: 33px;
left: 25px; left: -10%;
nav { nav {
font-size: small; font-size: small;
a { a {