-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
442 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""Module for Django system configuration.""" | ||
|
||
__version__ = "0.2.0" | ||
__version__ = "0.3.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Example Pīkau course | ||
name: Example pīkau course | ||
status: 6 | ||
overview: overview.md | ||
language: en | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
var faq = []; | ||
var fuze; | ||
var faq_search_results; | ||
var faq_all; | ||
|
||
$(document).ready(function() { | ||
faq_search_results = $('#faq-search-results'); | ||
faq_all = $('#faq-all'); | ||
|
||
// Load FAQ into array | ||
load_faq(); | ||
// Create fuse search function | ||
fuse = new Fuse(faq, { | ||
shouldSort: true, | ||
threshold: 0.6, | ||
location: 0, | ||
distance: 100, | ||
maxPatternLength: 32, | ||
minMatchCharLength: 1, | ||
keys: [ | ||
'question', | ||
'answer' | ||
] | ||
}); | ||
// // Change on each input | ||
$('#faq-search').on('input', function(event){ | ||
display_results(event.target.value); | ||
}); | ||
// // Call display function on load | ||
display_results(''); | ||
|
||
$('#clear-search').click(function() { | ||
$('#faq-search').val(''); | ||
display_results(''); | ||
}); | ||
}); | ||
|
||
function load_faq() { | ||
$('#faq-all .faq').each(function() { | ||
var item = {}; | ||
item.question = $('h5', this).text().trim(); | ||
item.answer = $('p', this).text().trim(); | ||
item.html = $(this).html(); | ||
faq.push(item); | ||
}); | ||
} | ||
|
||
function display_results(query) { | ||
// Empty questions | ||
faq_search_results.empty(); | ||
|
||
// If no query, show all QA's, otherwise filter by search | ||
if (query.length == 0) { | ||
faq_search_results.hide(); | ||
faq_all.show(); | ||
|
||
} else { | ||
faq_all.hide(); | ||
faq_search_results.show(); | ||
$.each(fuse.search(query), function(i, item) { | ||
faq_search_results.append($(item.html)); | ||
}); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.