Start redesigning the Webpage

This commit is contained in:
Taevas 2023-03-07 14:40:49 +01:00
parent d06196ac48
commit 29fef21cd1
8 changed files with 160 additions and 103 deletions

View file

@ -1,59 +0,0 @@
* {
text-align: center;
font-family: sans-serif;
}
body {
background-color: #112034;
color: white;
display: flex;
}
input[type="button"] {
padding: 40px;
margin: 10px;
font-size: 50px;
}
#rest {
background-color: #000;
width: 40%;
border: solid 1px;
margin-right: 10%;
}
form {
display: grid;
}
form * {
margin: 2px 20px;
}
#list {
flex: auto;
width: 600px;
height: 500px;
overflow-x: hidden;
overflow-y: auto;
background-color: black;
border: solid 1px;
}
ul {
padding: 0px;
}
li {
list-style: none;
font-size: 20px;
margin: 10px;
}
a:link {
color: white;
}
a:visited {
color: gray;
}

View file

@ -1,38 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Website-Finder</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="./index.css">
<script type="text/javascript" src="./index.js"></script>
</head>
<body>
<div id="rest">
<h1>WEBSITE-FINDER</h1>
<form>
<input type="button" id="btn" onclick="findWebsites()" value="Find websites!">
<label>Number of URLs to check:</label>
<input type="number" id="times" value="2000">
<label>Application protocols (separated with ", "):</label>
Please note that http requests (not https) will not work if the page is loaded on a HTTPS website, <b>putting http in that field is useless if you're using GitHub Pages</b>
<input type="text" id="protocols" value="https">
<label>Domains to check (separated with ", "):</label>
<input type="text" id="domains" value="com, org, net, tk, cn, de, ru, uk, nl, ca, au, in, ir, tv, live, gov, edu">
<label>Chances out of 100 for a URL to have two domains:</label>
<input type="number" id="second" value="0">
<label>Minimum URL length (excluding domain and protocol):</label>
<input type="number" id="min" value="2">
<label>Maximum URL length (excluding domain and protocol):</label>
<input type="number" id="max" value="15">
</form>
<p>STATUS: STOPPED</p>
<p>COUNT:</p>
<p>CHECKING:</p>
</div>
<div id="list">
<ul>
</ul>
</div>
</body>
</html>

81
Webpage/index.css Normal file
View file

@ -0,0 +1,81 @@
* {
text-align: center;
font-family: 'Gugi', sans-serif;
}
body {
background-color: #112034;
color: white;
}
#presentation {
background-color: #080833;
border-bottom: 1px solid #888;
padding-top: 5px;
margin-bottom: 20px;
}
#presentation p {
margin-bottom: 0;
}
#presentation a {
color: white;
}
#presentation a:hover {
color: greenyellow;
line-height: 1em;
}
label {
color: black;
}
input[type="button"] {
padding: 40px;
margin: 10px;
font-size: 50px;
}
#finder, #status {
border: solid 1px;
border-collapse: collapse;
width: 80vw;
margin-left: auto;
margin-right: auto;
padding: 20px;
}
#finder {
background-color: #00000075;
margin-bottom: 20px;
}
#status {
background-color: #030715a3;
}
#finder .row {
margin: 15px;
}
#list {
flex: auto;
width: 600px;
height: 500px;
overflow-x: hidden;
overflow-y: auto;
background-color: black;
border: solid 1px;
}
ul {
padding: 0px;
}
li {
list-style: none;
font-size: 20px;
margin: 10px;
}

76
Webpage/index.html Normal file
View file

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html>
<head>
<title>Website-Finder</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://fonts.cdnfonts.com/css/gugi" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="./index.css">
<script type="text/javascript" src="./index.js"></script>
</head>
<body>
<div id="presentation">
<h1>Website-Finder</h1>
<p>Also available in:</p>
<nav class="nav nav-pills nav-fill">
<a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://github.com/TTTaevas/Website-Finder/tree/master/C%23">C#</a>
<a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://github.com/TTTaevas/Website-Finder/tree/master/Crystal">Crystal</a>
<a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://github.com/TTTaevas/Website-Finder/tree/master/Go">Go</a>
<a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://github.com/TTTaevas/Website-Finder/tree/master/Node.js">Node.js</a>
<a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://github.com/TTTaevas/Website-Finder/tree/master/Python">Python</a>
<a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://github.com/TTTaevas/Website-Finder/tree/master/Ruby">Ruby</a>
</nav>
</div>
<div id="finder">
<form class="container">
<div class="row">
<div class="col col-lg-3 col-12 form-floating">
<input class="form-control" type="number" id="times" value="2000" placeholder="">
<label>Number of URLs to check</label>
</div>
<div class="col col-md col-12 form-floating">
<input class="form-control" placeholder="" type="number" id="min" value="2" placeholder="">
<label>Min domain length (excl. TLD)</label>
</div>
<div class="col col-md col-12 form-floating">
<input class="form-control" placeholder="" type="number" id="max" value="15" placeholder="">
<label>Max domain length (excl. TLD)</label>
</div>
</div>
<div class="row">
<div class="col col-lg col-md-3 col-12 form-floating">
<input class="form-control" placeholder="" type="text" id="protocols" value="https" placeholder="">
<label>Application protocols</label>
</div>
<div class="col col-lg col-md-9 col-12 form-floating">
<input class="form-control" placeholder="" type="text" id="domains"
value="com, org, net, tk, cn, de, ru, uk, nl, ca, au, in, ir, tv, live, gov, edu" placeholder="">
<label>TLDs to check</label>
</div>
</div>
<div class="row">
<div class="col col-lg-9 col-12 form-floating" style="margin-left: auto; margin-right: auto;">
<input class="form-control" placeholder="" type="number" id="second" value="0" placeholder="">
<label>Chances out of 100 for a URL to have two TLDs</label>
</div>
</div>
<input type="button" id="btn" onclick="findWebsites()" value="Find websites!">
</form>
</div>
<div id="status" class="row">
<div id="progress" class="col">
<p>STATUS: STOPPED</p>
<p>COUNT:</p>
<p>CHECKING:</p>
</div>
<div id="list" class="col">
<ul>
</ul>
</div>
</div>
</body>
</html>

View file

@ -43,7 +43,7 @@ function findWebsites() {
const min = document.getElementById("min").value ? Math.round(Number(document.getElementById("min").value)) : 2
const max = document.getElementById("max").value ? Math.round(Number(document.getElementById("max").value)) : 15
const list = document.getElementsByTagName("UL")[0]
const list = document.getElementById("list").getElementsByTagName("UL")[0]
const status = document.getElementsByTagName("P")[0]
const count = document.getElementsByTagName("P")[1]
const url_show = document.getElementsByTagName("P")[2]
@ -61,5 +61,4 @@ function findWebsites() {
document.getElementById("btn").disabled = true
main_loop()
}

View file

@ -1,5 +1,3 @@
<meta http-equiv="refresh" content="0; url=Javascript/index.html">
<!-- If you wish to host the Javascript part on GitHub Pages, this file is necessary to redirect to Javascript's index.html
Don't forget to adapt the URL to your needs!
<meta http-equiv="refresh" content="0; url=Webpage/index.html">
<!-- This file is only used for redirecting to the right page when root is hosted instead of ./Webpage
This file is not necessary for anything else, you may delete it if you find it useless -->