@moreonion/foundist 3.0.3 → 3.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moreonion/foundist",
3
- "version": "3.0.3",
3
+ "version": "3.1.0",
4
4
  "description": "Foundation based default theme for Impact Stack landing pages.",
5
5
  "author": "More Onion <kontakt@more-onion.at>",
6
6
  "license": "MIT",
@@ -26,7 +26,7 @@
26
26
  "prepare": "husky install"
27
27
  },
28
28
  "dependencies": {
29
- "@moreonion/foundation-base": "^3.0.2",
29
+ "@moreonion/foundation-base": "^3.1.0",
30
30
  "vite-plugin-nunjucks": "^0.1.10"
31
31
  },
32
32
  "lint-staged": {
@@ -9,6 +9,7 @@
9
9
  <li><a href="src/html/basic-action-page.html">Basic action page</a></li>
10
10
  <li><a href="src/html/e2t-action-page.html">Email to target page</a></li>
11
11
  <li><a href="src/html/donation-action-page.html">Donation page</a></li>
12
+ <li><a href="src/html/signup-action-page.html">Sign up page</a></li>
12
13
  <li><a href="src/html/thank-you-page.html">Thank you page</a></li>
13
14
  <li><a href="src/html/thank-you-page.html#overlay">Thank you page with overlay</a></li>
14
15
  <li><a href="src/html/login-page.html">Login page</a></li>
@@ -25,6 +25,7 @@
25
25
  {{ input("Textfield", error="Some error message for this field.") }}
26
26
  {{ select("Country", error="That’s not right.", hide_label=true) }}
27
27
  {% include "./form-items/radios-with-error.html" %}
28
+ {% include "./form-items/opt-in-radios-with-error.html" %}
28
29
  {{ button("Take action now!", class="expanded primary button large")}}
29
30
  </form>
30
31
  </div>
@@ -5,8 +5,8 @@
5
5
  {{ input("First name", {size: 60, maxlength: 128, placeholder: "First name"}) }}
6
6
  {{ input("Last name", {size: 60, maxlength: 128}) }}
7
7
  {{ input("Email address", {type: "email", id: "email", size: 60, required: "required"}) }}
8
+ {% include "./form-items/radios.html" %}
8
9
  {{ select("Country", hide_label=true) }}
9
- {% include "./form-items/opt-in-radios.html" %}
10
10
  {{ hidden("token") }}
11
11
  {{ button("Take action now!", class="expanded primary button large") }}
12
12
  </form>
@@ -4,9 +4,9 @@
4
4
  <form method="post" accept-charset="UTF-8" novalidate="novalidate">
5
5
  {% include "./form-items/webform-steps.html" %}
6
6
 
7
- <div class="form-item">
8
- <div class="email-to-target-selector-wrapper webform-prefill-exclude form-wrapper">
9
- <div class="email-to-target-target email-to-target-single form-wrapper">
7
+ <fieldset class="fieldset">
8
+ <div class="email-to-target-selector-wrapper">
9
+ <div class="email-to-target-target email-to-target-single">
10
10
  <p class="target">Rt Hon Mary Field MP </p>
11
11
  <div class="form-item">
12
12
  <label for="subject">Subject</label>
@@ -15,9 +15,7 @@
15
15
  <pre class="email-to-target-header">Dear Rt Hon Mary Field MP,</pre>
16
16
  <div class="form-item">
17
17
  <label for="message">Your message</label>
18
- <div class="form-textarea-wrapper">
19
- <textarea id="message" name="message" cols="60" rows="5" class="form-textarea"></textarea>
20
- </div>
18
+ <textarea id="message" name="message" cols="60" rows="5" class="form-textarea"></textarea>
21
19
  </div>
22
20
  <!-- linthtml-configure preset="none" -->
23
21
  <pre class="email-to-target-footer">I look forward to hearing from you.
@@ -28,7 +26,7 @@ Jane Smith
28
26
  A12 34B</pre>
29
27
  </div>
30
28
  </div>
31
- </div>
29
+ </fieldset>
32
30
 
33
31
  {{ button("Send message", class="expanded primary button large") }}
34
32
  </form>
@@ -1,11 +1,9 @@
1
1
  {% from "./_macros.html" import input %}
2
2
 
3
- <div class="form-item">
4
- <fieldset class="form-wrapper fieldset">
5
- <legend>Your Name</legend>
6
- <div class="fieldset-wrapper">
7
- {{ input("First name", {size: 60, maxlength: 128}) }}
8
- {{ input("Last name", {size: 60, maxlength: 128}) }}
9
- </div>
10
- </fieldset>
11
- </div>
3
+ <fieldset class="fieldset">
4
+ <legend>Your Name</legend>
5
+ <div class="fieldset-wrapper">
6
+ {{ input("First name", {size: 60, maxlength: 128}) }}
7
+ {{ input("Last name", {size: 60, maxlength: 128}) }}
8
+ </div>
9
+ </fieldset>
@@ -1,16 +1,14 @@
1
- <fieldset class="form-wrapper fieldset giftaid">
2
- <div class="fieldset-wrapper">
3
- <div class="form-item">
4
- <p><strong>Increase your donation by 25%</strong> without additional cost to you by ticking the box below</p>
5
- </div>
6
- <div class="form-item extra-spacing">
7
- <div class="form-item form-type-checkbox">
8
- <input type="checkbox" id="giftaid-checkbox" name="giftaid-checkbox" value="1" class="form-checkbox">
9
- <label class="option" for="giftaid-checkbox"><span>I am a UK tax payer and I want you to claim Gift Aid on my donation*</span></label>
10
- </div>
11
- </div>
12
- <div class="form-item">
13
- <p class="small muted">* This is the small print that you may want to add to your giftaid field but it’s really optional.</p>
1
+ <div class="form-group giftaid">
2
+ <div class="group-item form-item">
3
+ <p><strong>Increase your donation by 25%</strong> without additional cost to you by ticking the box below</p>
4
+ </div>
5
+ <div class="group-item form-item extra-spacing">
6
+ <div class="form-item form-type-checkbox">
7
+ <input type="checkbox" id="giftaid-checkbox" name="giftaid-checkbox" value="1" class="form-checkbox">
8
+ <label class="option" for="giftaid-checkbox"><span>I am a UK tax payer and I want you to claim Gift Aid on my donation*</span></label>
14
9
  </div>
15
10
  </div>
16
- </fieldset>
11
+ <div class="group-item form-item">
12
+ <p class="small muted">* This is the small print that you may want to add to your giftaid field but it’s really optional.</p>
13
+ </div>
14
+ </div>
@@ -1,7 +1,13 @@
1
- <div class="form-item extra-spacing">
2
- <label for="newsletter-checkbox" class="show-for-sr">Newsletter</label>
3
- <div class="form-item form-type-checkbox">
4
- <input type="checkbox" id="newsletter-checkbox" name="newsletter-checkbox" value="opt-in" class="form-checkbox">
5
- <label class="option" for="newsletter-checkbox">Please keep me up to date and send me your regular newsletter about this topic</label>
1
+ <div class="form-group opt-in">
2
+ <div class="group-item intro-text">
3
+ <h4>Get updates</h4>
4
+ <p>A cat will come by your house every week with news. Make sure to provide delicious food!</p>
5
+ </div>
6
+ <div class="group-item form-item extra-spacing">
7
+ <label for="newsletter-checkbox" class="show-for-sr">Newsletter</label>
8
+ <div class="form-item form-type-checkbox">
9
+ <input type="checkbox" id="newsletter-checkbox" name="newsletter-checkbox" value="opt-in" class="form-checkbox">
10
+ <label class="option" for="newsletter-checkbox">Please keep me up to date and send me a regular cat. I swear to provide excellent food.</label>
11
+ </div>
6
12
  </div>
7
13
  </div>
@@ -0,0 +1,16 @@
1
+ <div class="form-group opt-in">
2
+ <div class="group-item intro-text">
3
+ <h4>Stay connected</h4>
4
+ <p>Please subscribe to hear about other ways you can help. You will receive campaign and fundraising updates and cute cat content.</p>
5
+ </div>
6
+ <div class="group-item form-item extra-spacing">
7
+ <label for="newsletter-opt-in">Would you like to get our newsletter? <span class="form-required" title="This field is required.">*</span></label>
8
+ <div class="form-item form-type-radio">
9
+ <input type="radio" id="newsletter-opt-in" name="newsletter" value="opt-in" class="form-radio"> <label class="option" for="newsletter-opt-in">Yes, I’d love to</label>
10
+ </div>
11
+ <div class="form-item form-type-radio">
12
+ <input type="radio" id="newsletter-no-change" name="newsletter" value="no-change" class="form-radio"> <label class="option" for="newsletter-no-change">No, thank you</label>
13
+ </div>
14
+ </div>
15
+ <label for="newsletter-opt-in" class="group-item error form-error is-visible">Newsletter field is required.</label>
16
+ </div>
@@ -1,9 +1,19 @@
1
- <div class="form-item extra-spacing">
2
- <label for="newsletter-opt-in">Would you like to get our newsletter? <span class="form-required" title="This field is required.">*</span></label>
3
- <div class="form-item form-type-radio">
4
- <input type="radio" id="newsletter-opt-in" name="newsletter" value="opt-in" class="form-radio"> <label class="option" for="newsletter-opt-in">Yes, I’d love to</label>
1
+ <div class="form-group opt-in">
2
+ <div class="group-item intro-text">
3
+ <h4>Stay connected</h4>
4
+ <p>Please subscribe to hear about other ways you can help. You will receive campaign and fundraising updates and cute cat content.</p>
5
5
  </div>
6
- <div class="form-item form-type-radio">
7
- <input type="radio" id="newsletter-no-change" name="newsletter" value="no-change" class="form-radio"> <label class="option" for="newsletter-no-change">No, thank you</label>
6
+ <div class="group-item form-item extra-spacing">
7
+ <label for="newsletter-opt-in">Would you like to get our newsletter? <span class="form-required" title="This field is required.">*</span></label>
8
+ <div class="form-item form-type-radio">
9
+ <input type="radio" id="newsletter-opt-in" name="newsletter" value="opt-in" class="form-radio"> <label class="option" for="newsletter-opt-in">Yes, I’d love to</label>
10
+ </div>
11
+ <div class="form-item form-type-radio">
12
+ <input type="radio" id="newsletter-no-change" name="newsletter" value="no-change" class="form-radio"> <label class="option" for="newsletter-no-change">No, thank you</label>
13
+ </div>
14
+ </div>
15
+ <div class="group-item checked-text no-change">
16
+ <h4 class="form-label">Are you sure?</h4>
17
+ <p>If you don’t choose ‘Yes’ you will not receive any cat content from us. You may <a>unsubscribe</a> any time!</p>
8
18
  </div>
9
19
  </div>
@@ -0,0 +1,11 @@
1
+ {% from "./form-items/_macros.html" import hidden, button %}
2
+
3
+ <div id="form">
4
+ <form method="post" accept-charset="UTF-8" novalidate="novalidate">
5
+ {% include "./form-items/opt-in-radios.html" %}
6
+ {% include "./form-items/opt-in-checkbox.html" %}
7
+ {% include "./form-items/checkboxes.html" %}
8
+ {{ hidden("token") }}
9
+ {{ button("Sign up now!", class="expanded primary button large") }}
10
+ </form>
11
+ </div>
@@ -0,0 +1,36 @@
1
+ {% extends "src/html/templates/action-page.html" %}
2
+
3
+ {% set layout = "default" %}
4
+
5
+ {% block page_title %}Sign up now!{% endblock %}
6
+
7
+ {% block top %}
8
+ <p>Reward the chosen human with a slow blink. Scratch stand in front of the computer screen run off table persian cat jump eat fish. Roll on the floor purring your whiskers off cat dog hate mouse eat string barf pillow no baths hate everything.</p>
9
+ {% endblock %}
10
+
11
+ {% block form_intro %}
12
+ <h2>Signup now!</h2>
13
+ <p>Abyssinian tiger american shorthair british shorthair puma and maine coon.</p>
14
+ {% endblock %}
15
+
16
+ {% block progress_bar %}
17
+ {% include "src/html/includes/pgbar.html" %}
18
+ {% endblock %}
19
+
20
+ {% block form %}
21
+ {% include "src/html/includes/signup-form.html" %}
22
+ {% endblock %}
23
+
24
+ {% block content_top %}
25
+ <div class="media-stretch">
26
+ <img src="http://placekitten.com/860/455" alt="test image with cats" crossorigin="">
27
+ </div>
28
+ {% endblock %}
29
+
30
+ {% block content %}
31
+ <h2>Cougar British shorthair turkish angora</h2>
32
+ <p>Twitch tail in permanent irritation attempt to leap between furniture but woefully miscalibrate and bellyflop onto the floor; what's your problem? Get my claw stuck in the dog's ear. Lick plastic bags ask to go outside and ask to come inside and ask to go outside and ask to come inside hell is other people, ignore the squirrels, you'll never catch them anyway or walk on car leaving trail of paw prints on hood and windshield.</p>
33
+ <p>A very wise cat once said:</p>
34
+ <blockquote><p>Always ensure to lay down in such a manner that tail can lightly brush human's nose sleep in the bathroom sink. Scratch catasstrophe and lick the curtain just to be annoying so your pillow is now my pet bed nya nya nyan so run up and down stairs curl up and sleep on the freshly laundered towels.</p></blockquote>
35
+ <p>Need to check on human, have not seen in an hour might be dead oh look, human is alive, hiss at human.</p>
36
+ {% endblock %}
@@ -7,7 +7,7 @@
7
7
  {% block banner_content %}
8
8
  <div class="grid-container with-sidebar">
9
9
  <header id="headline">{% block headline %}{% endblock %}</header>
10
- <div id=form-wrapper class="flex-container align-middle">
10
+ <div id="form-wrapper" class="flex-container align-middle">
11
11
  <div id="form-outer">
12
12
  <div class="intro">{% block form_intro %}{% endblock %}</div>
13
13
  {% block progress_bar %}{% endblock %}
@@ -6,7 +6,7 @@
6
6
 
7
7
  {% block sidebar_bottom %}
8
8
  <div id="sidebar">
9
- <div id=form-wrapper class="flex-container align-middle">
9
+ <div id="form-wrapper" class="flex-container align-middle">
10
10
  <div id="form-outer">
11
11
  <div class="intro">{% block form_intro %}{% endblock %}</div>
12
12
  {% block progress_bar %}{% endblock %}
@@ -10,7 +10,7 @@
10
10
 
11
11
  {% block sidebar %}
12
12
  <div id="sidebar">
13
- <div id=form-wrapper class="flex-container align-middle">
13
+ <div id="form-wrapper" class="flex-container align-middle">
14
14
  <div id="form-outer">
15
15
  <div class="intro">{% block form_intro %}{% endblock %}</div>
16
16
  {% block progress_bar %}{% endblock %}
@@ -4,7 +4,7 @@
4
4
 
5
5
  /// Highlighting background of the headline.
6
6
  /// @type Color
7
- $headline-background: none !default;
7
+ $headline-background: $body-background !default;
8
8
 
9
9
  /// Font family of the headline.
10
10
  /// @type String | List
@@ -27,10 +27,11 @@ $headline-font-size: 2 * $large-font-size !default;
27
27
  $headline-color: color-pick-contrast(
28
28
  if(
29
29
  $headline-background and $headline-background != none,
30
- $headline-background,
31
- $fallback-background
30
+ get-background-color($headline-background),
31
+ get-background-color($fallback-background)
32
32
  ),
33
- ($body-font-color-alt, $body-font-color)
33
+ ($title-color, $body-font-color-alt, $body-font-color),
34
+ 6
34
35
  ) !default;
35
36
 
36
37
  #headline {
@@ -13,8 +13,10 @@
13
13
 
14
14
  // More margin for form items that need extra space.
15
15
  .form-item.extra-spacing {
16
- margin-top: $form-spacing * 2;
17
- margin-bottom: $form-spacing * 2;
16
+ &:not(.group-item) {
17
+ margin-top: $form-spacing * 2;
18
+ margin-bottom: $form-spacing * 2;
19
+ }
18
20
 
19
21
  .help-text {
20
22
  margin-top: $form-spacing;
@@ -50,25 +52,6 @@ input.button.primary {
50
52
  margin-top: $form-spacing * 2;
51
53
  }
52
54
 
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
-
72
55
  // Display radios, checkboxes etc. next to each other.
73
56
  .form-item.inline {
74
57
  &,
@@ -0,0 +1,46 @@
1
+ // Form group
2
+ // - - - - - - - - - - - - - - -
3
+ // Custom overrides for form groups
4
+
5
+ .giftaid,
6
+ .form-group {
7
+ // Override margins.
8
+ margin-top: $form-spacing * 2;
9
+ margin-bottom: $form-spacing * 2;
10
+
11
+ .form-item > div:first-child,
12
+ .form-item > label.show-for-sr + div,
13
+ .form-item > label.element-invisible + div {
14
+ input[type="checkbox"] + label {
15
+ margin-top: 0;
16
+ }
17
+ }
18
+
19
+ #{$text-tags} {
20
+ margin-bottom: $form-spacing * 2;
21
+ padding-#{$global-right}: 0;
22
+ }
23
+
24
+ // Override colors.
25
+ .checked-text {
26
+ h1,
27
+ .h1,
28
+ h2,
29
+ .h2,
30
+ h3,
31
+ .h3,
32
+ h4,
33
+ .h4,
34
+ h5,
35
+ .h5,
36
+ h6,
37
+ .h6,
38
+ a:not(.button),
39
+ blockquote {
40
+ &,
41
+ #form-outer & {
42
+ color: $form-group-checked-text-color;
43
+ }
44
+ }
45
+ }
46
+ }
@@ -106,6 +106,7 @@ $select-line-height: $form-label-line-height !default;
106
106
  $radio-icon-color: $select-triangle-color !default;
107
107
  $radio-align: flex-start !default;
108
108
  $radio-label-font-weight: $global-weight-normal !default;
109
+ $form-group-checkbox-size: rem-calc($base-line-height * 1.25) !default;
109
110
 
110
111
  // Files
111
112
  $file-upload-font-size: $small-font-size !default;
@@ -179,4 +180,3 @@ $loader-color: get-color(primary) !default;
179
180
 
180
181
  // Donation forms
181
182
  $payment-icon-color: $form-label-color !default;
182
- $giftaid-checkbox-size: rem-calc($base-line-height * 1.5) !default;
@@ -82,6 +82,7 @@
82
82
  // Custom components
83
83
  @include mo-button;
84
84
  @include mo-close-button;
85
+ @include mo-form-group;
85
86
  @include mo-form-steps;
86
87
  @include mo-recent-supporters;
87
88
  @include mo-progress-bar;
@@ -94,6 +95,7 @@
94
95
 
95
96
  @import "form/forms";
96
97
  @import "form/fields";
98
+ @import "form/form-group";
97
99
  @import "form/button";
98
100
  @import "form/donation-amount-button";
99
101
  @import "form/paymethod-select-button";