diff --git a/js/stats.js b/js/stats.js deleted file mode 100644 index 713291fd0b..0000000000 --- a/js/stats.js +++ /dev/null @@ -1,54 +0,0 @@ -function loadStatsJSON (url, callback) { - var xobj = new XMLHttpRequest() - xobj.overrideMimeType('application/json') - xobj.open('GET', url, true) - xobj.onreadystatechange = function () { - if (xobj.readyState === 4 && xobj.status === 200) { - // Required use of an anonymous callback as .open will NOT return a value - // but simply returns undefined in asynchronous mode - callback(xobj.responseText) - } - } - xobj.send(null) -} - -function displayStatsJSON (reportText) { - var stats = JSON.parse(reportText) - - var div = document.getElementById('stats-downloads') - var mlns = stats.downloads.month / 1e6 - var blns = stats.downloads.all / 1e9 - div.innerHTML = ( - mlns.toFixed(0) + ' million monthly downloads
' + - blns.toFixed(1) + ' billion all-time downloads' - ) - - div = document.getElementById('stats-members') - div.innerHTML = ( - stats.n_members_core + ' core devs
' + - stats.n_members_staged_recipes + ' staged-recipes maintainers
' + - (stats.n_members / 1e3).toFixed(1) + 'k feedstock maintainers' - ) - - div = document.getElementById('stats-data') - div.innerHTML = ( - (stats.n_repos / 1e3).toFixed(1) + 'k feedstocks
' + - (stats.n_packages / 1e3).toFixed(1) + 'k packages
' + - (stats.n_artifacts / 1e6).toFixed(1) + 'M artifacts' - ) - - div = document.getElementById('stats-issues-prs') - div.innerHTML = ( - ((stats.n_prs + stats.n_issues) / 1e3).toFixed(1) + 'k issues+PRs
' + - ((stats.n_open_prs + stats.n_open_issues) / 1e3).toFixed(1) + 'k/' + - ((stats.n_closed_prs + stats.n_closed_issues) / 1e3).toFixed(1) + 'k open/closed' - ) - - div = document.getElementById('stats1') - div.style.display = '' - div = document.getElementById('stats2') - div.style.display = '' -} - -var url = 'https://raw.githubusercontent.com/conda-forge/by-the-numbers/main/data/live_counts.json' -loadStatsJSON(url, displayStatsJSON) diff --git a/js/theme.js b/js/theme.js deleted file mode 100644 index 12992400a2..0000000000 --- a/js/theme.js +++ /dev/null @@ -1,30 +0,0 @@ -/*! - * Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com) - * Code licensed under the Apache License v2.0. - * For details, see http://www.apache.org/licenses/LICENSE-2.0. - */ - -// jQuery to collapse the navbar on scroll -$(window).scroll(function() { - if ($(".navbar").offset().top > 50) { - $(".navbar-fixed-top").addClass("top-nav-collapse"); - } else { - $(".navbar-fixed-top").removeClass("top-nav-collapse"); - } -}); - -// jQuery for page scrolling feature - requires jQuery Easing plugin -$(function() { - $('a.page-scroll').bind('click', function(event) { - var $anchor = $(this); - $('html, body').stop().animate({ - scrollTop: $($anchor.attr('href')).offset().top - }, 1500, 'easeInOutExpo'); - event.preventDefault(); - }); -}); - -// Closes the Responsive Menu on Menu Item Click -$('.navbar-collapse ul li a').click(function() { - $('.navbar-toggle:visible').click(); -});