-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
313 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
.well-known | ||
.googled2a683589c1df4e0.html | ||
.api_key.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.