Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Pull Request

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue number)

## Type of change

Please delete options that are not relevant.

- [ ] New Ressource
- [ ] New Module
- [ ] Content fix
- [ ] Documentation update
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)


## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

- [ ] Code Review
- [ ] Local execution
- [ ] other (please specify)

## Checklist:

- [ ] My content is Open Source (see License)
- [ ] My code follows the Open Source guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation where needed
- [ ] My changes generate no new warnings (double check during this pull request)
- [ ] I have added tests that prove my fix is effective or that my feature works (described above)
- [ ] Any dependent changes have been merged and published in downstream branches (development first)
13 changes: 13 additions & 0 deletions assets/js/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

this.addSorting();
this.addSearchFilter();
this.addRandomizer();
}

/**
Expand Down Expand Up @@ -382,6 +383,18 @@
url.searchParams.delete('search');
sessionStorage.setItem(TRAINING_URL, url.href);
}

_randomize(evt){
this.shuffle.sort({ randomize: true });
}

addRandomizer() {
const randomizeButton = document.getElementById('randomize');
if (!randomizeButton) {
return;
}
randomizeButton.addEventListener('click', this._randomize.bind(this));
}
}

document.addEventListener('DOMContentLoaded', function () {
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ <h3>Create your custom training plan effortlessly.</h3>
</div>
</div>

<button id="randomize" class="cursor-pointer btn btn-sm btn-outline-secondary mx-2" data-tooltip="I'm Feeling Lucky, Present New Modules" data-tooltip-location="top">shuffle</button>
<div class="p-2 flex-grow-1">
<input type="search" class="form-control col-6 js-shuffle-search" id="filters-search-input" placeholder="search by module title">
</div>
Expand Down