Skip to content

Commit 269cc4b

Browse files
committed
initial frontend work for #82
1 parent 84249a7 commit 269cc4b

File tree

5 files changed

+144
-10
lines changed

5 files changed

+144
-10
lines changed

.jscsrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
".git/",
99
"boldgrid-theme-framework/**",
1010
"src/includes/**",
11-
"src/assets/js/customizer/**"
11+
"src/assets/js/customizer/**",
12+
"src/assets/js/front-end.js"
1213
],
1314
"fileExtensions": [".js"]
1415
}

gulpfile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ gulp.task('jsHint', function () {
273273

274274
gulp.task('jscs', function () {
275275
return gulp.src([config.src + '/assets/js/**/*.js'])
276-
.pipe(jscs())
276+
.pipe(jscs())
277+
.pipe(jscs({configPath: "./.jscsrc"}))
277278
.pipe(jscs.reporter())
278279
.pipe(jscs.reporter('fail'));
279280
});

package.json

+16-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,19 @@
88
},
99
"babel": {
1010
"plugins": [
11-
"@babel/plugin-syntax-dynamic-import"
11+
[
12+
"@babel/plugin-transform-runtime",
13+
{
14+
"absoluteRuntime": false,
15+
"corejs": 2,
16+
"helpers": true,
17+
"regenerator": true,
18+
"useESModules": false
19+
}
20+
],
21+
[
22+
"@babel/plugin-syntax-dynamic-import"
23+
]
1224
]
1325
},
1426
"scripts": {
@@ -42,6 +54,7 @@
4254
"@babel/core": "^7.0.0-beta.47",
4355
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
4456
"@babel/plugin-transform-react-jsx": "^7.3.0",
57+
"@babel/plugin-transform-runtime": "^7.4.4",
4558
"@babel/preset-env": "^7.0.0-beta.47",
4659
"@boldgrid/controls": "https://github.com/BoldGrid/controls#dev",
4760
"PHP_CodeSniffer": "https://github.com/squizlabs/PHP_CodeSniffer/#2.9",
@@ -112,6 +125,7 @@
112125
"webpack-runtime-public-path-plugin": "^1.1.2"
113126
},
114127
"dependencies": {
128+
"@babel/runtime-corejs2": "^7.4.4",
115129
"@boldgrid/components": "^2.16.1",
116130
"@wordpress/dom-ready": "^2.0.2",
117131
"Buttons": "https://github.com/alexwolfe/Buttons#2.0.0",
@@ -124,6 +138,7 @@
124138
"hamburgers": "https://github.com/jonsuh/hamburgers#v0.9.3",
125139
"hero-patterns": "^2.0.2",
126140
"hover.css": "^2.3.1",
141+
"jarallax": "^1.10.7",
127142
"jquery-goup": "^1.1.0",
128143
"jquery.nicescroll": "^3.6.8",
129144
"jquery.stellar": "~0.6.2",

src/assets/js/front-end.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -602,15 +602,17 @@ var BoldGrid = BoldGrid || {};
602602

603603
// Parallax enabled pages.
604604
'boldgrid_customizer_parallax': {
605+
jarallax: null,
606+
/* jshint ignore:start */
605607
init: function() {
606-
var $body = $( 'body.boldgrid-customizer-parallax' );
607-
if ( $body.stellar ) {
608-
$body.attr( 'data-stellar-background-ratio', '0.2' );
609-
$body.stellar( {
610-
horizontalScrolling: false
611-
} );
612-
}
608+
( async function() {
609+
if ( ! BoldGrid.boldgrid_customizer_parallax.jarallax ) {
610+
BoldGrid.boldgrid_customizer_parallax.jarallax = await import( /* webpackChunkName: "jarallax" */ 'jarallax' );
611+
}
612+
BoldGrid.boldgrid_customizer_parallax.jarallax.jarallax( document.body, { speed: 0.2 } );
613+
} )();
613614
}
615+
/* jshint ignore:end */
614616
},
615617

616618
// WOW.js enabled.

yarn.lock

+115
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@
162162
"@babel/types" "7.0.0-beta.52"
163163
lodash "^4.17.5"
164164

165+
"@babel/helper-module-imports@^7.0.0":
166+
version "7.0.0"
167+
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d"
168+
integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==
169+
dependencies:
170+
"@babel/types" "^7.0.0"
171+
165172
"@babel/helper-module-transforms@7.0.0-beta.52":
166173
version "7.0.0-beta.52"
167174
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.52.tgz#bc8444ead252a372c928996ae1733deaf3b08c90"
@@ -531,6 +538,16 @@
531538
dependencies:
532539
regenerator-transform "^0.13.3"
533540

541+
"@babel/plugin-transform-runtime@^7.4.4":
542+
version "7.4.4"
543+
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz#a50f5d16e9c3a4ac18a1a9f9803c107c380bce08"
544+
integrity sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q==
545+
dependencies:
546+
"@babel/helper-module-imports" "^7.0.0"
547+
"@babel/helper-plugin-utils" "^7.0.0"
548+
resolve "^1.8.1"
549+
semver "^5.5.1"
550+
534551
"@babel/plugin-transform-shorthand-properties@7.0.0-beta.52":
535552
version "7.0.0-beta.52"
536553
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-beta.52.tgz#f3cd777643d66878842a1bad5b95b4cc0b5ecb97"
@@ -623,6 +640,14 @@
623640
js-levenshtein "^1.1.3"
624641
semver "^5.3.0"
625642

643+
"@babel/runtime-corejs2@^7.4.4":
644+
version "7.4.4"
645+
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.4.4.tgz#4d4519a4c85e9d98fdff59f5371758a34ae07923"
646+
integrity sha512-hE7oVwVsRws84u5/nkaWWdN2J4SXEGuXKjrAsP0E4nkYImjSbpdHfGTS2nvFc82aDGIuG6OzhAQMpIzTHuZeKA==
647+
dependencies:
648+
core-js "^2.6.5"
649+
regenerator-runtime "^0.13.2"
650+
626651
"@babel/runtime@^7.0.0":
627652
version "7.1.5"
628653
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.5.tgz#4170907641cf1f61508f563ece3725150cc6fe39"
@@ -700,6 +725,15 @@
700725
lodash "^4.17.5"
701726
to-fast-properties "^2.0.0"
702727

728+
"@babel/types@^7.0.0":
729+
version "7.4.4"
730+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0"
731+
integrity sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==
732+
dependencies:
733+
esutils "^2.0.2"
734+
lodash "^4.17.11"
735+
to-fast-properties "^2.0.0"
736+
703737
"@babel/types@^7.3.0":
704738
version "7.3.3"
705739
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.3.tgz#6c44d1cdac2a7625b624216657d5bc6c107ab436"
@@ -3828,6 +3862,11 @@ core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0:
38283862
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e"
38293863
integrity sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==
38303864

3865+
core-js@^2.6.5:
3866+
version "2.6.5"
3867+
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895"
3868+
integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==
3869+
38313870
core-util-is@1.0.2, core-util-is@~1.0.0:
38323871
version "1.0.2"
38333872
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -4482,6 +4521,11 @@ dom-serializer@0:
44824521
domelementtype "~1.1.1"
44834522
entities "~1.1.1"
44844523

4524+
dom-walk@^0.1.0:
4525+
version "0.1.1"
4526+
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
4527+
integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=
4528+
44854529
domain-browser@^1.1.1:
44864530
version "1.2.0"
44874531
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
@@ -5958,6 +6002,14 @@ global-prefix@^1.0.1:
59586002
is-windows "^1.0.1"
59596003
which "^1.2.14"
59606004

6005+
global@^4.3.2, global@~4.3.0:
6006+
version "4.3.2"
6007+
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
6008+
integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=
6009+
dependencies:
6010+
min-document "^2.19.0"
6011+
process "~0.5.1"
6012+
59616013
globals@^11.0.1, globals@^11.1.0:
59626014
version "11.7.0"
59636015
resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673"
@@ -7695,6 +7747,16 @@ isurl@^1.0.0-alpha5:
76957747
has-to-string-tag-x "^1.2.0"
76967748
is-object "^1.0.1"
76977749

7750+
jarallax@^1.10.7:
7751+
version "1.10.7"
7752+
resolved "https://registry.yarnpkg.com/jarallax/-/jarallax-1.10.7.tgz#b9e31392c705cb3ea21113d2b2c98fab8ff6b526"
7753+
integrity sha512-eIRVwNRLiWdEWkYvU3gwxOeZPHNeXnwmT9FqUb9wO8oQOGZPm/hDJUs5Z9FXYsK60Ivoj5WXLozx4SXaMlvfAg==
7754+
dependencies:
7755+
global "^4.3.2"
7756+
lite-ready "^1.0.4"
7757+
rafl "^1.2.2"
7758+
video-worker "^1.1.6"
7759+
76987760
jpegtran-bin@^3.0.0:
76997761
version "3.2.0"
77007762
resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz#f60ecf4ae999c0bdad2e9fbcdf2b6f0981e7a29b"
@@ -8158,6 +8220,11 @@ listr@^0.14.1:
81588220
rxjs "^6.1.0"
81598221
strip-ansi "^3.0.1"
81608222

8223+
lite-ready@^1.0.4:
8224+
version "1.0.4"
8225+
resolved "https://registry.yarnpkg.com/lite-ready/-/lite-ready-1.0.4.tgz#6dfe50f45a5a2840c87c8406a7abf3088bfd255e"
8226+
integrity sha1-bf5Q9FpaKEDIfIQGp6vzCIv9JV4=
8227+
81618228
load-json-file@^1.0.0:
81628229
version "1.1.0"
81638230
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
@@ -9032,6 +9099,13 @@ mimic-response@^1.0.0:
90329099
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e"
90339100
integrity sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=
90349101

9102+
min-document@^2.19.0:
9103+
version "2.19.0"
9104+
resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
9105+
integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=
9106+
dependencies:
9107+
dom-walk "^0.1.0"
9108+
90359109
mini-css-extract-plugin@^0.4.0:
90369110
version "0.4.1"
90379111
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.1.tgz#d2bcf77bb2596b8e4bd9257e43d3f9164c2e86cb"
@@ -10020,6 +10094,11 @@ path-parse@^1.0.5:
1002010094
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
1002110095
integrity sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=
1002210096

10097+
path-parse@^1.0.6:
10098+
version "1.0.6"
10099+
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
10100+
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
10101+
1002310102
path-root-regex@^0.1.0:
1002410103
version "0.1.2"
1002510104
resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"
@@ -10618,6 +10697,11 @@ process@^0.11.10:
1061810697
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
1061910698
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
1062010699

10700+
process@~0.5.1:
10701+
version "0.5.2"
10702+
resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf"
10703+
integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=
10704+
1062110705
progress@^2.0.0:
1062210706
version "2.0.0"
1062310707
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
@@ -10784,6 +10868,13 @@ querystringify@^2.0.0:
1078410868
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.0.tgz#7ded8dfbf7879dcc60d0a644ac6754b283ad17ef"
1078510869
integrity sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==
1078610870

10871+
rafl@^1.2.2:
10872+
version "1.2.2"
10873+
resolved "https://registry.yarnpkg.com/rafl/-/rafl-1.2.2.tgz#fe930f758211020d47e38815f5196a8be4150740"
10874+
integrity sha1-/pMPdYIRAg1H44gV9Rlqi+QVB0A=
10875+
dependencies:
10876+
global "~4.3.0"
10877+
1078710878
randomatic@^3.0.0:
1078810879
version "3.0.0"
1078910880
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923"
@@ -11063,6 +11154,11 @@ regenerator-runtime@^0.12.0:
1106311154
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de"
1106411155
integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==
1106511156

11157+
regenerator-runtime@^0.13.2:
11158+
version "0.13.2"
11159+
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447"
11160+
integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==
11161+
1106611162
regenerator-transform@^0.10.0:
1106711163
version "0.10.1"
1106811164
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
@@ -11351,6 +11447,13 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2:
1135111447
dependencies:
1135211448
path-parse "^1.0.5"
1135311449

11450+
resolve@^1.8.1:
11451+
version "1.10.1"
11452+
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18"
11453+
integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==
11454+
dependencies:
11455+
path-parse "^1.0.6"
11456+
1135411457
responselike@1.0.2:
1135511458
version "1.0.2"
1135611459
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
@@ -11608,6 +11711,11 @@ semver@^4.0.3, semver@^4.1.0:
1160811711
resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
1160911712
integrity sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=
1161011713

11714+
semver@^5.5.1:
11715+
version "5.7.0"
11716+
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
11717+
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
11718+
1161111719
semver@~5.0.1:
1161211720
version "5.0.3"
1161311721
resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
@@ -13096,6 +13204,13 @@ verror@1.10.0:
1309613204
core-util-is "1.0.2"
1309713205
extsprintf "^1.2.0"
1309813206

13207+
video-worker@^1.1.6:
13208+
version "1.1.6"
13209+
resolved "https://registry.yarnpkg.com/video-worker/-/video-worker-1.1.6.tgz#a0bfd63f386c7632ca4a6dfdeac430797c752b40"
13210+
integrity sha512-l72nF3wE3V8VuJOvg9zSonxe31udDrvAzT0bwU/GS+smxc9UQqZGBe7b1tyj/vBsagQusXVx0sEw6FwFD1GdZQ==
13211+
dependencies:
13212+
global "^4.3.2"
13213+
1309913214
vinyl-assign@^1.0.1:
1310013215
version "1.2.1"
1310113216
resolved "https://registry.yarnpkg.com/vinyl-assign/-/vinyl-assign-1.2.1.tgz#4d198891b5515911d771a8cd9c5480a46a074a45"

0 commit comments

Comments
 (0)