@moreonion/foundist 3.2.4 → 3.2.6

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.2.4",
3
+ "version": "3.2.6",
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.2.2",
29
+ "@moreonion/foundation-base": "^3.2.3",
30
30
  "vite-plugin-nunjucks": "^0.1.10"
31
31
  },
32
32
  "lint-staged": {
@@ -30,11 +30,5 @@
30
30
  {% block content %}
31
31
  <h2>Cougar British shorthair turkish angora</h2>
32
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
- <div class="letter">
34
- <h5>Give cats a chance</h5>
35
- <p>A very wise cat once said: ignore the squirrels, you'll never catch them anyway. Twitch tail in permanent irritation attempt to leap between furniture but woefully miscalibrate and bellyflop onto the floor.</p>
36
- <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>
37
- <p>Need to check on human, have not seen in an hour might be dead oh look, human is alive, hiss at human.</p>
38
- <p>Yours,<br>Kitty the Cat</p>
39
- </div>
33
+ {% include "src/html/includes/letter.html" %}
40
34
  {% endblock %}
@@ -0,0 +1,18 @@
1
+ <div class="letter">
2
+ <h5>Give cats a chance</h5>
3
+ <p>A very wise cat once said: ignore the squirrels, you'll never catch them anyway. Twitch tail in permanent irritation attempt to leap between furniture but woefully miscalibrate and bellyflop onto the floor.</p>
4
+ <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>
5
+ <p>Need to check on human, have not seen in an hour might be dead oh look, human is alive, hiss at human.</p>
6
+ <p>Yours,</p>
7
+ <ul class="signatures">
8
+ <li>
9
+ <span class="signature-image"><img src="http://placekitten.com/100/100" alt="portrait of a cat" crossorigin=""></span>
10
+ <span class="signature-name">Kitty</span>
11
+ <span class="signature-description">the cat</span>
12
+ </li>
13
+ </ul>
14
+ <div class="counter-wrapper">
15
+ <p class="counter">and 3,381 cats have signed!</p>
16
+ <p>Some more text below the counter</p>
17
+ </div>
18
+ </div>
@@ -106,7 +106,7 @@ export function stickyButton (options = {}) {
106
106
  }
107
107
  // Find blocking element
108
108
  const target = $cta.find('a').attr('href')
109
- if (target && !target.includes('/')) {
109
+ if (target && !target.includes('/') && $(target).is(':visible')) {
110
110
  defaults.blocker = target
111
111
  }
112
112
  // Put button(s) in right position.
@@ -121,7 +121,9 @@ export function stickyButton (options = {}) {
121
121
  $cta.appendTo('#page').addClass('bottom')
122
122
  }
123
123
  // Add SmoothScroll
124
- new SmoothScroll($cta.find('a')) // eslint-disable-line no-new
124
+ if ($(target).is(':visible')) {
125
+ new SmoothScroll($cta.find('a')) // eslint-disable-line no-new
126
+ }
125
127
  // Initialize plugin
126
128
  return $cta.map((i, el) => {
127
129
  return new Foundation.StickyButton($(el), {
@@ -13,6 +13,18 @@ $letter-shadow-color: color.scale(
13
13
  $alpha: -60%
14
14
  ) !default;
15
15
 
16
+ $letter-signature-max-width: 12rem !default;
17
+ $letter-signature-justify-content: flex-start !default;
18
+
19
+ $letter-counter-font-family: $header-font-family !default;
20
+ $letter-counter-font-size: $large-font-size !default;
21
+ $letter-counter-line-height: if(
22
+ $letter-counter-font-size == $large-font-size,
23
+ $large-lineheight,
24
+ grid-lineheight($letter-counter-font-size)
25
+ ) !default;
26
+ $letter-counter-font-weight: $global-weight-bold !default;
27
+
16
28
  .letter {
17
29
  position: relative;
18
30
  background: $letter-background;
@@ -50,4 +62,53 @@ $letter-shadow-color: color.scale(
50
62
  transform: skew(3deg) rotate(3deg);
51
63
  transform-origin: bottom right;
52
64
  }
65
+
66
+ // Styles for uploaded signature images + name and description
67
+ .signatures {
68
+ @extend .no-bullet;
69
+ display: grid;
70
+ grid-template-rows: auto;
71
+ grid-template-columns: auto;
72
+ gap: $global-margin;
73
+
74
+ @include breakpoint(medium) {
75
+ grid-template-columns: repeat(2, auto);
76
+ }
77
+ @include breakpoint(xlarge) {
78
+ grid-template-columns: repeat(3, auto);
79
+ }
80
+
81
+ li {
82
+ display: flex;
83
+ flex-direction: column;
84
+ justify-content: $letter-signature-justify-content;
85
+ max-width: $letter-signature-max-width;
86
+ }
87
+ }
88
+
89
+ .signature-name {
90
+ font-weight: $global-weight-bold;
91
+ }
92
+
93
+ .signature-image {
94
+ margin-bottom: 0.5 * $global-margin;
95
+ }
96
+
97
+ // Styles for some big text with a counter
98
+ .counter {
99
+ font-family: $letter-counter-font-family;
100
+ font-size: $letter-counter-font-size;
101
+ line-height: $letter-counter-line-height;
102
+ font-weight: $letter-counter-font-weight;
103
+ margin-bottom: 0.5 * $global-margin;
104
+ }
105
+
106
+ .counter-wrapper {
107
+ margin-bottom: $global-margin;
108
+
109
+ &:last-child {
110
+ margin-top: 2 * $global-margin;
111
+ text-align: center;
112
+ }
113
+ }
53
114
  }