mirror of
https://github.com/ipdb/website.git
synced 2025-02-14 21:10:26 +01:00
parent
12b973ef54
commit
6bbf89731b
@ -1,11 +1,11 @@
|
|||||||
/* global SmoothScroll */
|
/* global SmoothScroll, Autogrow, Cookiebanner */
|
||||||
/* global Autogrow */
|
|
||||||
|
|
||||||
/* eslint-disable spaced-comment */
|
/* eslint-disable spaced-comment */
|
||||||
//=include _dnt.js
|
//=include _dnt.js
|
||||||
//=include _newsletter.js
|
//=include _newsletter.js
|
||||||
//=include smooth-scroll/dist/js/smooth-scroll.js
|
//=include smooth-scroll/dist/js/smooth-scroll.js
|
||||||
//=include textarea-autogrow/textarea-autogrow.js
|
//=include textarea-autogrow/textarea-autogrow.js
|
||||||
|
//=include cookie-banner/src/cookiebanner.js
|
||||||
/* eslint-enable spaced-comment */
|
/* eslint-enable spaced-comment */
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
@ -25,3 +25,25 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const growingTextarea = new Autogrow(textarea)
|
const growingTextarea = new Autogrow(textarea)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//
|
||||||
|
// Cookie banner
|
||||||
|
//
|
||||||
|
// this global variable name seem not smart, plugin requires it though
|
||||||
|
// https://github.com/dobarkod/cookie-banner
|
||||||
|
const options = {
|
||||||
|
message: 'By using this website you agree to our <a>cookie policy</a>.',
|
||||||
|
linkmsg: ' ',
|
||||||
|
fontFamily: 'inherit',
|
||||||
|
fontSize: '15px',
|
||||||
|
bg: 'rgba(234, 243, 245, .7)',
|
||||||
|
fg: 'inherit',
|
||||||
|
link: '#cc6bb3',
|
||||||
|
closeText: '×',
|
||||||
|
closeStyle: 'font-size:1.1rem;float:right;padding:5px;margin:-5px;margin-top:-4px',
|
||||||
|
minHeight: '18px',
|
||||||
|
moreinfo: '/privacy/',
|
||||||
|
effect: 'fade'
|
||||||
|
}
|
||||||
|
|
||||||
|
const cookiebanner = new Cookiebanner(options); cookiebanner.run()
|
||||||
|
15
_src/_assets/scss/_cookiebanner.scss
Normal file
15
_src/_assets/scss/_cookiebanner.scss
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Mostly styled with options in js, the rest here
|
||||||
|
|
||||||
|
.cookiebanner {
|
||||||
|
border-top-left-radius: 1rem;
|
||||||
|
border-top-right-radius: 1rem;
|
||||||
|
|
||||||
|
@media ($screen-sm) {
|
||||||
|
// stylelint-disable declaration-no-important
|
||||||
|
left: 30% !important;
|
||||||
|
right: 30% !important;
|
||||||
|
line-height: 18px !important;
|
||||||
|
// stylelint-enable declaration-no-important
|
||||||
|
max-width: 25rem;
|
||||||
|
}
|
||||||
|
}
|
@ -16,6 +16,7 @@
|
|||||||
@import 'logo';
|
@import 'logo';
|
||||||
@import 'caretakers';
|
@import 'caretakers';
|
||||||
@import 'board';
|
@import 'board';
|
||||||
|
@import 'cookiebanner';
|
||||||
|
|
||||||
.content--page--markdown {
|
.content--page--markdown {
|
||||||
padding-top: $spacer * 2;
|
padding-top: $spacer * 2;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ajaxchimp": "^1.3.0",
|
"ajaxchimp": "^1.3.0",
|
||||||
|
"cookie-banner": "github:dobarkod/cookie-banner",
|
||||||
"jquery": "^3.2.1",
|
"jquery": "^3.2.1",
|
||||||
"smooth-scroll": "^12.1.4",
|
"smooth-scroll": "^12.1.4",
|
||||||
"textarea-autogrow": "^1.0.0"
|
"textarea-autogrow": "^1.0.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user