diff options
| author | Fuwn <[email protected]> | 2020-11-06 18:24:26 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2020-11-06 18:24:26 -0800 |
| commit | 9cdce4254700691301608c6f1d3081950023cc4f (patch) | |
| tree | 9d24529acc19b354f80cb2d610aa1e7686f4d530 /public | |
| download | blog-9cdce4254700691301608c6f1d3081950023cc4f.tar.xz blog-9cdce4254700691301608c6f1d3081950023cc4f.zip | |
repo: initial :star:
Diffstat (limited to 'public')
87 files changed, 2290 insertions, 0 deletions
diff --git a/public/css/bowling.css b/public/css/bowling.css new file mode 100644 index 0000000..332bc93 --- /dev/null +++ b/public/css/bowling.css @@ -0,0 +1,178 @@ +button { + color: #9d261d; + background: none; + font-family: inherit; + font-size: inherit; + border: 3px solid #9d261d; + padding: 15px; + margin-bottom: 10px; +} + +button:hover { + color: #fff; + background-color: #9d261d; + cursor: pointer; +} + +#demo { + margin: 40px auto; + position: relative; +} + +#stats { + position: absolute; + top: 0; + right: 0; +} + +.stats-label { + width: 80px; +} + +#scoreboard { + height: 76px; + display: flex; + margin-bottom: 40px; +} + +.scoreboard-half { + display: flex; + flex-grow: 15; +} + +.scoreboard-half:first-of-type .frame:last-child { + border-right: none; +} + +.scoreboard-half:nth-of-type(2) { + flex-grow: 16; +} + +.frame { + position: relative; + box-sizing: border-box; + display: flex; + justify-content: flex-end; + flex-grow: 2; + height: 76px; + border: 3px solid #222; + border-right: none; +} + +.frame:last-child { + flex-grow: 3; + border-right: 3px solid #222; +} + +.square { + border-bottom: 3px solid #222; + border-left: 3px solid #222; + width: 23px; + height: 23px; + line-height: 23px; + + text-align: center; +} + +.square:first-of-type { + border: none; +} + +.score { + position: absolute; + bottom: 5px; + left: 5px; +} + +#graph { + display: flex; + height: 300px; + align-items: flex-end; +} + +.bar { + background-color: #9d261d; + flex-grow: 1; + margin-right: 1px; +} + +#controls { + display: flex; +} + +#throw, +#game { + flex-grow: 3; + margin-right: 10px; +} + +#many-games { + flex-grow: 4; +} + +.mobile-spacer { + display: none; +} + +@media (max-width: 650px) { + #demo { + margin: 20px auto; + } + + button:after { + clear: both; + } + + #stats { + font-size: 16px; + } + + .bar { + margin: 0; + } + + #scoreboard { + flex-wrap: wrap; + height: auto; + } + + #graph { + height: 200px; + } + + .scoreboard-half:first-of-type .frame:nth-of-type(5) { + border-right: 3px solid #222; + } + + .frame { + flex-basis: 0; + } + + .scoreboard-half:first-of-type .frame { + border-bottom: none; + flex-grow: 2; + } + + .mobile-spacer { + display: block; + flex-grow: 1; + } + + #controls { + flex-wrap: wrap; + } + + #controls button { + margin: 0 0 10px; + } + + button#throw { + margin-right: 10px; + } +} + +@media (max-width: 425px) { + button#throw { + margin-right: 0; + } +} diff --git a/public/css/color-blindness.css b/public/css/color-blindness.css new file mode 100644 index 0000000..ebe492b --- /dev/null +++ b/public/css/color-blindness.css @@ -0,0 +1,30 @@ +body { + filter: url("#color-filter"); + -webkit-filter: url("#color-filter"); +} + +#controls { + margin-bottom: 60px; +} + +img { + border: none; + width: 50%; + float: left; +} + +svg { + width: 0; + height: 0; +} + +.control .label-text { + display: inline-block; + width: 40px; +} + +.control .label-value { + display: inline-block; + text-align: right; + width: 70px; +} diff --git a/public/css/demos/clicking.css b/public/css/demos/clicking.css new file mode 100644 index 0000000..9a9016e --- /dev/null +++ b/public/css/demos/clicking.css @@ -0,0 +1,46 @@ +.a11y-onclick .button { + text-align: center; + margin-right: 20px; + width: 100px; + color: white; + padding: 15px 25px; + background-color: #0074f6; +} + +.a11y-onclick.active:not(.no-active) .button { + background-color: #004a93; +} + +.a11y-onclick .output { + width: 200px; + padding: 15px; + background-color: #e9e9e9; +} + +.a11y-onclick.active .mouse-pointer { + top: 29px; +} + +.a11y-onclick .row { + width: 100%; +} + +.a11y-onclick .enter-key { + margin: 0 auto 20px; + width: 129px; + padding: 15px 25px; + background-color: #222222; + color: #ffffff; + text-align: right; + border-radius: 7px; + border-bottom: 5px solid #666666; +} + +.a11y-onclick.active .enter-key { + margin-top: 3px; + border-bottom-width: 2px; +} + +.a11y-onclick .button.focused { + outline: 3px solid #000000; +} diff --git a/public/css/demos/hover.css b/public/css/demos/hover.css new file mode 100644 index 0000000..23592da --- /dev/null +++ b/public/css/demos/hover.css @@ -0,0 +1,120 @@ +.hover-a11y .row { + background-color: #004a93; +} + +.hover-a11y .button { + color: #ffffff; + padding: 15px 25px; + text-align: center; +} + +.hover-a11y .mouse-pointer { + animation: mousepos 6s ease-in-out 0s infinite; + -webkit-animation: mousepos 6s ease-in-out 0s infinite; + -moz-animation: mousepos 6s ease-in-out 0s infinite; + -o-animation: mousepos 6s ease-in-out 0s infinite; +} + +.hover-a11y:not(.no-active) .button.active { + color: #aabbdd; +} + +.hover-a11y.with-underline:not(.no-active) .button.active { + text-decoration: underline; +} + +@-webkit-keyframes mousepos { + 0% { + -webkit-transform: translateX(30px) rotateZ(-20deg); + } + 15% { + -webkit-transform: translateX(100px) rotateZ(-20deg); + } + 20% { + -webkit-transform: translateX(100px) rotateZ(-20deg); + } + 40% { + -webkit-transform: translateX(300px) rotateZ(-20deg) translateY(10px); + } + 45% { + -webkit-transform: translateX(300px) rotateZ(-20deg) translateY(10px); + } + 80% { + -webkit-transform: translateX(30px) rotateZ(-20deg); + } + 100% { + -webkit-transform: translateX(30px) rotateZ(-20deg); + } +} + +@-moz-keyframes mousepos { + 0% { + -moz-transform: translateX(30px) rotateZ(-20deg); + } + 15% { + -moz-transform: translateX(100px) rotateZ(-20deg); + } + 20% { + -moz-transform: translateX(100px) rotateZ(-20deg); + } + 40% { + -moz-transform: translateX(300px) rotateZ(-20deg) translateY(10px); + } + 45% { + -moz-transform: translateX(300px) rotateZ(-20deg) translateY(10px); + } + 80% { + -moz-transform: translateX(30px) rotateZ(-20deg); + } + 100% { + -moz-transform: translateX(30px) rotateZ(-20deg); + } +} + +@-o-keyframes mousepos { + 0% { + -o-transform: translateX(30px) rotateZ(-20deg); + } + 15% { + -o-transform: translateX(100px) rotateZ(-20deg); + } + 20% { + -o-transform: translateX(100px) rotateZ(-20deg); + } + 40% { + -o-transform: translateX(300px) rotateZ(-20deg) translateY(10px); + } + 45% { + -o-transform: translateX(300px) rotateZ(-20deg) translateY(10px); + } + 80% { + -o-transform: translateX(30px) rotateZ(-20deg); + } + 100% { + -o-transform: translateX(30px) rotateZ(-20deg); + } +} + +@keyframes mousepos { + 0% { + transform: translateX(30px) rotateZ(-20deg); + } + 15% { + transform: translateX(100px) rotateZ(-20deg); + } + 20% { + transform: translateX(100px) rotateZ(-20deg); + } + 40% { + transform: translateX(300px) rotateZ(-20deg) translateY(10px); + } + 45% { + transform: translateX(300px) rotateZ(-20deg) translateY(10px); + } + 80% { + transform: translateX(30px) rotateZ(-20deg); + } + 100% { + transform: translateX(30px) rotateZ(-20deg); + } +} diff --git a/public/css/demos/shared.css b/public/css/demos/shared.css new file mode 100644 index 0000000..7794d32 --- /dev/null +++ b/public/css/demos/shared.css @@ -0,0 +1,28 @@ +.mouse-pointer { + -webkit-transform: rotateZ(-20deg); + -moz-transform: rotateZ(-20deg); + -ms-transform: rotateZ(-20deg); + -o-transform: rotateZ(-20deg); + transform: rotateZ(-20deg); + position: relative; + width: 0; + top: 27px; + right: 45px; +} + +.mouse-pointer .head { + border-left: 7px solid transparent; + border-right: 6px solid transparent; + border-bottom: 16px solid white; + width: 0; + height: 0; +} + +.mouse-pointer .tail { + width: 3px; + height: 8px; + position: relative; + left: 5px; + top: -1px; + background-color: #ffffff; +} diff --git a/public/css/fonts/KaTeX_AMS-Regular.ttf b/public/css/fonts/KaTeX_AMS-Regular.ttf Binary files differnew file mode 100644 index 0000000..afcd2eb --- /dev/null +++ b/public/css/fonts/KaTeX_AMS-Regular.ttf diff --git a/public/css/fonts/KaTeX_AMS-Regular.woff b/public/css/fonts/KaTeX_AMS-Regular.woff Binary files differnew file mode 100644 index 0000000..4f57515 --- /dev/null +++ b/public/css/fonts/KaTeX_AMS-Regular.woff diff --git a/public/css/fonts/KaTeX_AMS-Regular.woff2 b/public/css/fonts/KaTeX_AMS-Regular.woff2 Binary files differnew file mode 100644 index 0000000..b982d6e --- /dev/null +++ b/public/css/fonts/KaTeX_AMS-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Caligraphic-Bold.ttf b/public/css/fonts/KaTeX_Caligraphic-Bold.ttf Binary files differnew file mode 100644 index 0000000..f84148d --- /dev/null +++ b/public/css/fonts/KaTeX_Caligraphic-Bold.ttf diff --git a/public/css/fonts/KaTeX_Caligraphic-Bold.woff b/public/css/fonts/KaTeX_Caligraphic-Bold.woff Binary files differnew file mode 100644 index 0000000..ab56ab7 --- /dev/null +++ b/public/css/fonts/KaTeX_Caligraphic-Bold.woff diff --git a/public/css/fonts/KaTeX_Caligraphic-Bold.woff2 b/public/css/fonts/KaTeX_Caligraphic-Bold.woff2 Binary files differnew file mode 100644 index 0000000..710c261 --- /dev/null +++ b/public/css/fonts/KaTeX_Caligraphic-Bold.woff2 diff --git a/public/css/fonts/KaTeX_Caligraphic-Regular.ttf b/public/css/fonts/KaTeX_Caligraphic-Regular.ttf Binary files differnew file mode 100644 index 0000000..97814db --- /dev/null +++ b/public/css/fonts/KaTeX_Caligraphic-Regular.ttf diff --git a/public/css/fonts/KaTeX_Caligraphic-Regular.woff b/public/css/fonts/KaTeX_Caligraphic-Regular.woff Binary files differnew file mode 100644 index 0000000..aec8a33 --- /dev/null +++ b/public/css/fonts/KaTeX_Caligraphic-Regular.woff diff --git a/public/css/fonts/KaTeX_Caligraphic-Regular.woff2 b/public/css/fonts/KaTeX_Caligraphic-Regular.woff2 Binary files differnew file mode 100644 index 0000000..ee5193d --- /dev/null +++ b/public/css/fonts/KaTeX_Caligraphic-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Fraktur-Bold.ttf b/public/css/fonts/KaTeX_Fraktur-Bold.ttf Binary files differnew file mode 100644 index 0000000..483a7cd --- /dev/null +++ b/public/css/fonts/KaTeX_Fraktur-Bold.ttf diff --git a/public/css/fonts/KaTeX_Fraktur-Bold.woff b/public/css/fonts/KaTeX_Fraktur-Bold.woff Binary files differnew file mode 100644 index 0000000..189fea5 --- /dev/null +++ b/public/css/fonts/KaTeX_Fraktur-Bold.woff diff --git a/public/css/fonts/KaTeX_Fraktur-Bold.woff2 b/public/css/fonts/KaTeX_Fraktur-Bold.woff2 Binary files differnew file mode 100644 index 0000000..dc3bd4c --- /dev/null +++ b/public/css/fonts/KaTeX_Fraktur-Bold.woff2 diff --git a/public/css/fonts/KaTeX_Fraktur-Regular.ttf b/public/css/fonts/KaTeX_Fraktur-Regular.ttf Binary files differnew file mode 100644 index 0000000..9aa5f67 --- /dev/null +++ b/public/css/fonts/KaTeX_Fraktur-Regular.ttf diff --git a/public/css/fonts/KaTeX_Fraktur-Regular.woff b/public/css/fonts/KaTeX_Fraktur-Regular.woff Binary files differnew file mode 100644 index 0000000..d01450e --- /dev/null +++ b/public/css/fonts/KaTeX_Fraktur-Regular.woff diff --git a/public/css/fonts/KaTeX_Fraktur-Regular.woff2 b/public/css/fonts/KaTeX_Fraktur-Regular.woff2 Binary files differnew file mode 100644 index 0000000..7eeba37 --- /dev/null +++ b/public/css/fonts/KaTeX_Fraktur-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Main-Bold.ttf b/public/css/fonts/KaTeX_Main-Bold.ttf Binary files differnew file mode 100644 index 0000000..dc0185a --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Bold.ttf diff --git a/public/css/fonts/KaTeX_Main-Bold.woff b/public/css/fonts/KaTeX_Main-Bold.woff Binary files differnew file mode 100644 index 0000000..acf48e6 --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Bold.woff diff --git a/public/css/fonts/KaTeX_Main-Bold.woff2 b/public/css/fonts/KaTeX_Main-Bold.woff2 Binary files differnew file mode 100644 index 0000000..cf5abab --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Bold.woff2 diff --git a/public/css/fonts/KaTeX_Main-BoldItalic.ttf b/public/css/fonts/KaTeX_Main-BoldItalic.ttf Binary files differnew file mode 100644 index 0000000..4346f17 --- /dev/null +++ b/public/css/fonts/KaTeX_Main-BoldItalic.ttf diff --git a/public/css/fonts/KaTeX_Main-BoldItalic.woff b/public/css/fonts/KaTeX_Main-BoldItalic.woff Binary files differnew file mode 100644 index 0000000..d2cfe4e --- /dev/null +++ b/public/css/fonts/KaTeX_Main-BoldItalic.woff diff --git a/public/css/fonts/KaTeX_Main-BoldItalic.woff2 b/public/css/fonts/KaTeX_Main-BoldItalic.woff2 Binary files differnew file mode 100644 index 0000000..d0178f4 --- /dev/null +++ b/public/css/fonts/KaTeX_Main-BoldItalic.woff2 diff --git a/public/css/fonts/KaTeX_Main-Italic.ttf b/public/css/fonts/KaTeX_Main-Italic.ttf Binary files differnew file mode 100644 index 0000000..f2c3eba --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Italic.ttf diff --git a/public/css/fonts/KaTeX_Main-Italic.woff b/public/css/fonts/KaTeX_Main-Italic.woff Binary files differnew file mode 100644 index 0000000..1184295 --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Italic.woff diff --git a/public/css/fonts/KaTeX_Main-Italic.woff2 b/public/css/fonts/KaTeX_Main-Italic.woff2 Binary files differnew file mode 100644 index 0000000..aa05e14 --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Italic.woff2 diff --git a/public/css/fonts/KaTeX_Main-Regular.ttf b/public/css/fonts/KaTeX_Main-Regular.ttf Binary files differnew file mode 100644 index 0000000..8acb365 --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Regular.ttf diff --git a/public/css/fonts/KaTeX_Main-Regular.woff b/public/css/fonts/KaTeX_Main-Regular.woff Binary files differnew file mode 100644 index 0000000..9f8228f --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Regular.woff diff --git a/public/css/fonts/KaTeX_Main-Regular.woff2 b/public/css/fonts/KaTeX_Main-Regular.woff2 Binary files differnew file mode 100644 index 0000000..e3f71eb --- /dev/null +++ b/public/css/fonts/KaTeX_Main-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Math-BoldItalic.ttf b/public/css/fonts/KaTeX_Math-BoldItalic.ttf Binary files differnew file mode 100644 index 0000000..a645df6 --- /dev/null +++ b/public/css/fonts/KaTeX_Math-BoldItalic.ttf diff --git a/public/css/fonts/KaTeX_Math-BoldItalic.woff b/public/css/fonts/KaTeX_Math-BoldItalic.woff Binary files differnew file mode 100644 index 0000000..87d4f22 --- /dev/null +++ b/public/css/fonts/KaTeX_Math-BoldItalic.woff diff --git a/public/css/fonts/KaTeX_Math-BoldItalic.woff2 b/public/css/fonts/KaTeX_Math-BoldItalic.woff2 Binary files differnew file mode 100644 index 0000000..83b4996 --- /dev/null +++ b/public/css/fonts/KaTeX_Math-BoldItalic.woff2 diff --git a/public/css/fonts/KaTeX_Math-Italic.ttf b/public/css/fonts/KaTeX_Math-Italic.ttf Binary files differnew file mode 100644 index 0000000..9c38359 --- /dev/null +++ b/public/css/fonts/KaTeX_Math-Italic.ttf diff --git a/public/css/fonts/KaTeX_Math-Italic.woff b/public/css/fonts/KaTeX_Math-Italic.woff Binary files differnew file mode 100644 index 0000000..959746e --- /dev/null +++ b/public/css/fonts/KaTeX_Math-Italic.woff diff --git a/public/css/fonts/KaTeX_Math-Italic.woff2 b/public/css/fonts/KaTeX_Math-Italic.woff2 Binary files differnew file mode 100644 index 0000000..e3ea522 --- /dev/null +++ b/public/css/fonts/KaTeX_Math-Italic.woff2 diff --git a/public/css/fonts/KaTeX_SansSerif-Bold.ttf b/public/css/fonts/KaTeX_SansSerif-Bold.ttf Binary files differnew file mode 100644 index 0000000..ff10851 --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Bold.ttf diff --git a/public/css/fonts/KaTeX_SansSerif-Bold.woff b/public/css/fonts/KaTeX_SansSerif-Bold.woff Binary files differnew file mode 100644 index 0000000..f0d6ea7 --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Bold.woff diff --git a/public/css/fonts/KaTeX_SansSerif-Bold.woff2 b/public/css/fonts/KaTeX_SansSerif-Bold.woff2 Binary files differnew file mode 100644 index 0000000..4cf8f14 --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Bold.woff2 diff --git a/public/css/fonts/KaTeX_SansSerif-Italic.ttf b/public/css/fonts/KaTeX_SansSerif-Italic.ttf Binary files differnew file mode 100644 index 0000000..3dd7671 --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Italic.ttf diff --git a/public/css/fonts/KaTeX_SansSerif-Italic.woff b/public/css/fonts/KaTeX_SansSerif-Italic.woff Binary files differnew file mode 100644 index 0000000..9da0dfe --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Italic.woff diff --git a/public/css/fonts/KaTeX_SansSerif-Italic.woff2 b/public/css/fonts/KaTeX_SansSerif-Italic.woff2 Binary files differnew file mode 100644 index 0000000..ce19ae0 --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Italic.woff2 diff --git a/public/css/fonts/KaTeX_SansSerif-Regular.ttf b/public/css/fonts/KaTeX_SansSerif-Regular.ttf Binary files differnew file mode 100644 index 0000000..f117cd6 --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Regular.ttf diff --git a/public/css/fonts/KaTeX_SansSerif-Regular.woff b/public/css/fonts/KaTeX_SansSerif-Regular.woff Binary files differnew file mode 100644 index 0000000..6ed9878 --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Regular.woff diff --git a/public/css/fonts/KaTeX_SansSerif-Regular.woff2 b/public/css/fonts/KaTeX_SansSerif-Regular.woff2 Binary files differnew file mode 100644 index 0000000..2761149 --- /dev/null +++ b/public/css/fonts/KaTeX_SansSerif-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Script-Regular.ttf b/public/css/fonts/KaTeX_Script-Regular.ttf Binary files differnew file mode 100644 index 0000000..e6f3454 --- /dev/null +++ b/public/css/fonts/KaTeX_Script-Regular.ttf diff --git a/public/css/fonts/KaTeX_Script-Regular.woff b/public/css/fonts/KaTeX_Script-Regular.woff Binary files differnew file mode 100644 index 0000000..4a48e65 --- /dev/null +++ b/public/css/fonts/KaTeX_Script-Regular.woff diff --git a/public/css/fonts/KaTeX_Script-Regular.woff2 b/public/css/fonts/KaTeX_Script-Regular.woff2 Binary files differnew file mode 100644 index 0000000..b0aed19 --- /dev/null +++ b/public/css/fonts/KaTeX_Script-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Size1-Regular.ttf b/public/css/fonts/KaTeX_Size1-Regular.ttf Binary files differnew file mode 100644 index 0000000..37faa0f --- /dev/null +++ b/public/css/fonts/KaTeX_Size1-Regular.ttf diff --git a/public/css/fonts/KaTeX_Size1-Regular.woff b/public/css/fonts/KaTeX_Size1-Regular.woff Binary files differnew file mode 100644 index 0000000..0832f7a --- /dev/null +++ b/public/css/fonts/KaTeX_Size1-Regular.woff diff --git a/public/css/fonts/KaTeX_Size1-Regular.woff2 b/public/css/fonts/KaTeX_Size1-Regular.woff2 Binary files differnew file mode 100644 index 0000000..483e7b6 --- /dev/null +++ b/public/css/fonts/KaTeX_Size1-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Size2-Regular.ttf b/public/css/fonts/KaTeX_Size2-Regular.ttf Binary files differnew file mode 100644 index 0000000..cf32623 --- /dev/null +++ b/public/css/fonts/KaTeX_Size2-Regular.ttf diff --git a/public/css/fonts/KaTeX_Size2-Regular.woff b/public/css/fonts/KaTeX_Size2-Regular.woff Binary files differnew file mode 100644 index 0000000..14f6485 --- /dev/null +++ b/public/css/fonts/KaTeX_Size2-Regular.woff diff --git a/public/css/fonts/KaTeX_Size2-Regular.woff2 b/public/css/fonts/KaTeX_Size2-Regular.woff2 Binary files differnew file mode 100644 index 0000000..5ff7060 --- /dev/null +++ b/public/css/fonts/KaTeX_Size2-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Size3-Regular.ttf b/public/css/fonts/KaTeX_Size3-Regular.ttf Binary files differnew file mode 100644 index 0000000..ff7e2b9 --- /dev/null +++ b/public/css/fonts/KaTeX_Size3-Regular.ttf diff --git a/public/css/fonts/KaTeX_Size3-Regular.woff b/public/css/fonts/KaTeX_Size3-Regular.woff Binary files differnew file mode 100644 index 0000000..d3626ce --- /dev/null +++ b/public/css/fonts/KaTeX_Size3-Regular.woff diff --git a/public/css/fonts/KaTeX_Size3-Regular.woff2 b/public/css/fonts/KaTeX_Size3-Regular.woff2 Binary files differnew file mode 100644 index 0000000..e45ca49 --- /dev/null +++ b/public/css/fonts/KaTeX_Size3-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Size4-Regular.ttf b/public/css/fonts/KaTeX_Size4-Regular.ttf Binary files differnew file mode 100644 index 0000000..3034091 --- /dev/null +++ b/public/css/fonts/KaTeX_Size4-Regular.ttf diff --git a/public/css/fonts/KaTeX_Size4-Regular.woff b/public/css/fonts/KaTeX_Size4-Regular.woff Binary files differnew file mode 100644 index 0000000..93c57a6 --- /dev/null +++ b/public/css/fonts/KaTeX_Size4-Regular.woff diff --git a/public/css/fonts/KaTeX_Size4-Regular.woff2 b/public/css/fonts/KaTeX_Size4-Regular.woff2 Binary files differnew file mode 100644 index 0000000..53b65af --- /dev/null +++ b/public/css/fonts/KaTeX_Size4-Regular.woff2 diff --git a/public/css/fonts/KaTeX_Typewriter-Regular.ttf b/public/css/fonts/KaTeX_Typewriter-Regular.ttf Binary files differnew file mode 100644 index 0000000..2fd8529 --- /dev/null +++ b/public/css/fonts/KaTeX_Typewriter-Regular.ttf diff --git a/public/css/fonts/KaTeX_Typewriter-Regular.woff b/public/css/fonts/KaTeX_Typewriter-Regular.woff Binary files differnew file mode 100644 index 0000000..e90fa2b --- /dev/null +++ b/public/css/fonts/KaTeX_Typewriter-Regular.woff diff --git a/public/css/fonts/KaTeX_Typewriter-Regular.woff2 b/public/css/fonts/KaTeX_Typewriter-Regular.woff2 Binary files differnew file mode 100644 index 0000000..e40ab15 --- /dev/null +++ b/public/css/fonts/KaTeX_Typewriter-Regular.woff2 diff --git a/public/css/katex.min.css b/public/css/katex.min.css new file mode 100644 index 0000000..7549d6e --- /dev/null +++ b/public/css/katex.min.css @@ -0,0 +1,1052 @@ +@font-face { + font-family: KaTeX_AMS; + src: url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"), + url(fonts/KaTeX_AMS-Regular.woff) format("woff"), + url(fonts/KaTeX_AMS-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Caligraphic; + src: url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"), + url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"), + url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype"); + font-weight: 700; + font-style: normal; +} +@font-face { + font-family: KaTeX_Caligraphic; + src: url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"), + url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Fraktur; + src: url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"), + url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"), + url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype"); + font-weight: 700; + font-style: normal; +} +@font-face { + font-family: KaTeX_Fraktur; + src: url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"), + url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Main; + src: url(fonts/KaTeX_Main-Bold.woff2) format("woff2"), + url(fonts/KaTeX_Main-Bold.woff) format("woff"), + url(fonts/KaTeX_Main-Bold.ttf) format("truetype"); + font-weight: 700; + font-style: normal; +} +@font-face { + font-family: KaTeX_Main; + src: url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"), + url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"), + url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype"); + font-weight: 700; + font-style: italic; +} +@font-face { + font-family: KaTeX_Main; + src: url(fonts/KaTeX_Main-Italic.woff2) format("woff2"), + url(fonts/KaTeX_Main-Italic.woff) format("woff"), + url(fonts/KaTeX_Main-Italic.ttf) format("truetype"); + font-weight: 400; + font-style: italic; +} +@font-face { + font-family: KaTeX_Main; + src: url(fonts/KaTeX_Main-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Main-Regular.woff) format("woff"), + url(fonts/KaTeX_Main-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Math; + src: url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"), + url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"), + url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype"); + font-weight: 700; + font-style: italic; +} +@font-face { + font-family: KaTeX_Math; + src: url(fonts/KaTeX_Math-Italic.woff2) format("woff2"), + url(fonts/KaTeX_Math-Italic.woff) format("woff"), + url(fonts/KaTeX_Math-Italic.ttf) format("truetype"); + font-weight: 400; + font-style: italic; +} +@font-face { + font-family: "KaTeX_SansSerif"; + src: url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"), + url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"), + url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype"); + font-weight: 700; + font-style: normal; +} +@font-face { + font-family: "KaTeX_SansSerif"; + src: url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"), + url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"), + url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype"); + font-weight: 400; + font-style: italic; +} +@font-face { + font-family: "KaTeX_SansSerif"; + src: url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"), + url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"), + url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Script; + src: url(fonts/KaTeX_Script-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Script-Regular.woff) format("woff"), + url(fonts/KaTeX_Script-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Size1; + src: url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Size1-Regular.woff) format("woff"), + url(fonts/KaTeX_Size1-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Size2; + src: url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Size2-Regular.woff) format("woff"), + url(fonts/KaTeX_Size2-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Size3; + src: url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Size3-Regular.woff) format("woff"), + url(fonts/KaTeX_Size3-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Size4; + src: url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Size4-Regular.woff) format("woff"), + url(fonts/KaTeX_Size4-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Typewriter; + src: url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"), + url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"), + url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype"); + font-weight: 400; + font-style: normal; +} +.katex { + font: normal 1.21em KaTeX_Main, Times New Roman, serif; + line-height: 1.2; + text-indent: 0; + text-rendering: auto; +} +.katex * { + -ms-high-contrast-adjust: none !important; +} +.katex .katex-version:after { + content: "0.10.2"; +} +.katex .katex-mathml { + position: absolute; + clip: rect(1px, 1px, 1px, 1px); + padding: 0; + border: 0; + height: 1px; + width: 1px; + overflow: hidden; +} +.katex .katex-html > .newline { + display: block; +} +.katex .base { + position: relative; + white-space: nowrap; + width: min-content; +} +.katex .base, +.katex .strut { + display: inline-block; +} +.katex .textbf { + font-weight: 700; +} +.katex .textit { + font-style: italic; +} +.katex .textrm { + font-family: KaTeX_Main; +} +.katex .textsf { + font-family: KaTeX_SansSerif; +} +.katex .texttt { + font-family: KaTeX_Typewriter; +} +.katex .mathdefault { + font-family: KaTeX_Math; + font-style: italic; +} +.katex .mathit { + font-family: KaTeX_Main; + font-style: italic; +} +.katex .mathrm { + font-style: normal; +} +.katex .mathbf { + font-family: KaTeX_Main; + font-weight: 700; +} +.katex .boldsymbol { + font-family: KaTeX_Math; + font-weight: 700; + font-style: italic; +} +.katex .amsrm, +.katex .mathbb, +.katex .textbb { + font-family: KaTeX_AMS; +} +.katex .mathcal { + font-family: KaTeX_Caligraphic; +} +.katex .mathfrak, +.katex .textfrak { + font-family: KaTeX_Fraktur; +} +.katex .mathtt { + font-family: KaTeX_Typewriter; +} +.katex .mathscr, +.katex .textscr { + font-family: KaTeX_Script; +} +.katex .mathsf, +.katex .textsf { + font-family: KaTeX_SansSerif; +} +.katex .mathboldsf, +.katex .textboldsf { + font-family: KaTeX_SansSerif; + font-weight: 700; +} +.katex .mathitsf, +.katex .textitsf { + font-family: KaTeX_SansSerif; + font-style: italic; +} +.katex .mainrm { + font-family: KaTeX_Main; + font-style: normal; +} +.katex .vlist-t { + display: inline-table; + table-layout: fixed; +} +.katex .vlist-r { + display: table-row; +} +.katex .vlist { + display: table-cell; + vertical-align: bottom; + position: relative; +} +.katex .vlist > span { + display: block; + height: 0; + position: relative; +} +.katex .vlist > span > span { + display: inline-block; +} +.katex .vlist > span > .pstrut { + overflow: hidden; + width: 0; +} +.katex .vlist-t2 { + margin-right: -2px; +} +.katex .vlist-s { + display: table-cell; + vertical-align: bottom; + font-size: 1px; + width: 2px; + min-width: 2px; +} +.katex .msupsub { + text-align: left; +} +.katex .mfrac > span > span { + text-align: center; +} +.katex .mfrac .frac-line { + display: inline-block; + width: 100%; + border-bottom-style: solid; +} +.katex .hdashline, +.katex .hline, +.katex .mfrac .frac-line, +.katex .overline .overline-line, +.katex .rule, +.katex .underline .underline-line { + min-height: 1px; +} +.katex .mspace { + display: inline-block; +} +.katex .clap, +.katex .llap, +.katex .rlap { + width: 0; + position: relative; +} +.katex .clap > .inner, +.katex .llap > .inner, +.katex .rlap > .inner { + position: absolute; +} +.katex .clap > .fix, +.katex .llap > .fix, +.katex .rlap > .fix { + display: inline-block; +} +.katex .llap > .inner { + right: 0; +} +.katex .clap > .inner, +.katex .rlap > .inner { + left: 0; +} +.katex .clap > .inner > span { + margin-left: -50%; + margin-right: 50%; +} +.katex .rule { + display: inline-block; + border: 0 solid; + position: relative; +} +.katex .hline, +.katex .overline .overline-line, +.katex .underline .underline-line { + display: inline-block; + width: 100%; + border-bottom-style: solid; +} +.katex .hdashline { + display: inline-block; + width: 100%; + border-bottom-style: dashed; +} +.katex .sqrt > .root { + margin-left: 0.27777778em; + margin-right: -0.55555556em; +} +.katex .fontsize-ensurer, +.katex .sizing { + display: inline-block; +} +.katex .fontsize-ensurer.reset-size1.size1, +.katex .sizing.reset-size1.size1 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size1.size2, +.katex .sizing.reset-size1.size2 { + font-size: 1.2em; +} +.katex .fontsize-ensurer.reset-size1.size3, +.katex .sizing.reset-size1.size3 { + font-size: 1.4em; +} +.katex .fontsize-ensurer.reset-size1.size4, +.katex .sizing.reset-size1.size4 { + font-size: 1.6em; +} +.katex .fontsize-ensurer.reset-size1.size5, +.katex .sizing.reset-size1.size5 { + font-size: 1.8em; +} +.katex .fontsize-ensurer.reset-size1.size6, +.katex .sizing.reset-size1.size6 { + font-size: 2em; +} +.katex .fontsize-ensurer.reset-size1.size7, +.katex .sizing.reset-size1.size7 { + font-size: 2.4em; +} +.katex .fontsize-ensurer.reset-size1.size8, +.katex .sizing.reset-size1.size8 { + font-size: 2.88em; +} +.katex .fontsize-ensurer.reset-size1.size9, +.katex .sizing.reset-size1.size9 { + font-size: 3.456em; +} +.katex .fontsize-ensurer.reset-size1.size10, +.katex .sizing.reset-size1.size10 { + font-size: 4.148em; +} +.katex .fontsize-ensurer.reset-size1.size11, +.katex .sizing.reset-size1.size11 { + font-size: 4.976em; +} +.katex .fontsize-ensurer.reset-size2.size1, +.katex .sizing.reset-size2.size1 { + font-size: 0.83333333em; +} +.katex .fontsize-ensurer.reset-size2.size2, +.katex .sizing.reset-size2.size2 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size2.size3, +.katex .sizing.reset-size2.size3 { + font-size: 1.16666667em; +} +.katex .fontsize-ensurer.reset-size2.size4, +.katex .sizing.reset-size2.size4 { + font-size: 1.33333333em; +} +.katex .fontsize-ensurer.reset-size2.size5, +.katex .sizing.reset-size2.size5 { + font-size: 1.5em; +} +.katex .fontsize-ensurer.reset-size2.size6, +.katex .sizing.reset-size2.size6 { + font-size: 1.66666667em; +} +.katex .fontsize-ensurer.reset-size2.size7, +.katex .sizing.reset-size2.size7 { + font-size: 2em; +} +.katex .fontsize-ensurer.reset-size2.size8, +.katex .sizing.reset-size2.size8 { + font-size: 2.4em; +} +.katex .fontsize-ensurer.reset-size2.size9, +.katex .sizing.reset-size2.size9 { + font-size: 2.88em; +} +.katex .fontsize-ensurer.reset-size2.size10, +.katex .sizing.reset-size2.size10 { + font-size: 3.45666667em; +} +.katex .fontsize-ensurer.reset-size2.size11, +.katex .sizing.reset-size2.size11 { + font-size: 4.14666667em; +} +.katex .fontsize-ensurer.reset-size3.size1, +.katex .sizing.reset-size3.size1 { + font-size: 0.71428571em; +} +.katex .fontsize-ensurer.reset-size3.size2, +.katex .sizing.reset-size3.size2 { + font-size: 0.85714286em; +} +.katex .fontsize-ensurer.reset-size3.size3, +.katex .sizing.reset-size3.size3 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size3.size4, +.katex .sizing.reset-size3.size4 { + font-size: 1.14285714em; +} +.katex .fontsize-ensurer.reset-size3.size5, +.katex .sizing.reset-size3.size5 { + font-size: 1.28571429em; +} +.katex .fontsize-ensurer.reset-size3.size6, +.katex .sizing.reset-size3.size6 { + font-size: 1.42857143em; +} +.katex .fontsize-ensurer.reset-size3.size7, +.katex .sizing.reset-size3.size7 { + font-size: 1.71428571em; +} +.katex .fontsize-ensurer.reset-size3.size8, +.katex .sizing.reset-size3.size8 { + font-size: 2.05714286em; +} +.katex .fontsize-ensurer.reset-size3.size9, +.katex .sizing.reset-size3.size9 { + font-size: 2.46857143em; +} +.katex .fontsize-ensurer.reset-size3.size10, +.katex .sizing.reset-size3.size10 { + font-size: 2.96285714em; +} +.katex .fontsize-ensurer.reset-size3.size11, +.katex .sizing.reset-size3.size11 { + font-size: 3.55428571em; +} +.katex .fontsize-ensurer.reset-size4.size1, +.katex .sizing.reset-size4.size1 { + font-size: 0.625em; +} +.katex .fontsize-ensurer.reset-size4.size2, +.katex .sizing.reset-size4.size2 { + font-size: 0.75em; +} +.katex .fontsize-ensurer.reset-size4.size3, +.katex .sizing.reset-size4.size3 { + font-size: 0.875em; +} +.katex .fontsize-ensurer.reset-size4.size4, +.katex .sizing.reset-size4.size4 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size4.size5, +.katex .sizing.reset-size4.size5 { + font-size: 1.125em; +} +.katex .fontsize-ensurer.reset-size4.size6, +.katex .sizing.reset-size4.size6 { + font-size: 1.25em; +} +.katex .fontsize-ensurer.reset-size4.size7, +.katex .sizing.reset-size4.size7 { + font-size: 1.5em; +} +.katex .fontsize-ensurer.reset-size4.size8, +.katex .sizing.reset-size4.size8 { + font-size: 1.8em; +} +.katex .fontsize-ensurer.reset-size4.size9, +.katex .sizing.reset-size4.size9 { + font-size: 2.16em; +} +.katex .fontsize-ensurer.reset-size4.size10, +.katex .sizing.reset-size4.size10 { + font-size: 2.5925em; +} +.katex .fontsize-ensurer.reset-size4.size11, +.katex .sizing.reset-size4.size11 { + font-size: 3.11em; +} +.katex .fontsize-ensurer.reset-size5.size1, +.katex .sizing.reset-size5.size1 { + font-size: 0.55555556em; +} +.katex .fontsize-ensurer.reset-size5.size2, +.katex .sizing.reset-size5.size2 { + font-size: 0.66666667em; +} +.katex .fontsize-ensurer.reset-size5.size3, +.katex .sizing.reset-size5.size3 { + font-size: 0.77777778em; +} +.katex .fontsize-ensurer.reset-size5.size4, +.katex .sizing.reset-size5.size4 { + font-size: 0.88888889em; +} +.katex .fontsize-ensurer.reset-size5.size5, +.katex .sizing.reset-size5.size5 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size5.size6, +.katex .sizing.reset-size5.size6 { + font-size: 1.11111111em; +} +.katex .fontsize-ensurer.reset-size5.size7, +.katex .sizing.reset-size5.size7 { + font-size: 1.33333333em; +} +.katex .fontsize-ensurer.reset-size5.size8, +.katex .sizing.reset-size5.size8 { + font-size: 1.6em; +} +.katex .fontsize-ensurer.reset-size5.size9, +.katex .sizing.reset-size5.size9 { + font-size: 1.92em; +} +.katex .fontsize-ensurer.reset-size5.size10, +.katex .sizing.reset-size5.size10 { + font-size: 2.30444444em; +} +.katex .fontsize-ensurer.reset-size5.size11, +.katex .sizing.reset-size5.size11 { + font-size: 2.76444444em; +} +.katex .fontsize-ensurer.reset-size6.size1, +.katex .sizing.reset-size6.size1 { + font-size: 0.5em; +} +.katex .fontsize-ensurer.reset-size6.size2, +.katex .sizing.reset-size6.size2 { + font-size: 0.6em; +} +.katex .fontsize-ensurer.reset-size6.size3, +.katex .sizing.reset-size6.size3 { + font-size: 0.7em; +} +.katex .fontsize-ensurer.reset-size6.size4, +.katex .sizing.reset-size6.size4 { + font-size: 0.8em; +} +.katex .fontsize-ensurer.reset-size6.size5, +.katex .sizing.reset-size6.size5 { + font-size: 0.9em; +} +.katex .fontsize-ensurer.reset-size6.size6, +.katex .sizing.reset-size6.size6 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size6.size7, +.katex .sizing.reset-size6.size7 { + font-size: 1.2em; +} +.katex .fontsize-ensurer.reset-size6.size8, +.katex .sizing.reset-size6.size8 { + font-size: 1.44em; +} +.katex .fontsize-ensurer.reset-size6.size9, +.katex .sizing.reset-size6.size9 { + font-size: 1.728em; +} +.katex .fontsize-ensurer.reset-size6.size10, +.katex .sizing.reset-size6.size10 { + font-size: 2.074em; +} +.katex .fontsize-ensurer.reset-size6.size11, +.katex .sizing.reset-size6.size11 { + font-size: 2.488em; +} +.katex .fontsize-ensurer.reset-size7.size1, +.katex .sizing.reset-size7.size1 { + font-size: 0.41666667em; +} +.katex .fontsize-ensurer.reset-size7.size2, +.katex .sizing.reset-size7.size2 { + font-size: 0.5em; +} +.katex .fontsize-ensurer.reset-size7.size3, +.katex .sizing.reset-size7.size3 { + font-size: 0.58333333em; +} +.katex .fontsize-ensurer.reset-size7.size4, +.katex .sizing.reset-size7.size4 { + font-size: 0.66666667em; +} +.katex .fontsize-ensurer.reset-size7.size5, +.katex .sizing.reset-size7.size5 { + font-size: 0.75em; +} +.katex .fontsize-ensurer.reset-size7.size6, +.katex .sizing.reset-size7.size6 { + font-size: 0.83333333em; +} +.katex .fontsize-ensurer.reset-size7.size7, +.katex .sizing.reset-size7.size7 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size7.size8, +.katex .sizing.reset-size7.size8 { + font-size: 1.2em; +} +.katex .fontsize-ensurer.reset-size7.size9, +.katex .sizing.reset-size7.size9 { + font-size: 1.44em; +} +.katex .fontsize-ensurer.reset-size7.size10, +.katex .sizing.reset-size7.size10 { + font-size: 1.72833333em; +} +.katex .fontsize-ensurer.reset-size7.size11, +.katex .sizing.reset-size7.size11 { + font-size: 2.07333333em; +} +.katex .fontsize-ensurer.reset-size8.size1, +.katex .sizing.reset-size8.size1 { + font-size: 0.34722222em; +} +.katex .fontsize-ensurer.reset-size8.size2, +.katex .sizing.reset-size8.size2 { + font-size: 0.41666667em; +} +.katex .fontsize-ensurer.reset-size8.size3, +.katex .sizing.reset-size8.size3 { + font-size: 0.48611111em; +} +.katex .fontsize-ensurer.reset-size8.size4, +.katex .sizing.reset-size8.size4 { + font-size: 0.55555556em; +} +.katex .fontsize-ensurer.reset-size8.size5, +.katex .sizing.reset-size8.size5 { + font-size: 0.625em; +} +.katex .fontsize-ensurer.reset-size8.size6, +.katex .sizing.reset-size8.size6 { + font-size: 0.69444444em; +} +.katex .fontsize-ensurer.reset-size8.size7, +.katex .sizing.reset-size8.size7 { + font-size: 0.83333333em; +} +.katex .fontsize-ensurer.reset-size8.size8, +.katex .sizing.reset-size8.size8 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size8.size9, +.katex .sizing.reset-size8.size9 { + font-size: 1.2em; +} +.katex .fontsize-ensurer.reset-size8.size10, +.katex .sizing.reset-size8.size10 { + font-size: 1.44027778em; +} +.katex .fontsize-ensurer.reset-size8.size11, +.katex .sizing.reset-size8.size11 { + font-size: 1.72777778em; +} +.katex .fontsize-ensurer.reset-size9.size1, +.katex .sizing.reset-size9.size1 { + font-size: 0.28935185em; +} +.katex .fontsize-ensurer.reset-size9.size2, +.katex .sizing.reset-size9.size2 { + font-size: 0.34722222em; +} +.katex .fontsize-ensurer.reset-size9.size3, +.katex .sizing.reset-size9.size3 { + font-size: 0.40509259em; +} +.katex .fontsize-ensurer.reset-size9.size4, +.katex .sizing.reset-size9.size4 { + font-size: 0.46296296em; +} +.katex .fontsize-ensurer.reset-size9.size5, +.katex .sizing.reset-size9.size5 { + font-size: 0.52083333em; +} +.katex .fontsize-ensurer.reset-size9.size6, +.katex .sizing.reset-size9.size6 { + font-size: 0.5787037em; +} +.katex .fontsize-ensurer.reset-size9.size7, +.katex .sizing.reset-size9.size7 { + font-size: 0.69444444em; +} +.katex .fontsize-ensurer.reset-size9.size8, +.katex .sizing.reset-size9.size8 { + font-size: 0.83333333em; +} +.katex .fontsize-ensurer.reset-size9.size9, +.katex .sizing.reset-size9.size9 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size9.size10, +.katex .sizing.reset-size9.size10 { + font-size: 1.20023148em; +} +.katex .fontsize-ensurer.reset-size9.size11, +.katex .sizing.reset-size9.size11 { + font-size: 1.43981481em; +} +.katex .fontsize-ensurer.reset-size10.size1, +.katex .sizing.reset-size10.size1 { + font-size: 0.24108004em; +} +.katex .fontsize-ensurer.reset-size10.size2, +.katex .sizing.reset-size10.size2 { + font-size: 0.28929605em; +} +.katex .fontsize-ensurer.reset-size10.size3, +.katex .sizing.reset-size10.size3 { + font-size: 0.33751205em; +} +.katex .fontsize-ensurer.reset-size10.size4, +.katex .sizing.reset-size10.size4 { + font-size: 0.38572806em; +} +.katex .fontsize-ensurer.reset-size10.size5, +.katex .sizing.reset-size10.size5 { + font-size: 0.43394407em; +} +.katex .fontsize-ensurer.reset-size10.size6, +.katex .sizing.reset-size10.size6 { + font-size: 0.48216008em; +} +.katex .fontsize-ensurer.reset-size10.size7, +.katex .sizing.reset-size10.size7 { + font-size: 0.57859209em; +} +.katex .fontsize-ensurer.reset-size10.size8, +.katex .sizing.reset-size10.size8 { + font-size: 0.69431051em; +} +.katex .fontsize-ensurer.reset-size10.size9, +.katex .sizing.reset-size10.size9 { + font-size: 0.83317261em; +} +.katex .fontsize-ensurer.reset-size10.size10, +.katex .sizing.reset-size10.size10 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size10.size11, +.katex .sizing.reset-size10.size11 { + font-size: 1.19961427em; +} +.katex .fontsize-ensurer.reset-size11.size1, +.katex .sizing.reset-size11.size1 { + font-size: 0.20096463em; +} +.katex .fontsize-ensurer.reset-size11.size2, +.katex .sizing.reset-size11.size2 { + font-size: 0.24115756em; +} +.katex .fontsize-ensurer.reset-size11.size3, +.katex .sizing.reset-size11.size3 { + font-size: 0.28135048em; +} +.katex .fontsize-ensurer.reset-size11.size4, +.katex .sizing.reset-size11.size4 { + font-size: 0.32154341em; +} +.katex .fontsize-ensurer.reset-size11.size5, +.katex .sizing.reset-size11.size5 { + font-size: 0.36173633em; +} +.katex .fontsize-ensurer.reset-size11.size6, +.katex .sizing.reset-size11.size6 { + font-size: 0.40192926em; +} +.katex .fontsize-ensurer.reset-size11.size7, +.katex .sizing.reset-size11.size7 { + font-size: 0.48231511em; +} +.katex .fontsize-ensurer.reset-size11.size8, +.katex .sizing.reset-size11.size8 { + font-size: 0.57877814em; +} +.katex .fontsize-ensurer.reset-size11.size9, +.katex .sizing.reset-size11.size9 { + font-size: 0.69453376em; +} +.katex .fontsize-ensurer.reset-size11.size10, +.katex .sizing.reset-size11.size10 { + font-size: 0.83360129em; +} +.katex .fontsize-ensurer.reset-size11.size11, +.katex .sizing.reset-size11.size11 { + font-size: 1em; +} +.katex .delimsizing.size1 { + font-family: KaTeX_Size1; +} +.katex .delimsizing.size2 { + font-family: KaTeX_Size2; +} +.katex .delimsizing.size3 { + font-family: KaTeX_Size3; +} +.katex .delimsizing.size4 { + font-family: KaTeX_Size4; +} +.katex .delimsizing.mult .delim-size1 > span { + font-family: KaTeX_Size1; +} +.katex .delimsizing.mult .delim-size4 > span { + font-family: KaTeX_Size4; +} +.katex .nulldelimiter { + display: inline-block; + width: 0.12em; +} +.katex .delimcenter, +.katex .op-symbol { + position: relative; +} +.katex .op-symbol.small-op { + font-family: KaTeX_Size1; +} +.katex .op-symbol.large-op { + font-family: KaTeX_Size2; +} +.katex .op-limits > .vlist-t { + text-align: center; +} +.katex .accent > .vlist-t { + text-align: center; +} +.katex .accent .accent-body { + position: relative; +} +.katex .accent .accent-body:not(.accent-full) { + width: 0; +} +.katex .overlay { + display: block; +} +.katex .mtable .vertical-separator { + display: inline-block; + margin: 0 -0.025em; + border-right: 0.05em solid; + min-width: 1px; +} +.katex .mtable .vs-dashed { + border-right: 0.05em dashed; +} +.katex .mtable .arraycolsep { + display: inline-block; +} +.katex .mtable .col-align-c > .vlist-t { + text-align: center; +} +.katex .mtable .col-align-l > .vlist-t { + text-align: left; +} +.katex .mtable .col-align-r > .vlist-t { + text-align: right; +} +.katex .svg-align { + text-align: left; +} +.katex svg { + display: block; + position: absolute; + width: 100%; + height: inherit; + fill: currentColor; + stroke: currentColor; + fill-rule: nonzero; + fill-opacity: 1; + stroke-width: 1; + stroke-linecap: butt; + stroke-linejoin: miter; + stroke-miterlimit: 4; + stroke-dasharray: none; + stroke-dashoffset: 0; + stroke-opacity: 1; +} +.katex svg path { + stroke: none; +} +.katex img { + border-style: none; + min-width: 0; + min-height: 0; + max-width: none; + max-height: none; +} +.katex .stretchy { + width: 100%; + display: block; + position: relative; + overflow: hidden; +} +.katex .stretchy:after, +.katex .stretchy:before { + content: ""; +} +.katex .hide-tail { + width: 100%; + position: relative; + overflow: hidden; +} +.katex .halfarrow-left { + position: absolute; + left: 0; + width: 50.2%; + overflow: hidden; +} +.katex .halfarrow-right { + position: absolute; + right: 0; + width: 50.2%; + overflow: hidden; +} +.katex .brace-left { + position: absolute; + left: 0; + width: 25.1%; + overflow: hidden; +} +.katex .brace-center { + position: absolute; + left: 25%; + width: 50%; + overflow: hidden; +} +.katex .brace-right { + position: absolute; + right: 0; + width: 25.1%; + overflow: hidden; +} +.katex .x-arrow-pad { + padding: 0 0.5em; +} +.katex .mover, +.katex .munder, +.katex .x-arrow { + text-align: center; +} +.katex .boxpad { + padding: 0 0.3em; +} +.katex .fbox, +.katex .fcolorbox { + box-sizing: border-box; + border: 0.04em solid; +} +.katex .cancel-pad { + padding: 0 0.2em; +} +.katex .cancel-lap { + margin-left: -0.2em; + margin-right: -0.2em; +} +.katex .sout { + border-bottom-style: solid; + border-bottom-width: 0.08em; +} +.katex-display { + display: block; + margin: 1em 0; + text-align: center; +} +.katex-display > .katex { + display: block; + text-align: center; + white-space: nowrap; +} +.katex-display > .katex > .katex-html { + display: block; + position: relative; +} +.katex-display > .katex > .katex-html > .tag { + position: absolute; + right: 0; +} +.katex-display.leqno > .katex > .katex-html > .tag { + left: 0; + right: auto; +} +.katex-display.fleqn > .katex { + text-align: left; +} diff --git a/public/css/style.css b/public/css/style.css new file mode 100644 index 0000000..d1f1837 --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,229 @@ +body { + color: #222; + background-color: #ffffff; + font-size: 20px; +} + +body, +code { + font-family: "Inconsolata", monospace; +} + +h1, +h2, +h3 { + font-size: inherit; + display: inline; + font-weight: bold; +} + +h2::before { + content: "## "; +} + +h3::before { + content: "### "; +} + +p { + margin: 30px 0; +} + +h1 + p, +h2 + p, +h3 + p { + margin-top: 0; +} + +p.listing { + margin-top: 0; +} + +hr { + margin: 0; + border: none; +} + +hr::after { + content: "---"; + display: block; + text-align: center; +} + +.main { + box-sizing: border-box; + width: 650px; + padding: 30px; + margin: 40px auto; +} + +.blog-title { + border-bottom: 1px solid #ccc; + margin-bottom: 40px; +} + +.article { + margin: 34px 0; + line-height: 1.6; +} + +a, +a:visited { + color: #9d261d; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +a:focus { + background-color: #9d261d; + color: #fff; + outline: none; + text-decoration: none; +} + +.date { + float: right; + color: #767676; + font-style: italic; +} + +.tweet { + float: right; +} + +code { + background-color: #eeeeee; +} + +pre { + border-left: 1px solid #d9d9d9; + position: relative; + left: -20px; + padding-left: 20px; + overflow-x: scroll; +} + +pre code { + background-color: #ffffff; + display: block; +} + +img { + border: 2px solid black; + width: 100%; +} + +.flex { + display: -webkit-flex; + display: -moz-box; + display: -ms-flexbox; + display: flex; + width: 100%; + + flex-flow: row wrap; + -webkit-justify-content: center; + justify-content: center; +} + +.demo { + border: 2px solid #000; + box-sizing: border-box; + margin: 20px 0; + padding: 40px 0; +} + +.flash-item { + animation: flash 8s linear 0s infinite; + -webkit-animation: flash 8s linear 0s infinite; + -moz-animation: flash 8s linear 0s infinite; + -o-animation: flash 8s linear 0s infinite; +} + +.sr-only { + border: 0; + clip: rect(0, 0, 0, 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +@keyframes flash { + 0% { + opacity: 1; + } + 10% { + opacity: 0.1; + } + 20% { + opacity: 1; + } +} +@-webkit-keyframes flash { + 0% { + opacity: 1; + } + 10% { + opacity: 0.1; + } + 20% { + opacity: 1; + } +} +@-moz-keyframes flash { + 0% { + opacity: 1; + } + 10% { + opacity: 0.1; + } + 20% { + opacity: 1; + } +} +@-o-keyframes flash { + 0% { + opacity: 1; + } + 10% { + opacity: 0.1; + } + 20% { + opacity: 1; + } +} + +@media (max-width: 480px) { + body { + font-size: 20px; + line-height: 1.4; + } + + .main { + width: 100%; + padding: 10px; + margin-top: 0; + } + + .article { + margin-top: 30px; + } + + .date { + float: none; + display: block; + } + + .sep { + display: none; + } + + header a { + display: block; + } +} diff --git a/public/css/tomorrow.min.css b/public/css/tomorrow.min.css new file mode 100644 index 0000000..b025a41 --- /dev/null +++ b/public/css/tomorrow.min.css @@ -0,0 +1,75 @@ +.hljs-comment { + color: #8e908c; +} +.hljs-variable, +.hljs-attribute, +.hljs-tag, +.hljs-regexp, +.ruby .hljs-constant, +.xml .hljs-tag .hljs-title, +.xml .hljs-pi, +.xml .hljs-doctype, +.html .hljs-doctype, +.css .hljs-id, +.css .hljs-class, +.css .hljs-pseudo { + color: #c82829; +} +.hljs-number, +.hljs-preprocessor, +.hljs-pragma, +.hljs-built_in, +.hljs-literal, +.hljs-params, +.language-prolog .hljs-symbol, +.hljs-constant { + color: #f5871f; +} +.ruby .hljs-class .hljs-title, +.css .hljs-rule .hljs-attribute { + color: #eab700; +} +.hljs-string, +.hljs-value, +.hljs-inheritance, +.hljs-header, +.hljs-name, +.ruby .hljs-symbol, +.xml .hljs-cdata { + color: #718c00; +} +.hljs-title, +.css .hljs-hexcolor { + color: #3e999f; +} +.hljs-function, +.python .hljs-decorator, +.python .hljs-title, +.ruby .hljs-function .hljs-title, +.ruby .hljs-title .hljs-keyword, +.perl .hljs-sub, +.javascript .hljs-title, +.coffeescript .hljs-title { + color: #4271ae; +} +.hljs-keyword, +.javascript .hljs-function { + color: #8959a8; +} +.hljs { + display: block; + overflow-x: auto; + background: white; + color: #4d4d4c; + padding: 0.5em; + -webkit-text-size-adjust: none; +} +.coffeescript .javascript, +.javascript .xml, +.tex .hljs-formula, +.xml .javascript, +.xml .vbscript, +.xml .css, +.xml .hljs-cdata { + opacity: 0.5; +} diff --git a/public/img/a11y-invite.png b/public/img/a11y-invite.png Binary files differnew file mode 100644 index 0000000..f52ad6f --- /dev/null +++ b/public/img/a11y-invite.png diff --git a/public/img/accessicademy.png b/public/img/accessicademy.png Binary files differnew file mode 100644 index 0000000..c347e27 --- /dev/null +++ b/public/img/accessicademy.png diff --git a/public/img/ama.png b/public/img/ama.png Binary files differnew file mode 100644 index 0000000..4526b20 --- /dev/null +++ b/public/img/ama.png diff --git a/public/img/custom-filters.png b/public/img/custom-filters.png Binary files differnew file mode 100644 index 0000000..b3e7dfe --- /dev/null +++ b/public/img/custom-filters.png diff --git a/public/img/digits.PNG b/public/img/digits.PNG Binary files differnew file mode 100644 index 0000000..655ea07 --- /dev/null +++ b/public/img/digits.PNG diff --git a/public/img/extension-settings.png b/public/img/extension-settings.png Binary files differnew file mode 100644 index 0000000..f2a1a9f --- /dev/null +++ b/public/img/extension-settings.png diff --git a/public/img/github-spam.png b/public/img/github-spam.png Binary files differnew file mode 100644 index 0000000..89a3d49 --- /dev/null +++ b/public/img/github-spam.png diff --git a/public/img/greasemonkey-confirm.png b/public/img/greasemonkey-confirm.png Binary files differnew file mode 100644 index 0000000..b05b5b3 --- /dev/null +++ b/public/img/greasemonkey-confirm.png diff --git a/public/img/greasemonkey.png b/public/img/greasemonkey.png Binary files differnew file mode 100644 index 0000000..b62db8d --- /dev/null +++ b/public/img/greasemonkey.png diff --git a/public/img/spam.png b/public/img/spam.png Binary files differnew file mode 100644 index 0000000..d3992c7 --- /dev/null +++ b/public/img/spam.png diff --git a/public/img/tota11y.png b/public/img/tota11y.png Binary files differnew file mode 100644 index 0000000..d787d89 --- /dev/null +++ b/public/img/tota11y.png diff --git a/public/img/voiceover.png b/public/img/voiceover.png Binary files differnew file mode 100644 index 0000000..afa7ff3 --- /dev/null +++ b/public/img/voiceover.png diff --git a/public/img/window.png b/public/img/window.png Binary files differnew file mode 100644 index 0000000..da10689 --- /dev/null +++ b/public/img/window.png diff --git a/public/js/bowling.js b/public/js/bowling.js new file mode 100644 index 0000000..e65bf13 --- /dev/null +++ b/public/js/bowling.js @@ -0,0 +1,402 @@ +document.addEventListener("DOMContentLoaded", function() { + var graph = document.getElementById("graph") + var stats = document.getElementById("stats") + var scoreboard = document.getElementById("scoreboard") + + function generateEmptyGame() { + var frames = [] + for (var i = 0; i < 9; i++) { + frames.push({ + throws: [null, null], + score: null, + }) + } + + frames.push({ + throws: [null, null, null], + score: null, + }) + + return { + frames: frames, + currentFrame: 0, + isComplete: false, + } + } + + function scoreGame(game) { + var thisFrameScore + for (var i = 0; i < 10; i++) { + if (game.frames[i].throws[0] === null) { + break + } + + if (i === 9) { + var firstThrow = game.frames[i].throws[0] || 0 + var secondThrow = game.frames[i].throws[1] || 0 + var thirdThrow = game.frames[i].throws[2] || 0 + + thisFrameScore = firstThrow + secondThrow + thirdThrow + } else { + // Fetch the next two throws in case we get a mark + var firstBonusThrow = game.frames[i + 1].throws[0] || 0 + var secondBonusThrow + if (firstBonusThrow === 10) { + // If we're in the 9th frame, pick the second throw of + // the next frame as the 10th frame can have multiple + // strikes + if (i === 8) { + secondBonusThrow = game.frames[i + 1].throws[1] || 0 + } else { + secondBonusThrow = game.frames[i + 2].throws[0] || 0 + } + } else { + secondBonusThrow = game.frames[i + 1].throws[1] || 0 + } + + var firstThrow = game.frames[i].throws[0] || 0 + var secondThrow = game.frames[i].throws[1] || 0 + + if (firstThrow === 10) { + thisFrameScore = 10 + firstBonusThrow + secondBonusThrow + } else if (firstThrow + secondThrow === 10) { + thisFrameScore = 10 + firstBonusThrow + } else { + thisFrameScore = firstThrow + secondThrow + } + } + + if (i === 0) { + game.frames[i].score = thisFrameScore + } else { + game.frames[i].score = game.frames[i - 1].score + thisFrameScore + } + } + } + + function generateThrow(game) { + var isNewFrame = game.frames[game.currentFrame].throws[0] === null + + if (isNewFrame) { + var firstThrow = Math.floor(Math.random() * 11) + game.frames[game.currentFrame].throws[0] = firstThrow + + if (firstThrow === 10 && game.currentFrame !== 9) { + game.currentFrame++ + } + } else { + if (game.currentFrame !== 9) { + var lastThrow = game.frames[game.currentFrame].throws[0] + var nextThrow = Math.floor(Math.random() * (10 - lastThrow + 1)) + + game.frames[game.currentFrame].throws[1] = nextThrow + + if (game.currentFrame !== 9) { + game.currentFrame++ + } + } else { + var firstThrow = game.frames[game.currentFrame].throws[0] + var secondThrow = game.frames[game.currentFrame].throws[1] + + if (firstThrow === 10 && secondThrow === null) { + var secondThrow = Math.floor(Math.random() * 11) + game.frames[game.currentFrame].throws[1] = secondThrow + } else if (secondThrow === null) { + var secondThrow = Math.floor(Math.random() * (10 - firstThrow + 1)) + + game.frames[game.currentFrame].throws[1] = secondThrow + + if (firstThrow + secondThrow !== 10) { + game.isComplete = true + } + } else if (firstThrow === 10 && secondThrow === 10) { + var thirdThrow = Math.floor(Math.random() * 11) + game.frames[game.currentFrame].throws[2] = thirdThrow + game.isComplete = true + } else if (firstThrow === 10) { + var thirdThrow = Math.floor(Math.random() * (10 - secondThrow + 1)) + + game.frames[game.currentFrame].throws[2] = thirdThrow + game.isComplete = true + } else if (firstThrow + secondThrow === 10) { + var thirdThrow = Math.floor(Math.random() * 11) + game.frames[game.currentFrame].throws[2] = thirdThrow + game.isComplete = true + } + } + } + } + + function renderScoreBoard(game) { + var frame + scoreboard.innerHTML = "" + + var firstHalf = document.createElement("div") + firstHalf.classList.add("scoreboard-half") + + var secondHalf = document.createElement("div") + secondHalf.classList.add("scoreboard-half") + + for (var i = 0; i < 5; i++) { + frame = game.frames[i] + + firstHalf.appendChild(renderFrame(frame.score, frame.throws, i === 9)) + } + + var mobileSpacer = document.createElement("div") + mobileSpacer.classList.add("mobile-spacer") + firstHalf.appendChild(mobileSpacer) + + for (var i = 5; i < 10; i++) { + frame = game.frames[i] + + secondHalf.appendChild(renderFrame(frame.score, frame.throws, i === 9)) + } + + scoreboard.appendChild(firstHalf) + scoreboard.appendChild(secondHalf) + } + + function throwToString(points) { + if (points === null) { + return " " + } else if (points === 10) { + return "X" + } else if (points === 0) { + return "-" + } else { + return points + "" + } + } + + // Not the 10th though! + function frameToString(throws) { + if (throws[0] === 10) { + return ["X", ""] + } else if (throws[0] + throws[1] === 10) { + return [throwToString(throws[0]), "/"] + } else { + return throws.map(throwToString) + } + } + + function renderFrame(score, throws, isTenth) { + var contents + if (isTenth) { + // 10th frame has weird logic + if (throws === undefined) { + contents = ["", "", ""] + + // Two strikes = XX[third throw] + } else if (throws[0] === 10 && throws[1] === 10) { + contents = [ + throwToString(10), + throwToString(10), + throwToString(throws[2]), + ] + + // X[normal frame] + } else if (throws[0] === 10) { + contents = [throwToString(10)].concat(frameToString(throws.slice(1))) + + // [normal frame][bonus throw] + } else if (throws[0] + throws[1] === 10) { + contents = frameToString(throws.slice(0, 2)).concat([ + throwToString(throws[2]), + ]) + } else { + contents = frameToString(throws) + } + + // Make contents 3 items long... lol + if (contents.length < 3) { + contents.push("") + } + + if (contents.length < 3) { + contents.push("") + } + } else { + contents = frameToString(throws) + + if (contents.length < 2) { + contents.push("") + } + } + + var frame = document.createElement("div") + frame.classList.add("frame") + + contents.forEach(function(formattedThrow) { + var square = document.createElement("div") + square.classList.add("square") + square.innerHTML = formattedThrow + + frame.appendChild(square) + }) + + var scoreDiv = document.createElement("div") + scoreDiv.classList.add("score") + scoreDiv.innerHTML = score + + frame.appendChild(scoreDiv) + + return frame + } + + function renderGraph(graphDiv) { + graphDiv.innerHTML = "" + + var distribution = [] + for (var i = 0; i <= 300; i++) { + distribution[i] = scores[i] || 0 + } + var highestPopulation = Math.max.apply(null, distribution) + + var bar + for (var i = 0; i <= 300; i++) { + bar = document.createElement("div") + bar.classList.add("bar") + bar.style.height = ((scores[i] || 0) / highestPopulation) * 100 + "%" + graphDiv.appendChild(bar) + } + } + + function renderStats(statsDiv) { + var distribution = [] + for (var i = 0; i <= 300; i++) { + distribution[i] = scores[i] || 0 + } + + var numGames = distribution.reduce(function(a, b) { + return a + b + }) + + var allGames = [] + var totalPins = 0 + var minScore, maxScore + + var mode = 0, + modeIndex + + for (var i = 0; i <= 300; i++) { + for (var j = 0; j < distribution[i]; j++) { + allGames.push(i) + totalPins += i + } + + if (distribution[i] > 0) { + maxScore = i + + if (minScore === undefined) { + minScore = i + } + } + + if (distribution[i] > mode) { + mode = distribution[i] + modeIndex = i + } + } + + var mean = Math.floor((totalPins / numGames) * 100) / 100 + + // TODO: Odd/even + var median + if (allGames.length % 2 === 1) { + median = allGames[Math.floor(allGames.length / 2)] + } else { + median = + (allGames[Math.floor(allGames.length / 2)] + + allGames[Math.floor(allGames.length / 2) - 1]) / + 2 + } + + statsDiv.innerHTML = + "<div>" + + [ + '<span class="stats-label">Games:</span><span> ' + numGames + "</span>", + '<span class="stats-label">Min:</span><span> ' + minScore + "</span>", + '<span class="stats-label">Max:</span><span> ' + maxScore + "</span>", + '<span class="stats-label">Mean:</span><span> ' + mean + "</span>", + '<span class="stats-label">Median:</span><span> ' + median + "</span>", + '<span class="stats-label">Mode:</span><span> ' + + modeIndex + + " (" + + mode + + " games)</span>", + ].join("</div><div>") + + "</div>" + } + + var scores = [] + var game = generateEmptyGame() + renderScoreBoard(game) + + var throwButton = document.getElementById("throw") + var gameButton = document.getElementById("game") + var manyGamesButton = document.getElementById("many-games") + + function handleThrowClick(e) { + e.preventDefault() + + if (game.isComplete) { + game = generateEmptyGame() + } + + generateThrow(game) + scoreGame(game) + renderScoreBoard(game) + + if (game.isComplete) { + var score = game.frames[9].score + scores[score] = (scores[score] || 0) + 1 + renderGraph(graph) + renderStats(stats) + } + } + + function simulateGame() { + game = generateEmptyGame() + while (!game.isComplete) { + generateThrow(game) + } + + scoreGame(game) + renderScoreBoard(game) + + var score = game.frames[9].score + scores[score] = (scores[score] || 0) + 1 + renderGraph(graph) + } + + function handleGameClick(e) { + e.preventDefault() + simulateGame() + renderStats(stats) + } + + function handleManyClick(e) { + e.preventDefault() + var simulations = 0 + + ;(function run() { + simulations++ + simulateGame() + renderStats(stats) + + if (simulations < 100) { + setTimeout(run, 5) + } + })() + } + + throwButton.addEventListener("click", handleThrowClick) + throwButton.addEventListener("touchend", handleThrowClick) + + gameButton.addEventListener("click", handleGameClick) + gameButton.addEventListener("touchend", handleGameClick) + + manyGamesButton.addEventListener("click", handleManyClick) + manyGamesButton.addEventListener("touchend", handleManyClick) +}) diff --git a/public/js/color-blindness.js b/public/js/color-blindness.js new file mode 100644 index 0000000..306c98f --- /dev/null +++ b/public/js/color-blindness.js @@ -0,0 +1,30 @@ +var values = { + red: 100, + green: 100, + blue: 100, +} + +function renderLabel(control) { + document.getElementById(control + "-value").innerText = + "(" + values[control] + ")" +} + +function renderFilter() { + var matrix = [ + [values.red / 100, 0, 0, 0, 0].join(","), + [0, values.green / 100, 0, 0, 0].join(","), + [0, 0, values.blue / 100, 0, 0].join(","), + [0, 0, 0, 1, 0].join(","), + ].join("\n") + + document.getElementById("color-matrix").setAttribute("values", matrix) +} + +;["red", "green", "blue"].forEach(function(control) { + document.getElementById(control).addEventListener("input", function(e) { + values[control] = e.target.value + + renderLabel(control) + renderFilter() + }) +}) diff --git a/public/js/demos/clicking.js b/public/js/demos/clicking.js new file mode 100644 index 0000000..4e2e191 --- /dev/null +++ b/public/js/demos/clicking.js @@ -0,0 +1,24 @@ +setInterval(function() { + var examples = [].slice.call(document.querySelectorAll(".a11y-onclick")) + var outputs = [].slice.call( + document.querySelectorAll(".a11y-onclick:not(.no-output) .output") + ) + + examples.forEach(function(el) { + el.classList.add("active") + }) + + outputs.forEach(function(o) { + o.innerHTML = "Clicked!" + }) + + setTimeout(function() { + examples.forEach(function(el) { + el.classList.remove("active") + }) + + outputs.forEach(function(o) { + o.innerHTML = " " + }) + }, 1000) +}, 2500) diff --git a/public/js/demos/hover.js b/public/js/demos/hover.js new file mode 100644 index 0000000..57d9f3c --- /dev/null +++ b/public/js/demos/hover.js @@ -0,0 +1,42 @@ +var highlightIntervals = [ + { + on: [550, 3900], + off: [1400, 4150], + }, + { + on: [1700, 3500], + off: [1900, 3800], + }, + { + on: [2000], + off: [3400], + }, +] + +function highlightSequence() { + var examples = [].slice.call( + document.querySelectorAll(".hover-a11y:not(.no-active)") + ) + + examples.forEach(function(example) { + console.log(example) + var links = [].slice.call(example.querySelectorAll(".button")) + + highlightIntervals.forEach(function(timers, i) { + timers.on.forEach(function(ms) { + setTimeout(function() { + links[i].classList.add("active") + }, ms) + }) + + timers.off.forEach(function(ms) { + setTimeout(function() { + links[i].classList.remove("active") + }, ms) + }) + }) + }) +} + +setInterval(highlightSequence, 6000) +highlightSequence() // call once to start diff --git a/public/js/flasher.js b/public/js/flasher.js new file mode 100644 index 0000000..3c82f28 --- /dev/null +++ b/public/js/flasher.js @@ -0,0 +1,16 @@ +var flashEl = document.querySelector(".flash") +var flashText = flashEl.innerHTML +var flashItems, i + +flashEl.innerHTML = "" +for (var i = 0; i < flashText.length; i++) { + item = document.createElement("span") + item.innerHTML = flashText[i] + item.className = "flash-item" + + // animation delay + item.style.animationDelay = item.style.webkitAnimationDelay = item.style.mozAnimationDelay = item.style.oAnimationDelay = + 1 + 0.1 * i + "s" + + flashEl.appendChild(item) +} diff --git a/public/js/fraction.min.js b/public/js/fraction.min.js new file mode 100644 index 0000000..2b6a66b --- /dev/null +++ b/public/js/fraction.min.js @@ -0,0 +1,18 @@ +/* +Fraction.js v4.0.12 09/09/2015 +http://www.xarg.org/2014/03/rational-numbers-in-javascript/ + +Copyright (c) 2015, Robert Eisele ([email protected]) +Dual licensed under the MIT or GPL Version 2 licenses. +*/ +(function(x){function l(a,b){var c=0,k=1,h=1,e=0,u=0,l=0,p=1,r=1,f=0,g=1,t=1,q=1;if(void 0!==a&&null!==a)if(void 0!==b)c=a,k=b,h=c*k;else switch(typeof a){case "object":"d"in a&&"n"in a?(c=a.n,k=a.d,"s"in a&&(c*=a.s)):0 in a?(c=a[0],1 in a&&(k=a[1])):v();h=c*k;break;case "number":0>a&&(h=a,a=-a);if(0===a%1)c=a;else if(0<a){1<=a&&(r=Math.pow(10,Math.floor(1+Math.log(a)/Math.LN10)),a/=r);for(;1E7>=g&&1E7>=q;)if(c=(f+t)/(g+q),a===c){1E7>=g+q?(c=f+t,k=g+q):q>g?(c=t,k=q):(c=f,k=g);break}else a>c?(f+=t, + g+=q):(t+=f,q+=g),1E7<g?(c=t,k=q):(c=f,k=g);c*=r}else if(isNaN(a)||isNaN(b))k=c=NaN;break;case "string":g=a.match(/\d+|./g);null===g&&v();"-"===g[f]?(h=-1,f++):"+"===g[f]&&f++;if(g.length===f+1)u=n(g[f++],h);else if("."===g[f+1]||"."===g[f]){"."!==g[f]&&(e=n(g[f++],h));f++;if(f+1===g.length||"("===g[f+1]&&")"===g[f+3]||"'"===g[f+1]&&"'"===g[f+3])u=n(g[f],h),p=Math.pow(10,g[f].length),f++;if("("===g[f]&&")"===g[f+2]||"'"===g[f]&&"'"===g[f+2])l=n(g[f+1],h),r=Math.pow(10,g[f+1].length)-1,f+=3}else"/"=== + g[f+1]||":"===g[f+1]?(u=n(g[f],h),p=n(g[f+2],1),f+=3):"/"===g[f+3]&&" "===g[f+1]&&(e=n(g[f],h),u=n(g[f+2],h),p=n(g[f+4],1),f+=5);if(g.length<=f){k=p*r;h=c=l+k*e+r*u;break}default:v()}if(0===k)throw new y;d.s=0>h?-1:1;d.n=Math.abs(c);d.d=Math.abs(k)}function w(a){function b(){var b=Error.apply(this,arguments);b.name=this.name=a;this.stack=b.stack;this.message=b.message}function c(){}c.prototype=Error.prototype;b.prototype=new c;return b}function n(a,b){isNaN(a=parseInt(a,10))&&v();return a*b}function v(){throw new z; + }function p(a,b){if(!a)return b;if(!b)return a;for(;;){a%=b;if(!a)return b;b%=a;if(!b)return a}}function e(a,b){if(!(this instanceof e))return new e(a,b);l(a,b);a=e.REDUCE?p(d.d,d.n):1;this.s=d.s;this.n=d.n/a;this.d=d.d/a}var d={s:1,n:0,d:1},y=e.DivisionByZero=w("DivisionByZero"),z=e.InvalidParameter=w("InvalidParameter");e.REDUCE=1;e.prototype={s:1,n:0,d:1,abs:function(){return new e(this.n,this.d)},neg:function(){return new e(-this.s*this.n,this.d)},add:function(a,b){l(a,b);return new e(this.s* + this.n*d.d+d.s*this.d*d.n,this.d*d.d)},sub:function(a,b){l(a,b);return new e(this.s*this.n*d.d-d.s*this.d*d.n,this.d*d.d)},mul:function(a,b){l(a,b);return new e(this.s*d.s*this.n*d.n,this.d*d.d)},div:function(a,b){l(a,b);return new e(this.s*d.s*this.n*d.d,this.d*d.n)},clone:function(){return new e(this)},mod:function(a,b){if(isNaN(this.n)||isNaN(this.d))return new e(NaN);if(void 0===a)return new e(this.s*this.n%this.d,1);l(a,b);0===d.n&&0===this.d&&e(0,0);return new e(this.s*d.d*this.n%(d.n*this.d), + d.d*this.d)},gcd:function(a,b){l(a,b);return new e(p(d.n,this.n)*p(d.d,this.d),d.d*this.d)},lcm:function(a,b){l(a,b);return 0===d.n&&0===this.n?new e:new e(d.n*this.n,p(d.n,this.n)*p(d.d,this.d))},ceil:function(a){a=Math.pow(10,a||0);return isNaN(this.n)||isNaN(this.d)?new e(NaN):new e(Math.ceil(a*this.s*this.n/this.d),a)},floor:function(a){a=Math.pow(10,a||0);return isNaN(this.n)||isNaN(this.d)?new e(NaN):new e(Math.floor(a*this.s*this.n/this.d),a)},round:function(a){a=Math.pow(10,a||0);return isNaN(this.n)|| + isNaN(this.d)?new e(NaN):new e(Math.round(a*this.s*this.n/this.d),a)},inverse:function(){return new e(this.s*this.d,this.n)},pow:function(a){return 0>a?new e(Math.pow(this.s*this.d,-a),Math.pow(this.n,-a)):new e(Math.pow(this.s*this.n,a),Math.pow(this.d,a))},equals:function(a,b){l(a,b);return this.s*this.n*d.d===d.s*d.n*this.d},compare:function(a,b){l(a,b);var c=this.s*this.n*d.d-d.s*d.n*this.d;return(0<c)-(0>c)},simplify:function(a){function b(a){return 1===a.length?new e(a[0]):b(a.slice(1)).inverse().add(a[0])} + if(isNaN(this.n)||isNaN(this.d))return this;var c=this.abs().toContinued();a=a||.001;for(var k=0;k<c.length;k++){var h=b(c.slice(0,k+1));if(h.sub(this.abs()).abs().valueOf()<a)return h.mul(this.s)}return this},divisible:function(a,b){l(a,b);return!(!(d.n*this.d)||this.n*d.d%(d.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(a){var b,c="",k=this.n,e=this.d;0>this.s&&(c+="-");1===e?c+=k:(a&&0<(b=Math.floor(k/e))&&(c=c+b+" ",k%=e),c=c+k+"/",c+=e);return c},toLatex:function(a){var b, + c="",e=this.n,d=this.d;0>this.s&&(c+="-");1===d?c+=e:(a&&0<(b=Math.floor(e/d))&&(c+=b,e%=d),c=c+"\\frac{"+e+"}{"+d,c+="}");return c},toContinued:function(){var a=this.n,b=this.d,c=[];if(isNaN(this.n)||isNaN(this.d))return c;do{c.push(Math.floor(a/b));var e=a%b;a=b;b=e}while(1!==a);return c},toString:function(a){var b=this.n,c=this.d;if(isNaN(b)||isNaN(c))return"NaN";if(!e.REDUCE){var d=p(b,c);b/=d;c/=d}a:{for(d=c;0===d%2;d/=2);for(;0===d%5;d/=5);if(1===d)d=0;else{for(var h=10%d,m=1;1!==h;m++)if(h= + 10*h%d,2E3<m){d=0;break a}d=m}}a:{h=1;m=10;for(var l=d,n=1;0<l;m=m*m%c,l>>=1)l&1&&(n=n*m%c);m=n;for(l=0;300>l;l++){if(h===m){m=l;break a}h=10*h%c;m=10*m%c}m=0}h=-1===this.s?"-":"";h+=b/c|0;(b=b%c*10)&&(h+=".");if(d){for(a=m;a--;)h+=b/c|0,b%=c,b*=10;h+="(";for(a=d;a--;)h+=b/c|0,b%=c,b*=10;h+=")"}else for(a=a||15;b&&a--;)h+=b/c|0,b%=c,b*=10;return h}};"function"===typeof define&&define.amd?define([],function(){return e}):"object"===typeof exports?(Object.defineProperty(exports,"__esModule",{value:!0}), + e["default"]=e,e.Fraction=e,module.exports=e):x.Fraction=e})(this); |