@moreonion/foundist 2.1.2 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +16 -0
- package/README.md +5 -9
- package/package.json +6 -28
- package/src/html/basic-action-page-cover-1col-with-headline.html +54 -0
- package/src/html/basic-action-page-cover-1col.html +27 -27
- package/src/html/basic-action-page-cover-2col-reversed.html +27 -27
- package/src/html/basic-action-page-cover-2col-with-headline.html +54 -0
- package/src/html/basic-action-page-cover-2col.html +27 -27
- package/src/html/basic-action-page-cover-banner-with-headline.html +54 -0
- package/src/html/basic-action-page-cover-banner.html +27 -27
- package/src/html/basic-action-page-reversed.html +22 -23
- package/src/html/basic-action-page-with-banner-and-headline.html +54 -0
- package/src/html/basic-action-page-with-banner-reversed.html +27 -27
- package/src/html/basic-action-page-with-banner.html +27 -27
- package/src/html/basic-action-page-with-callouts.html +28 -28
- package/src/html/basic-action-page.html +22 -23
- package/src/html/build-index.html +9 -0
- package/src/html/dev-index.html +57 -0
- package/src/html/donation-action-page.html +20 -20
- package/src/html/e2t-action-page.html +25 -28
- package/src/html/includes/accordion.html +25 -25
- package/src/html/includes/basic-form-with-errors.html +28 -26
- package/src/html/includes/basic-form.html +11 -7
- package/src/html/includes/cookiebar.html +5 -5
- package/src/html/includes/donate-form.html +11 -10
- package/src/html/includes/e2t-single-form.html +29 -27
- package/src/html/includes/form-items/_macros.html +76 -0
- package/src/html/includes/form-items/checkboxes.html +18 -18
- package/src/html/includes/form-items/country-select-options.html +253 -0
- package/src/html/includes/form-items/donation-amount.html +63 -64
- package/src/html/includes/form-items/donation-interval.html +14 -13
- package/src/html/includes/form-items/fake-field.html +2 -2
- package/src/html/includes/form-items/fieldset.html +9 -7
- package/src/html/includes/form-items/file-upload.html +7 -7
- package/src/html/includes/form-items/giftaid.html +16 -0
- package/src/html/includes/form-items/inline-radios.html +14 -14
- package/src/html/includes/form-items/opt-in-checkbox.html +5 -5
- package/src/html/includes/form-items/opt-in-radios.html +7 -7
- package/src/html/includes/form-items/payment-icons.html +17 -17
- package/src/html/includes/form-items/paymethod-selector.html +24 -24
- package/src/html/includes/form-items/radios-with-error.html +8 -8
- package/src/html/includes/form-items/radios.html +14 -14
- package/src/html/includes/form-items/select-with-error.html +257 -257
- package/src/html/includes/form-items/textarea.html +2 -2
- package/src/html/includes/form-items/webform-steps.html +13 -13
- package/src/html/includes/language-switcher.html +10 -10
- package/src/html/includes/login-form.html +5 -3
- package/src/html/includes/menu.html +3 -3
- package/src/html/includes/overlay.html +4 -4
- package/src/html/includes/pagination.html +13 -13
- package/src/html/includes/pgbar-thermometer.html +8 -8
- package/src/html/includes/pgbar.html +5 -5
- package/src/html/includes/recent-supporters-agregated.html +32 -32
- package/src/html/includes/recent-supporters-comments.html +31 -31
- package/src/html/includes/recent-supporters-empty.html +3 -3
- package/src/html/includes/recent-supporters.html +26 -26
- package/src/html/includes/share-buttons.html +30 -28
- package/src/html/includes/sticky-button.html +1 -1
- package/src/html/includes/teasers.html +25 -5
- package/src/html/includes/toggle-element-show-more.html +3 -3
- package/src/html/includes/toggle-element-toggle.html +2 -2
- package/src/html/login-page.html +5 -7
- package/src/html/snippets-demo.html +13 -15
- package/src/html/teaser-page.html +7 -7
- package/src/html/templates/action-page-cover-1col.html +12 -83
- package/src/html/templates/action-page-cover-banner.html +16 -85
- package/src/html/templates/action-page-reversed.html +16 -82
- package/src/html/templates/action-page.html +21 -80
- package/src/html/templates/base.html +31 -0
- package/src/html/templates/page.html +99 -0
- package/src/html/templates/share-page.html +9 -0
- package/src/html/thank-you-page-cover-1col-with-headline.html +27 -0
- package/src/html/thank-you-page-cover-1col.html +14 -14
- package/src/html/thank-you-page-cover-2col-with-headline.html +31 -0
- package/src/html/thank-you-page-cover-2col.html +17 -13
- package/src/html/thank-you-page-cover-banner-with-headline.html +27 -0
- package/src/html/thank-you-page-cover-banner.html +14 -14
- package/src/html/thank-you-page-with-banner-and-headline.html +27 -0
- package/src/html/thank-you-page-with-banner.html +14 -14
- package/src/html/thank-you-page.html +15 -15
- package/src/html/typography-static-page.html +18 -20
- package/src/js/foundist.js +41 -14
- package/src/scss/_settings.scss +3 -3
- package/src/scss/components/_accordion.scss +4 -6
- package/src/scss/components/_headline.scss +118 -0
- package/src/scss/components/_settings.scss +6 -2
- package/src/scss/form/_fields.scss +19 -0
- package/src/scss/form/_settings.scss +4 -3
- package/src/scss/layout/_banner.scss +50 -13
- package/src/scss/layout/_cover-banner.scss +80 -34
- package/src/scss/layout/_cover.scss +127 -45
- package/src/scss/layout/_default.scss +9 -3
- package/src/scss/layout/_sections.scss +7 -3
- package/src/scss/main.scss +2 -0
- package/src/scss/typography/_settings.scss +2 -0
- package/src/html/empty-action-page.html +0 -29
- package/src/html/empty-static-page.html +0 -21
- package/src/html/includes/form-items/country-select.html +0 -258
- package/src/html/includes/form-items/email.html +0 -4
- package/src/html/includes/form-items/first-name.html +0 -4
- package/src/html/includes/form-items/last-name.html +0 -4
- package/src/html/includes/form-items/password.html +0 -5
- package/src/html/includes/form-items/submit-button.html +0 -2
- package/src/html/includes/form-items/text-with-description.html +0 -5
- package/src/html/includes/form-items/text-with-error.html +0 -5
- package/src/html/includes/teaser.html +0 -17
- package/src/html/index.html +0 -51
- package/src/html/templates/action-page-cover-2col-reversed.html +0 -97
- package/src/html/templates/action-page-cover-2col.html +0 -97
- package/src/html/templates/action-page-with-banner-reversed.html +0 -91
- package/src/html/templates/action-page-with-banner.html +0 -91
- package/src/html/templates/static-page-cover-1col.html +0 -80
- package/src/html/templates/static-page-cover-2col.html +0 -88
- package/src/html/templates/static-page-cover-banner.html +0 -81
- package/src/html/templates/static-page-with-banner.html +0 -77
- package/src/html/templates/static-page.html +0 -73
- package/src/html/templates/teaser-page.html +0 -73
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
{% extends "src/html/templates/share-page.html" %}
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
{% set layout = "cover-banner" %}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
{% block page_title %}Thank you for taking action. You’re awesome!{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block background %}
|
|
6
8
|
<img src="http://placekitten.com/1600/735" alt="test image with cats" crossorigin="">
|
|
7
|
-
|
|
9
|
+
{% endblock %}
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
{% block content %}
|
|
10
12
|
<p>Cat ipsum dolor sit amet, mewl for food at 4am. Meeeeouw spill litter box, scratch at owner, destroy all furniture, especially couch. Sleep on dog bed, force dog to sleep on floor stinky cat spend all night ensuring people don't sleep sleep all day yet spread kitty litter all over house.</p>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<block name="content-bottom">
|
|
14
|
-
<include src="share-buttons.html"></include>
|
|
15
|
-
</block>
|
|
13
|
+
{% endblock %}
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
{% block content_bottom %}
|
|
16
|
+
{% include "src/html/includes/share-buttons.html" %}
|
|
17
|
+
{% endblock %}
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
{% block footer %}
|
|
20
|
+
{% include "src/html/includes/menu.html" %}
|
|
21
|
+
{% endblock %}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{% extends "src/html/templates/share-page.html" %}
|
|
2
|
+
|
|
3
|
+
{% set layout = "banner" %}
|
|
4
|
+
|
|
5
|
+
{% block page_class %}{{ super() }} with-headline{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block page_title %}Thank you for taking action. You’re awesome!{% endblock %}
|
|
8
|
+
|
|
9
|
+
{% block banner %}
|
|
10
|
+
<img src="http://placekitten.com/1600/735" alt="test image with cats" crossorigin="">
|
|
11
|
+
{% endblock %}
|
|
12
|
+
|
|
13
|
+
{% block headline %}
|
|
14
|
+
<p>A huge thank you!</p>
|
|
15
|
+
{% endblock %}
|
|
16
|
+
|
|
17
|
+
{% block content %}
|
|
18
|
+
<p>Cat ipsum dolor sit amet, mewl for food at 4am. Meeeeouw spill litter box, scratch at owner, destroy all furniture, especially couch. Sleep on dog bed, force dog to sleep on floor stinky cat spend all night ensuring people don't sleep sleep all day yet spread kitty litter all over house.</p>
|
|
19
|
+
{% endblock %}
|
|
20
|
+
|
|
21
|
+
{% block content_bottom %}
|
|
22
|
+
{% include "src/html/includes/share-buttons.html" %}
|
|
23
|
+
{% endblock %}
|
|
24
|
+
|
|
25
|
+
{% block footer %}
|
|
26
|
+
{% include "src/html/includes/menu.html" %}
|
|
27
|
+
{% endblock %}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
{% extends "src/html/templates/share-page.html" %}
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
{% set layout = "banner" %}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
{% block page_title %}Thank you for taking action. You’re awesome!{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block banner %}
|
|
6
8
|
<img src="http://placekitten.com/1600/735" alt="test image with cats" crossorigin="">
|
|
7
|
-
|
|
9
|
+
{% endblock %}
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
{% block content %}
|
|
10
12
|
<p>Cat ipsum dolor sit amet, mewl for food at 4am. Meeeeouw spill litter box, scratch at owner, destroy all furniture, especially couch. Sleep on dog bed, force dog to sleep on floor stinky cat spend all night ensuring people don't sleep sleep all day yet spread kitty litter all over house.</p>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<block name="content-bottom">
|
|
14
|
-
<include src="share-buttons.html"></include>
|
|
15
|
-
</block>
|
|
13
|
+
{% endblock %}
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
{% block content_bottom %}
|
|
16
|
+
{% include "src/html/includes/share-buttons.html" %}
|
|
17
|
+
{% endblock %}
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
{% block footer %}
|
|
20
|
+
{% include "src/html/includes/menu.html" %}
|
|
21
|
+
{% endblock %}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
{% extends "src/html/templates/page.html" %}
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
{% set layout = "default" %}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
{% block page_title %}Thank you for taking action. You’re awesome!{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block content_top %}
|
|
6
8
|
<div class="media-stretch">
|
|
7
|
-
|
|
9
|
+
<img src="http://placekitten.com/625/400" alt="test image with cats" crossorigin="">
|
|
8
10
|
</div>
|
|
9
|
-
|
|
11
|
+
{% endblock %}
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
{% block content %}
|
|
12
14
|
<h2>Lies down sleep on dog bed, force dog to sleep on floor</h2>
|
|
13
15
|
<p>Cat ipsum dolor sit amet, mewl for food at 4am. Meeeeouw spill litter box, scratch at owner, destroy all furniture, especially couch. Sleep on dog bed, force dog to sleep on floor stinky cat spend all night ensuring people don't sleep sleep all day yet spread kitty litter all over house.</p>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<block name="content-bottom">
|
|
17
|
-
<include src="share-buttons.html"></include>
|
|
18
|
-
</block>
|
|
16
|
+
{% endblock %}
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
{% block content_bottom %}
|
|
19
|
+
{% include "src/html/includes/share-buttons.html" %}
|
|
20
|
+
{% endblock %}
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
{% block footer %}
|
|
23
|
+
{% include "src/html/includes/overlay.html" %}
|
|
24
|
+
{% endblock %}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
{% extends "src/html/templates/page.html" %}
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
{% block page_title %}This is the main headline{% endblock %}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
{% block top %}
|
|
6
6
|
<p>Experiences short bursts of poo-phoria after going to the loo chirp at birds, destroy the blinds. Spend all night ensuring people don't sleep sleep all day climb leg, so i show my fluffy belly but it's a trap! if you pet it i will tear up your hand yet steal the warm chair right after you get up get video posted to internet for chasing red dot.</p><p>Texts have been generated on <a href="http://www.catipsum.com/">Cat Ipsum</a>, images provided by <a href="http://placekitten.com/">placekitten</a>.</p>
|
|
7
|
-
|
|
7
|
+
{% endblock %}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
{% block content_top %}
|
|
10
10
|
<div class="media-stretch">
|
|
11
|
-
|
|
11
|
+
<img src="http://placekitten.com/800/400" alt="test image with cats" crossorigin="">
|
|
12
12
|
</div>
|
|
13
|
-
|
|
13
|
+
{% endblock %}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
{% block content %}
|
|
16
16
|
<h2>Meow meow mama hell is other people but i love cuddles</h2>
|
|
17
17
|
<p>Cat fur is the new black burrow under covers, so push your water glass on the floor bathe private parts with tongue then lick owner's face sugar, my siamese, stalks me (in a good way), day and night and hiss at vacuum cleaner flee in terror at cucumber discovered on floor. Make meme, make cute face freak human out make funny noise mow mow mow mow mow mow success now attack human.</p>
|
|
18
18
|
<blockquote>
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
<p>Mark territory peer out window, chatter at birds, lure them to mouth vommit food and eat it again. Crusty butthole need to chase tail licks paws sit in box make meme, make cute face. Nap all day eat and than sleep on your face so catto munch salmono so find a way to fit in tiny box cats making all the muffins my left donut is missing, as is my right.</p>
|
|
20
|
+
<cite>Famous Cat</cite>
|
|
21
21
|
</blockquote>
|
|
22
22
|
<p>I want to go outside let me go outside nevermind inside is better pee in the shoe but eat a rug and furry furry hairs everywhere oh no human coming lie on counter don't get off counter. Plays league of legends kitty loves pigs intrigued by the shower, or play with twist ties.
|
|
23
23
|
</p>
|
|
@@ -30,21 +30,19 @@
|
|
|
30
30
|
|
|
31
31
|
<h5>And some lists, lists are so amazing</h5>
|
|
32
32
|
<ol>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
<li>Jump on human and sleep on her all night long be long in the bed, purr in the morning and then give a bite to every human around for not waking up request food.</li>
|
|
34
|
+
<li>Peer out window, chatter at birds, lure them to mouth no, you can't close the door, i haven't decided whether or not i wanna go out.</li>
|
|
35
|
+
<li>Claw at curtains stretch and yawn nibble on tuna ignore human bite human hand cough hairball, eat toilet paper, and purr when being pet and walk on a keyboard.</li>
|
|
36
36
|
</ol>
|
|
37
37
|
<p>I like cats because they are fat and fluffy drink water out of the faucet purr when being pet i want to go outside let me go outside nevermind inside is better purr when give birth for hopped up on catnip i just saw other cats inside the house and nobody ask me before using my litter box.</p>
|
|
38
38
|
<ul>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
<li>Balinese donskoy</li>
|
|
40
|
+
<li>British shorthair munchkin cornish rex</li>
|
|
41
|
+
<li>Cheetah bombay ragdoll</li>
|
|
42
|
+
<li>Russian blue tomcat</li>
|
|
43
43
|
</ul>
|
|
44
44
|
|
|
45
45
|
<h6>Pet my belly, you know you want to</h6>
|
|
46
46
|
<p>Hiss at vacuum cleaner eat a rug and furry furry hairs everywhere oh no human coming lie on counter don't get off counter cat mojo so get scared by sudden appearance of cucumber. Flee in terror at cucumber discovered on floor.
|
|
47
47
|
</p>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</extends>
|
|
48
|
+
{% endblock %}
|
package/src/js/foundist.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import $ from 'jquery'
|
|
5
5
|
import select2 from 'select2'
|
|
6
6
|
|
|
7
|
+
/* eslint-disable no-unused-vars */
|
|
7
8
|
import {
|
|
8
9
|
Accordion,
|
|
9
10
|
Foundation,
|
|
@@ -11,6 +12,7 @@ import {
|
|
|
11
12
|
SmoothScroll,
|
|
12
13
|
Toggler
|
|
13
14
|
} from 'foundation-sites/js/foundation'
|
|
15
|
+
/* eslint-enable no-unused-vars */
|
|
14
16
|
|
|
15
17
|
import {
|
|
16
18
|
initEventBridge,
|
|
@@ -37,8 +39,10 @@ Foundation.plugin(SelectTwo, 'SelectTwo')
|
|
|
37
39
|
Foundation.plugin(StickyButton, 'StickyButton')
|
|
38
40
|
Foundation.plugin(ToggleElement, 'ToggleElement')
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Let foundation initialize the initial markup.
|
|
44
|
+
* This needs to be done for dynamically loaded markup too (e.g. AJAX markup)
|
|
45
|
+
*/
|
|
42
46
|
export function initFoundation () {
|
|
43
47
|
initEventBridge($)
|
|
44
48
|
if (typeof Drupal !== 'undefined') {
|
|
@@ -53,11 +57,18 @@ export function initFoundation () {
|
|
|
53
57
|
}
|
|
54
58
|
} else {
|
|
55
59
|
$(window.document).foundation()
|
|
60
|
+
$(window.document).on('dom-inserted', (event) => {
|
|
61
|
+
$(event.target).foundation()
|
|
62
|
+
})
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Activate AdaptiveSticky on forms in the sidebar.
|
|
68
|
+
* @param {object} options - Overrides to the AdaptiveSticky plugin settings.
|
|
69
|
+
* @returns {AdaptiveSticky|undefined} The initialized AdaptiveSticky plugin
|
|
70
|
+
*/
|
|
71
|
+
export function stickyForm (options = {}) {
|
|
61
72
|
const $form = $('#sidebar form, #sidebar .share-buttons')
|
|
62
73
|
if (!$form.length) {
|
|
63
74
|
return
|
|
@@ -69,20 +80,32 @@ export function stickyForm () {
|
|
|
69
80
|
return new Foundation.AdaptiveSticky($sidebar.children('.sticky'), {
|
|
70
81
|
target: '#form-outer form, #form-outer .share-buttons ul',
|
|
71
82
|
offset: $('#form-outer').css('padding-top'),
|
|
72
|
-
mediaQuery: 'large'
|
|
83
|
+
mediaQuery: 'large',
|
|
84
|
+
...options
|
|
73
85
|
})
|
|
74
86
|
}
|
|
75
87
|
|
|
76
|
-
|
|
77
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Activate StickyButton on CTA markup snippet.
|
|
90
|
+
* @param {object} options - Overrides to the StickyButton plugin settings.
|
|
91
|
+
* @returns {StickyButton[]|undefined} Array of initialized StickyButton plugins
|
|
92
|
+
*/
|
|
93
|
+
export function stickyButton (options = {}) {
|
|
78
94
|
let $cta = $('.sticky-cta')
|
|
79
95
|
if (!$cta.length) {
|
|
80
96
|
return
|
|
81
97
|
}
|
|
98
|
+
const defaults = {
|
|
99
|
+
topOverlap: 0.3
|
|
100
|
+
}
|
|
101
|
+
// Find blocking element
|
|
102
|
+
const target = $cta.find('a').attr('href')
|
|
103
|
+
if (target && !target.includes('/')) {
|
|
104
|
+
defaults.blocker = target
|
|
105
|
+
}
|
|
82
106
|
// Put button(s) in right position.
|
|
83
107
|
// Depending on the layout, the button should be on the bottom of the page,
|
|
84
108
|
// the sidebar or the main wrapper for large screen sizes.
|
|
85
|
-
const target = $cta.find('a').attr('href')
|
|
86
109
|
const $newParent = $('#sidebar, #main > .grid-container > .inner-wrapper')
|
|
87
110
|
if ($newParent.length) {
|
|
88
111
|
const $clone = $cta.clone().appendTo($newParent).addClass('bottom show-for-large')
|
|
@@ -92,18 +115,22 @@ export function stickyButton () {
|
|
|
92
115
|
$cta.appendTo('#page').addClass('bottom')
|
|
93
116
|
}
|
|
94
117
|
// Add SmoothScroll
|
|
95
|
-
|
|
118
|
+
new SmoothScroll($cta.find('a')) // eslint-disable-line no-new
|
|
96
119
|
// Initialize plugin
|
|
97
120
|
return $cta.map((i, el) => {
|
|
98
121
|
return new Foundation.StickyButton($(el), {
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
...defaults,
|
|
123
|
+
...options
|
|
101
124
|
})
|
|
102
125
|
})
|
|
103
126
|
}
|
|
104
127
|
|
|
105
|
-
|
|
106
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Activate cookiebar on cookiebar id.
|
|
130
|
+
* @param {object} options - Overrides to the Cookiebar plugin settings.
|
|
131
|
+
* @returns {Cookiebar|undefined} The initialized Cookiebar plugin
|
|
132
|
+
*/
|
|
133
|
+
export function cookiebar (options = {}) {
|
|
107
134
|
const $cookiebar = $('#cookiebar')
|
|
108
135
|
if (!$cookiebar.length) {
|
|
109
136
|
return
|
|
@@ -111,5 +138,5 @@ export function cookiebar () {
|
|
|
111
138
|
// Put cookiebar in right position.
|
|
112
139
|
$cookiebar.detach().appendTo('body')
|
|
113
140
|
// Initialize plugin
|
|
114
|
-
return new Foundation.CookieBar($cookiebar)
|
|
141
|
+
return new Foundation.CookieBar($cookiebar, options)
|
|
115
142
|
}
|
package/src/scss/_settings.scss
CHANGED
|
@@ -24,14 +24,14 @@ $global-font-size: $base-font-size * 6.25% !default;
|
|
|
24
24
|
// Global Colors
|
|
25
25
|
$foundation-palette: (
|
|
26
26
|
primary: #13505b,
|
|
27
|
-
secondary: #
|
|
28
|
-
success: #
|
|
27
|
+
secondary: #009f78,
|
|
28
|
+
success: #009f78,
|
|
29
29
|
warning: #a82403,
|
|
30
30
|
alert: #a82403,
|
|
31
31
|
) !default;
|
|
32
32
|
$white: #ffffff !default;
|
|
33
33
|
$light-gray: #f5f5f5 !default;
|
|
34
|
-
$medium-gray: #
|
|
34
|
+
$medium-gray: #949494 !default;
|
|
35
35
|
$dark-gray: #595959 !default;
|
|
36
36
|
$black: #222222 !default;
|
|
37
37
|
$global-color-pick-contrast-tolerance: 3.5 !default;
|
|
@@ -60,12 +60,10 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
margin-bottom: 0;
|
|
68
|
-
}
|
|
63
|
+
// Assuming accordions contain either text or paragraphs or a list.
|
|
64
|
+
#{$text-tags} {
|
|
65
|
+
.accordion-content > &:last-child {
|
|
66
|
+
margin-bottom: 0;
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// Headline
|
|
2
|
+
// - - - - - - - - - - - - - - -
|
|
3
|
+
// Displays a huge headline on a background image or banner
|
|
4
|
+
|
|
5
|
+
/// Highlighting background of the headline.
|
|
6
|
+
/// @type Color
|
|
7
|
+
$headline-background: none !default;
|
|
8
|
+
|
|
9
|
+
/// Font family of the headline.
|
|
10
|
+
/// @type String | List
|
|
11
|
+
$headline-font-family: $header-font-family !default;
|
|
12
|
+
|
|
13
|
+
/// Font weight of the headline.
|
|
14
|
+
/// @type Number | String
|
|
15
|
+
$headline-font-weight: $header-font-weight !default;
|
|
16
|
+
|
|
17
|
+
/// Font style of the headline.
|
|
18
|
+
/// @type String
|
|
19
|
+
$headline-font-style: $header-font-style !default;
|
|
20
|
+
|
|
21
|
+
/// Font size of the headline.
|
|
22
|
+
/// @type Number
|
|
23
|
+
$headline-font-size: 2 * $large-font-size !default;
|
|
24
|
+
|
|
25
|
+
/// Font color of the headline.
|
|
26
|
+
/// @type Color
|
|
27
|
+
$headline-color: color-pick-contrast(
|
|
28
|
+
if(
|
|
29
|
+
$headline-background and $headline-background != none,
|
|
30
|
+
$headline-background,
|
|
31
|
+
$fallback-background
|
|
32
|
+
),
|
|
33
|
+
($body-font-color-alt, $body-font-color)
|
|
34
|
+
) !default;
|
|
35
|
+
|
|
36
|
+
#headline {
|
|
37
|
+
color: $headline-color;
|
|
38
|
+
align-self: end;
|
|
39
|
+
|
|
40
|
+
#{$text-tags} {
|
|
41
|
+
font-family: $headline-font-family;
|
|
42
|
+
font-weight: $headline-font-weight;
|
|
43
|
+
font-style: $headline-font-style;
|
|
44
|
+
font-size: $headline-font-size;
|
|
45
|
+
line-height: grid-lineheight($headline-font-size);
|
|
46
|
+
|
|
47
|
+
@include breakpoint(small down) {
|
|
48
|
+
font-size: $headline-font-size * 0.75;
|
|
49
|
+
line-height: grid-lineheight(0.75 * $headline-font-size);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@include breakpoint(xxlarge) {
|
|
53
|
+
font-size: $headline-font-size * 1.25;
|
|
54
|
+
line-height: grid-lineheight(1.25 * $headline-font-size);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#page.banner-layout & {
|
|
58
|
+
// Reduce font-size because there is less space for the headline.
|
|
59
|
+
@include breakpoint(25em down) {
|
|
60
|
+
font-size: $headline-font-size * 0.5;
|
|
61
|
+
line-height: grid-lineheight(0.5 * $headline-font-size);
|
|
62
|
+
}
|
|
63
|
+
@include breakpoint(medium) {
|
|
64
|
+
font-size: $headline-font-size * 0.75;
|
|
65
|
+
line-height: grid-lineheight(0.75 * $headline-font-size);
|
|
66
|
+
}
|
|
67
|
+
@include breakpoint(xlarge) {
|
|
68
|
+
font-size: $headline-font-size;
|
|
69
|
+
line-height: grid-lineheight($headline-font-size);
|
|
70
|
+
}
|
|
71
|
+
@include breakpoint(xxlarge) {
|
|
72
|
+
font-size: $headline-font-size * 1.25;
|
|
73
|
+
line-height: grid-lineheight(1.25 * $headline-font-size);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@if $headline-background and $headline-background != none {
|
|
79
|
+
#{$text-tags} {
|
|
80
|
+
background: $headline-background;
|
|
81
|
+
display: inline;
|
|
82
|
+
box-decoration-break: clone;
|
|
83
|
+
padding: 0.05em 0.25em;
|
|
84
|
+
// Adjust line-height for 0.5em of vertical padding.
|
|
85
|
+
line-height: 1.5 * grid-lineheight(1.5 * $headline-font-size);
|
|
86
|
+
|
|
87
|
+
@include breakpoint(small down) {
|
|
88
|
+
line-height: 1.5 * grid-lineheight(1.5 * 0.75 * $headline-font-size);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include breakpoint(xxlarge) {
|
|
92
|
+
line-height: 1.5 * grid-lineheight(1.5 * 1.25 * $headline-font-size);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
#page.banner-layout & {
|
|
96
|
+
@include breakpoint(25em down, medium) {
|
|
97
|
+
line-height: 1.5 * grid-lineheight(1.5 * 0.5 * $headline-font-size);
|
|
98
|
+
}
|
|
99
|
+
@include breakpoint(medium) {
|
|
100
|
+
line-height: 1.5 * grid-lineheight(1.5 * 0.75 * $headline-font-size);
|
|
101
|
+
}
|
|
102
|
+
@include breakpoint(xlarge) {
|
|
103
|
+
line-height: 1.5 * grid-lineheight(1.5 * $headline-font-size);
|
|
104
|
+
}
|
|
105
|
+
@include breakpoint(xxlarge) {
|
|
106
|
+
line-height: 1.5 * grid-lineheight(1.5 * 1.25 * $headline-font-size);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Fake the usual margin (missing because of display: inline)
|
|
112
|
+
&:after {
|
|
113
|
+
content: "";
|
|
114
|
+
display: block;
|
|
115
|
+
height: $global-margin;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@use "sass:color";
|
|
5
5
|
|
|
6
6
|
// Card
|
|
7
|
-
$card-border: none;
|
|
7
|
+
$card-border: none !default;
|
|
8
8
|
$card-padding: rem-calc($base-line-height * 0.75) 6% !default;
|
|
9
9
|
$card-margin-bottom: rem-calc($base-line-height * 1.5) !default;
|
|
10
10
|
|
|
@@ -24,6 +24,7 @@ $recent-supporter-color: color-pick-contrast(
|
|
|
24
24
|
get-background-color($body-background),
|
|
25
25
|
($dark-gray, $light-gray)
|
|
26
26
|
) !default;
|
|
27
|
+
$recent-supporter-time-color: $muted-font-color !default;
|
|
27
28
|
$recent-supporter-border-color: if(
|
|
28
29
|
color.lightness(get-background-color($body-background)) < 50,
|
|
29
30
|
$dark-gray,
|
|
@@ -170,5 +171,8 @@ $cookiebar-color: color-pick-contrast(
|
|
|
170
171
|
get-background-color($cookiebar-background),
|
|
171
172
|
($body-font-color, $body-font-color-alt)
|
|
172
173
|
) !default;
|
|
173
|
-
$cookiebar-padding: rem-calc($base-line-height) 0 0;
|
|
174
|
+
$cookiebar-padding: rem-calc($base-line-height) 0 0 !default;
|
|
174
175
|
$cookiebar-flex-breakpoint: medium !default;
|
|
176
|
+
|
|
177
|
+
// Pagination
|
|
178
|
+
$pagination-item-color-disabled: $muted-font-color !default;
|
|
@@ -50,6 +50,25 @@ input.button.primary {
|
|
|
50
50
|
margin-top: $form-spacing * 2;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
// Margins for giftaid fields.
|
|
54
|
+
.giftaid {
|
|
55
|
+
margin-top: $form-spacing * 2;
|
|
56
|
+
margin-bottom: $form-spacing * 2;
|
|
57
|
+
|
|
58
|
+
.extra-spacing {
|
|
59
|
+
margin-top: 0;
|
|
60
|
+
margin-bottom: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.form-item > div:first-child,
|
|
64
|
+
.form-item > label.show-for-sr + div,
|
|
65
|
+
.form-item > label.element-invisible + div {
|
|
66
|
+
input[type="checkbox"] + label {
|
|
67
|
+
margin-top: 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
53
72
|
// Display radios, checkboxes etc. next to each other.
|
|
54
73
|
.form-item.inline {
|
|
55
74
|
&,
|
|
@@ -89,7 +89,7 @@ $input-height: rem-calc(2 * $base-line-height) !default;
|
|
|
89
89
|
$input-padding: (
|
|
90
90
|
rem-calc(($input-height - $input-line-height * $input-font-size) * 0.5) - $input-border-width
|
|
91
91
|
) 1rem !default;
|
|
92
|
-
$input-placeholder-color: $
|
|
92
|
+
$input-placeholder-color: $muted-font-color !default;
|
|
93
93
|
$input-prefix-color: $form-label-color !default;
|
|
94
94
|
$input-prefix-padding: 1em !default;
|
|
95
95
|
|
|
@@ -110,7 +110,7 @@ $radio-label-font-weight: $global-weight-normal !default;
|
|
|
110
110
|
// Files
|
|
111
111
|
$file-upload-font-size: $small-font-size !default;
|
|
112
112
|
$file-upload-padding: $form-spacing * 2 !default;
|
|
113
|
-
$file-upload-help-color: $
|
|
113
|
+
$file-upload-help-color: $muted-font-color !default;
|
|
114
114
|
|
|
115
115
|
// Help texts
|
|
116
116
|
$helptext-color: $form-label-color !default;
|
|
@@ -177,5 +177,6 @@ $form-steps-previous-background-color: color.scale(
|
|
|
177
177
|
// AJAX loading throbber
|
|
178
178
|
$loader-color: get-color(primary) !default;
|
|
179
179
|
|
|
180
|
-
//
|
|
180
|
+
// Donation forms
|
|
181
181
|
$payment-icon-color: $form-label-color !default;
|
|
182
|
+
$giftaid-checkbox-size: rem-calc($base-line-height * 1.5) !default;
|
|
@@ -6,6 +6,7 @@ $banner-height: 46vw !default;
|
|
|
6
6
|
$banner-background: $fallback-background !default;
|
|
7
7
|
|
|
8
8
|
#banner {
|
|
9
|
+
position: absolute;
|
|
9
10
|
width: 100%;
|
|
10
11
|
height: $banner-height;
|
|
11
12
|
background: $banner-background;
|
|
@@ -16,28 +17,64 @@ $banner-background: $fallback-background !default;
|
|
|
16
17
|
height: 100%;
|
|
17
18
|
object-fit: cover;
|
|
18
19
|
}
|
|
19
|
-
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
21
|
+
~ #main {
|
|
22
|
+
#page-title {
|
|
23
|
+
padding-top: 0;
|
|
24
|
+
}
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
position: absolute;
|
|
26
|
+
.grid-container {
|
|
27
|
+
grid-template-rows: minmax($banner-height, auto) auto;
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
// Ensure the first row is blocked when there is no #headline.
|
|
30
|
+
#page:not(.with-headline) &:before {
|
|
31
|
+
content: "";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
@include breakpoint(large) {
|
|
36
|
+
.grid-container.with-sidebar {
|
|
37
|
+
grid-template-rows: minmax($banner-height, auto) auto 1fr auto;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
#form-wrapper {
|
|
39
41
|
min-height: $banner-height;
|
|
40
42
|
}
|
|
41
43
|
}
|
|
44
|
+
|
|
45
|
+
#page.with-headline & #headline {
|
|
46
|
+
// Same as #main padding-top
|
|
47
|
+
margin-bottom: 1.5 * $global-padding;
|
|
48
|
+
|
|
49
|
+
@include breakpoint(large) {
|
|
50
|
+
margin-bottom: 2 * $global-padding;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Extra padding for headlines on larger screens.
|
|
54
|
+
@include breakpoint(xlarge) {
|
|
55
|
+
padding-bottom: $global-padding;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@include breakpoint(xxlarge) {
|
|
59
|
+
padding-bottom: 2 * $global-padding;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// On small screens when there is a headline double the banner height
|
|
65
|
+
// to increase the chance that the headline will fit on the banner.
|
|
66
|
+
@include breakpoint(small down) {
|
|
67
|
+
#page.with-headline & {
|
|
68
|
+
height: 2 * $banner-height;
|
|
69
|
+
|
|
70
|
+
~ #main .grid-container {
|
|
71
|
+
grid-template-rows: minmax(2 * $banner-height, auto) auto;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
42
74
|
}
|
|
43
75
|
}
|
|
76
|
+
|
|
77
|
+
// Give callouts some margin (assuming #messages are placed before #banner)
|
|
78
|
+
#page.banner-layout #messages .callout {
|
|
79
|
+
margin-bottom: $global-margin;
|
|
80
|
+
}
|