ui-kit-ck-consultant 0.5.261 → 0.5.263

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.
@@ -1085,14 +1085,109 @@ var Header = /*#__PURE__*/function (_React$Component) {
1085
1085
  _inheritsLoose(Header, _React$Component);
1086
1086
 
1087
1087
  function Header() {
1088
- return _React$Component.apply(this, arguments) || this;
1088
+ var _this;
1089
+
1090
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1091
+ args[_key] = arguments[_key];
1092
+ }
1093
+
1094
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1095
+
1096
+ _this.snowflake = function () {
1097
+ var COUNT = 125;
1098
+ var masthead = document.querySelector('.sky');
1099
+ var canvas = document.createElement('canvas');
1100
+ var ctx = canvas.getContext('2d');
1101
+ var width = masthead.clientWidth;
1102
+ var height = masthead.clientHeight;
1103
+ var i = 0;
1104
+ var active = false;
1105
+
1106
+ function onResize() {
1107
+ width = masthead.clientWidth;
1108
+ height = masthead.clientHeight;
1109
+ canvas.width = width;
1110
+ canvas.height = height;
1111
+ ctx.fillStyle = '#FFF';
1112
+ var wasActive = active;
1113
+ active = width > 600;
1114
+ if (!wasActive && active) requestAnimFrame(update);
1115
+ }
1116
+
1117
+ var Snowflake = function Snowflake() {
1118
+ this.x = 0;
1119
+ this.y = 0;
1120
+ this.vy = 0;
1121
+ this.vx = 0;
1122
+ this.r = 0;
1123
+ this.reset();
1124
+ };
1125
+
1126
+ Snowflake.prototype.reset = function () {
1127
+ this.x = Math.random() * width;
1128
+ this.y = Math.random() * -height;
1129
+ this.vy = 1 + Math.random() * 3;
1130
+ this.vx = 0.5 - Math.random();
1131
+ this.r = 1 + Math.random() * 2;
1132
+ this.o = 0.5 + Math.random() * 0.5;
1133
+ };
1134
+
1135
+ canvas.style.position = 'absolute';
1136
+ canvas.style.left = canvas.style.top = '0';
1137
+ var snowflakes = [],
1138
+ snowflake;
1139
+
1140
+ for (i = 0; i < COUNT; i++) {
1141
+ snowflake = new Snowflake();
1142
+ snowflake.reset();
1143
+ snowflakes.push(snowflake);
1144
+ }
1145
+
1146
+ function update() {
1147
+ ctx.clearRect(0, 0, width, height);
1148
+ if (!active) return;
1149
+
1150
+ for (i = 0; i < COUNT; i++) {
1151
+ snowflake = snowflakes[i];
1152
+ snowflake.y += snowflake.vy;
1153
+ snowflake.x += snowflake.vx;
1154
+ ctx.globalAlpha = snowflake.o;
1155
+ ctx.beginPath();
1156
+ ctx.arc(snowflake.x, snowflake.y, snowflake.r, 0, Math.PI * 2, false);
1157
+ ctx.closePath();
1158
+ ctx.fill();
1159
+
1160
+ if (snowflake.y > height) {
1161
+ snowflake.reset();
1162
+ }
1163
+ }
1164
+
1165
+ requestAnimFrame(update);
1166
+ }
1167
+
1168
+ window.requestAnimFrame = function () {
1169
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
1170
+ window.setTimeout(callback, 1000 / 60);
1171
+ };
1172
+ }();
1173
+
1174
+ onResize();
1175
+ window.addEventListener('resize', onResize, false);
1176
+ masthead.appendChild(canvas);
1177
+ };
1178
+
1179
+ return _this;
1089
1180
  }
1090
1181
 
1091
1182
  var _proto = Header.prototype;
1092
1183
 
1184
+ _proto.componentDidMount = function componentDidMount() {
1185
+ this.snowflake();
1186
+ };
1187
+
1093
1188
  _proto.render = function render() {
1094
1189
  return /*#__PURE__*/React.createElement("div", {
1095
- className: classNames$1(style$b.header, this.props.className)
1190
+ className: classNames$1(style$b.header, this.props.className, "sky")
1096
1191
  }, /*#__PURE__*/React.createElement("div", {
1097
1192
  className: style$b.header_absolute,
1098
1193
  style: this.props.styleBackground
@@ -4209,7 +4304,7 @@ var Footer = /*#__PURE__*/function (_React$Component) {
4209
4304
  xs: 12,
4210
4305
  md: 6,
4211
4306
  lg: 4,
4212
- className: "mt-5 mb-5"
4307
+ className: "mt-5 mb-5 d-flex"
4213
4308
  }, /*#__PURE__*/React.createElement("a", {
4214
4309
  className: "m-auto",
4215
4310
  target: "_blank",
@@ -4217,7 +4312,7 @@ var Footer = /*#__PURE__*/function (_React$Component) {
4217
4312
  onClick: this.props.onRgpdClick
4218
4313
  }, "RGPD & Cookies")), this.props.socialNetwork ? /*#__PURE__*/React.createElement(Col, {
4219
4314
  xs: 12,
4220
- className: "mt-5 mb-5 d-flex text-center"
4315
+ className: "mt-5 mb-5 text-center"
4221
4316
  }, this.props.socialNetwork) : null));
4222
4317
  };
4223
4318