Skip to content

Commit

Permalink
Add language counter on homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Sep 7, 2015
1 parent 805a0ce commit 889cda5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h1>Basic usage</h1>

<section id="languages-list" class="language-markup">
<h1>Supported languages</h1>
<p>This is the list of all languages currently supported by Prism, with their corresponding alias, to use in place of <code>xxxx</code> in the <code>language-xxxx</code> class:</p>
<p>This is the list of all <span id="languages-list-count"></span> languages currently supported by Prism, with their corresponding alias, to use in place of <code>xxxx</code> in the <code>language-xxxx</code> class:</p>
</section>

<section id="plugins">
Expand Down Expand Up @@ -222,10 +222,12 @@ <h1>Credits</h1>
(function() {
var languageItems = [];
var languages = components.languages;
var count = 0;
for (var id in languages) {
if (id == 'meta') {
continue;
}
count++;
var name = languages[id].title || languages[id];

languageItems.push({
Expand All @@ -247,6 +249,7 @@ <h1>Credits</h1>
contents: languageItems,
inside: '#languages-list'
});
$u.element.contents($('#languages-list-count'), count);
}());
</script>

Expand Down

0 comments on commit 889cda5

Please sign in to comment.