Skip to content

Commit

Permalink
[docs] Readme links and better list of examples names
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Sep 11, 2019
1 parent 585b0ff commit b364a1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ Used to destroy the Gauge element
## Demo
Click [here](https://justgage.com/) to see a demo
Click [here](https://toorshia.github.io/justgage) to see a demo
## Examples
Click [here](https://toorshia.github.io/justgage/examples) for a list of examples
Click [here](https://toorshia.github.io/justgage/#demo) for a list of examples
## Changelog
Expand Down
8 changes: 7 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,20 @@
var g1, g1a, g2, g2a, g2b, g3, g4, g4a, g4b, g5, g6, g7, g8, g9, g10, g11, g12, g13, g14, g15, g16;
var loaded = [false, false, false, false];

function fileName(string) {
string = string.replace(/-/, ' ')
string = string.substring(0, string.indexOf('.htm'))
return string.charAt(0).toUpperCase() + string.slice(1);
}

$(document).ready(function () {
initGauges(0);
initDemos();

$.get("https://api.github.com/repos/toorshia/justgage/contents/docs/examples", function (data, status) {
let htmlString = '';
for (let file of data) {
htmlString += `<li><a href="${file.path.substr(5)}">${file.name}</a></li>`;
htmlString += `<li><a href="${file.path.substr(5)}">${fileName(file.name)}</a></li>`;
}
htmlString += '';
$('#examples').html(htmlString);
Expand Down

0 comments on commit b364a1b

Please sign in to comment.