Skip to content

Commit 08a1877

Browse files
committed
initial commit
1 parent 151ac0a commit 08a1877

File tree

4 files changed

+522
-9
lines changed

4 files changed

+522
-9
lines changed

assets/images/logo.png

18.5 KB
Loading

assets/js/main.js

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
// JavaScript Document
2+
3+
$(document).ready(function() {
4+
"use strict";
5+
6+
var window_width = $(window).width(),
7+
window_height = window.innerHeight,
8+
header_height = $(".default-header").height(),
9+
header_height_static = $(".site-header.static").outerHeight(),
10+
fitscreen = window_height - header_height;
11+
12+
$(".fullscreen").css("height", window_height)
13+
$(".fitscreen").css("height", fitscreen);
14+
15+
if (document.getElementById("default-select")) {
16+
$('select').niceSelect();
17+
};
18+
if (document.getElementById("service-select")) {
19+
$('select').niceSelect();
20+
};
21+
22+
$('.img-gal').magnificPopup({
23+
type: 'image',
24+
gallery: {
25+
enabled: true
26+
}
27+
});
28+
29+
$('.img-pop-up').magnificPopup({
30+
type: 'image',
31+
gallery: {
32+
enabled: true
33+
}
34+
});
35+
36+
$('.play-btn').magnificPopup({
37+
type: 'iframe',
38+
mainClass: 'mfp-fade',
39+
removalDelay: 160,
40+
preloader: false,
41+
fixedContentPos: false
42+
});
43+
44+
45+
46+
// Initiate superfish on nav menu
47+
$('.nav-menu').superfish({
48+
animation: {
49+
opacity: 'show'
50+
},
51+
speed: 400
52+
});
53+
54+
// Mobile Navigation
55+
if ($('#nav-menu-container').length) {
56+
var $mobile_nav = $('#nav-menu-container').clone().prop({
57+
id: 'mobile-nav'
58+
});
59+
$mobile_nav.find('> ul').attr({
60+
'class': '',
61+
'id': ''
62+
});
63+
$('body').append($mobile_nav);
64+
$('body').prepend('<button type="button" id="mobile-nav-toggle"><i class="lnr lnr-menu"></i></button>');
65+
$('body').append('<div id="mobile-body-overly"></div>');
66+
$('#mobile-nav').find('.menu-has-children').prepend('<i class="lnr lnr-chevron-down"></i>');
67+
68+
$(document).on('click', '.menu-has-children i', function(e) {
69+
$(this).next().toggleClass('menu-item-active');
70+
$(this).nextAll('ul').eq(0).slideToggle();
71+
$(this).toggleClass("lnr-chevron-up lnr-chevron-down");
72+
});
73+
74+
$(document).on('click', '#mobile-nav-toggle', function(e) {
75+
$('body').toggleClass('mobile-nav-active');
76+
$('#mobile-nav-toggle i').toggleClass('lnr-cross lnr-menu');
77+
$('#mobile-body-overly').toggle();
78+
});
79+
80+
$(document).click(function(e) {
81+
var container = $("#mobile-nav, #mobile-nav-toggle");
82+
if (!container.is(e.target) && container.has(e.target).length === 0) {
83+
if ($('body').hasClass('mobile-nav-active')) {
84+
$('body').removeClass('mobile-nav-active');
85+
$('#mobile-nav-toggle i').toggleClass('lnr-cross lnr-menu');
86+
$('#mobile-body-overly').fadeOut();
87+
}
88+
}
89+
});
90+
} else if ($("#mobile-nav, #mobile-nav-toggle").length) {
91+
$("#mobile-nav, #mobile-nav-toggle").hide();
92+
}
93+
94+
// Smooth scroll for the menu and links with .scrollto classes
95+
$('.nav-menu a, #mobile-nav a, .scrollto').on('click', function() {
96+
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
97+
var target = $(this.hash);
98+
if (target.length) {
99+
var top_space = 0;
100+
101+
if ($('#header').length) {
102+
top_space = $('#header').outerHeight();
103+
104+
if (!$('#header').hasClass('header-fixed')) {
105+
top_space = top_space;
106+
}
107+
}
108+
109+
$('html, body').animate({
110+
scrollTop: target.offset().top - top_space
111+
}, 1500, 'easeInOutExpo');
112+
113+
if ($(this).parents('.nav-menu').length) {
114+
$('.nav-menu .menu-active').removeClass('menu-active');
115+
$(this).closest('li').addClass('menu-active');
116+
}
117+
118+
if ($('body').hasClass('mobile-nav-active')) {
119+
$('body').removeClass('mobile-nav-active');
120+
$('#mobile-nav-toggle i').toggleClass('lnr-times lnr-bars');
121+
$('#mobile-body-overly').fadeOut();
122+
}
123+
return false;
124+
}
125+
}
126+
});

index.html

+32-8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,29 @@
1212
</head>
1313

1414
<body class="aluminum">
15+
<div class="container-fluid main-menu madla sticky-top">
16+
<div class="row align-items-center justify-content-between d-flex">
17+
<div id="logo">
18+
<a href="index.html"><img class="logo-img" src="./assets/images/logo.png" alt="my logo"></a>
19+
</div>
20+
<nav id="nav-menu-container">
21+
<ul class="nav-menu">
22+
<li class="menu-active"><a href="index.html">Home</a></li>
23+
<li><a href="about.html">About Me</a></li>
24+
<li><a href="resume.html">Resume</a></li>
25+
<li><a href="portfolio.html">Portfolio</a></li>
26+
<li class="menu-has-children"><a href="">Blog</a>
27+
<ul>
28+
<li><a href="blog-home.html">Blog Home</a></li>
29+
<li><a href="blog-single.html">Latest Post</a></li>
30+
</ul>
31+
</li>
32+
<li><a href="contact.html">Contact</a></li>
33+
</ul>
34+
</nav>
35+
</div>
36+
</div>
37+
1538
<div class="container-fluid">
1639
<div class="row">
1740
<div class="card col-md-4 align-self-stretch" style="margin-left: 2em !important;">
@@ -128,14 +151,15 @@ <h6 class="text-madla"><i class="fa fa-calendar fa-fw margin-right"></i>Nov 2018
128151
</div>
129152

130153
<footer class="container-fluid madla center margin-top">
131-
<p>Find me on social media.</p>
132-
<i class="fa fa-facebook-official w3-hover-opacity"></i>
133-
<i class="fa fa-instagram w3-hover-opacity"></i>
134-
<i class="fa fa-snapchat w3-hover-opacity"></i>
135-
<i class="fa fa-pinterest-p w3-hover-opacity"></i>
136-
<i class="fa fa-twitter w3-hover-opacity"></i>
137-
<i class="fa fa-linkedin w3-hover-opacity"></i>
138-
<p>Powered by <a href="https://www.w3schools.com/w3css/default.asp" target="_blank">w3.css</a></p>
154+
<p>Find me on social media:</p>
155+
<a class="text-white" href="https://facebook.com" target="_blank"><i class="fa fa-facebook-official hover-opacity"></i></a>
156+
<a class="text-white" href="https://instagram.com" target="_blank"><i class="fa fa-instagram hover-opacity"></i></a>
157+
<a class="text-white" href="https://twitter.com" target="_blank"><i class="fa fa-twitter hover-opacity"></i></a>
158+
<a class="text-white" href="https://linkedin.com" target="_blank"><i class="fa fa-linkedin hover-opacity"></i></a>
159+
<p><i class="fa fa-copyright text-white"></i> 2020, Leonard Box</p>
139160
</footer>
161+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
162+
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
163+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
140164
</body>
141165
</html>

0 commit comments

Comments
 (0)