Merge pull request #593 from tiwariav/bugfix/dcl_cms_plugins
Bugfix/ dcl cms plugins
This commit is contained in:
commit
7654cf55aa
3 changed files with 27 additions and 9 deletions
|
@ -117,6 +117,12 @@ textarea {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.topnav .nav .open>a,
|
||||||
|
.topnav .nav .open>a:focus,
|
||||||
|
.topnav .nav .open>a:hover {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar .dcl-link {
|
.navbar .dcl-link {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
|
|
@ -104,21 +104,33 @@
|
||||||
});
|
});
|
||||||
$('.url').click(function(event) {
|
$('.url').click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var href = $(this).attr('href');
|
var $this = $(this);
|
||||||
|
var href = $this.attr('href');
|
||||||
$('.navbar-collapse').removeClass('in');
|
$('.navbar-collapse').removeClass('in');
|
||||||
$('.navbar-collapse').addClass('collapsing');
|
$('.navbar-collapse').addClass('collapsing');
|
||||||
if (href[0] === "#") {
|
if (href[0] === "#") {
|
||||||
if ($(href).length) {
|
scrollToElement(href);
|
||||||
$('html, body').animate({
|
|
||||||
scrollTop: $(href).offset().top - 50
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
} else if (href) {
|
} else if (href) {
|
||||||
window.location = href;
|
var path = $(this).prop('href').split('#');
|
||||||
|
var currentPath = window.location.origin + window.location.pathname;
|
||||||
|
if (!path[1]) {
|
||||||
|
window.location = href;
|
||||||
|
} else if (currentPath == path[0]) {
|
||||||
|
scrollToElement('#' + path[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function scrollToElement(el) {
|
||||||
|
var $el = $(el);
|
||||||
|
if ($el.length) {
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: $el.offset().top - 50
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function verifiedUrl() {
|
function verifiedUrl() {
|
||||||
if (window.location.href.indexOf('#success') > -1) {
|
if (window.location.href.indexOf('#success') > -1) {
|
||||||
form_success();
|
form_success();
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
{% if instance.contact_text %}
|
{% if instance.heading%}
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h2>{{ instance.contact_text }}</h2>
|
<h2>{{ instance.heading}}</h2>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="contact-details">
|
<div class="contact-details">
|
||||||
|
|
Loading…
Reference in a new issue