Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,26 @@
href="https://fonts.googleapis.com/css?family=Lato|Oxanium|Roboto&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles.css">
<title>Webarch - Architects of the Web</title>
<link rel="icon" href="../utils/icons/w3.ico" type="image/ico" />
</head>
<body></body>
<body>
<div class="wrapper">

<nav class="tabs">
<div class="selector"></div>
<a href="#" class="active">Home Page</a>
<a href="#" >About Us</a>
<a href="#"">Logo</a>
<a href="#" >Team</a>
<a href="#">Projects</a>
<a href="#">Clients</a>
<a href="#">Service</a>
<a href="#">Contact Us</a>
</nav>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" charset="utf-8"></script>
<script src="index.js" charset="utf-8"></script>
</body>
</html>
21 changes: 21 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
var tabs = $('.tabs');
var selector = $('.tabs').find('a').length;
//var selector = $(".tabs").find(".selector");
var activeItem = tabs.find('.active');
var activeWidth = activeItem.innerWidth();
$(".selector").css({
"left": activeItem.position.left + "px",
"width": activeWidth + "px"
});

$(".tabs").on("click","a",function(e){
e.preventDefault();
$('.tabs a').removeClass("active");
$(this).addClass('active');
var activeWidth = $(this).innerWidth();
var itemPos = $(this).position();
$(".selector").css({
"left":itemPos.left + "px",
"width": activeWidth + "px"
});
});
76 changes: 76 additions & 0 deletions pages/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@import url('https://fonts.googleapis.com/css?family=Roboto');

body{

background-color: #1b262c;
}

h2{
margin:0;
text-transform: uppercase;
}

h6{
margin:0;
color:#777;
}

.wrapper{
padding-left: 310px;
text-align:center;
margin:10px auto;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
font-family: 'Roboto', sans-serif;
}

.tabs{

font-size:15px;
padding:0;
list-style:none;
background:#dbedf3;
box-shadow:0 5px 20px rgba(0,0,0,0.1);
display:inline-block;
border-radius:50px;
position:relative;
}

.tabs a{
text-decoration:none;
color: #000000;
text-transform:uppercase;
padding:10px 40px;
display:inline-block;
position:relative;
z-index:1;
transition-duration:0.6s;
}

.tabs .active{
color:#fff;
}

.tabs a i{
margin-right:5px;
}

.tabs .selector{
height:100%;
display:inline-block;
position:absolute;
left:0;
top:0;
z-index:1;
border-radius:50px;
transition-duration:0.6s;
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);

background: #05abe0;
background: -moz-linear-gradient(45deg, #05abe0 0%, #8200f4 100%);
background: -webkit-linear-gradient(45deg, #05abe0 0%,#8200f4 100%);
background: linear-gradient(45deg, #05abe0 0%,#8200f4 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05abe0', endColorstr='#8200f4',GradientType=1 );
}