HTML
xxxxxxxxxx
1
<template>
2
<!--Main Navigation-->
3
<header>
4
<!-- Animated navbar-->
5
<MDBNavbar container expand="lg" position="top" scroll>
6
<MDBNavbarToggler
7
v-on:click="collapse = !collapse"
8
target="#navbarExample"
9
></MDBNavbarToggler>
10
<MDBCollapse v-model="collapse" id="navbarExample">
11
<MDBNavbarNav class="me-auto mb-2 mb-lg-0">
12
<MDBNavbarItem to="#intro" active>
13
Home
14
</MDBNavbarItem>
15
<MDBNavbarItem
16
href="https://www.youtube.com/channel/UC5CF7mLQZhvx8O5GODZAhdA"
17
newTab
18
rel="nofollow"
19
>
20
Learn Bootstrap 5
21
</MDBNavbarItem>
22
<MDBNavbarItem
23
href="https://mdbootstrap.com/docs/standard/"
24
newTab
25
rel="nofollow"
26
>
27
Download MDB UI KIT
28
</MDBNavbarItem>
29
</MDBNavbarNav>
30
<ul class="navbar-nav flex-row">
31
<!-- Icons -->
32
<MDBNavbarItem
33
href="https://www.youtube.com/channel/"
34
newTab
35
rel="nofollow"
36
class="pe-2"
37
>
38
<MDBIcon iconStyle="fab" icon="youtube" />
39
</MDBNavbarItem>
40
<MDBNavbarItem
41
href="https://www.facebook.com/mdbootstrap"
42
newTab
43
rel="nofollow"
44
class="px-2"
45
>
46
<MDBIcon iconStyle="fab" icon="facebook-f" />
47
</MDBNavbarItem>
48
<MDBNavbarItem
49
href="https://twitter.com/MDBootstrap"
50
newTab
51
rel="nofollow"
52
class="px-2"
53
>
54
<MDBIcon iconStyle="fab" icon="twitter" />
55
</MDBNavbarItem>
56
<MDBNavbarItem
57
href="https://github.com/mdbootstrap/mdb-ui-kit"
58
newTab
59
rel="nofollow"
60
class="ps-2"
61
>
62
<MDBIcon iconStyle="fab" icon="github" />
63
</MDBNavbarItem>
64
</ul>
65
</MDBCollapse>
66
</MDBNavbar>
67
<!-- Animated navbar -->
68
<!-- Background image -->
69
<div
70
id="intro"
71
class="bg-image"
72
style="
73
background-image: url(https://mdbcdn.b-cdn.net/img/new/fluid/city/113.webp);
74
height: 100vh;
75
"
76
>
77
<div class="mask text-white" style="background-color: rgba(0, 0, 0, 0.8)">
78
<MDBContainer class="d-flex align-items-center text-center h-100">
79
<div>
80
<h1 class="mb-5">This is title</h1>
81
<p>
82
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Officiis
83
molestiae laboriosam numquam expedita ullam saepe ipsam, deserunt
84
provident corporis, sit non accusamus maxime, magni nulla quasi
85
iste ipsa architecto? Autem!
86
</p>
87
</div>
88
</MDBContainer>
89
</div>
90
</div>
91
<!-- Background image -->
92
</header>
93
<!--Main Navigation-->
94
<MDBContainer class="my-5">
95
<p>
96
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Nobis quam
97
minima perspiciatis eos tenetur. Praesentium dolores at quos aperiam sed,
98
sint provident consectetur incidunt, nostrum porro earum commodi, ex
99
architecto.
100
</p>
101
</MDBContainer>
102
<!--Main Navigation-->
103
</template>
SCSS
xxxxxxxxxx
1
<style>
2
#app {
3
font-family: Roboto, Helvetica, Arial, sans-serif;
4
}
5
</style>
JS
xxxxxxxxxx
1
<script>
2
import {
3
MDBNavbar,
4
MDBNavbarItem,
5
MDBNavbarNav,
6
MDBNavbarToggler,
7
MDBCollapse,
8
MDBIcon,
9
MDBContainer
10
} from "mdb-vue-ui-kit";
11
import { ref } from "vue";
12
export default {
13
components: {
14
MDBNavbar,
15
MDBNavbarItem,
16
MDBNavbarNav,
17
MDBNavbarToggler,
18
MDBCollapse,
19
MDBIcon,
20
MDBContainer
21
},
22
setup() {
23
const collapse = ref(false);
24
return {
25
collapse
26
};
27
}
28
};
29
</script>
Console errors: 0