Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhosny committed Sep 12, 2023
1 parent e598095 commit 017e41d
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 15 deletions.
14 changes: 10 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>The Algorithms - JavaScript</title><link rel="stylesheet" href="./style.css"></head><body><h1>
The Algorithms - JavaScript (<a href="https://github.com/TheAlgorithms/JavaScript" target="_blank">Source</a>)
</h1>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>The Algorithms - JavaScript</title><link rel="stylesheet" href="./style.css"></head><body><h1>The Algorithms - JavaScript Playground</h1>
<p>
Algorithm:
<select id="algorithm-select"></select>
<br>
(<a href="https://github.com/TheAlgorithms/JavaScript" target="_blank">Source</a>)
</p>
<div id="container" style="height: 80vh"></div>

<div id="footer">
This page was
<a href="https://livecodes.io/?x=https://github.com/hatemhosny/thealgorithms-javascript/tree/gh-pages/src" target="_blank">built</a>
on <a href="https://livecodes.io/" target="_blank">LiveCodes</a>. (<a href="https://github.com/hatemhosny/thealgorithms-javascript" target="_blank">view on GitHub</a>)
</div>

<script>
const algorithms = [
"Backtracking/AllCombinationsOfSizeK",
Expand Down Expand Up @@ -382,7 +388,7 @@
const params = new URLSearchParams(window.location.search);
const selected =
(params.get("algorithm") &&
algorithms.find((algorithm) => algorithm === params.get("algorithm"))) ||
algorithms.find((algorithm) => algorithm === params.get("algorithm"))) ||
"Search/BinarySearch";
document.getElementById(selected).selected = true;
</script>
Expand Down
28 changes: 20 additions & 8 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
<h1>
The Algorithms - JavaScript (<a
href="https://github.com/TheAlgorithms/JavaScript"
target="_blank"
>Source</a
>)
</h1>
<h1>The Algorithms - JavaScript Playground</h1>
<p>
Algorithm:
<select id="algorithm-select"></select>
<br />
(<a href="https://github.com/TheAlgorithms/JavaScript" target="_blank"
>Source</a
>)
</p>
<div id="container" style="height: 80vh"></div>

<div id="footer">
This page was
<a
href="https://livecodes.io/?x=https://github.com/hatemhosny/thealgorithms-javascript/tree/gh-pages/src"
target="_blank"
>built</a
>
on <a href="https://livecodes.io/" target="_blank">LiveCodes</a>. (<a
href="https://github.com/hatemhosny/thealgorithms-javascript"
target="_blank"
>view on GitHub</a
>)
</div>

<script>
const algorithms = [
"Backtracking/AllCombinationsOfSizeK",
Expand Down Expand Up @@ -385,7 +397,7 @@ <h1>
const params = new URLSearchParams(window.location.search);
const selected =
(params.get("algorithm") &&
algorithms.find((algorithm) => algorithm === params.get("algorithm"))) ||
algorithms.find((algorithm) => algorithm === params.get("algorithm"))) ||
"Search/BinarySearch";
document.getElementById(selected).selected = true;
</script>
6 changes: 3 additions & 3 deletions src/livecodes.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ a {
}
#container {
height: 90vh;
}
#footer {
font-size: small;
margin: 1em;
}
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ a {
}
#container {
height: 90vh;
}
#footer {
font-size: small;
margin: 1em;
}

0 comments on commit 017e41d

Please sign in to comment.