2017-08-03 14:17:12 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
|
|
|
2019-02-28 12:17:10 -06:00
|
|
|
<title>Clippy lints documentation</title>
|
2017-08-03 14:17:12 -05:00
|
|
|
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"/>
|
|
|
|
<style>
|
|
|
|
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container" ng-app="clippy" ng-controller="docVersions">
|
|
|
|
<div class="page-header">
|
2018-07-25 13:02:52 -05:00
|
|
|
<h1>Clippy lints documentation</h1>
|
2017-08-03 14:17:12 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-cloak>
|
|
|
|
<div class="alert alert-info" role="alert" ng-if="loading">
|
|
|
|
Loading…
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-danger" role="alert" ng-if="error">
|
|
|
|
Error loading versions!<br/>
|
|
|
|
You can always try to get <a href="master/index.html">the master branch docs</a>.
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<article class="panel panel-default" ng-show="data">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">
|
|
|
|
Available versions
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<ul class="list-group">
|
2017-08-07 05:57:17 -05:00
|
|
|
<a class="list-group-item" ng-repeat="version in data | orderBy:versionOrder:true"
|
2017-08-03 14:17:12 -05:00
|
|
|
href="./{{version}}/index.html">
|
2017-08-07 05:57:17 -05:00
|
|
|
{{normalizeVersion(version)}}
|
2017-08-03 14:17:12 -05:00
|
|
|
</a>
|
|
|
|
</ul>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-11-21 21:40:09 -06:00
|
|
|
<a href="https://github.com/rust-lang/rust-clippy">
|
2017-08-03 14:17:12 -05:00
|
|
|
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"/>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.12/angular.min.js"></script>
|
|
|
|
<script>
|
|
|
|
angular.module('clippy', [])
|
|
|
|
.controller('docVersions', function ($scope, $http) {
|
|
|
|
$scope.loading = true;
|
|
|
|
|
2017-08-07 05:57:17 -05:00
|
|
|
$scope.normalizeVersion = function(v) {
|
|
|
|
return v.replace(/^v/, '');
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.versionOrder = function(v) {
|
|
|
|
if (v === 'master') { return Infinity; }
|
|
|
|
if (v === 'current') { return Number.MAX_VALUE; }
|
|
|
|
|
|
|
|
return $scope.normalizeVersion(v)
|
|
|
|
.split('.')
|
|
|
|
.reverse()
|
|
|
|
.reduce(function(acc, val, index) {
|
|
|
|
return acc + (val * Math.pow(100, index));
|
|
|
|
}, 0);
|
|
|
|
}
|
|
|
|
|
2017-08-03 14:17:12 -05:00
|
|
|
$http.get('./versions.json')
|
|
|
|
.success(function (data) {
|
|
|
|
$scope.data = data;
|
|
|
|
$scope.loading = false;
|
|
|
|
})
|
|
|
|
.error(function (data) {
|
|
|
|
$scope.error = data;
|
|
|
|
$scope.loading = false;
|
|
|
|
});
|
|
|
|
})
|
|
|
|
;
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|