Merge pull request #593 from tiwariav/bugfix/dcl_cms_plugins

Bugfix/ dcl cms plugins
This commit is contained in:
Arvind Tiwari 2018-03-22 02:52:08 +05:30 committed by GitHub
commit 7654cf55aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 9 deletions

View file

@ -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;

View file

@ -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) {
var path = $(this).prop('href').split('#');
var currentPath = window.location.origin + window.location.pathname;
if (!path[1]) {
window.location = href; 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();

View file

@ -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">