2e0427c3 by Jeff Balicki

pi charts and elements

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 53f44931
Showing 57 changed files with 1610 additions and 20 deletions
1 <?php
2
3
4 // Create id attribute allowing for custom "anchor" value.
5 $id = 'msf-pi-' . $block['id'];
6 if( !empty($block['anchor']) ) {
7 $id = $block['anchor'];
8 }
9
10 // Create class attribute allowing for custom "className" and "align" values.
11 $className = 'msf-pi';
12 if( !empty($block['className']) ) {
13 $className .= ' ' . $block['className'];
14 }
15 if( !empty($block['align']) ) {
16 $className .= ' align' . $block['align'];
17 }
18
19 $title = get_field('title') ?: null;
20 $theme = null;
21 $inner_blocks = get_field('data') ?: null;
22 $color = get_field('foreground_color') ?: null;
23
24 $data = [];
25
26 foreach($inner_blocks as $ib) {
27 $data[] = [ "name" => $ib['name'], "value" => (int)$ib['value'], 'color' => $ib['color'], 'font_color' => $color ];
28 }
29
30 ?>
31
32 <script>
33
34 window.addEventListener('scroll', function(event) {
35 if(!jQuery("#<?= $id ?>").hasClass('visible') && window.tz_checkVisible(jQuery("#<?= $id ?>"), null, 200)) {
36 jQuery("#<?= $id ?>").addClass('visible');
37 jQuery("#<?= $id ?>").addClass('is-visible');
38 window.renderPI(document.getElementById("<?= $id ?>"))
39 }
40 });
41
42
43 </script>
44 <div class='pi <?= $theme ?>' class="<?php echo esc_attr($className); ?>" style='width:100%;'>
45 <h3><?= $title ?></h3>
46 <div id="<?= $id ?>" data-points='<?= json_encode($data) ?>' data-color="<?= $color ?>"></div>
47 </div>
1 # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
3 # dependencies
4 /node_modules
5 /.pnp
6 .pnp.js
7
8 # testing
9 /coverage
10
11 # misc
12 .DS_Store
13 .env.local
14 .env.development.local
15 .env.test.local
16 .env.production.local
17
18 npm-debug.log*
19 yarn-debug.log*
20 yarn-error.log*
1 # Getting Started with Create React App
2
3 This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4
5 ## Available Scripts
6
7 In the project directory, you can run:
8
9 ### `yarn start`
10
11 Runs the app in the development mode.\
12 Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13
14 The page will reload if you make edits.\
15 You will also see any lint errors in the console.
16
17 ### `yarn test`
18
19 Launches the test runner in the interactive watch mode.\
20 See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21
22 ### `yarn build`
23
24 Builds the app for production to the `build` folder.\
25 It correctly bundles React in production mode and optimizes the build for the best performance.
26
27 The build is minified and the filenames include the hashes.\
28 Your app is ready to be deployed!
29
30 See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31
32 ### `yarn eject`
33
34 **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35
36 If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37
38 Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39
40 You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41
42 ## Learn More
43
44 You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45
46 To learn React, check out the [React documentation](https://reactjs.org/).
47
48 ### Code Splitting
49
50 This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51
52 ### Analyzing the Bundle Size
53
54 This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55
56 ### Making a Progressive Web App
57
58 This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59
60 ### Advanced Configuration
61
62 This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63
64 ### Deployment
65
66 This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67
68 ### `yarn build` fails to minify
69
70 This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
1 {
2 "files": {
3 "main.js": "/static/js/main.a7bb4a96.chunk.js",
4 "main.js.map": "/static/js/main.a7bb4a96.chunk.js.map",
5 "runtime-main.js": "/static/js/runtime-main.a933fda7.js",
6 "runtime-main.js.map": "/static/js/runtime-main.a933fda7.js.map",
7 "static/js/2.c3c99db9.chunk.js": "/static/js/2.c3c99db9.chunk.js",
8 "static/js/2.c3c99db9.chunk.js.map": "/static/js/2.c3c99db9.chunk.js.map",
9 "index.html": "/index.html",
10 "static/js/2.c3c99db9.chunk.js.LICENSE.txt": "/static/js/2.c3c99db9.chunk.js.LICENSE.txt"
11 },
12 "entrypoints": [
13 "static/js/runtime-main.a933fda7.js",
14 "static/js/2.c3c99db9.chunk.js",
15 "static/js/main.a7bb4a96.chunk.js"
16 ]
17 }
...\ No newline at end of file ...\ No newline at end of file
1 <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>React App</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="cbv-globe"></div><script>!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],p=0,s=[];p<f.length;p++)l=f[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(c&&c(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this["webpackJsonpcbv-globe"]=this["webpackJsonpcbv-globe"]||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var c=i;t()}([])</script><script src="/static/js/2.c3c99db9.chunk.js"></script><script src="/static/js/main.a7bb4a96.chunk.js"></script></body><script>window.renderProgression(document.getElementById("cbv-globe"))</script></html>
...\ No newline at end of file ...\ No newline at end of file
1 {
2 "short_name": "React App",
3 "name": "Create React App Sample",
4 "icons": [
5 {
6 "src": "favicon.ico",
7 "sizes": "64x64 32x32 24x24 16x16",
8 "type": "image/x-icon"
9 },
10 {
11 "src": "logo192.png",
12 "type": "image/png",
13 "sizes": "192x192"
14 },
15 {
16 "src": "logo512.png",
17 "type": "image/png",
18 "sizes": "512x512"
19 }
20 ],
21 "start_url": ".",
22 "display": "standalone",
23 "theme_color": "#000000",
24 "background_color": "#ffffff"
25 }
1 # https://www.robotstxt.org/robotstxt.html
2 User-agent: *
3 Disallow:
This diff could not be displayed because it is too large.
1 /*
2 object-assign
3 (c) Sindre Sorhus
4 @license MIT
5 */
6
7 /*!
8 Copyright (c) 2018 Jed Watson.
9 Licensed under the MIT License (MIT), see
10 http://jedwatson.github.io/classnames
11 */
12
13 /*! Conditions:: INITIAL */
14
15 /*! Production:: $accept : expression $end */
16
17 /*! Production:: css_value : ANGLE */
18
19 /*! Production:: css_value : CHS */
20
21 /*! Production:: css_value : EMS */
22
23 /*! Production:: css_value : EXS */
24
25 /*! Production:: css_value : FREQ */
26
27 /*! Production:: css_value : LENGTH */
28
29 /*! Production:: css_value : PERCENTAGE */
30
31 /*! Production:: css_value : REMS */
32
33 /*! Production:: css_value : RES */
34
35 /*! Production:: css_value : SUB css_value */
36
37 /*! Production:: css_value : TIME */
38
39 /*! Production:: css_value : VHS */
40
41 /*! Production:: css_value : VMAXS */
42
43 /*! Production:: css_value : VMINS */
44
45 /*! Production:: css_value : VWS */
46
47 /*! Production:: css_variable : CSS_VAR LPAREN CSS_CPROP COMMA math_expression RPAREN */
48
49 /*! Production:: css_variable : CSS_VAR LPAREN CSS_CPROP RPAREN */
50
51 /*! Production:: expression : math_expression EOF */
52
53 /*! Production:: math_expression : LPAREN math_expression RPAREN */
54
55 /*! Production:: math_expression : NESTED_CALC LPAREN math_expression RPAREN */
56
57 /*! Production:: math_expression : SUB PREFIX SUB NESTED_CALC LPAREN math_expression RPAREN */
58
59 /*! Production:: math_expression : css_value */
60
61 /*! Production:: math_expression : css_variable */
62
63 /*! Production:: math_expression : math_expression ADD math_expression */
64
65 /*! Production:: math_expression : math_expression DIV math_expression */
66
67 /*! Production:: math_expression : math_expression MUL math_expression */
68
69 /*! Production:: math_expression : math_expression SUB math_expression */
70
71 /*! Production:: math_expression : value */
72
73 /*! Production:: value : NUMBER */
74
75 /*! Production:: value : SUB NUMBER */
76
77 /*! Rule:: $ */
78
79 /*! Rule:: (--[0-9a-z-A-Z-]*) */
80
81 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)% */
82
83 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)Hz\b */
84
85 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)\b */
86
87 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ch\b */
88
89 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)cm\b */
90
91 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)deg\b */
92
93 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dpcm\b */
94
95 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dpi\b */
96
97 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dppx\b */
98
99 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)em\b */
100
101 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ex\b */
102
103 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)grad\b */
104
105 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)in\b */
106
107 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)kHz\b */
108
109 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)mm\b */
110
111 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ms\b */
112
113 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)pc\b */
114
115 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)pt\b */
116
117 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)px\b */
118
119 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)rad\b */
120
121 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)rem\b */
122
123 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)s\b */
124
125 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)turn\b */
126
127 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vh\b */
128
129 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vmax\b */
130
131 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vmin\b */
132
133 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vw\b */
134
135 /*! Rule:: ([a-z]+) */
136
137 /*! Rule:: (calc) */
138
139 /*! Rule:: (var) */
140
141 /*! Rule:: , */
142
143 /*! Rule:: - */
144
145 /*! Rule:: \( */
146
147 /*! Rule:: \) */
148
149 /*! Rule:: \* */
150
151 /*! Rule:: \+ */
152
153 /*! Rule:: \/ */
154
155 /*! Rule:: \s+ */
156
157 /*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
158
159 /** @license React v0.20.2
160 * scheduler.production.min.js
161 *
162 * Copyright (c) Facebook, Inc. and its affiliates.
163 *
164 * This source code is licensed under the MIT license found in the
165 * LICENSE file in the root directory of this source tree.
166 */
167
168 /** @license React v16.10.2
169 * react-is.production.min.js
170 *
171 * Copyright (c) Facebook, Inc. and its affiliates.
172 *
173 * This source code is licensed under the MIT license found in the
174 * LICENSE file in the root directory of this source tree.
175 */
176
177 /** @license React v17.0.2
178 * react-dom.production.min.js
179 *
180 * Copyright (c) Facebook, Inc. and its affiliates.
181 *
182 * This source code is licensed under the MIT license found in the
183 * LICENSE file in the root directory of this source tree.
184 */
185
186 /** @license React v17.0.2
187 * react-jsx-runtime.production.min.js
188 *
189 * Copyright (c) Facebook, Inc. and its affiliates.
190 *
191 * This source code is licensed under the MIT license found in the
192 * LICENSE file in the root directory of this source tree.
193 */
194
195 /** @license React v17.0.2
196 * react.production.min.js
197 *
198 * Copyright (c) Facebook, Inc. and its affiliates.
199 *
200 * This source code is licensed under the MIT license found in the
201 * LICENSE file in the root directory of this source tree.
202 */
This diff could not be displayed because it is too large.
1 !function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],p=0,s=[];p<f.length;p++)l=f[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(c&&c(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this["webpackJsonpcbv-globe"]=this["webpackJsonpcbv-globe"]||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var c=i;t()}([]);
2 //# sourceMappingURL=runtime-main.a933fda7.js.map
...\ No newline at end of file ...\ No newline at end of file
1 {"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU8B,QAGnC,IAAIC,EAASH,EAAiB5B,GAAY,CACzCK,EAAGL,EACHgC,GAAG,EACHF,QAAS,IAUV,OANAhB,EAAQd,GAAUW,KAAKoB,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAG/DK,EAAOC,GAAI,EAGJD,EAAOD,QAKfJ,EAAoBO,EAAInB,EAGxBY,EAAoBQ,EAAIN,EAGxBF,EAAoBS,EAAI,SAASL,EAASM,EAAMC,GAC3CX,EAAoBY,EAAER,EAASM,IAClC5B,OAAO+B,eAAeT,EAASM,EAAM,CAAEI,YAAY,EAAMC,IAAKJ,KAKhEX,EAAoBgB,EAAI,SAASZ,GACX,qBAAXa,QAA0BA,OAAOC,aAC1CpC,OAAO+B,eAAeT,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DrC,OAAO+B,eAAeT,EAAS,aAAc,CAAEe,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKzC,OAAO0C,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBzC,OAAO+B,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBS,EAAEc,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAAStB,GAChC,IAAIM,EAASN,GAAUA,EAAOiB,WAC7B,WAAwB,OAAOjB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,EAAoBY,EAAI,SAASgB,EAAQC,GAAY,OAAO/C,OAAOC,UAAUC,eAAeC,KAAK2C,EAAQC,IAGzG7B,EAAoB8B,EAAI,IAExB,IAAIC,EAAaC,KAAK,yBAA2BA,KAAK,0BAA4B,GAC9EC,EAAmBF,EAAW5C,KAAKuC,KAAKK,GAC5CA,EAAW5C,KAAOf,EAClB2D,EAAaA,EAAWG,QACxB,IAAI,IAAIvD,EAAI,EAAGA,EAAIoD,EAAWlD,OAAQF,IAAKP,EAAqB2D,EAAWpD,IAC3E,IAAIU,EAAsB4C,EAI1BxC,I","file":"static/js/runtime-main.a933fda7.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = this[\"webpackJsonpcbv-globe\"] = this[\"webpackJsonpcbv-globe\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 {
2 "name": "cbv-globe",
3 "version": "0.1.0",
4 "private": true,
5 "dependencies": {
6 "@testing-library/jest-dom": "^5.11.4",
7 "@testing-library/react": "^11.1.0",
8 "@testing-library/user-event": "^12.1.10",
9 "babel-loader": "8.1.0",
10 "i18next": "^20.3.1",
11 "i18next-browser-languagedetector": "^6.1.1",
12 "react": "^17.0.2",
13 "react-dom": "^17.0.2",
14 "react-i18next": "^11.10.0",
15 "react-scripts": "4.0.3",
16 "react-simple-maps": "2.1.2",
17 "react-spring": "^9.2.1",
18 "react-tooltip": "latest",
19 "react-visibility-sensor": "^5.1.1",
20 "recharts": "^2.0.9",
21 "web-vitals": "^1.0.1"
22 },
23 "scripts": {
24 "start": "react-scripts start",
25 "build": "react-scripts build",
26 "test": "react-scripts test",
27 "eject": "react-scripts eject"
28 },
29 "eslintConfig": {
30 "extends": [
31 "react-app",
32 "react-app/jest"
33 ]
34 },
35 "browserslist": {
36 "production": [
37 ">0.2%",
38 "not dead",
39 "not op_mini all"
40 ],
41 "development": [
42 "last 1 chrome version",
43 "last 1 firefox version",
44 "last 1 safari version"
45 ]
46 }
47 }
1 <svg width="768px" height="318px" viewBox="0 0 768 318" version="1.1">
2 <title>sectors-2</title>
3 <desc>Created with Sketch.</desc>
4 <defs></defs>
5 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
6 <g id="sectors-2">
7 <circle cx="300" cy="152" r="58" data-r="58" id="Fill-115" fill="#A4D6CF"></circle>
8 <circle cx="450" cy="150" r="24" data-r="24" id="Fill-116" fill="#6BC1BA"></circle>
9 <circle cx="470" cy="225" r="2425" data-r="24" id="Fill-117" fill="#A4D6CF"></circle>
10 <circle cx="375" cy="280" r="47" data-r="47" id="Fill-118" fill="#DAEEEB"></circle>
11 <g id="Professional-Valuation-Services" className="115" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(50.000000, 83.000000)" : "translate(50.000000, 83.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="18" font-weight="300">
12 <text id="Professional-Valuati">
13 <tspan x="0.273" y="14">{t('pro.professional')}</tspan>
14 <tspan x={t('pro.valuation.x')} y="35.6000073">{t('pro.Valuation')}</tspan>
15 <tspan x={t('pro.services.x')} y="57.2000146">{t('pro.Services')}</tspan>
16 </text>
17 </g>
18 <g id="Financial-Services" className="118" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(125.000000, 224.000000)" : "translate(125.000000, 224.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="13" font-weight="300">
19 <text>
20 <tspan x="0.677" y="10">{t('pro.Financial Services')}</tspan>
21 <tspan x="17.395" y="25.6000053">{t('pro.Industry')}</tspan>
22 <tspan x="18.5585" y="41.2000105">{t('pro.Government')}</tspan>
23 </text>
24 </g>
25 <g id="Other" className="116" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(55.000000, 224.000000)" : "translate(63.000000, 224.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="10" font-weight="300">
26 <text>
27 <tspan x="0.802" y="10">{t('pro.Retired')}</tspan>
28 </text>
29 </g>
30 <g id="50%" class="115" opacity="1" transform="translate(270.000000, 147.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="36" font-weight="bold" style="opacity: 1;"><text id="49%"><tspan x="0.8076" y="14.8007812">50%</tspan></text></g>
31 <g id="34%" class="118" opacity="1" transform="translate(345.000000, 275.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="34" font-weight="bold" style="opacity: 1;"><text><tspan x="0.5856" y="14.800781">39%</tspan></text></g>
32 <g id="10%" class="116" opacity="1" transform="translate(437.000000, 143.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="22" font-weight="bold" style="opacity: 1;"><text><tspan x="0.2997" y="14.800781">3%</tspan></text></g>
33 <g id="Retired" className="117" opacity={0} transform="translate(76.000000, 308.000000)" fill="#FFFFFF" font-family="Gotham-ExtraLight, Gotham" font-size="11" font-weight="300">
34 <text>
35 <tspan x="0" y="9">{t('pro.Other')}</tspan>
36 </text>
37 </g>
38 <g id="6%" class="117" opacity="1" transform="translate(455.000000, 217.000000)" fill="#221D58" font-family="Gotham-Bold, Gotham" font-size="22" font-weight="700" style="opacity: 1;"><text><tspan x="0.2495" y="14.800781">3%</tspan></text></g>
39 <path className="117" opacity={0} d="M94.4777,289.2349 L94.4777,263.4129" id="Stroke-210" stroke="#FFFFFF" stroke-width="0.5"></path>
40 </g>
41 </g>
42 </svg>
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE html>
2 <html lang="en">
3
4 <head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7 <meta name="theme-color" content="#000000">
8 <!--
9 manifest.json provides metadata used when your web app is added to the
10 homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
11 -->
12 <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
13 <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
14 <!--
15 Notice the use of %PUBLIC_URL% in the tags above.
16 It will be replaced with the URL of the `public` folder during the build.
17 Only files inside the `public` folder can be referenced from the HTML.
18
19 Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
20 work correctly both with client-side routing and a non-root public URL.
21 Learn how to configure a non-root public URL by running `npm run build`.
22 -->
23 <title>React App</title>
24 </head>
25
26 <body>
27 <noscript>
28 You need to enable JavaScript to run this app.
29 </noscript>
30 <div id="cbv-globe"></div>
31 <!--
32 This HTML file is a template.
33 If you open it directly in the browser, you will see an empty page.
34
35 You can add webfonts, meta tags, or analytics to this file.
36 The build step will place the bundled scripts into the <body> tag.
37
38 To begin the development, run `npm start` or `yarn start`.
39 To create a production bundle, use `npm run build` or `yarn build`.
40 -->
41 </body>
42
43 <script>
44 window.renderProgression(document.getElementById('cbv-globe'));
45 </script>
46
47 </html>
...\ No newline at end of file ...\ No newline at end of file
1 {
2 "short_name": "React App",
3 "name": "Create React App Sample",
4 "icons": [
5 {
6 "src": "favicon.ico",
7 "sizes": "64x64 32x32 24x24 16x16",
8 "type": "image/x-icon"
9 },
10 {
11 "src": "logo192.png",
12 "type": "image/png",
13 "sizes": "192x192"
14 },
15 {
16 "src": "logo512.png",
17 "type": "image/png",
18 "sizes": "512x512"
19 }
20 ],
21 "start_url": ".",
22 "display": "standalone",
23 "theme_color": "#000000",
24 "background_color": "#ffffff"
25 }
1 # https://www.robotstxt.org/robotstxt.html
2 User-agent: *
3 Disallow:
This diff could not be displayed because it is too large.
1 import React, { memo } from "react";
2 import { BarChart, Bar, ResponsiveContainer, LabelList, XAxis, YAxis, Cell } from 'recharts';
3 import { useTranslation, Trans } from 'react-i18next';
4
5 const renderCustomizedLabel = (props) => {
6 const {
7 x, y, width, height, name, fill
8 } = props;
9
10 return (
11 <text x={20} y={y + 35} fill={"#fff"} offset={15} height={55} textAnchor="start">
12 {(name < 900)?name+"*":name}
13 </text>
14 );
15 };
16
17 const CBVBars = ({ data }) => {
18
19 const { t } = useTranslation();
20
21 return (
22 <>
23 <ResponsiveContainer width={'100%'} >
24 <BarChart layout="vertical" data={ data } height={600}>
25 <XAxis type="number" dataKey="value" axisLine={false} tick={false} />
26 <YAxis dataKey="name" type="category" axisLine={false} tick={false}/>
27 <Bar dataKey="value">
28 {
29 data.map((entry, index) => (
30 <Cell x={0} height={55} key={`cell-${index}`} fill={(index % 2 == 0)?"#706B88":"#453E61"} />
31 ))
32 }
33 <LabelList dataKey="name" content={renderCustomizedLabel} />
34 </Bar>
35 </BarChart>
36 </ResponsiveContainer>
37 <small>&nbsp;{t("one-term-only")}</small>
38 </>
39 )
40 }
41
42 export default memo(CBVBars);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { BarChart, Bar, ResponsiveContainer, LabelList, XAxis, YAxis, Cell } from 'recharts';
3 import { useTranslation, Trans } from 'react-i18next';
4
5 const renderCustomizedLabel2021 = (props) => {
6 const {
7 x, y, width, height, name, fill
8 } = props;
9
10 return (
11 <text x={20} y={y + 30} fill={"#fff"} offset={15} height={55} textAnchor="start">
12 {(name < 900)?name+"*":name}
13 </text>
14 );
15 };
16
17 const CBVBars2021 = ({ data }) => {
18
19 const { t } = useTranslation();
20
21 return (
22 <>
23 <ResponsiveContainer width={'100%'} >
24 <BarChart layout="vertical" data={ data } height={600}>
25 <XAxis type="number" dataKey="value" axisLine={false} tick={false} />
26 <YAxis dataKey="name" type="category" axisLine={false} tick={false}/>
27 <Bar dataKey="value">
28 {
29 data.map((entry, index) => (
30 <Cell x={0} height={45} key={`cell-${index}`} fill={(index % 2 == 0)?"#6AC9C8":"#b0e0df"} />
31 ))
32 }
33 <LabelList dataKey="name" content={renderCustomizedLabel2021} />
34 </Bar>
35 </BarChart>
36 </ResponsiveContainer>
37 </>
38 )
39 }
40
41 export default memo(CBVBars2021);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { AreaChart, Area, XAxis, YAxis, Tooltip, ResponsiveContainer } from 'recharts';
3 import { useTranslation, Trans } from 'react-i18next';
4
5 const CustomTooltip = ({ active, payload, label }) => {
6
7 const { t } = useTranslation();
8
9 if (active && payload && payload.length) {
10 return (
11 <div className="custom-tooltip">
12 <p className="label" style={ {'color':'#221d58'} } >{`${label}`}</p>
13 </div>
14 );
15 }
16
17 return null;
18 };
19
20 const GraphChart = ({ data }) => {
21 var first_val = data[0]['name'];
22 var last_val = data[data.length - 1]['name'];
23
24 var ticks = Math.floor(last_val / 500);
25 var tick_array = [];
26 for(var i = 0;i < ticks;++i) {
27 tick_array.push((i+1) * 500);
28 }
29 return (
30 <>
31 <ResponsiveContainer width={'99%'} height={475}>
32 <AreaChart>
33 <defs>
34 <linearGradient id="colorUv" x1="0" y1="0" x2="0" y2="1">
35 <stop offset="0%" stopColor="#b4eded" stopOpacity={1}/>
36 <stop offset="100%" stopColor="#FFFFFF" stopOpacity={0.1}/>
37 </linearGradient>
38 </defs>
39 <XAxis tick={{ fill: '#FFFFFF' }} stroke="#BFBECF" dataKey="name" ticks={[first_val, last_val]} />
40 <YAxis tick={{ fill: '#FFFFFF' }} stroke="#BFBECF" ticks={tick_array} />
41 <Tooltip content={<CustomTooltip />} />
42 <Area dot={false} strokeWidth={2} data={ data } fill="url(#colorUv)" dataKey="value" stroke="#FFFFFF" />
43 </AreaChart></ResponsiveContainer>
44 </>
45 )
46 }
47
48 export default memo(GraphChart);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import {
3 ComposableMap,
4 Geographies,
5 Geography
6 } from "react-simple-maps";
7 import { useTranslation, Trans } from 'react-i18next';
8
9 const geoUrl =
10 // "http://arreport.test/world-110m.json";
11 "https://yearinreview.cbvinstitute.com/world-110m.json";
12
13
14 const MapChart = ({ setTooltipContent, countries }) => {
15
16 const { t } = useTranslation();
17
18 return (
19 <>
20 <ComposableMap data-tip="" projection="geoMercator" >
21 <Geographies geography={geoUrl}>
22 {({ geographies }) =>
23 geographies.map(geo => {
24 var found = false;
25 for(var i = 0;i < countries.length;++i) {
26 for(const cprop in geo.properties) {
27 if(typeof geo.properties[cprop].indexOf == 'function' && geo.properties[cprop].indexOf(countries[i].name) !== -1) {
28 geo.properties.NICENAME = countries[i].name
29 found = true;
30 break;
31 }
32 }
33 }
34
35 var style = {};
36
37 if(found) {
38 style = {
39 default: {
40 fill: "#5CBFBC",
41 outline: "#0F1647",
42 stroke: "#0F1647",
43 strokeWidth: "0.25px"
44 },
45 hover: {
46 fill: "white",
47 outline: "none"
48 }
49 }
50 } else {
51 style = {
52 default: {
53 fill: "#594D78",
54 outline: "none",
55 },
56 hover: {
57 fill: "#594D78",
58 outline: "none"
59 },
60 pressed: {
61 fill: "#594D78",
62 outline: "none"
63 }
64 }
65 }
66
67 return (
68 <Geography
69 key={geo.rsmKey}
70 geography={geo}
71 onMouseEnter={() => {
72 if(found) {
73 const { NICENAME } = geo.properties;
74 setTooltipContent(`${NICENAME}`);
75 }
76 }}
77 onMouseLeave={() => {
78 setTooltipContent("");
79 }}
80 style={style}
81 />
82 ) } )
83 }
84 </Geographies>
85 </ComposableMap>
86 </>
87 );
88 };
89
90 export default memo(MapChart);
1 import React, { memo } from "react";
2 import { Pie, PieChart, Sector, ResponsiveContainer } from 'recharts';
3
4 const renderActiveShape = (props) => {
5
6 const RADIAN = Math.PI / 180;
7 const { cx, cy, midAngle, innerRadius, outerRadius, startAngle, endAngle, fill, payload, percent, value, name, color, font_color } = props;
8 const sin = Math.sin(-RADIAN * midAngle);
9 const cos = Math.cos(-RADIAN * midAngle);
10 const sx = cx + (outerRadius + 10) * cos;
11 const sy = cy + (outerRadius + 10) * sin;
12 const mx = cx + (outerRadius + 30) * cos;
13 const my = cy + (outerRadius + 30) * sin;
14 const ex = mx + (cos >= 0 ? 1 : -1) * 22;
15 const ey = my;
16 const textAnchor = cos >= 0 ? 'start' : 'end';
17
18 return (
19 <g>
20 <Sector
21 cx={cx}
22 cy={cy}
23 innerRadius={innerRadius}
24 outerRadius={outerRadius}
25 startAngle={startAngle}
26 endAngle={endAngle}
27 fill={color}
28 />
29 <Sector
30 cx={cx}
31 cy={cy}
32 startAngle={startAngle}
33 endAngle={endAngle}
34 innerRadius={outerRadius + 6}
35 outerRadius={outerRadius + 10}
36 fill={color}
37 />
38 <path d={`M${sx},${sy}L${mx},${my}L${ex},${ey}`} stroke={color} fill="none" />
39 <circle cx={ex} cy={ey} r={2} fill={color} stroke="none" />
40 <text x={ex + (cos >= 0 ? 1 : -1) * 12} y={ey} style={{fontWeight:'bold'}} textAnchor={textAnchor} fill={font_color}>{`${name}`}</text>
41 <text x={ex + (cos >= 0 ? 1 : -1) * 12} y={ey} dy={18} textAnchor={textAnchor} fill={font_color}>
42 {`${(value)}%`}
43 </text>
44 </g>
45 );
46 };
47
48 const PiChart = ({ data, color }) => {
49 return (
50 <>
51 <ResponsiveContainer width={'100%'} height={300}><PieChart>
52 <Pie
53 activeIndex={Array.from({length: data.length}, (_, i) => (i-1) + 1)}
54 activeShape={renderActiveShape}
55 data={ data } dataKey="value" cx="50%" cy="50%" innerRadius={70} outerRadius={100} fill="#82ca9d" />
56 </PieChart></ResponsiveContainer>
57 </>
58 )
59 }
60
61 export default memo(PiChart);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { useTranslation, Trans } from 'react-i18next';
3
4 const ProgressionChart = (props) => {
5
6 const { t } = useTranslation();
7
8 return (
9 <>
10 <svg width="240px" height="318px" viewBox="0 0 240 318" version="1.1">
11 <title>sectors-2</title>
12 <desc>Created with Sketch.</desc>
13 <defs></defs>
14 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15 <g id="sectors-2">
16 <circle cx="94" cy="102" r="0" data-r="85" id="Fill-115" fill="#A4D6CF" ></circle>
17 <circle cx="78" cy="217" r="0" data-r="31" id="Fill-116" fill="#6BC1BA"></circle>
18 <circle cx="96" cy="265" r="0" data-r="21" id="Fill-117" fill="#A4D6CF"></circle>
19 <circle cx="175" cy="230" r="0" data-r="65" id="Fill-118" fill="#DAEEEB"></circle>
20 <g id="Professional-Valuation-Services" className="115" opacity={0} transform="translate(41.000000, 83.000000)" fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="18" font-weight="300">
21 <text id="Professional-Valuati">
22 <tspan x="0.273" y="14">{t('pro.professional')}</tspan>
23 <tspan x={t('pro.valuation.x')} y="35.6000073">{t('pro.Valuation')}</tspan>
24 <tspan x={t('pro.services.x')} y="57.2000146">{t('pro.Services')}</tspan>
25 </text>
26 </g>
27 <g id="Financial-Services" className="118" opacity={0} transform="translate(117.000000, 224.000000)" fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="13" font-weight="300">
28 <text>
29 <tspan x="0.677" y="10">{t('pro.Financial Services')}</tspan>
30 <tspan x="17.395" y="25.6000053">{t('pro.Industry')}</tspan>
31 <tspan x="18.5585" y="41.2000105">{t('pro.Government')}</tspan>
32 </text>
33 </g>
34 <g id="Other" className="116" opacity={0} transform="translate(59.000000, 224.000000)" fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="12" font-weight="300">
35 <text>
36 <tspan x="0.802" y="10">{t('pro.Other')}</tspan>
37 </text>
38 </g>
39 <g id="50%" className="115" opacity={0} transform="translate(73.000000, 58.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
40 <text id="49%">
41 <tspan x="0.8076" y="14.8007812">49%</tspan>
42 </text>
43 </g>
44 <g id="34%" className="118" opacity={0} transform="translate(154.000000, 201.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
45 <text>
46 <tspan x="0.5856" y="14.800781">36%</tspan>
47 </text>
48 </g>
49 <g id="10%" className="116" opacity={0} transform="translate(59.000000, 204.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
50 <text>
51 <tspan x="0.2997" y="14.800781">9%</tspan>
52 </text>
53 </g>
54 <g id="Retired" className="117" opacity={0} transform="translate(76.000000, 308.000000)" fill="#FFFFFF" font-family="Gotham-ExtraLight, Gotham" font-size="11" font-weight="300">
55 <text>
56 <tspan x="0" y="9">{t('pro.Retired')}</tspan>
57 </text>
58 </g>
59 <g id="6%" className="117" opacity={0} transform="translate(81.000000, 288.000000)" fill="#FFFFFF" font-family="Gotham-Medium, Gotham" font-size="18" font-weight="400">
60 <text>
61 <tspan x="0.2495" y="14.800781">6%</tspan>
62 </text>
63 </g>
64 <path className="117" opacity={0} d="M94.4777,289.2349 L94.4777,263.4129" id="Stroke-210" stroke="#FFFFFF" stroke-width="0.5"></path>
65 </g>
66 </g>
67 </svg>
68 </>
69 )
70 }
71
72 export default memo(ProgressionChart);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { useTranslation, Trans } from 'react-i18next';
3
4 const ProgressionChart2021 = () => {
5
6 const { t } = useTranslation();
7
8 return (
9 <>
10 <svg width="240px" height="318px" viewBox="0 0 240 318" version="1.1">
11 <title>sectors-2</title>
12 <desc>Created with Sketch.</desc>
13 <defs></defs>
14 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15 <g id="sectors-2">
16 <circle cx="94" cy="102" r="0" data-r="85" id="Fill-115" fill="#A4D6CF" ></circle>
17 <circle cx="78" cy="217" r="0" data-r="31" id="Fill-116" fill="#6BC1BA"></circle>
18 <circle cx="96" cy="265" r="0" data-r="21" id="Fill-117" fill="#A4D6CF"></circle>
19 <circle cx="175" cy="230" r="0" data-r="65" id="Fill-118" fill="#DAEEEB"></circle>
20 <g id="Professional-Valuation-Services" className="115" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(50.000000, 83.000000)" : "translate(50.000000, 83.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="18" font-weight="300">
21 <text id="Professional-Valuati">
22 <tspan x="0.273" y="14">{t('pro.professional')}</tspan>
23 <tspan x={t('pro.valuation.x')} y="35.6000073">{t('pro.Valuation')}</tspan>
24 <tspan x={t('pro.services.x')} y="57.2000146">{t('pro.Services')}</tspan>
25 </text>
26 </g>
27 <g id="Financial-Services" className="118" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(125.000000, 224.000000)" : "translate(125.000000, 224.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="13" font-weight="300">
28 <text>
29 <tspan x="0.677" y="10">{t('pro.Financial Services')}</tspan>
30 <tspan x="17.395" y="25.6000053">{t('pro.Industry')}</tspan>
31 <tspan x="18.5585" y="41.2000105">{t('pro.Government')}</tspan>
32 </text>
33 </g>
34 <g id="Other" className="116" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(55.000000, 224.000000)" : "translate(63.000000, 224.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="10" font-weight="300">
35 <text>
36 <tspan x="0.802" y="10">{t('pro.Retired')}</tspan>
37 </text>
38 </g>
39 <g id="50%" className="115" opacity={0} transform="translate(73.000000, 58.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
40 <text id="49%">
41 <tspan x="0.8076" y="14.8007812">50%</tspan>
42 </text>
43 </g>
44 <g id="34%" className="118" opacity={0} transform="translate(154.000000, 201.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
45 <text>
46 <tspan x="0.5856" y="14.800781">39%</tspan>
47 </text>
48 </g>
49 <g id="10%" className="116" opacity={0} transform="translate(66.000000, 204.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
50 <text>
51 <tspan x="0.2997" y="14.800781">7%</tspan>
52 </text>
53 </g>
54 <g id="Retired" className="117" opacity={0} transform="translate(76.000000, 308.000000)" fill="#FFFFFF" font-family="Gotham-ExtraLight, Gotham" font-size="11" font-weight="300">
55 <text>
56 <tspan x="0" y="9">{t('pro.Other')}</tspan>
57 </text>
58 </g>
59 <g id="6%" className="117" opacity={0} transform="translate(81.000000, 288.000000)" fill="#FFFFFF" font-family="Gotham-Medium, Gotham" font-size="18" font-weight="400">
60 <text>
61 <tspan x="0.2495" y="14.800781">4%</tspan>
62 </text>
63 </g>
64 <path className="117" opacity={0} d="M94.4777,289.2349 L94.4777,263.4129" id="Stroke-210" stroke="#FFFFFF" stroke-width="0.5"></path>
65 </g>
66 </g>
67 </svg>
68 </>
69 )
70 }
71
72 export default memo(ProgressionChart2021);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { useTranslation, Trans } from 'react-i18next';
3
4 const ProgressionChart2022 = () => {
5
6 const { t } = useTranslation();
7
8 return (
9 <>
10 <svg width="1024px" height="400px" viewBox="0 0 1024 400" version="1.1">
11 <title>sectors-2</title>
12 <desc>Created with Sketch.</desc>
13 <defs></defs>
14 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15 <g id="sectors-2">
16 <circle cx="450" cy="152" r="15" data-r="15" id="Fill-115" fill="#A4D6CF"></circle>
17 <circle cx="570" cy="165" r="6" data-r="6" id="Fill-116" fill="#6BC1BA"></circle>
18 <circle cx="600" cy="225" r="6" data-r="6" id="Fill-117" fill="#A4D6CF"></circle>
19 <circle cx="505" cy="270" r="10" data-r="10" id="Fill-118" fill="#DAEEEB"></circle>
20 <g id="Professional-Valuation-Services" className="115" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(0.000000, 160.000000)" : "translate(30.000000, 160.000000)" } fill="#1B193F" font-family="Gotham-Book, Gotham" font-size="18" font-weight="300">
21 <text id="Professional-Valuati">
22 <tspan x="0" y="0">{t('pro.professional')}</tspan>
23 <tspan x={document.documentElement.lang === "fr-FR" ? "78" : "115" } y="0">{t('pro.Valuation')}</tspan>
24 <tspan x={document.documentElement.lang === "fr-FR" ? "210" : "205" } y="0">{t('pro.Services')}</tspan>
25 </text>
26 </g>
27 <g id="Financial-Services" className="118" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(175.000000, 262.000000)" : "translate(175.000000, 262.000000)" } fill="#1B193F" font-family="Gotham-Book, Gotham" font-size="17" font-weight="300">
28 <text>
29 <tspan x={document.documentElement.lang === "fr-FR" ? "50" : "0" } y="0">{t('pro.Financial Services')}</tspan>
30 <tspan x="85" y="25">{t('pro.Government')}</tspan>
31 </text>
32 </g>
33 <g id="Other" className="116" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(710.000000, 218.000000)" : "translate(710.000000, 218.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="16" font-weight="300">
34 <text>
35 <tspan x="0.802" y="10">{t('pro.Retired')}</tspan>
36 </text>
37 </g>
38 <g id="50%" class="115" opacity={0} transform="translate(415.000000, 165.000000)" fill="#221D58" font-family="Gotham-Bold, Gotham" font-size="36" font-weight="bold"><text id="49%"><tspan x="0" y="0">52%</tspan></text></g>
39 <g id="34%" class="118" opacity={0} transform="translate(470, 265)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="34" font-weight="bold"><text><tspan x="0.5856" y="14.800781">41%</tspan></text></g>
40 <g id="10%" class="116" opacity={0} transform="translate(557.000000, 158.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="22" font-weight="bold"><text><tspan x="0.2997" y="14.800781">4%</tspan></text></g>
41 <g id="Retired" className="117" opacity={0} transform="translate(695.000000, 160.000000)" fill="#FFFFFF" font-family="Gotham-Bold, Gotham" font-size="16" font-weight="300">
42 <text>
43 <tspan x="0" y="9">{t('pro.Other')}</tspan>
44 </text>
45 </g>
46 <g id="6%" class="117" opacity={0} transform="translate(585.000000, 218.000000)" fill="#221D58" font-family="Gotham-Bold, Gotham" font-size="22" font-weight="700"><text><tspan x="0.2495" y="14.800781">3%</tspan></text></g>
47 <path class="115-line" opacity={0} d="M320,155 L390,155" id="Stroke-210" stroke="#AED5CF" stroke-width="1.5"></path>
48 <path class="118-line" opacity={0} d="M410,270 L460,270" id="Stroke-210" stroke="#DEEDEB" stroke-width="1.5"></path>
49 <path class="116-line" opacity={0} d="M680,165 L595,165" id="Stroke-210" stroke="#7FBFBA" stroke-width="1.5"></path>
50 <path class="117-line" opacity={0} d="M700,225 L625,225" id="Stroke-210" stroke="#AED5CF" stroke-width="1.5"></path>
51 </g>
52 </g>
53 </svg>
54 </>
55 )
56 }
57
58 export default memo(ProgressionChart2022);
...\ No newline at end of file ...\ No newline at end of file
1 import i18n from 'i18next';
2 import { initReactI18next } from 'react-i18next';
3 import LanguageDetector from 'i18next-browser-languagedetector';
4
5
6 i18n
7 // detect user language
8 // learn more: https://github.com/i18next/i18next-browser-languageDetector
9 .use(LanguageDetector)
10 // pass the i18n instance to react-i18next.
11 .use(initReactI18next)
12 // init i18next
13 // for all options read: https://www.i18next.com/overview/configuration-options
14 .init({
15 detection: {
16 order: ['querystring'],
17 "lookupQuerystring": 'lang',
18 lookupCookie: '',
19 lookupLocalStorage: '',
20 lookupSessionStorage: '',
21 caches: [],
22 },
23 debug: false,
24 fallbackLng: 'en',
25 interpolation: {
26 escapeValue: false, // not needed for react as it escapes by default
27 },
28 resources: {
29 en: {
30 translation: {
31 "one-term-only":"* ONE TERM ONLY",
32 "pro.valuation.x":"11.991",
33 "pro.services.x":"16.401",
34 "pro.professional":"Professional",
35 "pro.Valuation":"Valuation",
36 "pro.Services":"Services",
37 "pro.Financial Services":"Financial Services, Industry",
38 "pro.Industry":"Industry",
39 "pro.Government":"and Government",
40 "pro.Retired":"Retired",
41 "charts.members":"Members",
42 "pro.Other":"Other",
43 }
44 },
45 fr: {
46 translation: {
47 "pro.valuation.x":"0",
48 "pro.services.x":"0",
49 "one-term-only":"*UN TRIMESTRE SEULEMENT",
50 "pro.professional":"Services",
51 "pro.Valuation":"professionnels",
52 "pro.Services":"d’évaluation",
53 "pro.Financial Services":"Services financiers,",
54 "pro.Industry":"industrie, et",
55 "pro.Government":"gouvernement",
56 "pro.Retired":"À la retraite",
57 "charts.members":"Membres",
58 "pro.Other":"Autres",
59 }
60 }
61 }
62 });
63
64 export default i18n;
...\ No newline at end of file ...\ No newline at end of file
1 import React, { useState } from "react";
2 import ReactDOM from "react-dom";
3 import ReactTooltip from "react-tooltip";
4
5 import './i18n';
6 import MapChart from "./MapChart";
7 import GraphChart from "./GraphChart";
8 import PiChart from './PiChart';
9 import CBVBars from './BarChart';
10 import ProgressionChart from './ProgressionChart';
11 import ProgressionChart2021 from './ProgressionChart2021';
12 import ProgressionChart2022 from './ProgressionChart2022';
13 import CBVBars2021 from './BarChart2021';
14
15 function CBVGlobe(props) {
16 const [content, setContent] = useState("");
17 const [countries] = useState(props.countries);
18 return (
19 <div>
20 <MapChart setTooltipContent={setContent} countries={countries} />
21 <ReactTooltip backgroundColor="#715f8a" textColor="white">{content}</ReactTooltip>
22 </div>
23 );
24 }
25
26 window.renderGlobe = (el) => {
27 ReactDOM.render(<CBVGlobe countries={JSON.parse(el.dataset.countries)} />, el);
28 }
29
30
31 function CBVGraph(props) {
32 const [data] = useState(props.data);
33 return (
34 <div>
35 <GraphChart data={data} />
36 </div>
37 );
38 }
39
40 window.renderGraph = (el) => {
41 ReactDOM.render(<CBVGraph data={JSON.parse(el.dataset.points)} />, el);
42 }
43
44 function CBVPI(props) {
45 const [data] = useState(props.data);
46 const [color] = useState(props.color);
47 return (
48 <PiChart data={data} color={color} />
49 );
50 }
51
52 window.renderPI = (el) => {
53 ReactDOM.render(<CBVPI color={el.dataset.color} data={JSON.parse(el.dataset.points)} />, el);
54 }
55
56 function CBVBarChart2021(props) {
57 const [data] = useState(props.data);
58 return (
59 <CBVBars2021 data={data} />
60 );
61 }
62
63 window.renderBarChart2021 = (el) => {
64 ReactDOM.render(<CBVBarChart2021 data={JSON.parse(el.dataset.points)} />, el);
65 }
66
67 function CBVBarChart(props) {
68 const [data] = useState(props.data);
69 return (
70 <CBVBars data={data} />
71 );
72 }
73
74 window.renderBarChart = (el) => {
75 ReactDOM.render(<CBVBarChart data={JSON.parse(el.dataset.points)} />, el);
76 }
77
78 function CBVProgression(props) {
79 return (
80 <ProgressionChart />
81 );
82 }
83
84 window.renderProgression = (el) => {
85 ReactDOM.render(<CBVProgression />, el);
86 }
87
88 function CBVProgression2021(props) {
89 return (
90 <ProgressionChart2021 />
91 );
92 }
93
94 window.renderProgression2021 = (el) => {
95 ReactDOM.render(<CBVProgression2021 />, el);
96 }
97
98 function CBVProgression2022(props) {
99 return (
100 <ProgressionChart2022 />
101 );
102 }
103
104 window.renderProgression2022 = (el) => {
105 ReactDOM.render(<CBVProgression2022 />, el);
106 }
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -21,11 +21,11 @@ $container = get_theme_mod( 'understrap_container_type' ); ...@@ -21,11 +21,11 @@ $container = get_theme_mod( 'understrap_container_type' );
21 21
22 <div class="row"> 22 <div class="row">
23 23
24 <div class="col-md-6 col-sm-12"> 24 <div class="col-md-6 col-sm-12 site-info-menu">
25 25
26 <footer class="site-footer" id="colophon"> 26 <footer class="site-footer">
27 27
28 <div class="site-info"> 28 <div class="">
29 29
30 <?php dynamic_sidebar( 'custom-footer-left-widget' ); ?> 30 <?php dynamic_sidebar( 'custom-footer-left-widget' ); ?>
31 31
...@@ -36,7 +36,7 @@ $container = get_theme_mod( 'understrap_container_type' ); ...@@ -36,7 +36,7 @@ $container = get_theme_mod( 'understrap_container_type' );
36 </div><!-- col --> 36 </div><!-- col -->
37 <div class="col-md-6 col-sm-12"> 37 <div class="col-md-6 col-sm-12">
38 38
39 <footer class="site-footer" id="colophon"> 39 <footer class="site-footer">
40 40
41 <div class="site-info"> 41 <div class="site-info">
42 42
......
...@@ -49,6 +49,9 @@ function theme_enqueue_styles() { ...@@ -49,6 +49,9 @@ function theme_enqueue_styles() {
49 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { 49 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
50 wp_enqueue_script( 'comment-reply' ); 50 wp_enqueue_script( 'comment-reply' );
51 } 51 }
52 wp_enqueue_script( 'msf-globe-main', get_stylesheet_directory_uri() . '/blocks/react-app/build/static/js/main.a7bb4a96.chunk.js?v=1.222', array(), false, true );
53 wp_enqueue_script( 'msf-globe-runtime', get_stylesheet_directory_uri() . '/blocks/react-app/build/static/js/2.c3c99db9.chunk.js?v=2.222', array(), false, true );
54 wp_enqueue_script( 'msf-globe-chunk', get_stylesheet_directory_uri() . '/blocks/react-app/build/static/js/runtime-main.a933fda7.js?v=2.22', array(), false, true );
52 } 55 }
53 add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); 56 add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
54 57
......
...@@ -12,3 +12,17 @@ if( function_exists('acf_add_options_page') ) { ...@@ -12,3 +12,17 @@ if( function_exists('acf_add_options_page') ) {
12 )); 12 ));
13 13
14 } 14 }
15
16
17 add_action('acf/init', 'my_acf_init_block_types');
18 function my_acf_init_block_types() {
19
20
21 acf_register_block_type( array(
22 'title' => __( 'MSF PI Chart', 'client_textdomain' ),
23 'name' => 'msf-pi',
24 'render_template' => 'blocks/msf-PI/msf-PI.php',
25 'mode' => 'edit'
26 ));
27
28 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -7494,8 +7494,8 @@ ...@@ -7494,8 +7494,8 @@
7494 } 7494 }
7495 7495
7496 // Search Filter 7496 // Search Filter
7497 7497 var Search = function ($) {
7498 jQuery(document).ready(function ($) { 7498 function init() {
7499 $(".searchandfilter ul li:contains('hidden')").hide(); 7499 $(".searchandfilter ul li:contains('hidden')").hide();
7500 $('<li class="sf-field-reset"><input type="submit" class="search-filter-reset-custom" value="CLEAR ALL" "></li>').appendTo(jQuery('#advance-search-modal .searchandfilter ul:first-child ')); 7500 $('<li class="sf-field-reset"><input type="submit" class="search-filter-reset-custom" value="CLEAR ALL" "></li>').appendTo(jQuery('#advance-search-modal .searchandfilter ul:first-child '));
7501 $(document).on("click", ".search-filter-reset-custom", function (e) { 7501 $(document).on("click", ".search-filter-reset-custom", function (e) {
...@@ -7512,7 +7512,23 @@ ...@@ -7512,7 +7512,23 @@
7512 $('#search-box-content').removeClass('show'); 7512 $('#search-box-content').removeClass('show');
7513 $('.search-box').removeClass('show'); 7513 $('.search-box').removeClass('show');
7514 }); 7514 });
7515 if ($(window).width() < 960) {
7516 $(".search-result .entry-summary").each(function () {
7517 var yourString = $(this).text();
7518 var maxLength = 160;
7519 if (yourString.length > maxLength) {
7520 var trimmedString = yourString.substr(0, maxLength);
7521 trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" ")));
7522 $(this).text(trimmedString + "...");
7523 }
7515 }); 7524 });
7525 }
7526 }
7527 return {
7528 init: init
7529 };
7530 }(jquery);
7531 jquery(document).ready(Search.init);
7516 7532
7517 var Responsive = function ($) { 7533 var Responsive = function ($) {
7518 // $('.play-pause-btn').on('click', function() { 7534 // $('.play-pause-btn').on('click', function() {
...@@ -7694,6 +7710,20 @@ ...@@ -7694,6 +7710,20 @@
7694 7710
7695 // Add your custom JS here. 7711 // Add your custom JS here.
7696 new LazyLoad(); 7712 new LazyLoad();
7713 window.tz_checkVisible = function (elm, evalType, offset, heightBuffer) {
7714 evalType = evalType || "visible";
7715 var vpH = jQuery(window).height(),
7716 // Viewport Height
7717 st = jQuery(window).scrollTop(),
7718 // Scroll Top
7719 y = jQuery(elm).offset().top + offset,
7720 elementHeight = jQuery(elm).height();
7721 if (heightBuffer) {
7722 elementHeight += heightBuffer;
7723 }
7724 if (evalType === "visible") return y < vpH + st && y > st - elementHeight;
7725 if (evalType === "above") return y < vpH + st;
7726 };
7697 7727
7698 exports.Alert = alert; 7728 exports.Alert = alert;
7699 exports.Button = button; 7729 exports.Button = button;
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -50,7 +50,7 @@ if($post_type == 'attachment') { ...@@ -50,7 +50,7 @@ if($post_type == 'attachment') {
50 50
51 <div class="entry-summary" id='content'> 51 <div class="entry-summary" id='content'>
52 52
53 <?= wp_strip_all_tags(get_the_excerpt(), true) ?> 53 <?= str_replace("[...]Read More...", "",wp_strip_all_tags(get_the_excerpt(), true)); ?>
54 54
55 </div><!-- .entry-summary --> 55 </div><!-- .entry-summary -->
56 56
......
1 1
2 // Search Filter 2 // Search Filter
3 3
4 jQuery(document).ready(function($){ 4 import jquery from 'jquery';
5
6 var Search = (function($) {
7
8 function init() {
5 $(".searchandfilter ul li:contains('hidden')").hide(); 9 $(".searchandfilter ul li:contains('hidden')").hide();
6 $('<li class="sf-field-reset"><input type="submit" class="search-filter-reset-custom" value="CLEAR ALL" "></li>').appendTo( jQuery( '#advance-search-modal .searchandfilter ul:first-child ' ) ); 10 $('<li class="sf-field-reset"><input type="submit" class="search-filter-reset-custom" value="CLEAR ALL" "></li>').appendTo( jQuery( '#advance-search-modal .searchandfilter ul:first-child ' ) );
7 11
...@@ -22,6 +26,28 @@ jQuery(document).ready(function($){ ...@@ -22,6 +26,28 @@ jQuery(document).ready(function($){
22 $('#search-box-content').removeClass('show'); 26 $('#search-box-content').removeClass('show');
23 $('.search-box').removeClass('show'); 27 $('.search-box').removeClass('show');
24 }) 28 })
25 }); 29
30 if ($(window).width() < 960) {
31 $( ".search-result .entry-summary" ).each(function() {
32 var yourString = $(this).text();
33 var maxLength = 160;
34 if (yourString.length > maxLength) {
35 var trimmedString = yourString.substr(0, maxLength);
36 trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" ")));
37 $(this).text(trimmedString + "...");
38 }
39 });
40 }
41 }
42
43 return {
44 init: init
45 };
46
47 }(jquery));
48
49 jquery(document).ready(Search.init);
50
51 export { Search };
26 52
27 53
......
1 // Add your custom JS here. 1 // Add your custom JS here.
2 import jquery from 'jquery';
2 import LazyLoad from "vanilla-lazyload"; 3 import LazyLoad from "vanilla-lazyload";
3 4
4 import "./_menu_mobile"; 5 import "./_menu_mobile";
...@@ -9,3 +10,18 @@ import "./_header_menu"; ...@@ -9,3 +10,18 @@ import "./_header_menu";
9 var myLazyLoad = new LazyLoad(); 10 var myLazyLoad = new LazyLoad();
10 11
11 12
13 window.tz_checkVisible = function(elm, evalType , offset, heightBuffer) {
14 evalType = evalType || "visible";
15
16 var vpH = jQuery(window).height(), // Viewport Height
17 st = jQuery(window).scrollTop(), // Scroll Top
18 y = jQuery(elm).offset().top + offset,
19 elementHeight = jQuery(elm).height();
20
21 if (heightBuffer) {
22 elementHeight += heightBuffer;
23 }
24
25 if (evalType === "visible") return ((y < (vpH + st)) && (y > (st - elementHeight)));
26 if (evalType === "above") return ((y < (vpH + st)));
27 };
...\ No newline at end of file ...\ No newline at end of file
......
1 .wp-block-pb-accordion-item{
2
3 /*
4 We're overriding the page structure global for this because this
5 was seen to be different than usual blocks on page #49 in accordion section
6 */
7 &.first-accordion {
8 margin-top:1.563rem !important;
9 }
10
11
12 //This should be the default when it's closed as seen on page #49
13 padding-bottom:0.969rem;
14
15 &.is-open {
16 //This was seen to be the correct spacing in page #49 in the accordion with the download cards
17 //And it's only bottom because the header makes the space for the top
18 padding-bottom:1.563rem;
19 }
20
21 border-bottom:#BEBEBE solid 1px;
22
23 //This was seen to be the correct spacing in page #49 in the accordion with the download cards
24 & > h1, h2, h3, h4, h5 {
25 margin-top:0.969rem !important;
26 line-height: normal;
27 }
28
29 &:hover {
30 & > h1, & > h2, & > h3, & > h4, & > h5 {
31 text-decoration: underline;
32 }
33 }
34 &.first-accordion {
35 border-top: #bebebe solid 1px;
36 }
37
38 &.job-app-accordion {
39 border-top:0 !important;
40 border-bottom:0;
41 padding-bottom:0;
42 margin-top:0 !important;
43 & > h2 {
44 margin-left:2rem;
45 font-size: 1rem;
46 text-transform: uppercase;
47 margin-top:1.563rem !important;
48 &:after {
49 width: 19px;
50 height: 12px;
51 left:-30px;
52 }
53 }
54 }
55
56 }
57
58 .c-accordion__title{
59 font-size: 1.25rem;
60 }
61
62 .accordion-header:not(.timeline) {
63 margin-top:0 !important;
64 padding:1.563rem 0;
65 font-size: 1.563rem !important;
66 & + .first-accordion { //This is for the FAQ pages
67 margin-top:0 !important;
68 }
69 }
70
71 .c-accordion__title {
72 position: relative;
73 }
74
75 .c-accordion__title:before {
76 content: "";
77 width: 100%;
78 height: 3.5rem;
79 position: absolute;
80 top: -1rem;
81 }
82
83 .c-accordion__title:after {
84 color: #777;
85 content: "" !important;
86 font-weight: 300;
87 position: absolute;
88 right: unset;
89 left: -40px;
90 top: 50%;
91 width: 25px;
92 height: 15px;
93 background-image:url("./../img/down-arrow.png") ;
94 background-size: contain;
95 background-repeat: no-repeat;
96 }
97
98 .is-open > .c-accordion__title::after {
99 content: "" !important;
100 background-image:url("./../img/up-arrow.png") ;
101 }
102
103 .c-accordion__title.js-accordion-controller{
104 margin-left: 2.5rem;
105 }
106
107 .c-accordion__content {
108 padding-left: 2.5rem;
109 //This was set because this was the default space found on page #49 in the accordion section
110 & > *:first-child {
111 margin-top:1.156rem;
112 }
113 #dd-container {
114 margin-top:1.156rem;
115 }
116 }
117
118 .available-jobs {
119 .c-accordion__content{
120 padding-left: 2rem;
121 }
122 }
...\ No newline at end of file ...\ No newline at end of file
...@@ -13,4 +13,4 @@ body{ ...@@ -13,4 +13,4 @@ body{
13 @import "front_page"; 13 @import "front_page";
14 @import "page"; 14 @import "page";
15 @import "footer"; 15 @import "footer";
16 16 @import "accordion";
......
...@@ -18,15 +18,125 @@ a.skip-link { ...@@ -18,15 +18,125 @@ a.skip-link {
18 } 18 }
19 } 19 }
20 20
21 .fr-only { 21
22 display: none !important; 22 h1, h2, h3, h4, h5, h6 {
23 font-family: "PT Sans",sans-serif;
24 font-weight: 700;
25 margin: 0 0 10px;
26 padding: 0;
27 }
28
29 h1 {
30 font-size: 45px;
31 line-height: 52px;
32 }
33 h2{
34 font-size: 35px;
35 line-height: 42px;
36 }
37 h3 {
38 font-size: 24px;
39 line-height: 30px;
40 }
41 h4 {
42 font-size: 20px;
43 line-height: 25px;
44 }
45
46 ul{
47 li{
48 color: #4D4D4D;
49 margin-bottom: 8px;
50 padding: 3px 0 2px 10px;
51 ul{
52 list-style: none;
53 margin-top: 8px;
54 li:before{
55 content: "-";
56 color: #4D4D4D;
57 font-weight: bold;
58 display: inline-block;
59 width: 1.5em;
60 margin-left: -1.5em;
61 }
62 }
63 }
23 } 64 }
65 ol{
66 li{
67 color: #4D4D4D;
68 margin-bottom: 8px;
69 padding: 3px 0 2px 10px;
24 70
25 html:lang(fr-FR) {
26 .en-only {
27 display: none !important;
28 } 71 }
29 .fr-only { 72 }
30 display: inline-block !important; 73 .wp-block-pullquote{
74
75 padding: 2em 0;
76 margin-bottom:80px;
77
78 }
79 blockquote{
80 border-left: 1px solid #EE0000;
81 border-right: 1px solid #EE0000;
82 margin: 0 70px 80px 70px;
83 @media only screen and (max-width: 782px) {
84 margin: 0 20px;
85 }
86 position: relative;
87
88 p{
89 font-size: 20px;
90 line-height: 26px;
91 font-style: italic;
92 margin: 0 0 20px;
93 padding: 0px 25px ;
94 color: #4D4D4D;
95 text-align: left;
96 margin-bottom: -20px;
97 &::before{
98 content: "“";
99 display: block;
100 position: absolute;
101 top: 0px;
102 padding-top: 10px;
103 left: -20px;
104 font-size: 80px;
105 line-height: 55px;
106 color: #e00;
107 height: 30px;
108 width: 30px;
109 background-color: #fff;
110 }
111 &::after{
112 content: "”";
113 display: block;
114 position: absolute;
115 bottom: 0px;
116 right: -7px;
117 font-size: 80px;
118 line-height: 55px;
119 padding-top: 10px;
120 color: #e00;
121 height: 20px;
122 background-color: #fff;
123
124 }
125 }
126 cite{
127 font-size: 16px;
128 line-height: 20px;
129 display: block;
130 color: #4D4D4D;
131 font-weight: bold;
132 font-style: normal;
133 text-align: right;
134 position: absolute;
135 right: 30px;
136 bottom: -40px;
137 @media only screen and (max-width: 782px) {
138 max-width: 50%;
139 }
140 float: right;
31 } 141 }
32 } 142 }
...\ No newline at end of file ...\ No newline at end of file
......
1 #wrapper-footer{ 1 #wrapper-footer{
2 background-color: #F0F0F0; 2 background-color: #F0F0F0;
3 padding: 33px 0px; 3 padding: 33px 40px;
4 .appArea{
5 h2{
6 margin-left: -15px;
7 }
8 }
9 .site-info-menu{
10 padding-left: 0px;
11 margin-left: 0px;
12 }
4 } 13 }
5 14
6 15
...@@ -11,11 +20,23 @@ ...@@ -11,11 +20,23 @@
11 text-transform: uppercase; 20 text-transform: uppercase;
12 text-align: left; 21 text-align: left;
13 } 22 }
23 .chw-widget h2{
24 font-size: 20px;
25 font-weight: bold;
26 margin-bottom: 10px;
27 text-transform: uppercase;
28 text-align: left;
29
30 }
31
14 #menu-footer{ 32 #menu-footer{
15 list-style: none; 33 list-style: none;
16 margin-left: 0px; 34 margin-left: 0px;
17 padding-left: 0px; 35 padding-left: 0px;
18 li{ 36 li{
37 margin-bottom: 0px;
38 padding-bottom: 0px;
39 padding-left: 0px;
19 a{ 40 a{
20 color: #000; 41 color: #000;
21 font-size: 16px; 42 font-size: 16px;
...@@ -23,7 +44,8 @@ ...@@ -23,7 +44,8 @@
23 font-weight: 400; 44 font-weight: 400;
24 text-decoration: none; 45 text-decoration: none;
25 &:hover{ 46 &:hover{
26 color: #fff; 47 color: #000;
48 text-decoration: underline;
27 } 49 }
28 } 50 }
29 } 51 }
......
...@@ -172,6 +172,7 @@ ...@@ -172,6 +172,7 @@
172 } 172 }
173 #page-wrapper{ 173 #page-wrapper{
174 margin-top: 34px; 174 margin-top: 34px;
175 margin: 34px 40px 0 40px;
175 .breadcrumb{ 176 .breadcrumb{
176 margin-bottom: 0px; 177 margin-bottom: 0px;
177 #breadcrumb{ 178 #breadcrumb{
...@@ -196,7 +197,7 @@ h1+p { ...@@ -196,7 +197,7 @@ h1+p {
196 .side-menu{ 197 .side-menu{
197 list-style: none; 198 list-style: none;
198 margin-top: 14px; 199 margin-top: 14px;
199 padding-left: 15px; 200 padding-left: 0px;
200 li{ 201 li{
201 margin-bottom: 14px; 202 margin-bottom: 14px;
202 203
...@@ -215,3 +216,43 @@ h1+p { ...@@ -215,3 +216,43 @@ h1+p {
215 width: 100%; 216 width: 100%;
216 } 217 }
217 } 218 }
219
220
221 .pi {
222 height:300px;
223 min-height:300px;
224 @media(min-width: 1024px) {
225 min-height:200px;
226 text-align: center;
227 justify-content: center;
228 width: 100%;
229 height: auto;
230 }
231 .recharts-wrapper {
232 margin:0 auto;
233 }
234 h3 {
235 color:#000;
236 font-family:Gotham,Helvetica,Arial,sans-serif;
237 font-weight: 700;
238 margin:0;
239 }
240 svg {
241 height:200px;
242 overflow: visible;
243 }
244 svg:lang(en) {
245 height:300px;
246 }
247 @media(max-width: 768px) {
248 h3 {
249 text-align:center;
250 }
251 svg {
252 height:200px;
253 }
254 svg:lang(en) {
255 height:200px;
256 }
257 }
258 }
...\ No newline at end of file ...\ No newline at end of file
......