Skip to content

Commit

Permalink
web
Browse files Browse the repository at this point in the history
  • Loading branch information
Numax-cz committed Nov 21, 2020
1 parent 58ff325 commit 4e5ebfc
Show file tree
Hide file tree
Showing 11 changed files with 313 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.well-known
.googled2a683589c1df4e0.html
.api_key.json
56 changes: 42 additions & 14 deletions CSS/index.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,48 @@
*{
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Roboto Mono', monospace;
}

body{
margin: 0;
box-sizing: border-box;
padding: 0;
user-select: none;
background-color: #2f3640;
overflow: hidden;

}
body{
background-color: #2f3640;
.snow{
position: absolute;
width: 100vh;
height: 100vh;

}
.hodiny-hl,
.hodiny-txt,
.box,
.zdarne-pop{

font-family: 'Roboto Mono', monospace;

}
.ahojkamarade{
width: 100%;


font-size: 20vh;
text-align: center;
letter-spacing: 2vh;
font-family: 'Bebas Neue', cursive;
padding-top: 15vh;
color: white;
}

.zdarne-text{

.hodiny-hl{

width: 100%;
text-align: center;
color: white;
font-size: 10vh;
Expand All @@ -24,11 +51,7 @@ body{



#zdarne{
font-family: 'Bebas Neue', cursive;
padding-top: 15vh;

}
/*TEXT - ČAS - POP-TEXT*/
.zdarne-pop{
font-weight: 700;
Expand All @@ -45,7 +68,7 @@ body{
}
.odkazy{
user-select: none;
margin-top: 20vh;
margin-top: 10vh;
grid-gap: 2vh;
display: grid;
grid-template-columns: repeat(auto-fit, 385px);
Expand Down Expand Up @@ -89,17 +112,22 @@ body{
margin-top: 20px;
}
@media screen and (max-width:700px){
.zdarne-text{
font-size: 7vh;

.ahojkamarade{
font-size: 10vh;
}
.hodiny-hl{
font-size: 5vh;
}

}
@media screen and (max-width:462px){
.zdarne-text{
.ahojkamarade{
font-size: 5vh;

}
.hodiny-hl{
font-size: 4vh;
}

}

Expand Down
67 changes: 67 additions & 0 deletions CSS/pocasi.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Roboto Mono', monospace;
}
body{
margin: 0;
padding: 0;
user-select: none;
background-color: #2f3640;
overflow: hidden;
}
/*------MENU------*/
.menu-na{
user-select: none;
width: 100%;
background-color: #c0392b;
font-size: 5vh;
padding-bottom: 5px;
letter-spacing: 1vh;
text-align: center;
top: 0;
}
.menu-na a {
transition: .4s;
text-decoration: none;
color: white;
font-weight: bolder;
}
.menu-na a:hover {
transition: .3s;
letter-spacing: 1.2vh;
}
/*------MENU------*/


/*input*/
::placeholder{
color: white;
font-size: 15px;
}
.hledaciBox{
width: 25%;
padding: 20px 30px;
background-color: #c0392b;
border: none;
outline: none;
color: white;
}




#menu-pocasi{
width: 100%;
position: absolute;
top: 50vh;
transform: translateY(-50%);
text-align: center;
color: white;
}

.text{
font-size: 4vh;
padding-top: 35px;
}
49 changes: 49 additions & 0 deletions JS/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
function morenula(L) {
if (L < 10) {L = "0" + L};
return L;
}
const text1 = ["Co tu chceš jako? Chceš MMA? Tak pozdě večer?", "Čo ti šibe takto večer?", "Takto pozdě večer?", "To je na MMA tak pozdě večer!"]
const nahoda1 = text1[Math.floor(Math.random() * text1.length)]
const text2 = ["HA! more vstávat budeš!", "HA! nechtěl bych vstávat!"]
const nahoda2 = text2[Math.floor(Math.random() * text2.length)]
const text3 = ["Vstávat!!!", "Vstávej more", "Vstávat budeš!"]
const nahoda3 = text3[Math.floor(Math.random() * text3.length)]
const text4 = ["Žer!", "Nažer se jako!", "Žer! Nebo umřeš!"]
const nahoda4 = text4[Math.floor(Math.random() * text4.length)]
const text5 = ["Co tu chceš? Běž jíst!", "Dělé je oběd!", "Máš oběd!"]
const nahoda5 = text5[Math.floor(Math.random() * text5.length)]
const text6 = ["Co tu chceš jako? MMA?!", "Dáme MMA?", "chceš MMA?"]
const nahoda6 = text6[Math.floor(Math.random() * text6.length)]
const text7 = ["MMA?", "Beton", "Cihle", "Moravák", "Židle", "Stůl", "DDOS", "napicu.eu"]
const nahoda7 = text7[Math.floor(Math.random() * text7.length)]
const text8 = ["Dělé je Večerníček je!", "Večerníček!!!", "No běž se kókat na Večerníček!"]
const nahoda8 = text8[Math.floor(Math.random() * text8.length)]
const text9 = ["Ha! Večerníček ti skončil!", "Večerníček skončil :("]
const nahoda9 = text9[Math.floor(Math.random() * text9.length)]
const text10 = ["/time set night!", "NOC!", "HA tma jak v číči"]
const nahoda10 = text10[Math.floor(Math.random() * text10.length)]
const text11 = ["Spat běž!", "SPI!", "Spát budeš!!"]
const nahoda11 = text11[Math.floor(Math.random() * text11.length)]

function hodinyyyyyyyyy() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = morenula(m);
s = morenula(s);
document.getElementById('hodiny').innerHTML = h + ":" + m + ":" + s;
var t = setTimeout(hodinyyyyyyyyy, 1000);
if (h < 5) {document.getElementById('zdarne-pop-text').innerHTML = nahoda1}
if (h >= 5) {document.getElementById('zdarne-pop-text').innerHTML = nahoda2}
if (h >= 7) {document.getElementById('zdarne-pop-text').innerHTML = nahoda3}
if (h >= 9) {document.getElementById('zdarne-pop-text').innerHTML = nahoda4}
if (h >= 11) {document.getElementById('zdarne-pop-text').innerHTML = nahoda5}
if (h >= 13) {document.getElementById('zdarne-pop-text').innerHTML = nahoda6}
if (h >= 16) {document.getElementById('zdarne-pop-text').innerHTML = nahoda7}
if (h >= 18) {document.getElementById('zdarne-pop-text').innerHTML = nahoda8}
if (h >= 19) {document.getElementById('zdarne-pop-text').innerHTML = nahoda9}
if (h >= 21) {document.getElementById('zdarne-pop-text').innerHTML = nahoda10}
if (h >= 22) {document.getElementById('zdarne-pop-text').innerHTML = nahoda11}
}
console.log("%c Co tu chceš jako? Chceš MMA? pojď do klece na MMA!", "color: white; font-weight: bold; background-color: blue; font-size: 40px");
4 changes: 4 additions & 0 deletions JS/kalkulacka.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ function pocitej(){
if(L){
document.Lsdxd.textin.value = eval(L);
}


}

function cotomazesjako(){
document.Lsdxd.textin.value = "";


}

function procsepletesjako(){
Expand Down
43 changes: 43 additions & 0 deletions JS/pocasi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

const api = {
key: "9f7913914b03b001c0cca319edf16901",
api_url: "https://api.openweathermap.org/data/2.5/"
}

const hledani = document.querySelector('.hledaciBox');
hledani.addEventListener('keypress', klavesa);
function klavesa(L) {
if (L.keyCode == 13) {
pocasi(hledani.value);
}
}

function pocasi (mestoAP) {
fetch(`${api.api_url}weather?q=${mestoAP}&units=metric&APPID=${api.key}`)
.then(weather => {
return weather.json();
}).then(display);
}

function display (weather) {
console.log(weather)
var mesto = document.querySelector('.mesto')
mesto.innerText = `${weather.name}`


var dat = new Date();

var datum = document.querySelector('.datum')
datum.innerText = datumy(dat)
}
function datumy (date) {
const měsíce = ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"]
const dny = ["Neděle", "Pondělí", " Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"]

var den = dny[date.getDay()]
var datum = date.getDate()
var měsíc = měsíce[date.getMonth()]
var rok = date.getFullYear();

return `${den} ${datum} - ${měsíc} ${rok}`
}
26 changes: 26 additions & 0 deletions JS/vanoce.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
var nevím = new Date('Dec 24, 2020 00:00.00').getTime();


function novejrokpico(){
var čas = new Date().getTime()
cn = nevím - čas;

var sekundy = 1000;
var minuty = sekundy * 60;
var hodiny = minuty * 60;
var dny = hodiny * 24;



var d = Math.floor(cn / (dny));
var h = Math.floor((cn % (dny)) / (hodiny)) ;
var m = Math.floor((cn % (hodiny)) / (minuty));
var s = Math.floor((cn % (minuty)) / sekundy);


document.getElementById('Dny').innerText = d;
document.getElementById('Hodiny').innerText = h;
document.getElementById('Minuty').innerText = m;
document.getElementById('Sekundy').innerText = s;
}
setInterval(function(){novejrokpico();},1000)
Loading

0 comments on commit 4e5ebfc

Please sign in to comment.