diff --git a/about.html b/about.html index 0828bc5..95d4597 100644 --- a/about.html +++ b/about.html @@ -48,6 +48,11 @@ Contact +
  • + + Register + +
  • diff --git a/contact.html b/contact.html index f044f0e..a97bdb6 100644 --- a/contact.html +++ b/contact.html @@ -48,6 +48,11 @@ Contact +
  • + + Register + +
  • diff --git a/index.html b/index.html index e78bf18..11684b2 100644 --- a/index.html +++ b/index.html @@ -3,11 +3,12 @@ + Movie Database - +

    + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.

    + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.

    + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.

    @@ -73,12 +90,122 @@

    + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + + +

    + + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question. +

    +
    +
    + +

    + What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.What did the world look like as it was transforming into the horrifying apocalypse depicted in "The Walking Dead"? This spin-off set in Los Angeles, following new characters as they face the beginning of the end of the world, will answer that question.

    diff --git a/js.js b/js.js new file mode 100644 index 0000000..04e8ba4 --- /dev/null +++ b/js.js @@ -0,0 +1,119 @@ +function onLoad() { + var vremena = document.getElementsByClassName('vrijeme'); + var currentDate = new Date(); + for(var i = 0; i < vremena.length; i++) { + var datum = new Date(vremena[i].getAttribute('datetime')); + var diff = currentDate.getTime() - datum.getTime(); + if (diff < 60*1000) { + vremena[i].innerHTML = "Prije par sekundi"; + } else if (diff < 60 * 1000 * 60) { + var minute = Math.floor(diff/60/1000); + if(minute % 10 > 1 && minute % 10 < 5 && (minute / 10 < 1 || minute / 10 > 2)) { + vremena[i].innerHTML = "Prije " + minute + " minute"; + } else { + vremena[i].innerHTML = "Prije " + minute + " minuta"; + } + } else if (diff < 24 * 60 * 1000 * 60) { + var sati = Math.floor(diff/60/60/1000); + if(sati == 1) { + vremena[i].innerHTML = "Prije 1 sat"; + } else if (sati % 10 > 1 && sati % 10 < 5 && (sati / 10 < 1 || sati / 10 > 2)) { + vremena[i].innerHTML = "Prije " + sati + " sata"; + } else { + vremena[i].innerHTML = "Prije " + sati + " sati"; + } + } else if (diff < 24 * 60 * 1000 * 60 * 7) { + var dani = Math.floor(diff/24/60/60/1000); + if(dani == 1) { + vremena[i].innerHTML = "Prije 1 dan"; + } else { + vremena[i].innerHTML = "Prije " + dani + " dana"; + } + } else if (diff < 24 * 60 * 1000 * 60 * 30) { + var sedmice = Math.floor(diff/24/60/60/1000/7); + if(sedmice == 1) { + vremena[i].innerHTML = "Prije 1 sedmicu"; + } else if (sedmice % 10 > 1 && sedmice % 10 < 5 && (sedmice / 10 < 1 || sedmice / 10 > 2)) { + vremena[i].innerHTML = "Prije " + sedmice + " sedmice"; + } else { + vremena[i].innerHTML = "Prije " + sedmice + " sedmica"; + } + } else { + vremena[i].innerHTML = vremena[i].getAttribute('datetime'); + } + } +} + +function onFilter(select) { + var option = select; + var news = document.getElementsByClassName('news'); + var today = new Date(); + switch (option) { + case 'all': + for(var i = 0; i < news.length; i++) { + news[i].style.display = "inline-block"; + } + break; + case 'daily': + for(var i = 0; i < news.length; i++) { + var datum = new Date(news[i].getElementsByClassName('vrijeme')[0].getAttribute('datetime')); + var diff = today.getTime() - datum.getTime(); + if(diff<1000*60*60*24) { + news[i].style.display = "inline-block"; + } else { + news[i].style.display = "none"; + } + } + break; + case 'weekly': + for(var i = 0; i < news.length; i++) { + var datum = new Date(news[i].getElementsByClassName('vrijeme')[0].getAttribute('datetime')); + var diff = today.getTime() - datum.getTime(); + if(diff<1000*60*60*24*7) { + news[i].style.display = "inline-block"; + } else { + news[i].style.display = "none"; + } + } + break; + case 'monthly': + for(var i = 0; i < news.length; i++) { + var datum = new Date(news[i].getElementsByClassName('vrijeme')[0].getAttribute('datetime')); + var diff = today.getTime() - datum.getTime(); + if(diff<1000*60*60*24*30) { + news[i].style.display = "inline-block"; + } else { + news[i].style.display = "none"; + } + } + } +} + +function validateEmail(emailField) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + if(re.test(emailField.value)) { + emailField.style.backgroundColor = "white"; + } else { + emailField.style.backgroundColor = "red"; + } +} + +function validatePassword(passwordField) { + var re = /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/; + if(re.test(passwordField.value)) { + passwordField.style.backgroundColor = "white"; + } else { + passwordField.style.backgroundColor = "red"; + } +} + +function validateConfirm(confirmField) { + var passwordField = document.getElementById("passwordField"); + if(passwordField.value === confirmField.value) { + confirmField.style.backgroundColor = "white"; + validatePassword(passwordField); + } else { + confirmField.style.backgroundColor = "red"; + passwordField.style.backgroundColor = "red"; + } +} diff --git a/register.html b/register.html new file mode 100644 index 0000000..a1f9289 --- /dev/null +++ b/register.html @@ -0,0 +1,77 @@ + + + + + + + + Movie Database + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + diff --git a/stil.css b/stil.css index e0069d3..4c7c9f9 100644 --- a/stil.css +++ b/stil.css @@ -179,3 +179,10 @@ p { display: inline-block; margin: 5px; } + +time { + font-family: sans-serif; + color: gray; + font-size: 10px; + display: block; +} diff --git a/table.html b/table.html index cc2d14c..dd8d6f5 100644 --- a/table.html +++ b/table.html @@ -48,6 +48,11 @@ Contact +
  • + + Register + +