Skip to content
Snippets Groups Projects
Commit daab3b9c authored by jan.bednarik's avatar jan.bednarik
Browse files

donate: CSS update

parent c9f9183e
No related branches found
No related tags found
No related merge requests found
@font-face {
font-family: 'icomoon';
src: url('../../icons/icomoon.eot?qfo5nx');
src: url('../../icons/icomoon.eot?qfo5nx#iefix') format('embedded-opentype'),
url('../../icons/icomoon.ttf?qfo5nx') format('truetype'),
url('../../icons/icomoon.woff?qfo5nx') format('woff'),
url('../../icons/icomoon.svg?qfo5nx#icomoon') format('svg');
src: url('../../icons/icomoon.eot?692jc3');
src: url('../../icons/icomoon.eot?692jc3#iefix') format('embedded-opentype'),
url('../../icons/icomoon.ttf?692jc3') format('truetype'),
url('../../icons/icomoon.woff?692jc3') format('woff'),
url('../../icons/icomoon.svg?692jc3#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
......@@ -28,24 +28,6 @@ i {
.icon-heart:before {
content: "\f004";
}
.icon-linkedin:before {
content: "\f08c";
}
.icon-twitter:before {
content: "\f099";
}
.icon-youtube:before {
content: "\f167";
}
.icon-instagram:before {
content: "\f16d";
}
.icon-flickr:before {
content: "\f16e";
}
.icon-facebook-f:before {
content: "\f39e";
}
.icon-check:before {
content: "\f00c";
}
......@@ -61,3 +43,15 @@ i {
.icon-calendar:before {
content: "\f133";
}
.icon-linkedin:before {
content: "\f08c";
}
.icon-twitter:before {
content: "\f099";
}
.icon-instagram:before {
content: "\f16d";
}
.icon-facebook-f:before {
content: "\f39e";
}
/*
*
* Custom styling for Piráti senate candidate website
* Custom styling for Piráti donate website
* Author: Daniel Hlavacek
* Author's website: https://danielhlavacek.cz/
*
......@@ -65,7 +65,7 @@ h6, h6.lead {
}
}
h1.lead, h2.lead, h3.lead, h4.lead, h5.lead, h6.lead, .richtext h1, .richtext h2, .richtext h3, .richtext h4, .richtext h5, .richtext h6 {
h1.lead, h2.lead, h3.lead, h4.lead, h5.lead, h6.lead {
font-family: "Bebas Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
line-height: 1;
text-transform: uppercase;
......@@ -252,6 +252,20 @@ section {
background: #212121;
}
@media screen and (max-width: 991.99px) {
.navbar {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 1030;
}
main {
margin-top: 90px;
}
}
.navbar-dark .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgb(255, 255, 255)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
......@@ -266,10 +280,6 @@ section {
margin-right: -1rem;
}
.navbar.sticky-top {
top: -1px;
}
.nav-link {
display: block;
padding: .5rem 1rem;
......
(function ($) {
// Scroll to an element
function scrollToElement(elementId, margin, upOnly) {
// Defaults
if (margin === undefined) {
margin = 30;
}
if (upOnly === undefined) {
upOnly = 0;
}
// Target position and current position
var targetOffset = $(elementId).offset().top - (margin);
var currentOffset = $(window).scrollTop();
if (upOnly == 1) {
// Check if target position is higher, we don't scroll down
if (targetOffset < currentOffset) {
// Animate the body to the position
$('html, body').animate({
scrollTop: targetOffset
}, 400);
}
} else {
$('html, body').animate({
scrollTop: targetOffset
}, 400);
}
}
// Universal scrolling
$(document).on('click','.js-scroll-anchor', {} ,function(e){
e.preventDefault();
scrollToElement($(this).attr("href"), 10);
});
// Initialization
"use strict";
var nav = $('nav');
var navHeight = nav.outerHeight();
// Fancybox
$('[data-fancybox="gallery"]').fancybox({
buttons: [
// "zoom",
......@@ -50,7 +19,36 @@
});
/* DONATE FORM */
// Scroll function
$('a.js-scroll-anchor[href*="#"]:not([href="#"])').on("click", function () {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html, body').animate({
scrollTop: (target.offset().top - navHeight + 5)
}, 1000);
return false;
}
}
});
// Closes responsive menu when a scroll trigger link is clicked
$('.js-scroll-anchor').on("click", function () {
$('.navbar-collapse').collapse('hide');
});
// Activate scrollspy to add active class to navbar items on scroll
$('body').scrollspy({
target: '#mainNavigation',
offset: navHeight + 200
});
/*--/ End Scrolling nav /--*/
$(window).trigger('scroll');
/* DONATE FORM */
// On amount radio change
$("input[name='amount']").change(function() {
......@@ -73,3 +71,5 @@ $("input[name='amount']").change(function() {
// Trigger correct state onload
$("input[name='amount']:checked").change();
})(jQuery);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment