Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/discord.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
</head>
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0">
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0 overflow-hidden">
<!-- Navigation-->
<div id="nav-container"></div>

Expand Down
4 changes: 2 additions & 2 deletions dist/feedback.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
</head>
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0">
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0 overflow-hidden">
<!-- Navigation-->
<div id="nav-container"></div>

Expand Down
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<script src="js/crowdin.js"></script>
</head>
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0">
<main class="flex-shrink-0 overflow-hidden">
<!-- Navigation-->
<nav id="nav-container"></nav>

Expand Down Expand Up @@ -268,7 +268,7 @@ <h1>
</div>
<div class="col-sm-auto border-white my-3 px-3 py-2 border-start">
<div class="container">
<h4 class="card-title mb-3 fw-bolder">Donate</h4>
<h4 class="card-title mb-3 fw-bolder">Donate</h4>
</div>
<a
class="text-decoration-none"
Expand Down
36 changes: 36 additions & 0 deletions dist/js/levenshtein_distance.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
let levenshteinDistance = {
get: function (a, b) {
if (a.length === 0) return b.length;
if (b.length === 0) return a.length;

let matrix = [];

// increment along the first column of each row
let i;
for (i = 0; i <= b.length; i++) {
matrix[i] = [i];
}

// increment each column in the first row
let j;
for (j = 0; j <= a.length; j++) {
matrix[0][j] = j;
}

// Fill in the rest of the matrix
for (i = 1; i <= b.length; i++) {
for (j = 1; j <= a.length; j++) {
if (b.charAt(i - 1) === a.charAt(j - 1)) {
matrix[i][j] = matrix[i - 1][j - 1];
} else {
matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution
Math.min(matrix[i][j - 1] + 1, // insertion
matrix[i - 1][j] + 1)); // deletion
}
}
}

// return the percentage of the levenshtein distance
return (1 - (matrix[b.length][a.length] / Math.max(a.length, b.length))) * 100
}
}
27 changes: 8 additions & 19 deletions dist/js/projects.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
// projects section script
function rankingSorter(firstKey, secondKey) {
return function(a, b) {
if (a[firstKey] > b[firstKey]) {
return -1;
} else if (a[firstKey] < b[firstKey]) {
return 1;
}
else {
if (a[secondKey] > b[secondKey]) {
return 1;
} else if (a[secondKey] < b[secondKey]) {
return -1;
} else {
return 0;
}
}
}
}

// load external scripts
$.getScript('https://app.lizardbyte.dev/js/ranking_sorter.js')


// get project container
container = document.getElementById("project-container")
let org_name = "LizardByte"
let base_url = `https://app.${org_name.toLowerCase()}.dev`
let cache_repo = "uno"

// create project cards

$(document).ready(function(){
// Set cache = false for all jquery ajax requests.
$.ajaxSetup({
cache: false,
});
});


// create project cards
$(document).ready(function(){
// get readthedocs projects
let readthedocs = []
Expand Down
18 changes: 18 additions & 0 deletions dist/js/ranking_sorter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
let rankingSorter = function (firstKey, secondKey) {
return function(a, b) {
if (a[firstKey] > b[firstKey]) {
return -1;
} else if (a[firstKey] < b[firstKey]) {
return 1;
}
else {
if (a[secondKey] > b[secondKey]) {
return 1;
} else if (a[secondKey] < b[secondKey]) {
return -1;
} else {
return 0;
}
}
}
}
4 changes: 2 additions & 2 deletions dist/privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
</head>
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0">
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0 overflow-hidden">
<!-- Navigation-->
<div id="nav-container"></div>

Expand Down
2 changes: 1 addition & 1 deletion dist/support.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<script src="js/crowdin.js"></script>
</head>
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0">
<main class="flex-shrink-0 overflow-hidden">
<!-- Navigation-->
<nav id="nav-container"></nav>

Expand Down
4 changes: 2 additions & 2 deletions dist/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
</head>
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0">
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0 overflow-hidden">
<!-- Navigation-->
<div id="nav-container"></div>

Expand Down