Skip to content

Commit fa17b50

Browse files
authoredJul 9, 2023
Merge pull request #6 from Bappy4u/feature/AV-5-design-navbar
Navbar has been designed
2 parents 2a0ad62 + ad788f4 commit fa17b50

File tree

2 files changed

+44
-7
lines changed

2 files changed

+44
-7
lines changed
 

‎src/App.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ export default {
1414
</script>
1515

1616
<style>
17+
body {
18+
margin: 0;
19+
}
1720
#app {
1821
font-family: Avenir, Helvetica, Arial, sans-serif;
1922
-webkit-font-smoothing: antialiased;
2023
-moz-osx-font-smoothing: grayscale;
2124
text-align: center;
2225
color: #2c3e50;
23-
margin-top: 60px;
26+
2427
}
2528
</style>

‎src/components/menu.vue

+40-6
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,55 @@
3939

4040
<style>
4141
.top-menu {
42-
background-color: #f0f0f0;
42+
background-color: #333;
43+
44+
display: flex;
45+
align-items: center;
46+
4347
}
4448
4549
nav ul {
4650
list-style-type: none;
51+
margin: 0 20px;
4752
padding: 0;
48-
margin: 0;
53+
display: flex;
54+
height: 100%;
55+
max-width: 90vw;
4956
}
5057
5158
nav ul li {
52-
display: inline-block;
53-
padding: 10px;
59+
margin-right: 10px;
60+
opacity: 0;
61+
transform: translateY(-20px);
62+
animation: slideIn 0.5s forwards;
63+
animation-delay: calc(var(--index) * 0.1s);
64+
height: 100%;
65+
}
66+
67+
nav ul li a {
68+
color: #fff;
69+
text-decoration: none;
70+
padding: 15px;
71+
transition: color 0.3s, background-color 0.3s;
72+
height: 100%;
73+
display: flex;
74+
align-items: center;
75+
}
76+
77+
nav ul li a:hover {
78+
color: #ffcc00;
79+
background-color: #444;
80+
}
81+
82+
nav ul li.active a {
83+
color: #ffcc00;
84+
background-color: #444;
5485
}
5586
56-
nav ul li.active {
57-
background-color: #ccc;
87+
@keyframes slideIn {
88+
to {
89+
opacity: 1;
90+
transform: translateY(0);
91+
}
5892
}
5993
</style>

0 commit comments

Comments
 (0)