Closed m52go closed 4 years ago
288eef8:
sendAnalytic()
function.
0605baa:
Dynamic elements checked and working on local page and netlify, expanders and hover effect. (did notice that i couldn't switch to light mode, only dark mode was available).
Compared _site
dir from master against proposed branch (correct term? ). script.js
has been removed and replaced and added to the js
directory home.js
and faq.js
Looks good to me ... let me know if i went about it wrong at any point :)
Not sure whether the light mode/dark mode not working is an issue.
(did notice that i couldn't switch to light mode, only dark mode was available).
This was crucial. Thank you for finding this. Yes I completely removed the code for the toggling dark mode when deleting scripts.js
...the code for the toggle was not commented and kind of hidden at the bottom, so I didn't see it.
I've added it back now and rebased the branch so it's included in the last commit (https://github.com/bisq-network/bisq-website/pull/381/commits/ec7f8eaad7f9d3413e6499211fd3c07bc78c8368).
I wanted to add an anchor link to the front page, but FAQ page JavaScript was getting in the way.
As it turned out, JavaScript code for the home and FAQ pages was being loaded for every page. This also made load times unnecessarily slower for other pages.
This PR puts JavaScript for the home page in a separate home.js file that is only loaded when the home page is loaded. Likewise for the FAQ page.
Additionally, it removes lingering code from when Google Analytics was used.
Review/test: https://deploy-preview-381--bisq-website.netlify.app/
Review Guidance
In this case, there are just 2 commits, so it's worth looking at them separately.
sendAnalytic()
function and both lines that call itsendAnalytic()
...since these proposed changes remove that function, that method should not be used anywhere else./js/scripts.js
into 2 separate files called/js/home.js
and/js/faq.js
.git checkout master
,rm -rf _site
, and thenbundle exec jekyll build
._site
folder somewhere else.git checkout move-js
,rm -rf _site
, and thenbundle exec jekyll build
._site
folder with the other one with a diffing tool of your choice (e.g. Meld).You should see
js/scripts.js
missing on every page, andjs/home.js
andjs/faq.js
added to all home pages and all faq pages...but everything else should be the same.