From fec9bf2eeb41a84b973447f45aa264762eaa9f27 Mon Sep 17 00:00:00 2001 From: AnontoZ Date: Sun, 21 Oct 2018 02:29:43 -0400 Subject: [PATCH] Add files via upload --- about.html | 34 +++++++++++ hackgt.css | 101 +++++++++++++++++++++++++++----- index.html | 50 ++++++++++++++++ wrldcalendar.js | 149 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 319 insertions(+), 15 deletions(-) create mode 100644 about.html create mode 100644 index.html create mode 100644 wrldcalendar.js diff --git a/about.html b/about.html new file mode 100644 index 0000000..4fecf8d --- /dev/null +++ b/about.html @@ -0,0 +1,34 @@ + + + + HackGT Perry 2 + + + + + +
+
+

This is Team Perry's HackGT Global Calender Project

+

The purpose of this calender is to show all the holidays of all the countries in one website for the entire year

+ +
Home
+
+
+ + + +
+
+

About Us

+

Our HackGT Group consists of Huey, Anonto, and Alexander

+

We are noobs and this is our first hackaton

+

As we get to learn more about what we are doing we will hopefully finish our project

+

Thank you for reading and stay tuned for our final product

+

Launch Day:TDA

+

+
+ + + + diff --git a/hackgt.css b/hackgt.css index 3b63d9b..54e5967 100644 --- a/hackgt.css +++ b/hackgt.css @@ -1,29 +1,59 @@ -@import url('https://fonts.googleapis.com/css?family=Chakra+Petch" rel="stylesheet'); -@import url('https://fonts.googleapis.com/css?family=Open+Sans'); +/*@import url('https://fonts.googleapis.com/css?family=Chakra+Petch'); +@import url('https://fonts.googleapis.com/css?family=Open+Sans');*/ +@import url('https://fonts.googleapis.com/css?family=Open+Sans|Oswald'); body { - font family: 'Chakra Petch', sans-serif; + font-family: 'Oswald', sans-serif; color: black; - background-color: white; - margin-top: 2em; + background-color: #fafafa; + margin: 0; } h1 { - font-family:; + font-family: 'Oswald'; + color: white; +} + +p { + font-family: 'Open+Sans', sans-serif; + color: white; } +ul { + list-style-type: none; +} + +a, a:hover, a:active, a:visited { color: white; } + +* {box-sizing: border-box;} ul {list-style-type: none;} body {font-family: Verdana, sans-serif;} -/* Month header */ +.text { + color:black; +} + +.maintext { + color:black; + font-family: 'Open+Sans', sans-serif; +} + +.header { + overflow: hidden; + background-color: #6c757d; + padding: 10px 10px; + color: white; + font-style: 'light'; + font-family: 'Oswald' +} + .month { - padding: 70px 25px; + padding: 10px 10px; width: 100%; background: #1abc9c; text-align: center; } -/* Month list */ .month ul { margin: 0; padding: 0; @@ -36,23 +66,33 @@ body {font-family: Verdana, sans-serif;} letter-spacing: 3px; } -/* Previous button inside month header */ .month .prev { float: left; padding-top: 10px; } -/* Next button */ .month .next { float: right; padding-top: 10px; } -/* Weekdays (Mon-Sun) */ +.month .title { + font-family: 'Oswald'; + font-style: 'light'; + font-size:40px; +} + +.month .year { + font-family: 'Oswald'; + font-style: 'light'; + font-size:25px; +} + .weekdays { margin: 0; padding: 10px 0; - background-color:#ddd; + background-color: #ddd; + font-family: 'Oswald'; } .weekdays li { @@ -62,11 +102,12 @@ body {font-family: Verdana, sans-serif;} text-align: center; } -/* Days (1-31) */ .days { padding: 10px 0; background: #eee; margin: 0; + font-family: 'Open Sans'; + font-size: 18px; } .days li { @@ -79,9 +120,39 @@ body {font-family: Verdana, sans-serif;} color: #777; } -/* Highlight the "current" day */ .days li .active { padding: 5px; background: #1abc9c; color: white !important +} + +.footer { + overflow: hidden; + padding: 10px 10px; + background-color: #010b1c; + position: fixed; + left: 0; + bottom: 0; + width: 100%; + color: white; + text-align: center; +} + +.footer .text { + font-style: 'light'; + font-family: 'Oswald' +} + +/* Add media queries for smaller screens */ +@media screen and (max-width:720px) { + .weekdays li, .days li {width: 13.1%;} +} + +@media screen and (max-width: 420px) { + .weekdays li, .days li {width: 12.5%;} + .days li .active {padding: 2px;} +} + +@media screen and (max-width: 290px) { + .weekdays li, .days li {width: 12.2%;} } \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..533df0d --- /dev/null +++ b/index.html @@ -0,0 +1,50 @@ + + + + HackGT Perry 2 + + + + + +
+
+

This is Team Perry's HackGT Global Calender Project

+

The purpose of this calender is to show all the holidays of all the countries in one website for the entire year

+ +
About
+
+
+ + +
+ +
+ + + + + + + + + + diff --git a/wrldcalendar.js b/wrldcalendar.js new file mode 100644 index 0000000..acbf95d --- /dev/null +++ b/wrldcalendar.js @@ -0,0 +1,149 @@ +var months = [ "January","February","March","April","May","June","July","August","September", + "October","November","December"]; +var monthDays = [31,getFebDays(),31,30,31,30,31,31,30,31,30,31]; + +function dispDays() { + month = getMonth(); + year = getYear(); + text = getDaysBefore(month,year); + numDays = monthDays[month]; + currDay = getDay(); + for (i = 1; i <= numDays; i++) { + if (i == currDay) { + text += "
  • " + i.toString() + "
  • " + } + else { + text += "
  • "+ i.toString() + "
  • "; + } + } + text += getDaysAfter(month,year); + document.getElementById("calDays").innerHTML = text; +} + +function dispCalDays(month, year) { + text = getDaysBefore(month,year); + numDays = monthDays[month]; + currMonth = false; + if (month == getMonth() && year == getYear()) { + currMonth = true; + } + currDay = getDay(); + for (i = 1; i <= numDays; i++) { + if (i == currDay && currMonth) { + text += "
  • " + i.toString() + "
  • " + } + else { + text += "
  • "+ i.toString() + "
  • "; + } + } + text += getDaysAfter(month,year); + document.getElementById("calDays").innerHTML = text; +} + +function nextMonth() { + month = months.indexOf(document.getElementById("currMonth").textContent); + month = month+1; + year = parseInt(String(document.getElementById("currYear").textContent)); + if (month > 11) { + month -= 12; + year = year + 1; + } + document.getElementById("currMonth").innerHTML = months[month]; + document.getElementById("currYear").innerHTML = year; + dispCalDays(month,year); +} + +function prevMonth() { + month = months.indexOf(document.getElementById("currMonth").textContent); + month = month-1; + year = parseInt(String(document.getElementById("currYear").textContent)); + if (month < 0) { + month += 12; + year = year - 1; + } + document.getElementById("currMonth").innerHTML = months[month]; + document.getElementById("currYear").innerHTML = year; + dispCalDays(month,year); +} + +function getDate() { + date = new Date(); + y = date.getFullYear(); + m = date.getMonth() + 1; + d = date.getDate(); + day = date.getDay(); +} + +function getDay() { + date = new Date(); + return date.getDate(); +} + +function getMonth() { + date = new Date(); + return date.getMonth(); +} + +function getYear() { + date = new Date(); + return date.getFullYear(); +} + +function getFebDays() { + year = getYear(); + if (year % 4 > 0) { + return 28; + } + else if (year % 100 > 0) { + return 28; + } + else if (year % 400 > 0) { + return 28; + } + return 29; +} + +function getDaysBefore(month,year) { + indexFirst = indexFirstDay(month,year); + if (month == 0) { + month = 12; + } + lastDay = monthDays[month-1]; + start = lastDay-indexFirst+1; //Plus 1 compensates for indexFirst automatically being ahead of the last day 9 + text = ""; + for (i = start; i <= lastDay; i++) { + text += "
  • "+ i.toString() + "
  • "; + } + return text; +} + +function getDaysAfter(month,year) { + indexLast = indexLastDay(month,year); + if (month == 12) { + month = 0; + } + start = 1; + text = ""; + for (i = start; i < 7-indexLast; i++) { + text += "
  • "+ i.toString() + "
  • "; + } + return text; +} + +function indexFirstDay(month, year) { + var firstDay = new Date(year,month,1); + return firstDay.getDay(); +} + +function indexLastDay(month, year) { + var lastDay = new Date(year,month,monthDays[month]); + return lastDay.getDay(); +} + +function writeMonth() { + document.getElementById("currMonth").innerHTML = months[getMonth()]; +} + +function writeYear() { + document.getElementById("currYear").innerHTML = getYear(); +} \ No newline at end of file