diff --git a/bars.svg b/bars.svg new file mode 100644 index 0000000..87d79f9 --- /dev/null +++ b/bars.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bitcoin.svg b/bitcoin.svg new file mode 100644 index 0000000..9ee5f2e --- /dev/null +++ b/bitcoin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..7bf76c7 --- /dev/null +++ b/index.html @@ -0,0 +1,167 @@ + + + + + + Bits-Net + + + + + + + +
+
+ + + +
+ + + 0.0 + + + + + +
+
+
+
+
+ + + +
+
+ Wrench +
+
+
+
+
Shop
+
+
+
Buy 1 PI
+
5
+
+
+
Buy 1 PC
+
10
+
+
+
Buy 1 Server
+
10
+
+
+
Buy 1 Cluster
+
0
+
+
+
+
+
+
+
Wonna start and stop this shit ?
+
+
+
Start PI
+
0
+
+
+
Start PC
+
0
+
+
+
Start Server
+
0
+
+
+
Start Cluster
+
0
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/test.css b/test.css new file mode 100644 index 0000000..8f85ecb --- /dev/null +++ b/test.css @@ -0,0 +1,353 @@ +* { + box-sizing: border-box; +} +:root{ +--coin: #e2b025; +--bit-click: rgb(238, 194, 99); +--bit-hover: #ffffffb9; +--bit: #dadadab9; +--background: #121212; +--background-main: #333333; +--background-menu: #292929; +--border-idlee: #4C4C4C; +--font: #a0cbff; +--font-small: #585858; +--head: #00497f; +--icons: #000000; +--icon-back: #ffffffb9; + +} +body{ + max-width: 100%; + height: 100%; + margin-left: auto; + margin-right: auto; + margin-top: 0px; + margin-bottom: 0px; + background-color: var(--background-main ); + +} +.row::after { +content: ""; +clear: both; +display: table; +} + +[class*="col-"] { +float: left; +padding: 15px; +} + +html { +font-family: "Lucida Sans", sans-serif; +background-color: var(--background); +height: 100%; +-webkit-tap-highlight-color: rgba(255, 255, 255, 0); +} + +.header { +user-select: none; +background-color: var(--head ); +max-height: 4.4em; +height: 3.1em; +} +.icon-head{ + max-width: 2em; + margin-top: 5px; + margin-left: 15px; + float: left; + fill: var(--icons ); +} +.icon-head-right{ +max-width: 2em; +fill: var(--coin ); +vertical-align: -27px; +} +.number{ +text-align: center; +font-size: 2em; +margin-left: auto; +margin-right: auto; +vertical-align: -23px; +color: aliceblue; +font-size: 200%; +} +.icon-bit{ +display: unset; +border-radius: 100px; +box-sizing: none; +border: none; +text-align: center; +color: inherit; +background: none; +cursor: pointer; +display: inline-block; +text-transform: uppercase; +letter-spacing: 1px; +outline: none; +position: relative; +-webkit-transition: all 0.3s; +-moz-transition: all 0.3s; +transition: all 0.3s; +margin-left: 13px; +margin-right: 13px; +margin-top: 10%; +} + +.icon-bit:after { + position: absolute; + z-index: -1; + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + transition: all 0.3s; +} +#icon-bit-main{ +box-sizing: none; +} +/* Button 1 */ +.btn-1 { + fill: var(--bit ); +} + +.btn-1:hover { + fill: var(--bit-hover ); +} + +.btn-1:active { + fill: var(--bit-click ); + top: 2px; +} + +.btn-1:before { + position: absolute; + height: 100%; + left: 0; + top: 0; + line-height: 3; + font-size: 140%; + width: 60px; +} + +.menu ul { +list-style-type: none; +margin: 0; +padding: 0; +} + +.menu li { +padding: 8px; +margin-bottom: 7px; +background-color: var(--background-menu ); +box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + +.menu li:hover { +background-color: var(--background-menu ); +} + +.aside { +background-color: var(--background-menu ); +font-size: 14px; +} +#menu-desc{ +display: none; +} +#menu-mobi{ +display: flex ; +flex-direction: column; +height: unset; +} + +.footer { +user-select: none; +background-color: var(--background-menu ); +text-align: center; +font-size: 18px; +} +.Fabrik { +color: var(--font ); +border: solid 1px; +user-select: none; +text-align: center; +font-size: 1.125rem; +font-family: "Source Sans Pro", sans-serif; +display: block; +text-decoration: none ; +cursor: pointer; +} +.Fabrik:hover { + + color: rgb(138, 138, 138); + transition: 0.3s; + cursor: pointer; +} + +.top { + border: solid 1px; + user-select: none; + text-align: center; + color: var(--font ); + font-size: 1.3rem; + font-family: "Source Sans Pro", sans-serif; + display: block; + text-decoration: none ; + border-color: var(--border-idlee); +} +/* For mobile phones: */ +[class*="col-"] { + width: 100%; +} + +@media only screen and (min-width: 600px) { +/* For tablets: */ +.col-s-1 {width: 8.33%;} +.col-s-2 {width: 16.66%;} +.col-s-3 {width: 30%;} +.col-s-4 {width: 33.33%;} +.col-s-5 {width: 41.66%;} +.col-s-6 {width: 50%;} +.col-s-7 {width: 58.33%;} +.col-s-8 {width: 66.66%;} +.col-s-9 {width: 95%;} +.col-s-10 {width: 83.33%;} +.col-s-11 {width: 91.66%;} +.col-s-12 {width: 100%;} +body{width: 100%;} + + +} +@media only screen and (min-width: 768px) { +/* For desktop: */ +.col-1 {width: 8.33%;} +.col-2 {width: 16.66%;} +.col-3 {width: 30%;} +.col-4 {width: 33.33%;} +.col-5 {width: 41.66%;} +.col-6 {width: 70%;} +.col-7 {width: 58.33%;} +.col-8 {width: 66.66%;} +.col-9 {width: 75%;} +.col-10 {width: 83.33%;} +.col-11 {width: 91.66%;} +.col-12 {width: 100%;} +body{width: 80%;} +.icon-bit{max-width: 800px;} +#menu-desc{display: unset;} +.icon-bit{ + margin-left: unset; + margin-right: unset; +} +#menu-mobi{ + display: none ; +} + +} +@media only screen and (min-width: 900px) { +/* For desktop: */ +.col-1 {width: 8.33%;} +.col-2 {width: 16.66%;} +.col-3 {width: 30%;} +.col-4 {width: 33.33%;} +.col-5 {width: 41.66%;} +.col-6 {width: 70%;} +.col-7 {width: 58.33%;} +.col-8 {width: 66.66%;} +.col-9 {width: 75%;} +.col-10 {width: 83.33%;} +.col-11 {width: 91.66%;} +.col-12 {width: 100%;} +body{width: 60%;} +.icon-bit{max-width: 800px;} +#menu-desc{display: unset;} +.icon-bit{ + margin-left: unset; + margin-right: unset; +} +#menu-mobi{ + display: none ; +} +} +.short_text{ +color: var(--font-small); +font-size: 0.8em; +} + +.text-center{ +text-align: center !important; +} + +.mobil-nav{ +background-color: var(--background-menu) ; +margin-left: auto; +margin-right: auto; +text-align: center; +user-select: none; + +position: fixed; +bottom: 0px; +width: 100%; +max-height: 30%; +} +.mobil-navsub{ +background-color: var(--background-menu) ; +user-select: none; +} + +.icon-nav1{ +max-width: 25%; +margin-bottom: 5%; +padding: 3%; +user-select: none; +background-color: var(--icon-back); +border-radius: 8px; +} +.icon-nav2{ +max-width: 25%; +margin-bottom: 5%; +margin-left: 3%; +margin-right: 3%; +padding: 3%; +user-select: none; +background-color: var(--icon-back); +border-radius: 8px; +} +.icon-nav3{ +max-width: 25%; +padding: 3%; +user-select: none; +margin-bottom: 5%; +background-color: var(--icon-back); +border-radius: 8px; +} +.nav-bottom{ +bottom: 10px; +} +.text-nav{ +background-color: var(--head); +font-size: 20px; + +} +#wrench{ +background-color: crimson; +border-radius: 10px; +flex-grow: 2; +margin: 5px; +display: none; + +} +#bag{ + background-color: crimson; + border-radius: 10px; + flex-grow: 2; + margin: 5px; + display: none; + +} +#arrow{ + background-color: crimson; + border-radius: 10px; + flex-grow: 2; + margin: 5px; + display: none; + +} diff --git a/test.js b/test.js new file mode 100644 index 0000000..6f64b76 --- /dev/null +++ b/test.js @@ -0,0 +1,328 @@ + + +var bit = 0; +var bitFac = 1; +let out = 0; +let check = false; +let checkIf = false; +let test; +let test1; + +// Var. for Pi funktion +var Pi = 0; +var pricePi = 5; +var Pifac = 0; +var piTrue = false; +var piCheck = false; +var Pifact = 1; +// Var. for PC funktion +var Pc = 0; +var pricePc = 10; +var Pcfac = 0; +var PcTrue = false; +var PcCheck = false; +var Pcfact = 1; +// Var. for Server funktion +var Sv = 0; +var priceSv = 10; +var Svfac = 0; +var SvTrue = false; +var SvCheck = false; +var Svfact = 1; + +function up() { + bit = bit + bitFac; + out = bit.toFixed(1); + document.getElementById('output').innerHTML = out; + if (check != true) { + check = true; + setTimeout(loop, 1); + } +} + +function loop() { + myVar = setInterval(load, 100); +} + +function load() { + if (bit >= pricePi) { + document.getElementById("pi").style.color = "#148914"; + } else { + document.getElementById("pi").style.color = "unset"; + } + if (bit >= pricePc) { + document.getElementById("pc").style.color = "#148914"; + } else { + document.getElementById("pc").style.color = "unset"; + } + if (bit >= priceSv) { + document.getElementById("sv").style.color = "#148914"; + } else { + document.getElementById("sv").style.color = "unset"; + } +} +// Buy one PI funktion -------------------------------------------------------------- +function undoPi() { + document.getElementById("pi").style.color = "unset"; +} + +function piFunk() { + if (piTrue === true && piCheck === true) { + Pifac = Pi * 1.05; + bit = bit + Pifac; + out = bit.toFixed(1); + document.getElementById('output').innerHTML = out; + var Pifac2 = Pifac / 2; + out = (Pifac2.toFixed(1)) + " /sec"; + document.getElementById('piBits').innerHTML = out; + setTimeout(piFunk, 2000); + } +} + +function pistr() { + if (piTrue === true) { + piTrue = false; + document.getElementById('pistr').innerHTML = "Start PI"; + } else { + piTrue = true; + setTimeout(piFunk, 1); + document.getElementById('pistr').innerHTML = "Stop PI"; + } +} + +function pi() { + if (bit >= pricePi) { + bit = bit - pricePi; + Pifact = Pifact * 1.005; + pricePi = pricePi * Pifact; + Pi = Pi + 1; + console.log(Pifact.toPrecision(3)); + //console.log (pricePi.); + console.log(pricePi); + out = bit.toFixed(1); + document.getElementById('output').innerHTML = out; + out = pricePi.toFixed(1); + document.getElementById('piPrice').innerHTML = out; + if (Pi >= 1) { + piTrue = true; + document.getElementById('pistr').innerHTML = "Stop PI"; + if (piCheck != true) { + setTimeout(piFunk, 1); + piCheck = true; + } + } + } else { + document.getElementById("pi").style.color = "#ff0000"; + setTimeout(undoPi, 1000); + } +} +// Buy one PC funktion -------------------------------------------------------------- +function undoPc() { + document.getElementById("pc").style.color = "unset"; +} + +function pcFunk() { + if (PcTrue === true && PcCheck === true) { + Pcfac = Pc * 1.3; + bit = bit + Pcfac; + out = bit.toFixed(1); + document.getElementById('output').innerHTML = out; + var Pcfac2 = Pcfac / 2; + out = (Pcfac2.toFixed(1)) + " /sec"; + document.getElementById('pcBits').innerHTML = out; + setTimeout(pcFunk, 2000); + } +} + +function pcstr() { + if (PcTrue === true) { + PcTrue = false; + document.getElementById('pcstr').innerHTML = "Start PC"; + } else { + PcTrue = true; + setTimeout(pcFunk, 1); + document.getElementById('pcstr').innerHTML = "Stop PC"; + } +} + +function pc() { + if (bit >= pricePc) { + bit = bit - pricePc; + Pcfact = Pcfact * 1.005; + pricePc = pricePc * Pcfact; + Pc = Pc + 1; + console.log(Pcfact.toPrecision(3)); + //console.log (pricePc.); + console.log(pricePc); + out = bit.toFixed(1); + document.getElementById('output').innerHTML = out; + out = pricePc.toFixed(1); + document.getElementById('pcPrice').innerHTML = out; + if (Pc >= 1) { + PcTrue = true; + document.getElementById('pcstr').innerHTML = "Stop Pc"; + if (PcCheck != true) { + setTimeout(pcFunk, 1); + PcCheck = true; + } + } + } else { + document.getElementById("pc").style.color = "#ff0000"; + setTimeout(undoPc, 1000); + } +} +// Buy one Server funktion -------------------------------------------------------------- +function undoSv() { + document.getElementById("sv").style.color = "unset"; +} + +function svFunk() { + if (SvTrue === true && SvCheck === true) { + Svfac = Sv * 1.6; + bit = bit + Svfac; + out = bit.toFixed(1); + document.getElementById('output').innerHTML = out; + var Svfac2 = Svfac / 2; + out = (Svfac2.toFixed(1)) + " /sec"; + document.getElementById('svBits').innerHTML = out; + setTimeout(svFunk, 2000); + } +} + +function svstr() { + if (SvTrue === true) { + SvTrue = false; + document.getElementById('svstr').innerHTML = "Start Server"; + } else { + SvTrue = true; + setTimeout(svFunk, 1); + document.getElementById('svstr').innerHTML = "Stop Server"; + } +} + +function sv() { + if (bit >= priceSv) { + bit = bit - priceSv; + Svfact = Svfact * 1.009; + priceSv = priceSv * Svfact; + Sv = Sv + 1; + console.log(Svfact.toPrecision(3)); + //console.log (priceSv.); + console.log(priceSv); + out = bit.toFixed(1); + document.getElementById('output').innerHTML = out; + out = priceSv.toFixed(1); + document.getElementById('svPrice').innerHTML = out; + if (Sv >= 1) { + SvTrue = true; + document.getElementById('svstr').innerHTML = "Stop Server"; + if (SvCheck != true) { + setTimeout(svFunk, 1); + SvCheck = true; + } + } + } else { + document.getElementById("sv").style.color = "#ff0000"; + setTimeout(undoSv, 1000); + } +} +//--Popup shit--------------------------------------- +var wrenchCheck = true; +function wrench() { + if (wrenchCheck == true) { + document.getElementById("icon-bit-main").style.display = "none"; + document.getElementById("wrench").style.display = "block"; + wrenchCheck = false; + var elements = document.getElementsByClassName('icon-nav1'); + elements[0].style.backgroundColor = "#4C4C4C"; + + if (bagCheck === true || arrowCheck === true ) { + document.getElementById("bag").style.display = "none"; + document.getElementById("arrow").style.display = "none"; + + var elements = document.getElementsByClassName('icon-nav2'); + elements[0].style.backgroundColor = "#c4c4c4"; + var elements = document.getElementsByClassName('icon-nav3'); + elements[0].style.backgroundColor = "#c4c4c4"; + bagCheck = true; + arrowCheck = true; + + } + } + else{ + document.getElementById("wrench").style.display = "none"; + document.getElementById("icon-bit-main").style.display = "block"; + wrenchCheck = true; + + var elements = document.getElementsByClassName('icon-nav1'); + elements[0].style.backgroundColor = "#c4c4c4"; + + } +} +var bagCheck = true; +function bag() { + if (bagCheck == true) { + document.getElementById("bag").style.display = "block"; + document.getElementById("icon-bit-main").style.display = "none"; + bagCheck = false; + + var elements = document.getElementsByClassName('icon-nav2'); + elements[0].style.backgroundColor = "#4C4C4C"; + if (wrenchCheck === true || arrowCheck === true ) { + document.getElementById("wrench").style.display = "none"; + document.getElementById("arrow").style.display = "none"; + var elements = document.getElementsByClassName('icon-nav1'); + elements[0].style.backgroundColor = "#c4c4c4"; + var elements = document.getElementsByClassName('icon-nav3'); + elements[0].style.backgroundColor = "#c4c4c4"; + wrenchCheck = true; + arrowCheck = true; + + } + } + else{ + document.getElementById("bag").style.display = "none"; + document.getElementById("icon-bit-main").style.display = "block"; + bagCheck = true; + + var elements = document.getElementsByClassName('icon-nav2'); + elements[0].style.backgroundColor = "#c4c4c4"; + + } +} +var arrowCheck = true; +function arrow() { + if (arrowCheck == true) { + document.getElementById("icon-bit-main").style.display = "none"; + document.getElementById("arrow").style.display = "block"; + arrowCheck = false; + + var elements = document.getElementsByClassName('icon-nav3'); + elements[0].style.backgroundColor = "#4C4C4C"; + + if (wrenchCheck === true || bagCheck === true ) { + document.getElementById("wrench").style.display = "none"; + document.getElementById("bag").style.display = "none"; + var elements = document.getElementsByClassName('icon-nav1'); + elements[0].style.backgroundColor = "#c4c4c4"; + var elements = document.getElementsByClassName('icon-nav2'); + elements[0].style.backgroundColor = "#c4c4c4"; + + wrenchCheck = true; + bagCheck = true; + + } + } + else{ + document.getElementById("arrow").style.display = "none"; + document.getElementById("icon-bit-main").style.display = "block"; + arrowCheck = true; + + var elements = document.getElementsByClassName('icon-nav3'); + elements[0].style.backgroundColor = "#c4c4c4"; + + } +} + +//https://www.w3schools.com/howto/howto_js_popup_form.asp +//https://www.w3schools.com/js/tryit.asp?filename=tryjs_intro_lightbulb \ No newline at end of file