Skip to content

Commit

Permalink
fixing jump to top
Browse files Browse the repository at this point in the history
  • Loading branch information
Eden Kupermintz committed Jul 7, 2019
1 parent f97f20e commit be55a1e
Show file tree
Hide file tree
Showing 10,266 changed files with 795,228 additions and 46 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,13 @@ Once you have installed Ruby, clone this repository to your machine. Once done,

**Serving the site after the first install**

All you need to run in consequent builds of the site is `bundle exec jekyll serve`. You can add the suffix `--incremental` to enable incremental building of the site. This saves build times since the regeneration feature is enabled by default (the site rebuilds every time you hit "save"). When `--incremental` is used, Jekyll won't rebuild the entire site on every save, only the affected sections. If you'd like the project to automatically open in a new tab, you can add the `-o` flag to the end of the above command.
You have two options to run the site after the first install:

**Note**: changes that alter site navigation or other changes that change the site as a whole might not show up when using `--incremental`. If that occurs, simply "kill" the build and run `bundle exec jekyll serve` without the suffix.
* **Using gulp.js**. [Gulp](https://gulpjs.com/) is a toolkit for automating painful or time-consuming tasks. By simply typing in `gulp` in your command line, it takes care of all the build commands needed to serve the site. It also watches the root directory and will automatically refresh your browser once any changes were built. Gulp and its dependencies is installed locally in the project, so there's no further installation needed from your end.

* **Using Jekyll's standard commands**. All you need to run in consequent builds of the site is `bundle exec jekyll serve`. You can add the suffix `--incremental` to enable incremental building of the site. This saves build times since the regeneration feature is enabled by default (the site rebuilds every time you hit "save"). When `--incremental` is used, Jekyll won't rebuild the entire site on every save, only the affected sections. If you'd like the project to automatically open in a new tab, you can add the `-o` flag to the end of the above command.

**Note**: changes that alter site navigation or other changes that change the site as a whole might not show up when using `--incremental`. If that occurs, simply "kill" the build and run `bundle exec jekyll serve` without the suffix. **This is also true for gulp: you will need to kill your gulp instance and then run the direct Jekyll command**.

### Template

Expand Down
19 changes: 19 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var gulp = require('gulp');
var shell = require('gulp-shell');
var browserSync = require('browser-sync').create();

// Task for building blog when something changed:
gulp.task('build', shell.task(['bundle exec jekyll serve --incremental']));
// If you don't use bundle:
// gulp.task('build', shell.task(['jekyll serve']));
// If you use Windows Subsystem for Linux (thanks @SamuliAlajarvela):
// gulp.task('build', shell.task(['bundle exec jekyll serve --force_polling']));

// Task for serving blog with Browsersync
gulp.task('serve', function () {
browserSync.init({server: {baseDir: '_site/'}});
// Reloads page when some of the already built files changed:
gulp.watch('_site/**/*.*').on('change', browserSync.reload);
});

gulp.task('default', gulp.parallel('build', 'serve'));
91 changes: 47 additions & 44 deletions js/additionalscripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ function navigateContent(url) {
$('.innerpageitem').removeClass("activeitem");
}
//jump to top when page loads
var hash = window.location.hash;
if (!hash) {
if (window.location.hash == "") {
console.log(window.location.hash);
window.scrollTo(0, 0);
}
if (/Mobi|Android/i.test(navigator.userAgent) == true) {
Expand Down Expand Up @@ -559,48 +559,51 @@ function scrollToHash () {
}

function domainTool() {
let input;
let accountInput;
const csdsButton = document.getElementById("csds-button");
const csdsResult = document.getElementById("csds-result");
let csdsUrl;
let html = "";
csdsButton.addEventListener("click", event => {
input = document.getElementById("account");
accountInput = input.value;
csdsUrl = 'https://api.liveperson.net/api/account/' + accountInput + '/service/baseURI?version=1.0';
retrieveDomains(accountInput);
});
const retrieveDomains = (account) => {
$.ajax({
url: csdsUrl,
headers: {
'Accept': 'application/json'
},
dataType: "json",
success: function(data) {
html = '';
$(csdsResult).css('display', 'table');
if (data.baseURIs.length > 0) {
html += '<thead><th>Service name</th><th>Base URI</th></thead><tbody>';
data.baseURIs.sort(function(a, b){
var m1 = a.service.toLowerCase();
var m2 = b.service.toLowerCase();
if(m1< m2) return -1;
if(m1> m2) return 1;
return 0;
})
data.baseURIs.forEach((entry) => {
html += `<tr><td>${entry.service}</td><td>${entry.baseURI}</td></tr>`;
});
html += '</tbody>'
csdsResult.innerHTML = html;
} else {
csdsResult.innerHTML = "Unable to retrieve base URIs for account, please verify your account number.";
}
}
});
}
var $title = $('.h1').text();
if ($title == "Domain API") {
let input;
let accountInput;
const csdsButton = document.getElementById("csds-button");
const csdsResult = document.getElementById("csds-result");
let csdsUrl;
let html = "";
csdsButton.addEventListener("click", event => {
input = document.getElementById("account");
accountInput = input.value;
csdsUrl = 'https://api.liveperson.net/api/account/' + accountInput + '/service/baseURI?version=1.0';
retrieveDomains(accountInput);
});
const retrieveDomains = (account) => {
$.ajax({
url: csdsUrl,
headers: {
'Accept': 'application/json'
},
dataType: "json",
success: function(data) {
html = '';
$(csdsResult).css('display', 'table');
if (data.baseURIs.length > 0) {
html += '<thead><th>Service name</th><th>Base URI</th></thead><tbody>';
data.baseURIs.sort(function(a, b){
var m1 = a.service.toLowerCase();
var m2 = b.service.toLowerCase();
if(m1< m2) return -1;
if(m1> m2) return 1;
return 0;
})
data.baseURIs.forEach((entry) => {
html += `<tr><td>${entry.service}</td><td>${entry.baseURI}</td></tr>`;
});
html += '</tbody>'
csdsResult.innerHTML = html;
} else {
csdsResult.innerHTML = "Unable to retrieve base URIs for account, please verify your account number.";
}
}
});
}
}
}

//detect if explorer and then add a bunch of classes with its own CSS because it's oh so special
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/atob

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/browser-sync

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/color-support

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/dev-ip

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/gulp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/lt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/throttleproxy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/window-size

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit be55a1e

Please sign in to comment.