Skip to content

Commit

Permalink
admin sidebar modified
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsin-riad committed Apr 20, 2021
1 parent a705c6d commit 5996511
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 127 deletions.
4 changes: 0 additions & 4 deletions vuejs-project4/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.slim.min.js">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script> -->
<title>vuejs-project4</title>
</head>
<body>
Expand Down
90 changes: 83 additions & 7 deletions vuejs-project4/src/components/Admin/sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,62 @@
<li class="header">Navigation</li>
<li>
<router-link to="/admin/dashboard">
<i class="fa fa-home" aria-hidden="true"></i> Homepage
<i class="fa fa-home" aria-hidden="true"></i> Dashboard
</router-link>
</li>
<li>
<router-link to="/admin/dashboard">
<i class="fa fa-tachometer" aria-hidden="true"></i> Dashboard
</router-link>
<a href="javascript:void(0);" class="" @click="subToggle1">
<i class="fa fa-tachometer" aria-hidden="true"></i> Creation
</a>
<ul class="sidebar-sub-nav" v-bind:style="{display: show1}">
<li>
<router-link to="/admin/">
<i class="fa fa-home" aria-hidden="true"></i> Course
</router-link>
</li>
<li>
<router-link to="/admin/">
<i class="fa fa-home" aria-hidden="true"></i> Teacher
</router-link>
</li>
<li>
<router-link to="/admin/">
<i class="fa fa-home" aria-hidden="true"></i> Student
</router-link>
</li>
<li>
<router-link to="/admin/">
<i class="fa fa-home" aria-hidden="true"></i> Section
</router-link>
</li>
<li>
<router-link to="/admin/">
<i class="fa fa-home" aria-hidden="true"></i> Session
</router-link>
</li>
</ul>
</li>
<li>
<a href="javascript:void(0);" class="" @click="subToggle2">
<i class="fa fa-tachometer" aria-hidden="true"></i> Manage
</a>
<ul class="sidebar-sub-nav" v-bind:style="{display: show2}">
<li>
<router-link to="/admin/">
<i class="fa fa-home" aria-hidden="true"></i> Session
</router-link>
</li>
<li>
<router-link to="/admin/">
<i class="fa fa-home" aria-hidden="true"></i> Enrollment Status
</router-link>
</li>
<li>
<router-link to="/admin/">
<i class="fa fa-home" aria-hidden="true"></i> Student Enrollment
</router-link>
</li>
</ul>
</li>
<li class="header">Another Menu</li>
<li>
Expand Down Expand Up @@ -50,14 +99,29 @@
export default {
data() {
return {
user: null
user: null,
show1: 'none',
show2: 'none',
fg: true
}
},
methods: {
handleClick() {
localStorage.removeItem('token');
localStorage.removeItem('role');
this.$router.push('/');
},
subToggle1() {
if(this.fg) this.show1 = 'block';
else this.show1 = 'none';
this.fg ^= 1;
console.log(this.fg);
},
subToggle2() {
if(this.fg) this.show2 = 'block';
else this.show2 = 'none';
this.fg ^= 1;
console.log(this.fg);
}
},
async created() {
Expand Down Expand Up @@ -86,10 +150,10 @@ export default {
.sidebar-logo {
padding: 10px 15px 10px 30px;
font-size: 20px;
background-color: #ac7500;
background-color: #553a00;
}
.sidebar-navigation li::before {
background-color: #c39642;
background-color: #3f2a03;
position: absolute;
content: '';
height: 100%;
Expand All @@ -100,4 +164,16 @@ export default {
width: 3px;
z-index: -1;
}
.sidebar-sub-nav li::before {
background-color: #251601;
position: absolute;
content: '';
height: 95%;
left: 1%;
top: 0;
-webkit-transition: width 0.2s ease-in;
transition: width 0.2s ease-in;
width: 3px;
z-index: -1;
}
</style>
113 changes: 0 additions & 113 deletions vuejs-project4/src/components/HelloWorld.vue

This file was deleted.

2 changes: 1 addition & 1 deletion vuejs-project4/src/components/Teacher/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
body {
background: #9012e4;
background: linear-gradient(to right, #690369, #e724dd);
background: linear-gradient(to right, #31024d, #9113c3);
}
.card-signin {
Expand Down
4 changes: 2 additions & 2 deletions vuejs-project4/src/components/Teacher/Information.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export default {
}
body {
background: #bb771e;
background: linear-gradient(to right, #815103, #e7a324);
background: #9012e4;
background: linear-gradient(to right, #31024d, #9113c3);
}
.card-signin {
Expand Down

0 comments on commit 5996511

Please sign in to comment.