added navbar active
This commit is contained in:
parent
e148a8f38f
commit
0e5ec512e9
4 changed files with 60 additions and 19 deletions
|
@ -49,10 +49,15 @@
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
.custom-alert-t{
|
.custom-alert-t{
|
||||||
position: fixed;
|
position:fixed;
|
||||||
top: -700px;
|
top: 0px;
|
||||||
right: 20px;
|
left: 0px;
|
||||||
width: 320px;
|
width: 100%;
|
||||||
|
z-index:9999;
|
||||||
|
border-radius:0px
|
||||||
|
}
|
||||||
|
#dashboard-menu .nav-link.active{
|
||||||
|
background-color: #77B0AA;
|
||||||
}
|
}
|
||||||
@media (max-width:992px) {
|
@media (max-width:992px) {
|
||||||
#dashboard-menu{
|
#dashboard-menu{
|
||||||
|
|
|
@ -14,4 +14,19 @@
|
||||||
|
|
||||||
document.body.append(element);
|
document.body.append(element);
|
||||||
}
|
}
|
||||||
|
//navbar-active(admin)
|
||||||
|
function setActive(){
|
||||||
|
let navbar = document.getElementById('dashboard-menu');
|
||||||
|
let a_tag = navbar.getElementsByTagName('a');
|
||||||
|
|
||||||
|
for(i=0; i < a_tag.length; i++){
|
||||||
|
let file = a_tag[i].href.split('/').pop();
|
||||||
|
let file_name = file.split('.')[0];
|
||||||
|
|
||||||
|
if(document.location.href.indexOf(file_name) >= 0){
|
||||||
|
a_tag[i].classList.add('active')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setActive();
|
||||||
</script>
|
</script>
|
|
@ -16,20 +16,20 @@
|
||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse flex-column align-items-stretch" id="adminDropdown">
|
<div class="collapse navbar-collapse flex-column align-items-stretch" id="adminDropdown">
|
||||||
<ul class="nav nav-pills flex-column">
|
<ul class="nav nav-pills flex-column">
|
||||||
<li class="nav-item">
|
<li class="nav-item" id="dashboard">
|
||||||
<a class="nav-link text-white" href="dashboard.php">Dashboard</a>
|
<a class="nav-link text-white" href="dashboard.php">Dashboard</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item" id="rooms">
|
||||||
<a class="nav-link text-white" href="#">Rooms</a>
|
<a class="nav-link text-white" href="rooms.php">Rooms</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item" id="user_query">
|
||||||
<a class="nav-link text-white" href="#">Users</a>
|
<a class="nav-link text-white" href="user_query.php">User Query</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item" id="settings">
|
||||||
<a class="nav-link text-white" href="settings.php">Settings</a>
|
<a class="nav-link text-white" href="settings.php">Settings</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -122,7 +122,11 @@
|
||||||
.accordion:has(.active) .arrow{
|
.accordion:has(.active) .arrow{
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
.custom-alert{
|
||||||
|
position: fixed;
|
||||||
|
top: 25px;
|
||||||
|
right: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width:980px) {
|
@media (max-width:980px) {
|
||||||
.contact-container{
|
.contact-container{
|
||||||
|
@ -367,17 +371,34 @@
|
||||||
<div class="panel" data-color="pink" style="min-height: 100%;">
|
<div class="panel" data-color="pink" style="min-height: 100%;">
|
||||||
<h1 class="contact-form-title">Contact Form</h1>
|
<h1 class="contact-form-title">Contact Form</h1>
|
||||||
<p style="text-align: center; margin-left: 20px; margin-right: 20px;">Can't find the contact and information you're looking for? Write to us via this quick form.</p>
|
<p style="text-align: center; margin-left: 20px; margin-right: 20px;">Can't find the contact and information you're looking for? Write to us via this quick form.</p>
|
||||||
<div class="contact-form-container">
|
<div class="contact-form-container shadow">
|
||||||
<form>
|
<form method="POST">
|
||||||
<input type="text" id="name" placeholder="Your Name">
|
<input type="text" name="name" placeholder="Your Name" required>
|
||||||
<input type="email" placeholder="Email" size="30" required></label>
|
<input type="email" name="email" placeholder="Email" size="30" required></label>
|
||||||
<input type="text" id="subject" placeholder="Subject">
|
<input type="text" name="subject" placeholder="Subject" required>
|
||||||
<textarea id="message" placeholder="Message" style="height:200px" required></textarea>
|
<textarea name="message" placeholder="Message" style="height:200px" required></textarea>
|
||||||
<input type="submit" value="Send">
|
<div class="d-flex justify-content-center items-center" >
|
||||||
|
<button type="submit" name="send" class="btn-main">Send</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if(isset($_POST['send'])){
|
||||||
|
$frm_data = filteration($_POST);
|
||||||
|
$q = "INSERT INTO `user_query`(`name`, `email`, `subject`, `message`) VALUES (?, ?, ?, ?)";
|
||||||
|
$values = [$frm_data['name'], $frm_data['email'], $frm_data['subject'], $frm_data['message']];
|
||||||
|
$res = insert($q, $values, 'ssss');
|
||||||
|
|
||||||
|
if($res ==1){
|
||||||
|
alert('success', 'Your message is sent.');
|
||||||
|
} else{
|
||||||
|
alert('error', 'Fail to send your message.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<!--footer-->
|
<!--footer-->
|
||||||
<?php require('./components/footer.php'); ?>
|
<?php require('./components/footer.php'); ?>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue