diff --git a/style.css b/style.css index 075f4cf..10f63a7 100644 --- a/style.css +++ b/style.css @@ -2,419 +2,480 @@ /* General */ /* ------------------------------ */ -button{ - color: #000; - font-size: 12px; - text-decoration: none; +body { + margin: 0; + font: .75em "Segoe UI", "Arial", sans-serif; + text-align: center; + background-position-x: center; } -a{ - color: #0000FF; +h1 { + margin-bottom: .25em; +} + +a { + color: #0000FF; +} + +button { + color: #000; + font-size: 12px; + text-decoration: none; +} + +#container { + margin: auto; + padding: 0 10px; } @-webkit-keyframes fadeIO { - 0% {opacity: 0;} - 30% {opacity: 100%;} - 70% {opacity: 100%;} - 100% {opacity: 0;} + 0% { + opacity: 0; + } + 30% { + opacity: 100%; + } + 70% { + opacity: 100%; + } + 100% { + opacity: 0; + } } + /* iPhone */ + @media only screen and (width:320px) and (device-width:320px) and (device-height:480px) and (orientation: landscape) { - body { - -webkit-transform: scale(0.667); - -webkit-transform-origin: top right; - position: absolute; - right: 0; - top: 0; - width: 480px; - } + body { + -webkit-transform: scale(0.667); + -webkit-transform-origin: top right; + position: absolute; + right: 0; + top: 0; + width: 480px; + } } + + /* iPad */ + @media only screen and (width:768px) and (device-width:768px) and (device-height:1024px) and (orientation: landscape) { - body { - -webkit-transform: scale(0.75); - -webkit-transform-origin: top right; - position: absolute; - right: 0; - top: 0; - width: 1024px; - } + body { + -webkit-transform: scale(0.75); + -webkit-transform-origin: top right; + position: absolute; + right: 0; + top: 0; + width: 1024px; + } } -body{ - margin: 0; - font: .75em "Segoe UI", "Arial", sans-serif; - text-align: center; - background-position-x: center; -} -h1{ - margin-bottom: .25em; -} +/* Apply absolute formatting on small screens so that there's padding on both sides of the schedule */ -#container{ - margin: auto; - padding: 0 10px; +@media only screen and (max-width:814px) { + .week #container { + position: absolute; + } } -/* apply absolute formatting on small screens so that there's padding on both sides of the schedule */ -@media only screen and (max-width:814px){ - .week #container{ - position: absolute; - } +#titleTitles, +#schedules, +#changelog { + display: none; } -#titleTitles, #schedules, #changelog{ - display: none; -} - /* ------------------------------ */ /* Header */ /* ------------------------------ */ -.noHighlight{ - /*-webkit-touch-callout: none; (disables context menu on mobile? perhaps this also disables highlighting on mobile?)*/ - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; +.noHighlight { + /*-webkit-touch-callout: none; (disables context menu on mobile? perhaps this also disables highlighting on mobile?)*/ + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } -#header{ - position: relative; - margin: 1.25em auto; - width: 100%; - max-width: 400px; +#header { + position: relative; + margin: 1.25em auto; + width: 100%; + max-width: 400px; } -#title{ - display: inline; - /*-webkit-touch-callout: initial;*/ - -webkit-user-select: initial; - -khtml-user-select: initial; - -moz-user-select: initial; - -ms-user-select: initial; - user-select: initial; +#title { + display: inline; + /*-webkit-touch-callout: initial;*/ + -webkit-user-select: initial; + -khtml-user-select: initial; + -moz-user-select: initial; + -ms-user-select: initial; + user-select: initial; } -#leftArrow{ - float: left; +#leftArrow { + float: left; } -#rightArrow{ - float: right; + +#leftArrow:hover { + padding: 0 20px 0 4px; } -#leftArrow, #rightArrow{ - cursor: pointer; - padding: 0 12px; - font-weight: normal; - transition: padding .2s; - -webkit-transition: padding .2s; + +#rightArrow { + float: right; } -#leftArrow:hover{ - padding: 0 20px 0 4px; + +#rightArrow:hover { + padding: 0 4px 0 20px; } -#rightArrow:hover{ - padding: 0 4px 0 20px; + +#leftArrow, +#rightArrow { + cursor: pointer; + padding: 0 12px; + font-weight: normal; + transition: padding .2s; + -webkit-transition: padding .2s; } -#leftArrow:hover, #rightArrow:hover{ - font-weight: bold; + +#leftArrow:hover, +#rightArrow:hover { + font-weight: bold; } -#warning{ - display:none; - margin-bottom: 1em; +#warning { + display: none; + margin-bottom: 1em; } + /* ------------------------------ */ /* Schedule */ /* ------------------------------ */ -table{ - border-collapse: collapse; +table { + border-collapse: collapse; } -#schedule{ - margin: auto; - height: 300px; /* acts like min-height */ - background-color: rgba(255,255,255,.5) +#schedule { + margin: auto; + height: 300px; + /* acts like min-height */ + background-color: rgba(255, 255, 255, .5) } -#schedule td{ - width: 158px; /* 2px short to account for 2px border */ - border: 2px solid black; - padding: 0 0 15px; - vertical-align: top; +#schedule td { + width: 158px; + /* 2px short to account for 2px border */ + border: 2px solid black; + padding: 0 0 15px; + vertical-align: top; } .periodone { - background-color: rgba(18,41,246,.55); + background-color: rgba(18, 41, 246, .55); } .periodtwo { - background-color: rgba(249,122,44,.82); + background-color: rgba(249, 122, 44, .82); } .periodthree { - background-color: rgba(249,210,42, .65); + background-color: rgba(249, 210, 42, .65); } .periodfour { - background-color: rgba(99,41,228,.5); + background-color: rgba(99, 41, 228, .5); } .periodfive { - background-color: rgba(64,228,62,.66); + background-color: rgba(64, 228, 62, .66); } -.periodsix{ - background-color: rgba(11, 137, 72, .75); +.periodsix { + background-color: rgba(11, 137, 72, .75); } -.lunchtime{ - background-color: rgba(255,46,67,.7); +.lunchtime { + background-color: rgba(255, 46, 67, .7); } -.periodseven -{ - background-color: rgba(48,228,227,.66); +.periodseven { + background-color: rgba(48, 228, 227, .66); } -.periodeight{ - background-color: rgba(206,52,228,.66); +.periodeight { + background-color: rgba(206, 52, 228, .66); } .officehours { - background-color: rgba(249, 22, 215,.5); + background-color: rgba(249, 22, 215, .5); } .meeting { - background-color: rgba(77, 80, 123, .28); + background-color: rgba(77, 80, 123, .28); } -.meetingtwo{ - background-color: rgba(196, 233, 242, .6); +.meetingtwo { + background-color: rgba(196, 233, 242, .6); } -.period, .head{ - width: inherit; - overflow: hidden; - line-height: 110%; +.period, +.head { + width: inherit; + overflow: hidden; + line-height: 110%; } -.periodWrapper, .headWrapper{ - display: table-cell; - width: inherit; - border-bottom: 1px solid black; - vertical-align: middle; + +.periodWrapper, +.headWrapper { + display: table-cell; + width: inherit; + border-bottom: 1px solid black; + vertical-align: middle; } -.periodLength{ - font-size: .8em; + +.periodLength { + font-size: .8em; } -.head{ - height: 3.25em; - border-bottom: 2px solid black; - font-size: 1.33em; + +.head { + height: 3.25em; + border-bottom: 2px solid black; + font-size: 1.33em; } -.headWrapper{ - height: inherit; + +.headWrapper { + height: inherit; } -.headDate{ - font-size: .8em; + +.headDate { + font-size: .8em; } -.headSchedId{ - font-size: .7em; + +.headSchedId { + font-size: .7em; } -#today .head{ - font-weight: bold; +#today .head { + font-weight: bold; } -#today .head{ - background: rgba(128,128,128,.75); /* looks like #ddd on white background */ +#today .head { + background: rgba(128, 128, 128, .75); + /* looks like #ddd on white background */ } -#today .now{ - background-color: rgba(208,208,208,.75); - /* looks close to #999 on #ddd background */ +#today .now { + background-color: rgba(208, 208, 208, .75); + /* looks close to #999 on #ddd background */ } -.long{ - font-weight: bold; +.long { + font-weight: bold; } -#schedule .lunch{ - width:100%; - height:100%; +#schedule .lunch { + width: 100%; + height: 100%; } -#schedule .lunch td{ - width: 80px; /* half of day width */ - padding: 0px; - border-width: 0; + +#schedule .lunch td { + width: 80px; + /* half of day width */ + padding: 0px; + border-width: 0; } + #schedule .lunch td:first-child { - border-right: 1px solid black; + border-right: 1px solid black; } + /* ------------------------------ */ /* Version */ /* ------------------------------ */ -#version{ - position: fixed; - bottom: 0px; - left: 0px; - padding: 0 3px; - border-top-right-radius: 3px; - color: #555; - background-color: rgba(255, 255, 255, 0.5); +#version { + position: fixed; + bottom: 0px; + left: 0px; + padding: 0 3px; + border-top-right-radius: 3px; + color: #555; + background-color: rgba(255, 255, 255, 0.5); } -#version a{ - text-decoration: none; + +#version a { + text-decoration: none; } + /* ------------------------------ */ /* Options */ /* ------------------------------ */ -#options{ - box-sizing: content-box; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - position: fixed; - right: -50%; - bottom: -70%; - border-left: 1px solid gray; - border-top: 1px solid gray; - border-top-left-radius: 5px; - padding: 2.5em 0 0 2.5em; - /*width: 30px; +#options { + box-sizing: content-box; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + position: fixed; + right: -50%; + bottom: -70%; + border-left: 1px solid gray; + border-top: 1px solid gray; + border-top-left-radius: 5px; + padding: 2.5em 0 0 2.5em; + /*width: 30px; height: 30px;*/ - width: 50%; - height: 70%; - background-color: rgba(207, 207, 207, 0.9); - color: #333; - transition: right .5s, bottom .5s, padding .5s, border-top-left-radius .5s; - -webkit-transition: right .5s, bottom .5s, padding .5s border-top-left-radius .5s; - z-index: 10; -} -#options.mobile{ /* must be before #options.expanded for expanding to apply properly */ - right: -100%; - bottom: -100%; - padding: 3.75em 0 0 3.75em; - font-size: 1.2em; - width: 100%; - height: 100%; -} -#options.expanded{ - right: 0; - bottom: 0; - padding: 0; -} -#options.mobile.expanded{ - border-top-left-radius: 0; -} - -#optionsTitle{ - margin: 0 0 5px; - -webkit-transition: margin .5s; -} -.expanded #optionsTitle{ - margin-top: 30px; -} -#optionsArrow{ - position: absolute; - left: 0; - top: 0; - padding: .2em .35em; - font: 1.66em Arial; - text-align: left; - cursor: pointer; + width: 50%; + height: 70%; + background-color: rgba(207, 207, 207, 0.9); + color: #333; + transition: right .5s, bottom .5s, padding .5s, border-top-left-radius .5s; + -webkit-transition: right .5s, bottom .5s, padding .5s border-top-left-radius .5s; + z-index: 10; +} + +#options.mobile { + /* must be before #options.expanded for expanding to apply properly */ + right: -100%; + bottom: -100%; + padding: 3.75em 0 0 3.75em; + font-size: 1.2em; + width: 100%; + height: 100%; } + +#options.expanded { + right: 0; + bottom: 0; + padding: 0; +} + +#options.mobile.expanded { + border-top-left-radius: 0; +} + +#optionsTitle { + margin: 0 0 5px; + -webkit-transition: margin .5s; +} + +.expanded #optionsTitle { + margin-top: 30px; +} + +#optionsArrow { + position: absolute; + left: 0; + top: 0; + padding: .2em .35em; + font: 1.66em Arial; + text-align: left; + cursor: pointer; +} + .mobile #optionsArrow { - font-size: 2.5em; + font-size: 2.5em; } -#options.mobile input[type=checkbox]{ - transform: scale(1.2); - -webkit-transform: scale(1.2); +#options.mobile input[type=checkbox] { + transform: scale(1.2); + -webkit-transform: scale(1.2); } -#options input[type=number], #options input[type=text]{ - border: 1px solid gray; - background: rgba(255, 255, 255, .5); - text-align: center; - font-size: 1em; + +#options input[type=number], +#options input[type=text] { + border: 1px solid gray; + background: rgba(255, 255, 255, .5); + text-align: center; + font-size: 1em; } -#options input[type=number]{ - width: 2.5em; + +#options input[type=number] { + width: 2.5em; } -#options input::-webkit-outer-spin-button, #options input::-webkit-inner-spin-button{ - display: none; /* hide spinner on number inputs in webkit browsers */ + +#options input::-webkit-outer-spin-button, +#options input::-webkit-inner-spin-button { + /* hide spinner on number inputs in webkit browsers */ + display: none; } -#optionsContent{ - margin: 0 auto; +#optionsContent { + margin: 0 auto; } -#optionsContent tr{ - height: 2em; + +#optionsContent tr { + height: 2em; } -#optionsContent th{ - padding: 15px 0 5px; + +#optionsContent th { + padding: 15px 0 5px; } -#optionsContent td:first-child{ - padding-right: 15px; - text-align: right; + +#optionsContent td:first-child { + padding-right: 15px; + text-align: right; } -.tooltipIndicator{ - text-decoration: underline; + +.tooltipIndicator { + text-decoration: underline; } -#repo{ - position: absolute; - right: 0; - bottom: 0; - padding: 0 5px 3px 0; +#repo { + position: absolute; + right: 0; + bottom: 0; + padding: 0 5px 3px 0; } + /* ------------------------------ */ /* Clock */ /* ------------------------------ */ -#currentTime{ - position: absolute; - right: 0; - top: 0; - padding: 7px 10px; - border-bottom-left-radius: 5px; - background: rgba(255,255,255,.5); - font-size: 1.5em; - font-weight: bold; - /* letter-spacing: .05em; */ - color: #333; +#currentTime { + position: absolute; + right: 0; + top: 0; + padding: 7px 10px; + border-bottom-left-radius: 5px; + background: rgba(255, 255, 255, .5); + font-size: 1.5em; + font-weight: bold; + /* letter-spacing: .05em; */ + color: #333; } + /* ------------------------------ */ /* Refresh */ /* ------------------------------ */ -#refresh{ - display: none; - position: fixed; - top: 0; - right: 0; - padding-right: 3px; - color: #AAA; - font-size: 2em; - cursor: pointer; - transition: color .25s; - -webkit-transition: color .25s; -} -#refresh:hover{ - color: #333; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; +#refresh { + display: none; + position: fixed; + top: 0; + right: 0; + padding-right: 3px; + color: #AAA; + font-size: 2em; + cursor: pointer; + transition: color .25s; + -webkit-transition: color .25s; +} + +#refresh:hover { + color: #333; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; }