@foeewni/web-core 2.2.3 → 2.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.
@@ -13,7 +13,7 @@ export default {
13
13
  },
14
14
 
15
15
  getHalfScrollTop: function getHalfScrollTop() {
16
- return exports.default.getScrollTop() + (window.innerHeight / 2);
16
+ return this.getScrollTop() + (window.innerHeight / 2);
17
17
  },
18
18
 
19
19
  getDocumentHeight: function getDocumentHeight() {
@@ -24,14 +24,14 @@ export default {
24
24
  },
25
25
 
26
26
  getScrollFromScreens: function getScrollFromScreens(screens) {
27
- const height = exports.default.getViewportHeight();
27
+ const height = this.getViewportHeight();
28
28
 
29
29
  return height * screens;
30
30
  },
31
31
 
32
32
 
33
33
  getScrollFromPerc: function getScrollFromPerc(perc) {
34
- const height = exports.default.getDocumentHeight();
34
+ const height = this.getDocumentHeight();
35
35
 
36
36
  return height / 100 * perc;
37
37
  },
@@ -45,8 +45,8 @@ export default {
45
45
  const { top } = $(el).offset();
46
46
  const height = el.clientHeight;
47
47
  const bottom = top + height;
48
- const scroll = exports.default.getScrollTop();
49
- const viewHeight = exports.default.getViewportHeight();
48
+ const scroll = this.getScrollTop();
49
+ const viewHeight = this.getViewportHeight();
50
50
  return !(bottom < scroll || top - viewHeight >= scroll);
51
51
  },
52
52
 
@@ -69,4 +69,14 @@ export default {
69
69
 
70
70
  return breakpoints[breakpointIndex].size;
71
71
  },
72
+
73
+ getHeaderHeight: function getHeaderHeight() {
74
+ const $ = window.jQuery;
75
+ const breakpoint = this.getCurrentBreakpoint();
76
+
77
+ if ($('.foe-header').length) {
78
+ return parseInt(scss[`foe-header-height-${breakpoint}`], 10);
79
+ }
80
+ return 0;
81
+ },
72
82
  };
@@ -13,4 +13,8 @@
13
13
  @each $screen, $size in $container-max-widths {
14
14
  container-#{$screen}: $size;
15
15
  }
16
+
17
+ @each $screen, $size in $foe-header-heights {
18
+ foe-header-height-#{$screen}: $size;
19
+ }
16
20
  }
@@ -388,9 +388,9 @@ $line-height-sm: 1.5;
388
388
  $border-width: 1px;
389
389
  $border-color: $gray-300;
390
390
 
391
- $border-radius: .1rem;
392
- $border-radius-lg: .1rem;
393
- $border-radius-sm: .1rem;
391
+ $border-radius: .1rem * 3;
392
+ $border-radius-lg: .1rem * 4;
393
+ $border-radius-sm: .1rem * 2;
394
394
 
395
395
  $box-shadow-sm: 0 .125rem .25rem rgba($black, .075);
396
396
  $box-shadow: 0 .5rem 1rem rgba($black, .15);
@@ -525,7 +525,7 @@ $input-btn-padding-x: .75rem;
525
525
  $input-btn-line-height: $line-height-base;
526
526
 
527
527
  $input-btn-focus-width: .2rem;
528
- $input-btn-focus-color: rgba($component-active-bg, .25);
528
+ $input-btn-focus-color: rgba($component-active-bg, .75);
529
529
  $input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;
530
530
 
531
531
  $input-btn-padding-y-sm: .25rem;
@@ -1141,6 +1141,18 @@ $foe-nav-logo-height-medium: $foe-nav-height-medium*3/5;
1141
1141
  $foe-nav-logo-height-large: $foe-nav-height-large*3/5;
1142
1142
  $foe-nav-logo-height-large-scrolled: $foe-nav-height-large-scrolled*3/5; // Hence can be the same size of navbar when scrolled
1143
1143
 
1144
+ // Manually add in all header variants based on bootstrap-named breakpoints.
1145
+ // Likely prone to change in the Bootstrap 5+ refactor.
1146
+
1147
+ // @TODO / @REFACTOR / @BS5
1148
+ $foe-header-heights: (
1149
+ xs: $foe-nav-height-small,
1150
+ sm: $foe-nav-height-small,
1151
+ md: $foe-nav-height-medium,
1152
+ lg: $foe-nav-height-large-scrolled,
1153
+ xl: $foe-nav-height-large-scrolled,
1154
+ xxl: $foe-nav-height-large-scrolled
1155
+ );
1144
1156
 
1145
1157
  // CTA button
1146
1158
  $foe-nav-cta-height-small: 35px;