fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="UTF-8"/> 5 <meta name="viewport" content="width=device-width, initial-scale=1"/> 6 7 <title>Clippy lints documentation</title> 8 9 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"/> 10 <style> 11 [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; } 12 </style> 13</head> 14<body> 15 <div class="container" ng-app="clippy" ng-controller="docVersions"> 16 <div class="page-header"> 17 <h1>Clippy lints documentation</h1> 18 </div> 19 20 <div ng-cloak> 21 <div class="alert alert-info" role="alert" ng-if="loading"> 22 Loading… 23 </div> 24 <div class="alert alert-danger" role="alert" ng-if="error"> 25 Error loading versions!<br/> 26 You can always try to get <a href="master/index.html">the master branch docs</a>. 27 </div> 28 29 <article class="panel panel-default" ng-show="data"> 30 <div class="panel-heading"> 31 <h3 class="panel-title"> 32 Available versions 33 </h3> 34 </div> 35 36 <ul class="list-group"> 37 <a class="list-group-item" ng-repeat="version in data | orderBy:versionOrder:true" 38 href="./{{version}}/index.html"> 39 {{version}} 40 </a> 41 </ul> 42 </article> 43 </div> 44 </div> 45 46 <a href="https://github.com/rust-lang/rust-clippy"> 47 <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"/> 48 </a> 49 50 51 <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.12/angular.min.js"></script> 52 <script> 53 angular.module('clippy', []) 54 .controller('docVersions', function ($scope, $http) { 55 $scope.loading = true; 56 57 $scope.normalizeVersion = function(v) { 58 return v.replace(/^rust-/, ''); 59 }; 60 61 $scope.versionOrder = function(v) { 62 if (v === 'master') { return Infinity; } 63 if (v === 'stable') { return Number.MAX_VALUE; } 64 if (v === 'beta') { return Number.MAX_VALUE - 1; } 65 if (v === 'pre-1.29.0') { return Number.MIN_VALUE; } 66 67 return $scope.normalizeVersion(v) 68 .split('.') 69 .reverse() 70 .reduce(function(acc, val, index) { 71 return acc + (val * Math.pow(100, index)); 72 }, 0); 73 } 74 75 $http.get('./versions.json') 76 .success(function (data) { 77 $scope.data = data; 78 $scope.loading = false; 79 }) 80 .error(function (data) { 81 $scope.error = data; 82 $scope.loading = false; 83 }); 84 }) 85 ; 86 </script> 87</body> 88</html>