0
0

📦️ compile jhtml

This commit is contained in:
thetek 2021-07-29 12:44:16 +02:00
parent 65207c2d9d
commit cdb15b447a
3 changed files with 222 additions and 286 deletions

498
start/index.css vendored
View File

@ -1,7 +1,6 @@
*stop() *stop()
* { * {
box-sizing: border-box !important; box-sizing: border-box !important; }
}
html, body { html, body {
background-color: #21252b; background-color: #21252b;
@ -10,270 +9,216 @@ html, body {
margin: 0; margin: 0;
overflow-x: hidden; overflow-x: hidden;
padding: 0; padding: 0;
scrollbar-color: #4d5765 #21252b !important; scrollbar-color: #4d5765 #21252b !important; }
}
input, button { input, button {
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", "Helvetica", sans-serif; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", "Helvetica", sans-serif; }
}
#content { #content {
min-height: calc(100vh - 9rem); min-height: calc(100vh - 9rem); }
}
#header { #header {
height: 4rem; height: 4rem;
padding: 0.5rem; padding: .5rem;
width: 100vw; width: 100vw; }
} #header button {
#header button { background-color: #21252b;
background-color: #21252b; border: none;
border: none; border-radius: .5rem;
border-radius: 0.5rem; color: #4c5666;
color: #4c5666; cursor: pointer;
cursor: pointer; float: right;
float: right; height: 3rem;
height: 3rem; transition: all .3s ease;
transition: all 0.3s ease; width: 3rem; }
width: 3rem; #header button:hover {
} background-color: #2c3139;
#header button:hover { color: #99a2b2; }
background-color: #2c3139; #header button.spaceleft {
color: #99a2b2; margin-left: 1rem; }
}
#header button.spaceleft {
margin-left: 1rem;
}
#title { #title {
margin-bottom: 5rem; margin-bottom: 5rem;
margin-top: 5rem; margin-top: 5rem;
text-align: center; text-align: center; }
} #title h1 {
#title h1 { font-size: 4rem;
font-size: 4rem; font-weight: 200;
font-weight: 200; margin-bottom: 1rem; }
margin-bottom: 1rem; #title h1 span {
} color: #4c5666; }
#title h1 span { #title span {
color: #4c5666; color: #7c889c; }
} #title span a {
#title span { color: #7c889c; }
color: #7c889c;
}
#title span a {
color: #7c889c;
}
#search { #search {
text-align: center; text-align: center;
margin-bottom: 5rem; margin-bottom: 5rem; }
} #search #searchbar .buttonspacer {
#search #searchbar .buttonspacer { display: inline-block;
display: inline-block; width: 3.5rem; }
width: 3.5rem; #search #searchbar input {
} background-color: #2c3139;
#search #searchbar input { border: none;
background-color: #2c3139; border-radius: .5rem 0 0 .5rem;
border: none; color: #d3d7de;
border-radius: 0.5rem 0 0 0.5rem; font-size: 1.5rem;
color: #d3d7de; font-weight: 300;
font-size: 1.5rem; height: 3rem;
font-weight: 300; padding: .5rem 1rem;
height: 3rem; transition: all .3s ease;
padding: 0.5rem 1rem; vertical-align: bottom; }
transition: all 0.3s ease; #search #searchbar input:focus {
vertical-align: bottom; background-color: #373e48;
} outline: none; }
#search #searchbar input:focus { #search #searchbar button {
background-color: #373e48; border: none;
outline: none; cursor: pointer;
} height: 3rem;
#search #searchbar button { transition: all .3s ease;
border: none; vertical-align: bottom;
cursor: pointer; width: 3rem; }
height: 3rem; #search #searchbar button#dnswatch-search-submit {
transition: all 0.3s ease; background-color: #373e48;
vertical-align: bottom; border-radius: 0 .5rem .5rem 0;
width: 3rem; color: #7c889c; }
} #search #searchbar button#dnswatch-search-submit:hover {
#search #searchbar button#dnswatch-search-submit { background-color: #424a56;
background-color: #373e48; color: #d3d7de; }
border-radius: 0 0.5rem 0.5rem 0; #search #searchbar button#help {
color: #7c889c; background-color: transparent;
} border-radius: .5rem;
#search #searchbar button#dnswatch-search-submit:hover { color: #4c5666;
background-color: #424a56; margin-left: .5rem; }
color: #d3d7de; #search #searchbar button#help:hover {
} background-color: #2c3139;
#search #searchbar button#help { color: #99a2b2; }
background-color: transparent; #search small {
border-radius: 0.5rem; display: block;
color: #4c5666; margin-top: 1rem;
margin-left: 0.5rem; color: #7c889c; }
} #search #loadani {
#search #searchbar button#help:hover { display: none;
background-color: #2c3139; margin-top: 1rem;
color: #99a2b2; visibility: hidden; }
} #search #loadani #spinner {
#search small { animation: 1s linear infinite spinner;
display: block; border: 2px solid transparent;
margin-top: 1rem; border-bottom: 2px solid #61afef;
color: #7c889c; border-radius: .5rem;
} display: inline-block;
#search #loadani { height: 1rem;
display: none; width: 1rem; }
margin-top: 1rem; #search #loadani span {
visibility: hidden; color: #61afef;
} margin-left: .5rem; }
#search #loadani #spinner { #search #invaliddomain {
animation: 1s linear infinite spinner; color: #e06c75;
border: 2px solid transparent; display: none;
border-bottom: 2px solid #61afef; margin-top: 1rem;
border-radius: 0.5rem; visibility: hidden; }
display: inline-block; #search #invaliddomain .feather {
height: 1rem; vertical-align: -.3rem; }
width: 1rem;
}
#search #loadani span {
color: #61afef;
margin-left: 0.5rem;
}
#search #invaliddomain {
color: #e06c75;
display: none;
margin-top: 1rem;
visibility: hidden;
}
#search #invaliddomain .feather {
vertical-align: -0.3rem;
}
#results small.random { #results small.random {
color: #4c5666; color: #4c5666;
display: block; display: block;
font-size: 0.8rem; font-size: .8rem;
margin-top: 1rem; margin-top: 1rem;
text-align: center; text-align: center; }
} #results small.random button {
#results small.random button { background: none;
background: none; border: none;
border: none; color: #626e83;
color: #626e83; cursor: pointer;
cursor: pointer; font-size: .8rem;
font-size: 0.8rem; outline: none;
outline: none; text-decoration: underline; }
text-decoration: underline;
}
#results table { #results table {
margin-left: 25vw; margin-left: 25vw;
width: 50vw; width: 50vw; }
} #results table tr {
#results table tr { height: 3rem; }
height: 3rem; #results table tr td.status {
} width: 3rem; }
#results table tr td.status { #results table tr td.status.check {
width: 3rem; color: #98c379; }
} #results table tr td.status.cross {
#results table tr td.status.check { color: #e06c75; }
color: #98c379; #results table tr td.status.ref {
} color: #61afef; }
#results table tr td.status.cross { #results table tr td.status.offline {
color: #e06c75; color: #d19a66; }
} #results table tr td.icon {
#results table tr td.status.ref { border-left: solid transparent 2rem;
color: #61afef; width: 3rem; }
} #results table tr td.name small {
#results table tr td.status.offline { color: #7c889c;
color: #d19a66; margin-left: 1rem; }
} #results table tr td.desc {
#results table tr td.icon { text-align: right; }
border-left: solid transparent 2rem; #results table tr td.desc.blocked {
width: 3rem; color: #e06c75; }
} #results table tr td.desc.ref {
#results table tr td.name small { color: #61afef; }
color: #7c889c; #results table tr td.help {
margin-left: 1rem; text-align: right;
} width: 3rem; }
#results table tr td.desc { #results table tr td.help button {
text-align: right; background-color: #21252b;
} border: none;
#results table tr td.desc.blocked { border-radius: .5rem;
color: #e06c75; color: #4c5666;
} cursor: pointer;
#results table tr td.desc.ref { height: 2rem;
color: #61afef; padding: .4rem;
} transition: all .3s ease;
#results table tr td.help { width: 2.1rem; }
text-align: right; #results table tr td.help button:hover {
width: 3rem; background-color: #2c3139;
} color: #99a2b2; }
#results table tr td.help button { #results table tr td.help button svg {
background-color: #21252b; height: 1.2rem;
border: none; vertical-align: -.2rem;
border-radius: 0.5rem; width: 1.2rem; }
color: #4c5666;
cursor: pointer;
height: 2rem;
padding: 0.4rem;
transition: all 0.3s ease;
width: 2.1rem;
}
#results table tr td.help button:hover {
background-color: #2c3139;
color: #99a2b2;
}
#results table tr td.help button svg {
height: 1.2rem;
vertical-align: -0.2rem;
width: 1.2rem;
}
#info { #info {
margin: 5rem auto; margin: 5rem auto;
max-width: 50rem; max-width: 50rem;
width: 100vw; width: 100vw; }
} #info h1 {
#info h1 { color: #61afef;
color: #61afef; font-size: 1.5rem;
font-size: 1.5rem; font-weight: 300;
font-weight: 300; padding-bottom: 1rem;
padding-bottom: 1rem; padding-top: 5rem; }
padding-top: 5rem; #info h1 svg {
} vertical-align: -.2rem;
#info h1 svg { margin-right: .3rem; }
vertical-align: -0.2rem; #info p {
margin-right: 0.3rem; line-height: 1.8rem; }
} #info p a {
#info p { color: #61afef; }
line-height: 1.8rem; #info p b {
} color: #61afef; }
#info p a { #info p br {
color: #61afef; display: block;
} margin-top: 1.2rem; }
#info p b { #info a.moreinfo {
color: #61afef; color: #61afef;
} display: block;
#info p br { margin-top: 5rem;
display: block; text-align: center; }
margin-top: 1.2rem;
}
#info a.moreinfo {
color: #61afef;
display: block;
margin-top: 5rem;
text-align: center;
}
#footer { #footer {
color: #7c889c; color: #7c889c;
height: 9rem; height: 9rem;
padding-top: 5rem; padding-top: 5rem;
text-align: center; text-align: center; }
} #footer a {
#footer a { color: #7c889c; }
color: #7c889c;
}
#modal { #modal {
background-color: rgba(0, 0, 0, 0.6); background-color: rgba(0, 0, 0, 0.6);
@ -284,56 +229,43 @@ input, button {
position: fixed; position: fixed;
top: 0; top: 0;
width: 100vw; width: 100vw;
z-index: 1000; z-index: 1000; }
} #modal #modal-content {
#modal #modal-content { background-color: #21252b;
background-color: #21252b; border-radius: .5rem;
border-radius: 0.5rem; color: #d3d7de;
color: #d3d7de; margin-left: 50%;
margin-left: 50%; margin-top: 25%;
margin-top: 25%; max-width: 30rem;
max-width: 30rem; padding: 2rem;
padding: 2rem; transform: translate(-50%, -50%);
transform: translate(-50%, -50%); width: 90%; }
width: 90%; #modal #modal-content #modal-close {
} color: #4c5666;
#modal #modal-content #modal-close { float: right;
color: #4c5666; transition: all .3s ease; }
float: right; #modal #modal-content #modal-close:hover, #modal #modal-content #modal-close:focus {
transition: all 0.3s ease; color: #7c889c;
} cursor: pointer;
#modal #modal-content #modal-close:hover, #modal #modal-content #modal-close:focus { text-decoration: none; }
color: #7c889c; #modal #modal-content #modal-message {
cursor: pointer; line-height: 1.8rem; }
text-decoration: none; #modal #modal-content #modal-message a {
} color: #61afef;
#modal #modal-content #modal-message { text-decoration: underline; }
line-height: 1.8rem; #modal #modal-content #modal-message b {
} color: #61afef; }
#modal #modal-content #modal-message a { #modal #modal-content #modal-message br {
color: #61afef; display: block;
text-decoration: underline; margin-top: 1.2rem; }
} #modal #modal-content #modal-message span {
#modal #modal-content #modal-message b { color: #7c889c; }
color: #61afef;
}
#modal #modal-content #modal-message br {
display: block;
margin-top: 1.2rem;
}
#modal #modal-content #modal-message span {
color: #7c889c;
}
.uncolored-svg { .uncolored-svg {
filter: invert(0.8); filter: invert(0.8); }
}
@keyframes spinner { @keyframes spinner {
0% { 0% {
transform: rotate(0deg); transform: rotate(0deg); }
}
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg); } }
}
}

8
start/index.js vendored
View File

@ -21,7 +21,11 @@ function dnswatch_search() {
// send api request // send api request
var request = new XMLHttpRequest(); var request = new XMLHttpRequest();
request.open('POST', 'https://dns-watch.org/lookup', true); request.open('POST',
window.location.hostname === ''
? 'https://dns-watch.org/lookup' // send request to the official website when running the .html locally
: `https://${window.location.hostname}/lookup`, // send request to /lookup if not running locally
true);
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
request.onload = function() { request.onload = function() {
@ -167,7 +171,7 @@ function show_modal(type) {
let msg; let msg;
switch (type) { switch (type) {
case 'search': case 'search':
msg = '<b>dns-watch.org</b> is a service that allows you to see how (mainly German) Internet Service Providers (ISPs) deal with Internet censorship. <a href="/why">More Information</a><br>In order to test a website for availability, enter the domain into the search bar and press Enter.<br><span>Try out these examples if you are unsure: gnu.org, wikipedia.org, s.to</span>'; msg = 'In order to test a website for availability, enter the domain into the search bar and press Enter.<br><span>Try out these examples if you are unsure: gnu.org, wikipedia.org, s.to</span>';
break; break;
case 'reference': case 'reference':
msg = 'In order to validate the DNS responses, we use <b>references</b>.<br>These references are from trustworthy DNS providers, such as Cloudflare or UncensoredDNS.<br>The responses of the DNS providers that should be tested (located in the bottom table) will be compared to the results from the references.' msg = 'In order to validate the DNS responses, we use <b>references</b>.<br>These references are from trustworthy DNS providers, such as Cloudflare or UncensoredDNS.<br>The responses of the DNS providers that should be tested (located in the bottom table) will be compared to the results from the references.'

2
start/index.php vendored
View File

@ -21,6 +21,6 @@ giving them information on which ISPs are blocking their web services.<br>
We support a Free Web without Internet censorship, and so should you!</p><h1><i data-feather="tool"></i> What can I do against it?</h1><p>If you happen to be affected by Internet censorship an you're still We support a Free Web without Internet censorship, and so should you!</p><h1><i data-feather="tool"></i> What can I do against it?</h1><p>If you happen to be affected by Internet censorship an you're still
using your ISP's default DNS settings, we provide resources that can using your ISP's default DNS settings, we provide resources that can
help you switch to a more trustworthy and most of the time even faster help you switch to a more trustworthy and most of the time even faster
DNS, thus regainig a Free Web without censorship! Read our DNS, thus regaining a Free Web without censorship! Read our
<a href="/tools">tutorial</a> on how to gain back your freedom in the <a href="/tools">tutorial</a> on how to gain back your freedom in the
World Wide Web and circumvent DNS-blocking by ISPs!</p><a class="moreinfo" href="/why">More Information</a></div></div><div id="footer"><span>dns-watch.org by </span><a href="https://www.tjdev.de">tjdev.de</a><span> | </span><a href="/imprint">imprint</a></div><div id="modal"><div id="modal-content"><div id="modal-close" onclick="close_modal()"><i data-feather="x"></i></div><div id="modal-message"></div></div></div> World Wide Web and circumvent DNS-blocking by ISPs!</p><a class="moreinfo" href="/why">More Information</a></div></div><div id="footer"><span>dns-watch.org by </span><a href="https://www.tjdev.de">tjdev.de</a><span> | </span><a href="/imprint">imprint</a></div><div id="modal"><div id="modal-content"><div id="modal-close" onclick="close_modal()"><i data-feather="x"></i></div><div id="modal-message"></div></div></div>