├── webroot ├── fonts │ ├── entypo.eot │ ├── entypo.ttf │ ├── entypo.woff │ ├── entypo.woff2 │ ├── perfect.ttf │ ├── perfect.woff │ ├── perfect.woff2 │ ├── sinkinsans │ │ ├── SinkinSans-200XLight-webfont.eot │ │ ├── SinkinSans-200XLight-webfont.ttf │ │ ├── SinkinSans-300Light-webfont.eot │ │ ├── SinkinSans-300Light-webfont.ttf │ │ ├── SinkinSans-300Light-webfont.woff │ │ ├── SinkinSans-400Italic-webfont.eot │ │ ├── SinkinSans-400Italic-webfont.ttf │ │ ├── SinkinSans-500Medium-webfont.eot │ │ ├── SinkinSans-500Medium-webfont.ttf │ │ ├── SinkinSans-200XLight-webfont.woff │ │ ├── SinkinSans-400Italic-webfont.woff │ │ ├── SinkinSans-400Regular-webfont.eot │ │ ├── SinkinSans-400Regular-webfont.ttf │ │ ├── SinkinSans-400Regular-webfont.woff │ │ ├── SinkinSans-500Medium-webfont.woff │ │ ├── SinkinSans-500MediumItalic-webfont.eot │ │ ├── SinkinSans-500MediumItalic-webfont.ttf │ │ └── SinkinSans-500MediumItalic-webfont.woff │ └── perfect.svg ├── images │ ├── logo.jpg │ ├── pic01.jpg │ ├── pic02.jpg │ ├── pic03.jpg │ ├── pic04.jpg │ ├── pic05.jpg │ ├── pic06.jpg │ ├── pic07.jpg │ ├── pic08.jpg │ ├── pic09.jpg │ ├── pic10.jpg │ ├── pic11.jpg │ ├── pic12.jpg │ ├── avatar.jpg │ ├── perfect-logo.png │ ├── perfect-logo-2-0.png │ ├── perfect-logo.svg │ └── perfect-logo-2-0.svg ├── assets │ ├── fonts │ │ ├── entypo.eot │ │ ├── entypo.ttf │ │ ├── entypo.woff │ │ ├── entypo.woff2 │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ └── sinkinsans │ │ │ ├── SinkinSans-200XLight-webfont.eot │ │ │ ├── SinkinSans-200XLight-webfont.ttf │ │ │ ├── SinkinSans-300Light-webfont.eot │ │ │ ├── SinkinSans-300Light-webfont.ttf │ │ │ ├── SinkinSans-300Light-webfont.woff │ │ │ ├── SinkinSans-400Italic-webfont.eot │ │ │ ├── SinkinSans-400Italic-webfont.ttf │ │ │ ├── SinkinSans-500Medium-webfont.eot │ │ │ ├── SinkinSans-500Medium-webfont.ttf │ │ │ ├── SinkinSans-200XLight-webfont.woff │ │ │ ├── SinkinSans-400Italic-webfont.woff │ │ │ ├── SinkinSans-400Regular-webfont.eot │ │ │ ├── SinkinSans-400Regular-webfont.ttf │ │ │ ├── SinkinSans-400Regular-webfont.woff │ │ │ ├── SinkinSans-500Medium-webfont.woff │ │ │ ├── SinkinSans-500MediumItalic-webfont.eot │ │ │ ├── SinkinSans-500MediumItalic-webfont.ttf │ │ │ └── SinkinSans-500MediumItalic-webfont.woff │ ├── css │ │ ├── old │ │ │ ├── styles │ │ │ │ ├── admin.css │ │ │ │ └── jumbotron-narrow.css │ │ │ ├── ie8.css │ │ │ └── ie9.css │ │ └── theme.css │ ├── sass │ │ ├── layout │ │ │ ├── _main.scss │ │ │ ├── _footer.scss │ │ │ ├── _sidebar.scss │ │ │ ├── _wrapper.scss │ │ │ ├── _intro.scss │ │ │ ├── _menu.scss │ │ │ └── _header.scss │ │ ├── components │ │ │ ├── _blurb.scss │ │ │ ├── _icon.scss │ │ │ ├── _box.scss │ │ │ ├── _section.scss │ │ │ ├── _author.scss │ │ │ ├── _image.scss │ │ │ ├── _table.scss │ │ │ ├── _mini-post.scss │ │ │ ├── _button.scss │ │ │ ├── _form.scss │ │ │ ├── _list.scss │ │ │ └── _post.scss │ │ ├── libs │ │ │ ├── _functions.scss │ │ │ ├── _vars.scss │ │ │ └── _mixins.scss │ │ ├── base │ │ │ ├── _page.scss │ │ │ └── _typography.scss │ │ ├── main.scss │ │ ├── ie8.scss │ │ └── ie9.scss │ └── js │ │ ├── old │ │ ├── ie │ │ │ ├── html5shiv.js │ │ │ └── respond.min.js │ │ ├── main.js │ │ └── skel.min.js │ │ ├── js │ │ ├── prefixfree.min.js │ │ └── modernizr-2.6.2.min.js │ │ ├── scripts.js │ │ └── plugins.min.js └── templates │ ├── footer.mustache │ ├── index.mustache │ └── header.mustache ├── .gitignore ├── Package.swift ├── Sources ├── PageHandlers.swift ├── Handlers.swift ├── Config.swift └── main.swift ├── config └── ApplicationConfiguration.json.default.json ├── README.md └── LICENSE.md /webroot/fonts/entypo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/entypo.eot -------------------------------------------------------------------------------- /webroot/fonts/entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/entypo.ttf -------------------------------------------------------------------------------- /webroot/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/logo.jpg -------------------------------------------------------------------------------- /webroot/images/pic01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic01.jpg -------------------------------------------------------------------------------- /webroot/images/pic02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic02.jpg -------------------------------------------------------------------------------- /webroot/images/pic03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic03.jpg -------------------------------------------------------------------------------- /webroot/images/pic04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic04.jpg -------------------------------------------------------------------------------- /webroot/images/pic05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic05.jpg -------------------------------------------------------------------------------- /webroot/images/pic06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic06.jpg -------------------------------------------------------------------------------- /webroot/images/pic07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic07.jpg -------------------------------------------------------------------------------- /webroot/images/pic08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic08.jpg -------------------------------------------------------------------------------- /webroot/images/pic09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic09.jpg -------------------------------------------------------------------------------- /webroot/images/pic10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic10.jpg -------------------------------------------------------------------------------- /webroot/images/pic11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic11.jpg -------------------------------------------------------------------------------- /webroot/images/pic12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/pic12.jpg -------------------------------------------------------------------------------- /webroot/fonts/entypo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/entypo.woff -------------------------------------------------------------------------------- /webroot/fonts/entypo.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/entypo.woff2 -------------------------------------------------------------------------------- /webroot/fonts/perfect.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/perfect.ttf -------------------------------------------------------------------------------- /webroot/fonts/perfect.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/perfect.woff -------------------------------------------------------------------------------- /webroot/fonts/perfect.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/perfect.woff2 -------------------------------------------------------------------------------- /webroot/images/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/avatar.jpg -------------------------------------------------------------------------------- /webroot/assets/fonts/entypo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/entypo.eot -------------------------------------------------------------------------------- /webroot/assets/fonts/entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/entypo.ttf -------------------------------------------------------------------------------- /webroot/assets/fonts/entypo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/entypo.woff -------------------------------------------------------------------------------- /webroot/images/perfect-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/perfect-logo.png -------------------------------------------------------------------------------- /webroot/assets/fonts/entypo.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/entypo.woff2 -------------------------------------------------------------------------------- /webroot/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /webroot/images/perfect-logo-2-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/images/perfect-logo-2-0.png -------------------------------------------------------------------------------- /webroot/assets/css/old/styles/admin.css: -------------------------------------------------------------------------------- 1 | .header { 2 | width: 100%; 3 | background-color: #EEE; 4 | } 5 | 6 | .admin-mb { 7 | margin-bottom: 20px; 8 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | /config/ApplicationConfiguration.json 6 | /log.log 7 | Package.swift.orig 8 | Package.pins 9 | -------------------------------------------------------------------------------- /webroot/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /webroot/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /webroot/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-200XLight-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-200XLight-webfont.eot -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-200XLight-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-200XLight-webfont.ttf -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-300Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-300Light-webfont.eot -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-300Light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-300Light-webfont.ttf -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-300Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-300Light-webfont.woff -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-400Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-400Italic-webfont.eot -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-400Italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-400Italic-webfont.ttf -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-500Medium-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-500Medium-webfont.eot -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-500Medium-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-500Medium-webfont.ttf -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-200XLight-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-200XLight-webfont.woff -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-400Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-400Italic-webfont.woff -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-400Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-400Regular-webfont.eot -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-400Regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-400Regular-webfont.ttf -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-400Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-400Regular-webfont.woff -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-500Medium-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-500Medium-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.eot -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.ttf -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.eot -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.ttf -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.eot -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.ttf -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.eot -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.ttf -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.eot -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.ttf -------------------------------------------------------------------------------- /webroot/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.eot -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.ttf -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.eot -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.ttf -------------------------------------------------------------------------------- /webroot/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerfectExamples/Perfect-Authentication-Demo/HEAD/webroot/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.woff -------------------------------------------------------------------------------- /webroot/assets/sass/layout/_main.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Main */ 8 | 9 | #main { 10 | @include vendor('flex-grow', '1'); 11 | -ms-flex: 1; 12 | width: 100%; 13 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_blurb.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Blurb */ 8 | 9 | .blurb { 10 | h2 { 11 | font-size: 0.8em; 12 | margin: 0 0 (_size(element-margin) * 0.75) 0; 13 | } 14 | 15 | h3 { 16 | font-size: 0.7em; 17 | } 18 | 19 | p { 20 | font-size: 0.9em; 21 | } 22 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_icon.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Icon */ 8 | 9 | .icon { 10 | @include icon; 11 | border-bottom: none; 12 | position: relative; 13 | 14 | > .label { 15 | display: none; 16 | } 17 | 18 | &.prefix { 19 | } 20 | 21 | &.suffix { 22 | &:before { 23 | float: right; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /webroot/templates/footer.mustache: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /webroot/assets/sass/components/_box.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Box */ 8 | 9 | .box { 10 | border: solid 1px _palette(border); 11 | margin-bottom: _size(element-margin); 12 | padding: 1.5em; 13 | 14 | > :last-child, 15 | > :last-child > :last-child, 16 | > :last-child > :last-child > :last-child { 17 | margin-bottom: 0; 18 | } 19 | 20 | &.alt { 21 | border: 0; 22 | border-radius: 0; 23 | padding: 0; 24 | } 25 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_section.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Section/Article */ 8 | 9 | section, article { 10 | &.special { 11 | text-align: center; 12 | } 13 | } 14 | 15 | header { 16 | p { 17 | font-family: _font(family-heading); 18 | font-size: 0.7em; 19 | font-weight: _font(weight-heading); 20 | letter-spacing: _font(kerning-heading); 21 | line-height: 2.5; 22 | margin-top: -1em; 23 | text-transform: uppercase; 24 | } 25 | } -------------------------------------------------------------------------------- /webroot/assets/sass/layout/_footer.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Footer */ 8 | 9 | #footer { 10 | .icons { 11 | color: _palette(fg-light); 12 | } 13 | 14 | .copyright { 15 | color: _palette(fg-light); 16 | font-family: _font(family-heading); 17 | font-size: 0.5em; 18 | font-weight: _font(weight-heading); 19 | letter-spacing: _font(kerning-heading); 20 | text-transform: uppercase; 21 | } 22 | 23 | body.single & { 24 | text-align: center; 25 | } 26 | } -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // Generated automatically by Perfect Assistant Application 2 | // Date: 2017-02-02 21:30:36 +0000 3 | import PackageDescription 4 | let package = Package( 5 | name: "Perfect-Authentication-Demo", 6 | targets: [], 7 | dependencies: [ 8 | .Package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", majorVersion: 2), 9 | .Package(url: "https://github.com/PerfectlySoft/Perfect-Mustache.git", majorVersion: 2), 10 | .Package(url: "https://github.com/iamjono/JSONConfig.git", majorVersion: 1), 11 | .Package(url: "https://github.com/PerfectlySoft/Perfect-OAuth2.git", majorVersion: 1), 12 | .Package(url: "https://github.com/PerfectlySoft/Perfect-RequestLogger.git", majorVersion: 1), 13 | ] 14 | ) 15 | -------------------------------------------------------------------------------- /webroot/assets/sass/layout/_sidebar.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Sidebar */ 8 | 9 | #sidebar { 10 | margin-right: _size(section-spacing); 11 | min-width: 22em; 12 | width: 22em; 13 | 14 | > * { 15 | border-top: solid 1px _palette(border); 16 | margin: _size(section-spacing) 0 0 0; 17 | padding: _size(section-spacing) 0 0 0; 18 | } 19 | 20 | > :first-child { 21 | border-top: 0; 22 | margin-top: 0; 23 | padding-top: 0; 24 | } 25 | 26 | @include breakpoint(large) { 27 | border-top: solid 1px _palette(border); 28 | margin: _size(section-spacing) 0 0 0; 29 | min-width: 0; 30 | padding: _size(section-spacing) 0 0 0; 31 | width: 100%; 32 | } 33 | } -------------------------------------------------------------------------------- /webroot/assets/sass/libs/_functions.scss: -------------------------------------------------------------------------------- 1 | /// Gets a duration value. 2 | /// @param {string} $keys Key(s). 3 | /// @return {string} Value. 4 | @function _duration($keys...) { 5 | @return val($duration, $keys...); 6 | } 7 | 8 | /// Gets a font value. 9 | /// @param {string} $keys Key(s). 10 | /// @return {string} Value. 11 | @function _font($keys...) { 12 | @return val($font, $keys...); 13 | } 14 | 15 | /// Gets a misc value. 16 | /// @param {string} $keys Key(s). 17 | /// @return {string} Value. 18 | @function _misc($keys...) { 19 | @return val($misc, $keys...); 20 | } 21 | 22 | /// Gets a palette value. 23 | /// @param {string} $keys Key(s). 24 | /// @return {string} Value. 25 | @function _palette($keys...) { 26 | @return val($palette, $keys...); 27 | } 28 | 29 | /// Gets a size value. 30 | /// @param {string} $keys Key(s). 31 | /// @return {string} Value. 32 | @function _size($keys...) { 33 | @return val($size, $keys...); 34 | } -------------------------------------------------------------------------------- /webroot/assets/sass/layout/_wrapper.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Wrapper */ 8 | 9 | #wrapper { 10 | @include vendor('display', 'flex'); 11 | @include vendor('flex-direction', 'row-reverse'); 12 | @include vendor('transition', 'opacity #{_duration(menu)} ease'); 13 | margin: 0 auto; 14 | max-width: 100%; 15 | opacity: 1; 16 | padding: (_size(section-spacing) * 1.5); 17 | width: 90em; 18 | 19 | body.is-menu-visible & { 20 | opacity: 0.15; 21 | } 22 | 23 | @include breakpoint(xlarge) { 24 | padding: _size(section-spacing); 25 | } 26 | 27 | @include breakpoint(large) { 28 | display: block; 29 | } 30 | 31 | @include breakpoint(small) { 32 | padding: _size(section-spacing-small); 33 | } 34 | 35 | body.single & { 36 | display: block; 37 | } 38 | } -------------------------------------------------------------------------------- /webroot/templates/index.mustache: -------------------------------------------------------------------------------- 1 | {{>header}} 2 |
3 |
4 |

SessionID: {{sessionID}}

5 |

Login Type: {{loginType}}

6 |

UserID: {{userID}}

7 |

UserName: {{firstName}} {{lastName}}

8 |

Picture: {{picture}}

9 |

AccessToken: {{accessToken}}

10 | 11 | {{^authenticated}} 12 |

13 | Log in with Facebook 14 | Log in with GitHub 15 | Log in with Google 16 | Log in with Linkedin 17 | Log in with Slack 18 | Log in with SalesForce 19 |

20 | {{/authenticated}} 21 | 22 | {{#authenticated}} 23 |

24 | Log out 25 |

26 | {{/authenticated}} 27 | 28 |
29 |
30 | {{>footer}} 31 | -------------------------------------------------------------------------------- /webroot/assets/sass/base/_page.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Basic */ 8 | 9 | // MSIE: Required for IEMobile. 10 | @-ms-viewport { 11 | width: device-width; 12 | } 13 | 14 | // MSIE: Prevents scrollbar from overlapping content. 15 | body { 16 | -ms-overflow-style: scrollbar; 17 | } 18 | 19 | // Ensures page width is always >=320px. 20 | @include breakpoint(xsmall) { 21 | html, body { 22 | min-width: 320px; 23 | } 24 | } 25 | 26 | body { 27 | background: _palette(bg-alt); 28 | 29 | // Prevents animation/transition "flicker" on page load. 30 | // Automatically added/removed by js/main.js. 31 | &.is-loading { 32 | *, *:before, *:after { 33 | @include vendor('animation', 'none !important'); 34 | @include vendor('transition', 'none !important'); 35 | } 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_author.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Author */ 8 | 9 | .author { 10 | @include vendor('display', 'flex'); 11 | @include vendor('flex-direction', 'row'); 12 | @include vendor('align-items', 'center'); 13 | @include vendor('justify-content', 'flex-end'); 14 | border-bottom: 0; 15 | font-family: _font(family-heading); 16 | font-size: 0.6em; 17 | font-weight: _font(weight-heading); 18 | letter-spacing: _font(kerning-heading); 19 | text-transform: uppercase; 20 | white-space: nowrap; 21 | 22 | .name { 23 | @include vendor('transition', 'border-bottom-color #{_duration(transition)} ease'); 24 | border-bottom: dotted 1px _palette(border-alt); 25 | display: block; 26 | margin: 0 1.5em 0 0; 27 | } 28 | 29 | img { 30 | border-radius: 100%; 31 | display: block; 32 | width: 4em; 33 | } 34 | 35 | &:hover { 36 | .name { 37 | border-bottom-color: transparent; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /webroot/assets/sass/libs/_vars.scss: -------------------------------------------------------------------------------- 1 | // Misc. 2 | $misc: ( 3 | z-index-base: 10000 4 | ); 5 | 6 | // Duration. 7 | $duration: ( 8 | menu: 0.5s, 9 | transition: 0.2s 10 | ); 11 | 12 | // Size. 13 | $size: ( 14 | element-height: 2.75em, 15 | element-margin: 2em, 16 | section-spacing: 3em, 17 | section-spacing-small: 1.5em, 18 | menu: 25em 19 | ); 20 | 21 | // Font. 22 | $font: ( 23 | family: ('Source Sans Pro', Helvetica, sans-serif), 24 | family-fixed: ('Courier New', monospace), 25 | family-heading: ('Raleway', Helvetica, sans-serif), 26 | weight: 400, 27 | weight-bold: 700, 28 | weight-heading: 400, 29 | weight-heading-bold: 800, 30 | weight-heading-extrabold: 900, 31 | kerning-heading: 0.25em 32 | ); 33 | 34 | // Palette. 35 | $palette: ( 36 | bg: #ffffff, 37 | bg-alt: #f4f4f4, 38 | fg: #646464, 39 | fg-bold: #3c3b3b, 40 | fg-light: #aaaaaa, 41 | border: rgba(160,160,160,0.3), 42 | border-bg: rgba(160,160,160,0.075), 43 | border-alt: rgba(160,160,160,0.65), 44 | accent: #2ebaae 45 | ); -------------------------------------------------------------------------------- /Sources/PageHandlers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PageHandlers.swift 3 | // Perfect-Authentication 4 | // 5 | // Created by Jonathan Guthrie on 2017-01-18. 6 | // 7 | // 8 | 9 | import PerfectMustache 10 | import PerfectHTTP 11 | 12 | public struct MustacheHandler: MustachePageHandler { 13 | var context: [String: Any] 14 | public func extendValuesForResponse(context contxt: MustacheWebEvaluationContext, collector: MustacheEvaluationOutputCollector) { 15 | contxt.extendValues(with: context) 16 | do { 17 | contxt.webResponse.setHeader(.contentType, value: "text/html") 18 | try contxt.requestCompleted(withCollector: collector) 19 | } catch { 20 | let response = contxt.webResponse 21 | response.status = .internalServerError 22 | response.appendBody(string: "\(error)") 23 | response.completed() 24 | } 25 | } 26 | 27 | public init(context: [String: Any] = [String: Any]()) { 28 | self.context = context 29 | } 30 | } 31 | 32 | 33 | extension HTTPResponse { 34 | public func render(template: String, context: [String: Any] = [String: Any]()) { 35 | mustacheRequest(request: self.request, response: self, handler: MustacheHandler(context: context), templatePath: request.documentRoot + "/\(template).mustache") 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /config/ApplicationConfiguration.json.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "facebookAppID": "---", 3 | "facebookSecret": "---", 4 | "facebookEndpointAfterAuth": "http://localhost:8181/auth/response/facebook", 5 | "facebookRedirectAfterAuth":"http://localhost:8181/", 6 | 7 | "githubKey": "---", 8 | "githubSecret": "---", 9 | "githubEndpointAfterAuth": "http://localhost:8181/auth/response/github", 10 | "githubRedirectAfterAuth":"http://localhost:8181/", 11 | 12 | "googleKey": "---", 13 | "googleSecret": "---", 14 | "googleEndpointAfterAuth": "http://localhost:8181/auth/response/google", 15 | "googleRedirectAfterAuth":"http://localhost:8181/", 16 | 17 | "linkedinKey": "---", 18 | "linkedinSecret": "---", 19 | "linkedinEndpointAfterAuth": "http://localhost:8181/auth/response/linkedin", 20 | "linkedinRedirectAfterAuth":"http://localhost:8181/", 21 | 22 | "slackKey": "---", 23 | "slackSecret": "---", 24 | "slackEndpointAfterAuth": "http://localhost:8181/auth/response/slack", 25 | "slackRedirectAfterAuth":"http://localhost:8181/", 26 | 27 | "salesforceKey": "---", 28 | "salesforceSecret": "---", 29 | "salesforceEndpointAfterAuth": "http://localhost:8181/auth/response/salesforce", 30 | "salesforceRedirectAfterAuth":"http://localhost:8181/" 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /webroot/assets/css/old/ie8.css: -------------------------------------------------------------------------------- 1 | /* 2 | Future Imperfect by HTML5 UP 3 | html5up.net | @ajlkn 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Button */ 8 | 9 | input[type="submit"], 10 | input[type="reset"], 11 | input[type="button"], 12 | button, 13 | .button { 14 | border: solid 1px #dedede; 15 | } 16 | 17 | /* Form */ 18 | 19 | input[type="text"], 20 | input[type="password"], 21 | input[type="email"], 22 | input[type="tel"], 23 | select, 24 | textarea { 25 | border: solid 1px #dedede; 26 | } 27 | 28 | /* Post */ 29 | 30 | .post { 31 | border: solid 1px #dedede; 32 | } 33 | 34 | .post > header { 35 | border-bottom: solid 1px #dedede; 36 | } 37 | 38 | /* Mini Post */ 39 | 40 | .mini-post { 41 | border: solid 1px #dedede; 42 | } 43 | 44 | /* Header */ 45 | 46 | #header { 47 | border-bottom: solid 1px #dedede; 48 | } 49 | 50 | #header .links { 51 | border-left: solid 1px #dedede; 52 | } 53 | 54 | #header .main ul li { 55 | border-left: solid 1px #dedede; 56 | } 57 | 58 | /* Sidebar */ 59 | 60 | #sidebar > * { 61 | border-top: solid 1px #dedede; 62 | } 63 | 64 | /* Menu */ 65 | 66 | #menu { 67 | border-left: solid 1px #dedede; 68 | } 69 | 70 | #menu > * { 71 | border-top: solid 1px #dedede; 72 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_image.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Image */ 8 | 9 | .image { 10 | border: 0; 11 | display: inline-block; 12 | position: relative; 13 | 14 | img { 15 | display: block; 16 | } 17 | 18 | &.left, 19 | &.right { 20 | max-width: 40%; 21 | 22 | img { 23 | width: 100%; 24 | } 25 | } 26 | 27 | &.left { 28 | float: left; 29 | padding: 0 1.5em 1em 0; 30 | top: 0.25em; 31 | } 32 | 33 | &.right { 34 | float: right; 35 | padding: 0 0 1em 1.5em; 36 | top: 0.25em; 37 | } 38 | 39 | &.fit { 40 | display: block; 41 | margin: 0 0 _size(element-margin) 0; 42 | width: 100%; 43 | 44 | img { 45 | width: 100%; 46 | } 47 | } 48 | 49 | &.featured { 50 | display: block; 51 | margin: 0 0 _size(section-spacing) 0; 52 | width: 100%; 53 | 54 | img { 55 | width: 100%; 56 | } 57 | 58 | @include breakpoint(small) { 59 | margin: 0 0 _size(section-spacing-small) 0; 60 | } 61 | } 62 | 63 | &.main { 64 | display: block; 65 | margin: 0 0 (_size(element-margin) * 1.5) 0; 66 | width: 100%; 67 | 68 | img { 69 | width: 100%; 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /webroot/assets/sass/main.scss: -------------------------------------------------------------------------------- 1 | @import 'libs/vars'; 2 | @import 'libs/functions'; 3 | @import 'libs/mixins'; 4 | @import 'libs/skel'; 5 | @import 'font-awesome.min.css'; 6 | @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Raleway:400,800,900'); 7 | 8 | /* 9 | Future Imperfect by HTML5 UP 10 | html5up.net | @ajlkn 11 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 12 | */ 13 | 14 | @include skel-breakpoints(( 15 | xlarge: '(max-width: 1680px)', 16 | large: '(max-width: 1280px)', 17 | medium: '(max-width: 980px)', 18 | small: '(max-width: 736px)', 19 | xsmall: '(max-width: 480px)' 20 | )); 21 | 22 | @include skel-layout(( 23 | reset: 'full', 24 | boxModel: 'border', 25 | grid: ( gutters: 1em ) 26 | )); 27 | 28 | // Base. 29 | 30 | @import 'base/page'; 31 | @import 'base/typography'; 32 | 33 | // Component. 34 | 35 | @import 'components/author'; 36 | @import 'components/blurb'; 37 | @import 'components/box'; 38 | @import 'components/button'; 39 | @import 'components/form'; 40 | @import 'components/icon'; 41 | @import 'components/image'; 42 | @import 'components/list'; 43 | @import 'components/mini-post'; 44 | @import 'components/post'; 45 | @import 'components/section'; 46 | @import 'components/table'; 47 | 48 | // Layout. 49 | 50 | @import 'layout/header'; 51 | @import 'layout/wrapper'; 52 | @import 'layout/main'; 53 | @import 'layout/sidebar'; 54 | @import 'layout/intro'; 55 | @import 'layout/footer'; 56 | @import 'layout/menu'; -------------------------------------------------------------------------------- /webroot/assets/sass/ie8.scss: -------------------------------------------------------------------------------- 1 | @import 'libs/vars'; 2 | @import 'libs/functions'; 3 | @import 'libs/mixins'; 4 | @import 'libs/skel'; 5 | 6 | /* 7 | Future Imperfect by HTML5 UP 8 | html5up.net | @ajlkn 9 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 10 | */ 11 | 12 | $palette-border: #dedede; 13 | 14 | /* Button */ 15 | 16 | input[type="submit"], 17 | input[type="reset"], 18 | input[type="button"], 19 | button, 20 | .button { 21 | border: solid 1px $palette-border; 22 | } 23 | 24 | /* Form */ 25 | 26 | input[type="text"], 27 | input[type="password"], 28 | input[type="email"], 29 | input[type="tel"], 30 | select, 31 | textarea { 32 | border: solid 1px $palette-border; 33 | } 34 | 35 | /* Post */ 36 | 37 | .post { 38 | border: solid 1px $palette-border; 39 | 40 | > header { 41 | border-bottom: solid 1px $palette-border; 42 | } 43 | } 44 | 45 | /* Mini Post */ 46 | 47 | .mini-post { 48 | border: solid 1px $palette-border; 49 | } 50 | 51 | /* Header */ 52 | 53 | #header { 54 | border-bottom: solid 1px $palette-border; 55 | 56 | .links { 57 | border-left: solid 1px $palette-border; 58 | } 59 | 60 | .main { 61 | ul { 62 | li { 63 | border-left: solid 1px $palette-border; 64 | } 65 | } 66 | } 67 | } 68 | 69 | /* Sidebar */ 70 | 71 | #sidebar { 72 | > * { 73 | border-top: solid 1px $palette-border; 74 | } 75 | } 76 | 77 | /* Menu */ 78 | 79 | #menu { 80 | border-left: solid 1px $palette-border; 81 | 82 | > * { 83 | border-top: solid 1px $palette-border; 84 | } 85 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_table.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Table */ 8 | 9 | .table-wrapper { 10 | -webkit-overflow-scrolling: touch; 11 | overflow-x: auto; 12 | } 13 | 14 | table { 15 | margin: 0 0 _size(element-margin) 0; 16 | width: 100%; 17 | 18 | tbody { 19 | tr { 20 | border: solid 1px _palette(border); 21 | border-left: 0; 22 | border-right: 0; 23 | 24 | &:nth-child(2n + 1) { 25 | background-color: _palette(border-bg); 26 | } 27 | } 28 | } 29 | 30 | td { 31 | padding: 0.75em 0.75em; 32 | } 33 | 34 | th { 35 | color: _palette(fg-bold); 36 | font-size: 0.9em; 37 | font-weight: _font(weight-bold); 38 | padding: 0 0.75em 0.75em 0.75em; 39 | text-align: left; 40 | } 41 | 42 | thead { 43 | border-bottom: solid 2px _palette(border); 44 | } 45 | 46 | tfoot { 47 | border-top: solid 2px _palette(border); 48 | } 49 | 50 | &.alt { 51 | border-collapse: separate; 52 | 53 | tbody { 54 | tr { 55 | td { 56 | border: solid 1px _palette(border); 57 | border-left-width: 0; 58 | border-top-width: 0; 59 | 60 | &:first-child { 61 | border-left-width: 1px; 62 | } 63 | } 64 | 65 | &:first-child { 66 | td { 67 | border-top-width: 1px; 68 | } 69 | } 70 | } 71 | } 72 | 73 | thead { 74 | border-bottom: 0; 75 | } 76 | 77 | tfoot { 78 | border-top: 0; 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /webroot/templates/header.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Perfect Authentication 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
30 | 46 |
47 | -------------------------------------------------------------------------------- /webroot/assets/css/old/styles/jumbotron-narrow.css: -------------------------------------------------------------------------------- 1 | /* Space out content a bit */ 2 | body { 3 | padding-top: 20px; 4 | padding-bottom: 20px; 5 | } 6 | 7 | /* Everything but the jumbotron gets side spacing for mobile first views */ 8 | .header, 9 | .marketing, 10 | .footer { 11 | padding-right: 15px; 12 | padding-left: 15px; 13 | } 14 | 15 | /* Custom page header */ 16 | .header { 17 | padding-bottom: 20px; 18 | border-bottom: 1px solid #e5e5e5; 19 | } 20 | /* Make the masthead heading the same height as the navigation */ 21 | .header h3 { 22 | margin-top: 0; 23 | margin-bottom: 0; 24 | line-height: 40px; 25 | } 26 | 27 | /* Custom page footer */ 28 | .footer { 29 | padding-top: 19px; 30 | color: #777; 31 | border-top: 1px solid #e5e5e5; 32 | } 33 | 34 | /* Customize container */ 35 | @media (min-width: 768px) { 36 | .container { 37 | max-width: 730px; 38 | } 39 | } 40 | .container-narrow > hr { 41 | margin: 30px 0; 42 | } 43 | 44 | /* Main marketing message and sign up button */ 45 | .jumbotron { 46 | text-align: center; 47 | border-bottom: 1px solid #e5e5e5; 48 | } 49 | .jumbotron .btn { 50 | padding: 14px 24px; 51 | font-size: 21px; 52 | } 53 | 54 | /* Supporting marketing content */ 55 | .marketing { 56 | margin: 40px 0; 57 | } 58 | .marketing p + h4 { 59 | margin-top: 28px; 60 | } 61 | 62 | /* Responsive: Portrait tablets and up */ 63 | @media screen and (min-width: 768px) { 64 | /* Remove the padding we set earlier */ 65 | .header, 66 | .marketing, 67 | .footer { 68 | padding-right: 0; 69 | padding-left: 0; 70 | } 71 | /* Space out the masthead */ 72 | .header { 73 | margin-bottom: 30px; 74 | } 75 | /* Remove the bottom border on the jumbotron for visual effect */ 76 | .jumbotron { 77 | border-bottom: 0; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Sources/Handlers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Handlers.swift 3 | // Perfect-Authentication 4 | // 5 | // Created by Jonathan Guthrie on 2017-01-23. 6 | // 7 | // 8 | 9 | import PerfectHTTP 10 | import OAuth2 11 | import PerfectSession 12 | 13 | class Handlers { 14 | 15 | static func main(data: [String:Any]) throws -> RequestHandler { 16 | return { 17 | request, response in 18 | var context: [String : Any] = ["sessionID": request.session?.token ?? ""] 19 | 20 | if let i = request.session?.userid, !i.isEmpty { context["authenticated"] = true } 21 | 22 | if let i = request.session?.userid { context["userID"] = i } 23 | if let i = request.session?.data["loginType"] { context["loginType"] = i } 24 | if let i = request.session?.data["accessToken"] { context["accessToken"] = i } 25 | if let i = request.session?.data["firstName"] { context["firstName"] = i } 26 | if let i = request.session?.data["lastName"] { context["lastName"] = i } 27 | if let i = request.session?.data["picture"] { context["picture"] = i } 28 | 29 | response.render(template: "templates/index", context: context) 30 | } 31 | } 32 | 33 | static func cont(data: [String:Any]) throws -> RequestHandler { 34 | return { 35 | request, response in 36 | var context: [String : Any] = ["sessionID": request.session?.token ?? ""] 37 | 38 | if let i = request.session?.userid, !i.isEmpty { context["authenticated"] = true } 39 | 40 | response.render(template: "templates/index", context: context) 41 | } 42 | } 43 | 44 | 45 | public static func logout(data: [String:Any]) throws -> RequestHandler { 46 | return { 47 | request, response in 48 | if let _ = request.session?.token { 49 | MemorySessions.destroy(request, response) 50 | request.session = PerfectSession() // wipe clean 51 | response.request.session = PerfectSession() // wipe clean 52 | } 53 | response.redirect(path: "/") 54 | } 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /webroot/assets/sass/libs/_mixins.scss: -------------------------------------------------------------------------------- 1 | /// Makes an element's :before pseudoelement a FontAwesome icon. 2 | /// @param {string} $content Optional content value to use. 3 | /// @param {string} $where Optional pseudoelement to target (before or after). 4 | @mixin icon($content: false, $where: before) { 5 | 6 | text-decoration: none; 7 | 8 | &:#{$where} { 9 | 10 | @if $content { 11 | content: $content; 12 | } 13 | 14 | -moz-osx-font-smoothing: grayscale; 15 | -webkit-font-smoothing: antialiased; 16 | font-family: FontAwesome; 17 | font-style: normal; 18 | font-weight: normal; 19 | text-transform: none !important; 20 | 21 | } 22 | 23 | } 24 | 25 | /// Applies padding to an element, taking the current element-margin value into account. 26 | /// @param {mixed} $tb Top/bottom padding. 27 | /// @param {mixed} $lr Left/right padding. 28 | /// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left) 29 | /// @param {bool} $important If true, adds !important. 30 | @mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) { 31 | 32 | @if $important { 33 | $important: '!important'; 34 | } 35 | 36 | padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max(0.1em, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important}; 37 | 38 | } 39 | 40 | /// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp). 41 | /// @param {string} $svg SVG data URL. 42 | /// @return {string} Encoded SVG data URL. 43 | @function svg-url($svg) { 44 | 45 | $svg: str-replace($svg, '"', '\''); 46 | $svg: str-replace($svg, '<', '%3C'); 47 | $svg: str-replace($svg, '>', '%3E'); 48 | $svg: str-replace($svg, '&', '%26'); 49 | $svg: str-replace($svg, '#', '%23'); 50 | $svg: str-replace($svg, '{', '%7B'); 51 | $svg: str-replace($svg, '}', '%7D'); 52 | $svg: str-replace($svg, ';', '%3B'); 53 | 54 | @return url("data:image/svg+xml;charset=utf8,#{$svg}"); 55 | 56 | } -------------------------------------------------------------------------------- /webroot/assets/sass/layout/_intro.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Intro */ 8 | 9 | #intro { 10 | .logo { 11 | border-bottom: 0; 12 | display: inline-block; 13 | margin: 0 0 (_size(element-margin) * 0.5) 0; 14 | overflow: hidden; 15 | position: relative; 16 | width: 4em; 17 | 18 | &:before { 19 | background-image: svg-url(''); 20 | background-position: top left; 21 | background-repeat: no-repeat; 22 | background-size: 100% 100%; 23 | content: ''; 24 | display: block; 25 | height: 100%; 26 | left: 0; 27 | position: absolute; 28 | top: 0; 29 | width: 100%; 30 | } 31 | 32 | img { 33 | display: block; 34 | margin-left: -0.25em; 35 | width: 4.5em; 36 | } 37 | } 38 | 39 | header { 40 | h2 { 41 | font-size: 2em; 42 | font-weight: _font(weight-heading-extrabold); 43 | } 44 | 45 | p { 46 | font-size: 0.8em; 47 | } 48 | } 49 | 50 | @include breakpoint(large) { 51 | margin: 0 0 _size(section-spacing) 0; 52 | text-align: center; 53 | 54 | header { 55 | h2 { 56 | font-size: 2em; 57 | } 58 | 59 | p { 60 | font-size: 0.7em; 61 | } 62 | } 63 | } 64 | 65 | @include breakpoint(small) { 66 | margin: 0 0 _size(section-spacing-small) 0; 67 | padding: 1.25em 0; 68 | 69 | > :last-child { 70 | margin-bottom: 0; 71 | } 72 | 73 | .logo { 74 | margin: 0 0 (_size(element-margin) * 0.25) 0; 75 | } 76 | 77 | header { 78 | h2 { 79 | font-size: 1.25em; 80 | } 81 | 82 | > :last-child { 83 | margin-bottom: 0; 84 | } 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_mini-post.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Mini Post */ 8 | 9 | .mini-post { 10 | @include vendor('display', 'flex'); 11 | @include vendor('flex-direction', 'column-reverse'); 12 | background: _palette(bg); 13 | border: solid 1px _palette(border); 14 | margin: 0 0 _size(element-margin) 0; 15 | 16 | .image { 17 | overflow: hidden; 18 | width: 100%; 19 | 20 | img { 21 | @include vendor('transition', 'transform #{_duration(transition)} ease-out'); 22 | width: 100%; 23 | } 24 | 25 | &:hover { 26 | img { 27 | @include vendor('transform', 'scale(1.05)'); 28 | } 29 | } 30 | } 31 | 32 | header { 33 | @include padding(1.25em, 1.25em, (0, 3em, 0, 0)); 34 | min-height: 4em; 35 | position: relative; 36 | @include vendor('flex-grow', '1'); 37 | 38 | h3 { 39 | font-size: 0.7em; 40 | } 41 | 42 | .published { 43 | display: block; 44 | font-family: _font(family-heading); 45 | font-size: 0.6em; 46 | font-weight: _font(weight-heading); 47 | letter-spacing: _font(kerning-heading); 48 | margin: -0.625em 0 (_size(element-margin) * 0.85) 0; 49 | text-transform: uppercase; 50 | } 51 | 52 | .author { 53 | position: absolute; 54 | right: 2em; 55 | top: 2em; 56 | } 57 | } 58 | } 59 | 60 | .mini-posts { 61 | margin: 0 0 _size(element-margin) 0; 62 | 63 | @include breakpoint(large) { 64 | @include vendor('display', 'flex'); 65 | @include vendor('flex-wrap', 'wrap'); 66 | width: calc(100% + #{_size(element-margin)}); 67 | 68 | > * { 69 | margin: _size(element-margin) _size(element-margin) 0 0; 70 | width: calc(50% - #{_size(element-margin)}); 71 | } 72 | 73 | > :nth-child(-n + 2) { 74 | margin-top: 0; 75 | } 76 | } 77 | 78 | @include breakpoint(xsmall) { 79 | display: block; 80 | width: 100%; 81 | 82 | > * { 83 | margin: 0 0 _size(element-margin) 0; 84 | width: 100%; 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_button.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Button */ 8 | 9 | input[type="submit"], 10 | input[type="reset"], 11 | input[type="button"], 12 | button, 13 | .button { 14 | @include vendor('appearance', 'none'); 15 | @include vendor('transition', ( 16 | 'background-color #{_duration(transition)} ease', 17 | 'box-shadow #{_duration(transition)} ease', 18 | 'color #{_duration(transition)} ease' 19 | )); 20 | background-color: transparent; 21 | border: 0; 22 | box-shadow: inset 0 0 0 1px _palette(border); 23 | color: _palette(fg-bold) !important; 24 | cursor: pointer; 25 | display: inline-block; 26 | font-family: _font(family-heading); 27 | font-size: 0.6em; 28 | font-weight: _font(weight-heading-bold); 29 | height: _size(element-height) * 1.75; 30 | letter-spacing: _font(kerning-heading); 31 | line-height: _size(element-height) * 1.75; 32 | padding: 0 2.5em; 33 | text-align: center; 34 | text-decoration: none; 35 | text-transform: uppercase; 36 | white-space: nowrap; 37 | 38 | &:hover { 39 | box-shadow: inset 0 0 0 1px _palette(accent); 40 | color: _palette(accent) !important; 41 | 42 | &:active { 43 | background-color: transparentize(_palette(accent), 0.95); 44 | } 45 | } 46 | 47 | &:before, &:after { 48 | color: _palette(fg-light); 49 | position: relative; 50 | } 51 | 52 | &:before { 53 | left: -1em; 54 | padding: 0 0 0 0.75em; 55 | } 56 | 57 | &:after { 58 | left: 1em; 59 | padding: 0 0.75em 0 0; 60 | } 61 | 62 | &.fit { 63 | display: block; 64 | margin: 0 0 (_size(element-margin) * 0.5) 0; 65 | width: 100%; 66 | } 67 | 68 | &.big { 69 | font-size: 0.7em; 70 | padding: 0 3em; 71 | } 72 | 73 | &.small { 74 | font-size: 0.5em; 75 | } 76 | 77 | &.disabled, 78 | &:disabled { 79 | @include vendor('pointer-events', 'none'); 80 | color: _palette(border) !important; 81 | 82 | &:before { 83 | color: _palette(border) !important; 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /webroot/assets/css/old/ie9.css: -------------------------------------------------------------------------------- 1 | /* 2 | Future Imperfect by HTML5 UP 3 | html5up.net | @ajlkn 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* List */ 8 | 9 | ul.posts article:after { 10 | clear: both; 11 | content: ''; 12 | display: block; 13 | } 14 | 15 | ul.posts article .image { 16 | display: table-cell; 17 | vertical-align: top; 18 | } 19 | 20 | ul.posts article header { 21 | display: table-cell; 22 | padding-right: 1em; 23 | vertical-align: top; 24 | } 25 | 26 | /* Author */ 27 | 28 | .author .name { 29 | display: inline-block; 30 | vertical-align: middle; 31 | } 32 | 33 | .author img { 34 | display: inline-block; 35 | vertical-align: middle; 36 | } 37 | 38 | /* Post */ 39 | 40 | .post:after { 41 | clear: both; 42 | content: ''; 43 | display: block; 44 | } 45 | 46 | .post > header:after { 47 | clear: both; 48 | content: ''; 49 | display: block; 50 | } 51 | 52 | .post > header .title { 53 | display: table-cell; 54 | vertical-align: top; 55 | width: 65%; 56 | } 57 | 58 | .post > header .meta { 59 | display: table-cell; 60 | vertical-align: top; 61 | width: 30%; 62 | } 63 | 64 | .post > footer:after { 65 | clear: both; 66 | content: ''; 67 | display: block; 68 | } 69 | 70 | .post > footer .actions { 71 | display: inline-block; 72 | } 73 | 74 | .post > footer .stats { 75 | display: inline-block; 76 | margin-left: 2em; 77 | } 78 | 79 | /* Mini Post */ 80 | 81 | .mini-post .image { 82 | display: block; 83 | } 84 | 85 | /* Header */ 86 | 87 | #header:after { 88 | clear: both; 89 | content: ''; 90 | display: block; 91 | } 92 | 93 | #header h1 { 94 | float: left; 95 | } 96 | 97 | #header .links { 98 | float: left; 99 | } 100 | 101 | #header .main { 102 | position: absolute; 103 | right: 0; 104 | top: 0; 105 | } 106 | 107 | /* Wrapper */ 108 | 109 | /* Sidebar */ 110 | 111 | #sidebar { 112 | display: table-cell; 113 | margin-right: 0; 114 | padding-right: 3em; 115 | vertical-align: top; 116 | } 117 | 118 | /* Main */ 119 | 120 | #main { 121 | display: table-cell; 122 | vertical-align: top; 123 | } -------------------------------------------------------------------------------- /webroot/assets/js/old/ie/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); 8 | for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d * { 30 | border-top: solid 1px _palette(border); 31 | padding: _size(section-spacing); 32 | 33 | > :last-child { 34 | margin-bottom: 0; 35 | } 36 | } 37 | 38 | > :first-child { 39 | border-top: 0; 40 | } 41 | 42 | .links { 43 | list-style: none; 44 | padding: 0; 45 | 46 | > li { 47 | border: 0; 48 | border-top: dotted 1px _palette(border); 49 | margin: 1.5em 0 0 0; 50 | padding: 1.5em 0 0 0; 51 | 52 | a { 53 | display: block; 54 | border-bottom: 0; 55 | 56 | h3 { 57 | @include vendor('transition', 'color #{_duration(transition)} ease'); 58 | font-size: 0.7em; 59 | } 60 | 61 | p { 62 | font-family: _font(family-heading); 63 | font-size: 0.6em; 64 | font-weight: _font(weight-heading); 65 | letter-spacing: _font(kerning-heading); 66 | letter-spacing: _size(letter-spacing-alt); 67 | margin-bottom: 0; 68 | text-decoration: none; 69 | text-transform: uppercase; 70 | } 71 | 72 | &:hover { 73 | h3 { 74 | color: _palette(accent); 75 | } 76 | } 77 | } 78 | 79 | &:first-child { 80 | border-top: 0; 81 | margin-top: 0; 82 | padding-top: 0; 83 | } 84 | } 85 | } 86 | 87 | body.is-menu-visible & { 88 | @include vendor('transform', 'translateX(0)'); 89 | visibility: visible; 90 | } 91 | 92 | @include breakpoint(small) { 93 | > * { 94 | padding: _size(section-spacing-small); 95 | } 96 | } 97 | } -------------------------------------------------------------------------------- /Sources/Config.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Config.swift 3 | // Perfect-Authentication 4 | // 5 | // Created by Jonathan Guthrie on 2017-01-23. 6 | // 7 | // 8 | 9 | import PerfectLib 10 | import JSONConfig 11 | import OAuth2 12 | 13 | 14 | struct AppCredentials { 15 | var clientid = "" 16 | var clientsecret = "" 17 | } 18 | 19 | func config() { 20 | if let configData = JSONConfig(name: "./config/ApplicationConfiguration.json") { 21 | if let dict = configData.getValues() { 22 | 23 | if let i = dict["facebookAppID"] { FacebookConfig.appid = i as! String } 24 | if let i = dict["facebookSecret"] { FacebookConfig.secret = i as! String } 25 | if let i = dict["facebookEndpointAfterAuth"] { FacebookConfig.endpointAfterAuth = i as! String } 26 | if let i = dict["facebookRedirectAfterAuth"] { FacebookConfig.redirectAfterAuth = i as! String } 27 | 28 | if let i = dict["githubKey"] { GitHubConfig.appid = i as! String } 29 | if let i = dict["githubSecret"] { GitHubConfig.secret = i as! String } 30 | if let i = dict["githubEndpointAfterAuth"] { GitHubConfig.endpointAfterAuth = i as! String } 31 | if let i = dict["githubRedirectAfterAuth"] { GitHubConfig.redirectAfterAuth = i as! String } 32 | 33 | if let i = dict["googleKey"] { GoogleConfig.appid = i as! String } 34 | if let i = dict["googleSecret"] { GoogleConfig.secret = i as! String } 35 | if let i = dict["googleEndpointAfterAuth"] { GoogleConfig.endpointAfterAuth = i as! String } 36 | if let i = dict["googleRedirectAfterAuth"] { GoogleConfig.redirectAfterAuth = i as! String } 37 | 38 | if let i = dict["linkedinKey"] { LinkedinConfig.appid = i as! String } 39 | if let i = dict["linkedinSecret"] { LinkedinConfig.secret = i as! String } 40 | if let i = dict["linkedinEndpointAfterAuth"] { LinkedinConfig.endpointAfterAuth = i as! String } 41 | if let i = dict["linkedinRedirectAfterAuth"] { LinkedinConfig.redirectAfterAuth = i as! String } 42 | 43 | if let i = dict["slackKey"] { SlackConfig.appid = i as! String } 44 | if let i = dict["slackSecret"] { SlackConfig.secret = i as! String } 45 | if let i = dict["slackEndpointAfterAuth"] { SlackConfig.endpointAfterAuth = i as! String } 46 | if let i = dict["slackRedirectAfterAuth"] { SlackConfig.redirectAfterAuth = i as! String } 47 | 48 | if let i = dict["salesforceKey"] { SalesForceConfig.appid = i as! String } 49 | if let i = dict["salesforceSecret"] { SalesForceConfig.secret = i as! String } 50 | if let i = dict["salesforceEndpointAfterAuth"] { SalesForceConfig.endpointAfterAuth = i as! String } 51 | if let i = dict["salesforceRedirectAfterAuth"] { SalesForceConfig.redirectAfterAuth = i as! String } 52 | 53 | } 54 | } else { 55 | print("Unable to get Configuration") 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /webroot/assets/sass/ie9.scss: -------------------------------------------------------------------------------- 1 | @import 'libs/vars'; 2 | @import 'libs/functions'; 3 | @import 'libs/mixins'; 4 | @import 'libs/skel'; 5 | 6 | /* 7 | Future Imperfect by HTML5 UP 8 | html5up.net | @ajlkn 9 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 10 | */ 11 | 12 | /* List */ 13 | 14 | ul { 15 | &.posts { 16 | article { 17 | &:after { 18 | clear: both; 19 | content: ''; 20 | display: block; 21 | } 22 | 23 | .image { 24 | display: table-cell; 25 | vertical-align: top; 26 | } 27 | 28 | header { 29 | display: table-cell; 30 | padding-right: 1em; 31 | vertical-align: top; 32 | } 33 | } 34 | } 35 | } 36 | 37 | /* Author */ 38 | 39 | .author { 40 | .name { 41 | display: inline-block; 42 | vertical-align: middle; 43 | } 44 | 45 | img { 46 | display: inline-block; 47 | vertical-align: middle; 48 | } 49 | } 50 | 51 | /* Post */ 52 | 53 | .post { 54 | &:after { 55 | clear: both; 56 | content: ''; 57 | display: block; 58 | } 59 | 60 | > header { 61 | &:after { 62 | clear: both; 63 | content: ''; 64 | display: block; 65 | } 66 | 67 | .title { 68 | display: table-cell; 69 | vertical-align: top; 70 | width: 65%; 71 | } 72 | 73 | .meta { 74 | display: table-cell; 75 | vertical-align: top; 76 | width: 30%; 77 | } 78 | } 79 | 80 | > footer { 81 | &:after { 82 | clear: both; 83 | content: ''; 84 | display: block; 85 | } 86 | 87 | .actions { 88 | display: inline-block; 89 | } 90 | 91 | .stats { 92 | display: inline-block; 93 | margin-left: 2em; 94 | } 95 | } 96 | } 97 | 98 | /* Mini Post */ 99 | 100 | .mini-post { 101 | .image { 102 | display: block; 103 | } 104 | } 105 | 106 | /* Header */ 107 | 108 | #header { 109 | &:after { 110 | clear: both; 111 | content: ''; 112 | display: block; 113 | } 114 | 115 | h1 { 116 | float: left; 117 | } 118 | 119 | .links { 120 | float: left; 121 | } 122 | 123 | .main { 124 | position: absolute; 125 | right: 0; 126 | top: 0; 127 | } 128 | } 129 | 130 | /* Wrapper */ 131 | 132 | #wrapper { 133 | } 134 | 135 | /* Sidebar */ 136 | 137 | #sidebar { 138 | display: table-cell; 139 | margin-right: 0; 140 | padding-right: _size(section-spacing); 141 | vertical-align: top; 142 | } 143 | 144 | /* Main */ 145 | 146 | #main { 147 | display: table-cell; 148 | vertical-align: top; 149 | } -------------------------------------------------------------------------------- /webroot/assets/js/old/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | Future Imperfect by HTML5 UP 3 | html5up.net | @ajlkn 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | (function($) { 8 | 9 | skel.breakpoints({ 10 | xlarge: '(max-width: 1680px)', 11 | large: '(max-width: 1280px)', 12 | medium: '(max-width: 980px)', 13 | small: '(max-width: 736px)', 14 | xsmall: '(max-width: 480px)' 15 | }); 16 | 17 | $(function() { 18 | 19 | var $window = $(window), 20 | $body = $('body'), 21 | $menu = $('#menu'), 22 | $sidebar = $('#sidebar'), 23 | $main = $('#main'); 24 | 25 | // Disable animations/transitions until the page has loaded. 26 | $body.addClass('is-loading'); 27 | 28 | $window.on('load', function() { 29 | window.setTimeout(function() { 30 | $body.removeClass('is-loading'); 31 | }, 100); 32 | }); 33 | 34 | // Fix: Placeholder polyfill. 35 | $('form').placeholder(); 36 | 37 | // Prioritize "important" elements on medium. 38 | skel.on('+medium -medium', function() { 39 | $.prioritize( 40 | '.important\\28 medium\\29', 41 | skel.breakpoint('medium').active 42 | ); 43 | }); 44 | 45 | // IE<=9: Reverse order of main and sidebar. 46 | if (skel.vars.IEVersion <= 9) 47 | $main.insertAfter($sidebar); 48 | 49 | // Menu. 50 | $menu 51 | .appendTo($body) 52 | .panel({ 53 | delay: 500, 54 | hideOnClick: true, 55 | hideOnSwipe: true, 56 | resetScroll: true, 57 | resetForms: true, 58 | side: 'right', 59 | target: $body, 60 | visibleClass: 'is-menu-visible' 61 | }); 62 | 63 | // Search (header). 64 | var $search = $('#search'), 65 | $search_input = $search.find('input'); 66 | 67 | $body 68 | .on('click', '[href="#search"]', function(event) { 69 | 70 | event.preventDefault(); 71 | 72 | // Not visible? 73 | if (!$search.hasClass('visible')) { 74 | 75 | // Reset form. 76 | $search[0].reset(); 77 | 78 | // Show. 79 | $search.addClass('visible'); 80 | 81 | // Focus input. 82 | $search_input.focus(); 83 | 84 | } 85 | 86 | }); 87 | 88 | $search_input 89 | .on('keydown', function(event) { 90 | 91 | if (event.keyCode == 27) 92 | $search_input.blur(); 93 | 94 | }) 95 | .on('blur', function() { 96 | window.setTimeout(function() { 97 | $search.removeClass('visible'); 98 | }, 100); 99 | }); 100 | 101 | // Intro. 102 | var $intro = $('#intro'); 103 | 104 | // Move to main on <=large, back to sidebar on >large. 105 | skel 106 | .on('+large', function() { 107 | $intro.prependTo($main); 108 | }) 109 | .on('-large', function() { 110 | $intro.prependTo($sidebar); 111 | }); 112 | 113 | }); 114 | 115 | })(jQuery); -------------------------------------------------------------------------------- /webroot/assets/sass/base/_typography.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Type */ 8 | 9 | body, input, select, textarea { 10 | color: _palette(fg); 11 | font-family: _font(family); 12 | font-size: 14pt; 13 | font-weight: _font(weight); 14 | line-height: 1.75; 15 | 16 | @include breakpoint(xlarge) { 17 | font-size: 12pt; 18 | } 19 | 20 | @include breakpoint(large) { 21 | font-size: 12pt; 22 | } 23 | 24 | @include breakpoint(medium) { 25 | font-size: 12pt; 26 | } 27 | 28 | @include breakpoint(small) { 29 | font-size: 12pt; 30 | } 31 | 32 | @include breakpoint(xsmall) { 33 | font-size: 12pt; 34 | } 35 | } 36 | 37 | a { 38 | @include vendor('transition', ( 39 | 'color #{_duration(transition)} ease', 40 | 'border-bottom-color #{_duration(transition)} ease' 41 | )); 42 | border-bottom: dotted 1px _palette(border-alt); 43 | color: inherit; 44 | text-decoration: none; 45 | 46 | &:before { 47 | @include vendor('transition', ( 48 | 'color #{_duration(transition)} ease' 49 | )); 50 | } 51 | 52 | &:hover { 53 | border-bottom-color: transparent; 54 | color: _palette(accent) !important; 55 | 56 | &:before { 57 | color: _palette(accent) !important; 58 | } 59 | } 60 | } 61 | 62 | strong, b { 63 | color: _palette(fg-bold); 64 | font-weight: _font(weight-bold); 65 | } 66 | 67 | em, i { 68 | font-style: italic; 69 | } 70 | 71 | p { 72 | margin: 0 0 _size(element-margin) 0; 73 | } 74 | 75 | h1, h2, h3, h4, h5, h6 { 76 | color: _palette(fg-bold); 77 | font-family: _font(family-heading); 78 | font-weight: _font(weight-heading-bold); 79 | letter-spacing: _font(kerning-heading); 80 | line-height: 1.65; 81 | margin: 0 0 (_size(element-margin) * 0.5) 0; 82 | text-transform: uppercase; 83 | 84 | a { 85 | color: inherit; 86 | border-bottom: 0; 87 | } 88 | } 89 | 90 | h2 { 91 | font-size: 1.1em; 92 | } 93 | 94 | h3 { 95 | font-size: 0.9em; 96 | } 97 | 98 | h4 { 99 | font-size: 0.7em; 100 | } 101 | 102 | h5 { 103 | font-size: 0.7em; 104 | } 105 | 106 | h6 { 107 | font-size: 0.7em; 108 | } 109 | 110 | sub { 111 | font-size: 0.8em; 112 | position: relative; 113 | top: 0.5em; 114 | } 115 | 116 | sup { 117 | font-size: 0.8em; 118 | position: relative; 119 | top: -0.5em; 120 | } 121 | 122 | blockquote { 123 | border-left: solid 4px _palette(border); 124 | font-style: italic; 125 | margin: 0 0 _size(element-margin) 0; 126 | padding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4) _size(element-margin); 127 | } 128 | 129 | code { 130 | background: _palette(border-bg); 131 | border: solid 1px _palette(border); 132 | font-family: _font(family-fixed); 133 | font-size: 0.9em; 134 | margin: 0 0.25em; 135 | padding: 0.25em 0.65em; 136 | } 137 | 138 | pre { 139 | -webkit-overflow-scrolling: touch; 140 | font-family: _font(family-fixed); 141 | font-size: 0.9em; 142 | margin: 0 0 _size(element-margin) 0; 143 | 144 | code { 145 | display: block; 146 | line-height: 1.75em; 147 | padding: 1em 1.5em; 148 | overflow-x: auto; 149 | } 150 | } 151 | 152 | hr { 153 | border: 0; 154 | border-bottom: solid 1px _palette(border); 155 | margin: _size(element-margin) 0; 156 | 157 | &.major { 158 | margin: (_size(element-margin) * 1.5) 0; 159 | } 160 | } 161 | 162 | .align-left { 163 | text-align: left; 164 | } 165 | 166 | .align-center { 167 | text-align: center; 168 | } 169 | 170 | .align-right { 171 | text-align: right; 172 | } -------------------------------------------------------------------------------- /webroot/assets/sass/layout/_header.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Header */ 8 | 9 | body { 10 | padding-top: 3.5em; 11 | } 12 | 13 | #header { 14 | @include vendor('display', 'flex'); 15 | @include vendor('justify-content', 'space-between'); 16 | background-color: _palette(bg); 17 | border-bottom: solid 1px _palette(border); 18 | height: 3.5em; 19 | left: 0; 20 | line-height: 3.5em; 21 | position: fixed; 22 | top: 0; 23 | width: 100%; 24 | z-index: _misc(z-index-base); 25 | 26 | a { 27 | color: inherit; 28 | text-decoration: none; 29 | } 30 | 31 | ul { 32 | list-style: none; 33 | margin: 0; 34 | padding-left: 0; 35 | 36 | li { 37 | display: inline-block; 38 | padding-left: 0; 39 | } 40 | } 41 | 42 | h1 { 43 | height: inherit; 44 | line-height: inherit; 45 | padding: 0 0 0 1.5em; 46 | white-space: nowrap; 47 | 48 | a { 49 | font-size: 0.7em; 50 | } 51 | } 52 | 53 | .links { 54 | @include vendor('flex', '1'); 55 | border-left: solid 1px _palette(border); 56 | height: inherit; 57 | line-height: inherit; 58 | margin-left: 1.5em; 59 | overflow: hidden; 60 | padding-left: 1.5em; 61 | 62 | ul { 63 | li { 64 | border-left: solid 1px _palette(border); 65 | line-height: 1; 66 | margin-left: 1em; 67 | padding-left: 1em; 68 | 69 | &:first-child { 70 | border-left: 0; 71 | margin-left: 0; 72 | padding-left: 0; 73 | } 74 | 75 | a { 76 | border-bottom: 0; 77 | font-family: _font(family-heading); 78 | font-size: 0.7em; 79 | font-weight: _font(weight-heading); 80 | letter-spacing: _font(kerning-heading); 81 | text-transform: uppercase; 82 | } 83 | } 84 | } 85 | } 86 | 87 | .main { 88 | height: inherit; 89 | line-height: inherit; 90 | text-align: right; 91 | 92 | ul { 93 | height: inherit; 94 | line-height: inherit; 95 | 96 | li { 97 | border-left: solid 1px _palette(border); 98 | height: inherit; 99 | line-height: inherit; 100 | white-space: nowrap; 101 | 102 | > * { 103 | display: block; 104 | float: left; 105 | } 106 | 107 | > a { 108 | @include icon; 109 | border-bottom: 0; 110 | color: _palette(fg-light); 111 | overflow: hidden; 112 | position: relative; 113 | text-indent: 4em; 114 | width: 4em; 115 | 116 | &:before { 117 | display: block; 118 | height: inherit; 119 | left: 0; 120 | line-height: inherit; 121 | position: absolute; 122 | text-align: center; 123 | text-indent: 0; 124 | top: 0; 125 | width: inherit; 126 | } 127 | } 128 | } 129 | } 130 | } 131 | 132 | form { 133 | margin: 0; 134 | 135 | input { 136 | display: inline-block; 137 | height: 2.5em; 138 | position: relative; 139 | top: -2px; 140 | vertical-align: middle; 141 | } 142 | } 143 | 144 | #search { 145 | @include vendor('transition', 'all 0.5s ease'); 146 | max-width: 0; 147 | opacity: 0; 148 | overflow: hidden; 149 | padding: 0; 150 | white-space: nowrap; 151 | 152 | input { 153 | width: 12em; 154 | } 155 | 156 | &.visible { 157 | max-width: 12.5em; 158 | opacity: 1; 159 | padding: 0 0.5em 0 0; 160 | } 161 | } 162 | 163 | @include breakpoint(medium) { 164 | .links { 165 | display: none; 166 | } 167 | } 168 | 169 | @include breakpoint(small) { 170 | height: 2.75em; 171 | line-height: 2.75em; 172 | 173 | h1 { 174 | padding: 0 0 0 1em; 175 | } 176 | 177 | .main { 178 | .search { 179 | display: none; 180 | } 181 | } 182 | } 183 | } -------------------------------------------------------------------------------- /Sources/main.swift: -------------------------------------------------------------------------------- 1 | // 2 | // main.swift 3 | // Perfect Authentication Testing 4 | // 5 | // Created by Jonathan Guthrie on 207-01-18. 6 | // Copyright (C) 2017 PerfectlySoft, Inc. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This source file is part of the Perfect.org open source project 11 | // 12 | // Copyright (c) 2015 - 2017 PerfectlySoft Inc. and the Perfect project authors 13 | // Licensed under Apache License v2.0 14 | // 15 | // See http://perfect.org/licensing.html for license information 16 | // 17 | //===----------------------------------------------------------------------===// 18 | // 19 | import PerfectLib 20 | import PerfectHTTP 21 | import PerfectHTTPServer 22 | import PerfectSession 23 | import OAuth2 24 | import PerfectRequestLogger 25 | 26 | // NOTE: Facebook config vars are in /config/ApplictionConfiguration.json 27 | // Then they are loaded here: 28 | config() 29 | 30 | // Configuration of Session 31 | SessionConfig.name = "TestingAuthentication" 32 | SessionConfig.idle = 3600 33 | SessionConfig.cookieDomain = "localhost" 34 | SessionConfig.IPAddressLock = false 35 | SessionConfig.userAgentLock = false 36 | SessionConfig.CSRF.checkState = false 37 | SessionConfig.CORS.enabled = false 38 | SessionConfig.cookieSameSite = .lax 39 | 40 | RequestLogFile.location = "./log.log" 41 | 42 | // Configure Server 43 | var confData: [String:[[String:Any]]] = [ 44 | "servers": [ 45 | [ 46 | "name":"localhost", 47 | "port":8181, 48 | "routes":[], 49 | "filters":[ 50 | [ 51 | "type":"response", 52 | "priority":"high", 53 | "name":PerfectHTTPServer.HTTPFilter.contentCompression, 54 | ], 55 | [ 56 | "type":"request", 57 | "priority":"high", 58 | "name":SessionMemoryFilter.filterAPIRequest, 59 | ], 60 | [ 61 | "type":"request", 62 | "priority":"high", 63 | "name":RequestLogger.filterAPIRequest, 64 | ], 65 | [ 66 | "type":"response", 67 | "priority":"high", 68 | "name":SessionMemoryFilter.filterAPIResponse, 69 | ], 70 | [ 71 | "type":"response", 72 | "priority":"high", 73 | "name":RequestLogger.filterAPIResponse, 74 | ] 75 | ] 76 | ] 77 | ] 78 | ] 79 | 80 | // Add routes 81 | var routes: [[String: Any]] = [[String: Any]]() 82 | routes.append(["method":"get", "uri":"/", "handler":Handlers.main]) 83 | routes.append(["method":"get", "uri":"/logout", "handler":Handlers.logout]) 84 | 85 | routes.append(["method":"get", "uri":"/to/facebook", "handler":Facebook.sendToProvider]) 86 | routes.append(["method":"get", "uri":"/to/github", "handler":GitHub.sendToProvider]) 87 | routes.append(["method":"get", "uri":"/to/google", "handler":Google.sendToProvider]) 88 | routes.append(["method":"get", "uri":"/to/linkedin", "handler":Linkedin.sendToProvider]) 89 | routes.append(["method":"get", "uri":"/to/slack", "handler":Slack.sendToProvider]) 90 | routes.append(["method":"get", "uri":"/to/salesforce", "handler":SalesForce.sendToProvider]) 91 | 92 | routes.append(["method":"get", "uri":"/auth/response/facebook", "handler":Facebook.authResponse]) 93 | routes.append(["method":"get", "uri":"/auth/response/github", "handler":GitHub.authResponse]) 94 | routes.append(["method":"get", "uri":"/auth/response/google", "handler":Google.authResponse]) 95 | routes.append(["method":"get", "uri":"/auth/response/linkedin", "handler":Linkedin.authResponse]) 96 | routes.append(["method":"get", "uri":"/auth/response/slack", "handler":Slack.authResponse]) 97 | routes.append(["method":"get", "uri":"/auth/response/salesforce", "handler":SalesForce.authResponse]) 98 | 99 | routes.append(["method":"get", "uri":"/**", "handler":PerfectHTTPServer.HTTPHandler.staticFiles, 100 | "documentRoot":"./webroot", 101 | "allowResponseFilters":true]) 102 | 103 | confData["servers"]?[0]["routes"] = routes 104 | 105 | do { 106 | // Launch the servers based on the configuration data. 107 | try HTTPServer.launch(configurationData: confData) 108 | 109 | } catch { 110 | fatalError("\(error)") // fatal error launching one of the servers 111 | } 112 | -------------------------------------------------------------------------------- /webroot/assets/js/old/ie/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! Respond.js v1.4.2: min/max-width media query polyfill 2 | * Copyright 2014 Scott Jehl 3 | * Licensed under MIT 4 | * http://j.mp/respondjs */ 5 | 6 | !function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b input:first-child { 30 | padding-left: 2.5em; 31 | } 32 | } 33 | } 34 | 35 | label { 36 | color: _palette(fg-bold); 37 | display: block; 38 | font-size: 0.9em; 39 | font-weight: _font(weight-bold); 40 | margin: 0 0 (_size(element-margin) * 0.5) 0; 41 | } 42 | 43 | input[type="text"], 44 | input[type="password"], 45 | input[type="email"], 46 | input[type="tel"], 47 | select, 48 | textarea { 49 | @include vendor('appearance', 'none'); 50 | background: _palette(border-bg); 51 | border: none; 52 | border: solid 1px _palette(border); 53 | border-radius: 0; 54 | color: inherit; 55 | display: block; 56 | outline: 0; 57 | padding: 0 1em; 58 | text-decoration: none; 59 | width: 100%; 60 | 61 | &:invalid { 62 | box-shadow: none; 63 | } 64 | 65 | &:focus { 66 | border-color: _palette(accent); 67 | box-shadow: inset 0 0 0 1px _palette(accent); 68 | } 69 | } 70 | 71 | .select-wrapper { 72 | @include icon; 73 | display: block; 74 | position: relative; 75 | 76 | &:before { 77 | color: _palette(border); 78 | content: '\f078'; 79 | display: block; 80 | height: _size(element-height); 81 | line-height: _size(element-height); 82 | pointer-events: none; 83 | position: absolute; 84 | right: 0; 85 | text-align: center; 86 | top: 0; 87 | width: _size(element-height); 88 | } 89 | 90 | select::-ms-expand { 91 | display: none; 92 | } 93 | } 94 | 95 | input[type="text"], 96 | input[type="password"], 97 | input[type="email"], 98 | select { 99 | height: _size(element-height); 100 | } 101 | 102 | textarea { 103 | padding: 0.75em 1em; 104 | } 105 | 106 | input[type="checkbox"], 107 | input[type="radio"], { 108 | @include vendor('appearance', 'none'); 109 | display: block; 110 | float: left; 111 | margin-right: -2em; 112 | opacity: 0; 113 | width: 1em; 114 | z-index: -1; 115 | 116 | & + label { 117 | @include icon; 118 | color: _palette(fg); 119 | cursor: pointer; 120 | display: inline-block; 121 | font-size: 1em; 122 | font-weight: _font(weight); 123 | padding-left: (_size(element-height) * 0.6) + 0.75em; 124 | padding-right: 0.75em; 125 | position: relative; 126 | 127 | &:before { 128 | background: _palette(border-bg); 129 | border: solid 1px _palette(border); 130 | content: ''; 131 | display: inline-block; 132 | height: (_size(element-height) * 0.6); 133 | left: 0; 134 | line-height: (_size(element-height) * 0.575); 135 | position: absolute; 136 | text-align: center; 137 | top: 0; 138 | width: (_size(element-height) * 0.6); 139 | } 140 | } 141 | 142 | &:checked + label { 143 | &:before { 144 | background: _palette(fg-bold); 145 | border-color: _palette(fg-bold); 146 | color: _palette(bg); 147 | content: '\f00c'; 148 | } 149 | } 150 | 151 | &:focus + label { 152 | &:before { 153 | border-color: _palette(accent); 154 | box-shadow: 0 0 0 1px _palette(accent); 155 | } 156 | } 157 | } 158 | 159 | input[type="checkbox"] { 160 | & + label { 161 | &:before { 162 | } 163 | } 164 | } 165 | 166 | input[type="radio"] { 167 | & + label { 168 | &:before { 169 | border-radius: 100%; 170 | } 171 | } 172 | } 173 | 174 | ::-webkit-input-placeholder { 175 | color: _palette(fg-light) !important; 176 | opacity: 1.0; 177 | } 178 | 179 | :-moz-placeholder { 180 | color: _palette(fg-light) !important; 181 | opacity: 1.0; 182 | } 183 | 184 | ::-moz-placeholder { 185 | color: _palette(fg-light) !important; 186 | opacity: 1.0; 187 | } 188 | 189 | :-ms-input-placeholder { 190 | color: _palette(fg-light) !important; 191 | opacity: 1.0; 192 | } 193 | 194 | .formerize-placeholder { 195 | color: _palette(fg-light) !important; 196 | opacity: 1.0; 197 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Perfect-Authentication Demo 2 | 3 | [![Perfect logo](http://www.perfect.org/github/Perfect_GH_header_854.jpg)](http://perfect.org/get-involved.html) 4 | 5 | [![Perfect logo](http://www.perfect.org/github/Perfect_GH_button_1_Star.jpg)](https://github.com/PerfectlySoft/Perfect) 6 | [![Perfect logo](http://www.perfect.org/github/Perfect_GH_button_2_Git.jpg)](https://gitter.im/PerfectlySoft/Perfect) 7 | [![Perfect logo](http://www.perfect.org/github/Perfect_GH_button_3_twit.jpg)](https://twitter.com/perfectlysoft) 8 | [![Perfect logo](http://www.perfect.org/github/Perfect_GH_button_4_slack.jpg)](http://perfect.ly) 9 | 10 | 11 | [![Swift 3.0](https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat)](https://developer.apple.com/swift/) 12 | [![Platforms OS X | Linux](https://img.shields.io/badge/Platforms-OS%20X%20%7C%20Linux%20-lightgray.svg?style=flat)](https://developer.apple.com/swift/) 13 | [![License Apache](https://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat)](http://perfect.org/licensing.html) 14 | [![Twitter](https://img.shields.io/badge/Twitter-@PerfectlySoft-blue.svg?style=flat)](http://twitter.com/PerfectlySoft) 15 | [![Join the chat at https://gitter.im/PerfectlySoft/Perfect](https://img.shields.io/badge/Gitter-Join%20Chat-brightgreen.svg)](https://gitter.im/PerfectlySoft/Perfect?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 16 | [![Slack Status](http://perfect.ly/badge.svg)](http://perfect.ly) [![GitHub version](https://badge.fury.io/gh/PerfectlySoft%2FPerfect-CURL.svg)](https://badge.fury.io/gh/PerfectlySoft%2FPerfect-CURL) 17 | 18 | ## Demonstrating the OAuth2 Library for Perfect 19 | 20 | 21 | This project provides [OAuth2](https://oauth.net/2/) demo of the [Perfect Authentication](https://github.com/PerfectlySoft/Perfect-Authentication) libraries and select OAuth2 provider drivers - Facebook, Google, GitHub. 22 | 23 | Full documentation can be found at [http://www.perfect.org/docs/OAuth2.html](http://www.perfect.org/docs/OAuth2.html) 24 | 25 | This package builds with Swift Package Manager and is part of the [Perfect](https://github.com/PerfectlySoft/Perfect) project. It was written to be stand-alone and so does not require PerfectLib or any other components. 26 | 27 | Ensure you have installed and activated the latest Swift 3.0 tool chain. 28 | 29 | ## Setup 30 | 31 | Download this repo, clone it, or import it using [Perfect Assistant](https://www.perfect.org/en/assistant/). Build, configure the system with your AppID's and secrets, and run. 32 | 33 | ``` 34 | git clone https://github.com/PerfectExamples/Perfect-Authentication-Demo 35 | cd Perfect-Authentication-Demo 36 | swift build 37 | .build/debug/Perfect-Authentication-Demo 38 | ``` 39 | 40 | Alternatively, build the Xcode project with `swift package generate-xcodeproj`. 41 | 42 | If you choose to generate an Xcode Project, you MUST change to the executable target AND set the custom working directory to the project directory for its scheme in order for the web routes to work properly. 43 | 44 | 45 | 46 | ## Configuration 47 | 48 | Each provider needs an "appid", also known as a "key", and a "secret". These are usually generated by the OAuth Host, such as Facebook, GitHub and Google developer consoles. These values, as well as an "endpointAfterAuth" and "redirectAfterAuth" value must be set for each provider you wish to use. If you leave any unset, the authentication will fail. 49 | 50 | These settings are configured by removing the ".default" extension from the "ApplicationConfiguration.json.default" file in the "config" directory, then populating the values as needed. 51 | 52 | The default file looks like this: 53 | 54 | ``` swift 55 | { 56 | "facebookAppID": "---", 57 | "facebookSecret": "---", 58 | "facebookEndpointAfterAuth": "http://localhost:8181/auth/response/facebook", 59 | "facebookRedirectAfterAuth":"http://localhost:8181/", 60 | 61 | "githubKey": "---", 62 | "githubSecret": "---", 63 | "githubEndpointAfterAuth": "http://localhost:8181/auth/response/github", 64 | "githubRedirectAfterAuth":"http://localhost:8181/", 65 | 66 | "googleKey": "---", 67 | "googleSecret": "---", 68 | "googleEndpointAfterAuth": "http://localhost:8181/auth/response/google", 69 | "googleRedirectAfterAuth":"http://localhost:8181/" 70 | } 71 | ``` 72 | 73 | Replace the `---` values with those from your own accounts. 74 | 75 | ## Running 76 | 77 | Once the demo has been configured, it can be run from the command line, or from Xcode. 78 | 79 | It can then be accessed from a web browser at `http://localhost:8181`. 80 | 81 | The first page you will see will have the following: 82 | 83 | ``` 84 | SessionID: <> 85 | 86 | Login Type: 87 | 88 | UserID: 89 | 90 | UserName: 91 | 92 | Picture: 93 | 94 | AccessToken: 95 | ``` 96 | 97 | These values however will be populated upon login with one of the providers via the buttons. 98 | 99 | Logging out will terminate the session, and start a new session without any information gained from a login with a provider. 100 | 101 | Note that this demo uses the "MemorySessions" driver, so terminating the demo and restarting it will delete all existing sessions. 102 | 103 | 104 | ## Further Information 105 | For more information on the Perfect project, please visit [perfect.org](http://perfect.org). 106 | -------------------------------------------------------------------------------- /webroot/assets/js/js/prefixfree.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * StyleFix 1.0.3 & PrefixFree 1.0.7 3 | * @author Lea Verou 4 | * MIT license 5 | */(function(){function t(e,t){return[].slice.call((t||document).querySelectorAll(e))}if(!window.addEventListener)return;var e=window.StyleFix={link:function(t){try{if(t.rel!=="stylesheet"||t.hasAttribute("data-noprefix"))return}catch(n){return}var r=t.href||t.getAttribute("data-href"),i=r.replace(/[^\/]+$/,""),s=(/^[a-z]{3,10}:/.exec(i)||[""])[0],o=(/^[a-z]{3,10}:\/\/[^\/]+/.exec(i)||[""])[0],u=/^([^?]*)\??/.exec(r)[1],a=t.parentNode,f=new XMLHttpRequest,l;f.onreadystatechange=function(){f.readyState===4&&l()};l=function(){var n=f.responseText;if(n&&t.parentNode&&(!f.status||f.status<400||f.status>600)){n=e.fix(n,!0,t);if(i){n=n.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(e,t,n){return/^([a-z]{3,10}:|#)/i.test(n)?e:/^\/\//.test(n)?'url("'+s+n+'")':/^\//.test(n)?'url("'+o+n+'")':/^\?/.test(n)?'url("'+u+n+'")':'url("'+i+n+'")'});var r=i.replace(/([\\\^\$*+[\]?{}.=!:(|)])/g,"\\$1");n=n.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+r,"gi"),"$1")}var l=document.createElement("style");l.textContent=n;l.media=t.media;l.disabled=t.disabled;l.setAttribute("data-href",t.getAttribute("href"));a.insertBefore(l,t);a.removeChild(t);l.media=t.media}};try{f.open("GET",r);f.send(null)}catch(n){if(typeof XDomainRequest!="undefined"){f=new XDomainRequest;f.onerror=f.onprogress=function(){};f.onload=l;f.open("GET",r);f.send(null)}}t.setAttribute("data-inprogress","")},styleElement:function(t){if(t.hasAttribute("data-noprefix"))return;var n=t.disabled;t.textContent=e.fix(t.textContent,!0,t);t.disabled=n},styleAttribute:function(t){var n=t.getAttribute("style");n=e.fix(n,!1,t);t.setAttribute("style",n)},process:function(){t('link[rel="stylesheet"]:not([data-inprogress])').forEach(StyleFix.link);t("style").forEach(StyleFix.styleElement);t("[style]").forEach(StyleFix.styleAttribute)},register:function(t,n){(e.fixers=e.fixers||[]).splice(n===undefined?e.fixers.length:n,0,t)},fix:function(t,n,r){for(var i=0;i-1&&(e=e.replace(/(\s|:|,)(repeating-)?linear-gradient\(\s*(-?\d*\.?\d*)deg/ig,function(e,t,n,r){return t+(n||"")+"linear-gradient("+(90-r)+"deg"}));e=t("functions","(\\s|:|,)","\\s*\\(","$1"+s+"$2(",e);e=t("keywords","(\\s|:)","(\\s|;|\\}|$)","$1"+s+"$2$3",e);e=t("properties","(^|\\{|\\s|;)","\\s*:","$1"+s+"$2:",e);if(n.properties.length){var o=RegExp("\\b("+n.properties.join("|")+")(?!:)","gi");e=t("valueProperties","\\b",":(.+?);",function(e){return e.replace(o,s+"$1")},e)}if(r){e=t("selectors","","\\b",n.prefixSelector,e);e=t("atrules","@","\\b","@"+s+"$1",e)}e=e.replace(RegExp("-"+s,"g"),"-");e=e.replace(/-\*-(?=[a-z]+)/gi,n.prefix);return e},property:function(e){return(n.properties.indexOf(e)>=0?n.prefix:"")+e},value:function(e,r){e=t("functions","(^|\\s|,)","\\s*\\(","$1"+n.prefix+"$2(",e);e=t("keywords","(^|\\s)","(\\s|$)","$1"+n.prefix+"$2$3",e);n.valueProperties.indexOf(r)>=0&&(e=t("properties","(^|\\s|,)","($|\\s|,)","$1"+n.prefix+"$2$3",e));return e},prefixSelector:function(e){return e.replace(/^:{1,2}/,function(e){return e+n.prefix})},prefixProperty:function(e,t){var r=n.prefix+e;return t?StyleFix.camelCase(r):r}};(function(){var e={},t=[],r={},i=getComputedStyle(document.documentElement,null),s=document.createElement("div").style,o=function(n){if(n.charAt(0)==="-"){t.push(n);var r=n.split("-"),i=r[1];e[i]=++e[i]||1;while(r.length>3){r.pop();var s=r.join("-");u(s)&&t.indexOf(s)===-1&&t.push(s)}}},u=function(e){return StyleFix.camelCase(e)in s};if(i.length>0)for(var a=0;a * { 57 | @include icon; 58 | border: 0; 59 | 60 | .label { 61 | display: none; 62 | } 63 | } 64 | } 65 | } 66 | 67 | &.actions { 68 | cursor: default; 69 | list-style: none; 70 | padding-left: 0; 71 | 72 | li { 73 | display: inline-block; 74 | padding: 0 (_size(element-margin) * 0.75) 0 0; 75 | vertical-align: middle; 76 | 77 | &:last-child { 78 | padding-right: 0; 79 | } 80 | } 81 | 82 | &.pagination { 83 | .next { 84 | @include icon('', after); 85 | 86 | &:after { 87 | content: '\f054'; 88 | } 89 | } 90 | 91 | .previous { 92 | @include icon('', before); 93 | 94 | &:before { 95 | content: '\f053'; 96 | } 97 | } 98 | 99 | @include breakpoint(large) { 100 | text-align: center; 101 | 102 | .next, .previous { 103 | min-width: 20em; 104 | } 105 | } 106 | 107 | @include breakpoint(small) { 108 | .next, .previous { 109 | min-width: 18em; 110 | } 111 | } 112 | } 113 | 114 | &.small { 115 | li { 116 | padding: 0 (_size(element-margin) * 0.5) 0 0; 117 | } 118 | } 119 | 120 | &.vertical { 121 | li { 122 | display: block; 123 | padding: (_size(element-margin) * 0.75) 0 0 0; 124 | 125 | &:first-child { 126 | padding-top: 0; 127 | } 128 | 129 | > * { 130 | margin-bottom: 0; 131 | } 132 | } 133 | 134 | &.small { 135 | li { 136 | padding: (_size(element-margin) * 0.5) 0 0 0; 137 | 138 | &:first-child { 139 | padding-top: 0; 140 | } 141 | } 142 | } 143 | } 144 | 145 | &.fit { 146 | display: table; 147 | margin-left: (_size(element-margin) * -0.5); 148 | padding: 0; 149 | table-layout: fixed; 150 | width: calc(100% + #{(_size(element-margin) * 0.5)}); 151 | 152 | li { 153 | display: table-cell; 154 | padding: 0 0 0 (_size(element-margin) * 0.5); 155 | 156 | > * { 157 | margin-bottom: 0; 158 | } 159 | } 160 | 161 | &.small { 162 | margin-left: (_size(element-margin) * -0.25); 163 | width: calc(100% + #{(_size(element-margin) * 0.25)}); 164 | 165 | li { 166 | padding: 0 0 0 (_size(element-margin) * 0.25); 167 | } 168 | } 169 | } 170 | 171 | @include breakpoint(xsmall) { 172 | margin: 0 0 _size(element-margin) 0; 173 | 174 | li { 175 | padding: (_size(element-margin) * 0.5) 0 0 0; 176 | display: block; 177 | text-align: center; 178 | width: 100%; 179 | 180 | &:first-child { 181 | padding-top: 0; 182 | } 183 | 184 | > * { 185 | width: 100%; 186 | margin: 0 !important; 187 | 188 | &.icon { 189 | &:before { 190 | } 191 | } 192 | } 193 | } 194 | 195 | &.small { 196 | li { 197 | padding: (_size(element-margin) * 0.25) 0 0 0; 198 | 199 | &:first-child { 200 | padding-top: 0; 201 | } 202 | } 203 | } 204 | } 205 | } 206 | 207 | &.posts { 208 | list-style: none; 209 | padding: 0; 210 | 211 | li { 212 | border-top: dotted 1px _palette(border); 213 | margin: (_size(element-margin) * 0.75) 0 0 0; 214 | padding: (_size(element-margin) * 0.75) 0 0 0; 215 | 216 | &:first-child { 217 | border-top: 0; 218 | margin-top: 0; 219 | padding-top: 0; 220 | } 221 | } 222 | 223 | article { 224 | @include vendor('display', 'flex'); 225 | @include vendor('align-items', 'flex-start'); 226 | @include vendor('flex-direction', 'row-reverse'); 227 | 228 | .image { 229 | display: block; 230 | margin-right: 1.5em; 231 | min-width: 4em; 232 | width: 4em; 233 | 234 | img { 235 | width: 100%; 236 | } 237 | } 238 | 239 | header { 240 | @include vendor('flex-grow', '1'); 241 | -ms-flex: 1; 242 | 243 | h3 { 244 | font-size: 0.7em; 245 | margin-top: 0.125em; 246 | } 247 | 248 | .published { 249 | display: block; 250 | font-family: _font(family-heading); 251 | font-size: 0.6em; 252 | font-weight: _font(weight-heading); 253 | letter-spacing: _font(kerning-heading); 254 | margin: -0.625em 0 (_size(element-margin) * 0.85) 0; 255 | text-transform: uppercase; 256 | } 257 | 258 | > :last-child { 259 | margin-bottom: 0; 260 | } 261 | } 262 | } 263 | } 264 | } 265 | 266 | dl { 267 | margin: 0 0 _size(element-margin) 0; 268 | 269 | dt { 270 | display: block; 271 | font-weight: _font(weight-bold); 272 | margin: 0 0 (_size(element-margin) * 0.5) 0; 273 | } 274 | 275 | dd { 276 | margin-left: _size(element-margin); 277 | } 278 | } -------------------------------------------------------------------------------- /webroot/assets/sass/components/_post.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Future Imperfect by HTML5 UP 3 | /// html5up.net | @ajlkn 4 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | /// 6 | 7 | /* Post */ 8 | 9 | .post { 10 | @include padding(_size(section-spacing), _size(section-spacing)); 11 | background: _palette(bg); 12 | border: solid 1px _palette(border); 13 | margin: 0 0 _size(section-spacing) 0; 14 | position: relative; 15 | 16 | > header { 17 | @include vendor('display', 'flex'); 18 | border-bottom: solid 1px _palette(border); 19 | left: (_size(section-spacing) * -1); 20 | margin: (_size(section-spacing) * -1) 0 _size(section-spacing) 0; 21 | position: relative; 22 | width: calc(100% + #{_size(section-spacing) * 2}); 23 | 24 | .title { 25 | @include vendor('flex-grow', '1'); 26 | -ms-flex: 1; 27 | padding: (_size(section-spacing) * 1.25) _size(section-spacing) (_size(section-spacing) * 1.1) _size(section-spacing); 28 | 29 | h2 { 30 | font-weight: _font(weight-heading-extrabold); 31 | font-size: 1.5em; 32 | } 33 | 34 | > :last-child { 35 | margin-bottom: 0; 36 | } 37 | } 38 | 39 | .meta { 40 | @include padding(_size(section-spacing) * 1.25, _size(section-spacing)); 41 | border-left: solid 1px _palette(border); 42 | min-width: 17em; 43 | text-align: right; 44 | width: 17em; 45 | 46 | > * { 47 | margin: 0 0 (_size(element-margin) * 0.5) 0; 48 | } 49 | 50 | > :last-child { 51 | margin-bottom: 0; 52 | } 53 | 54 | .published { 55 | color: _palette(fg-bold); 56 | display: block; 57 | font-family: _font(family-heading); 58 | font-size: 0.7em; 59 | font-weight: _font(weight-heading-bold); 60 | letter-spacing: _font(kerning-heading); 61 | margin-top: 0.5em; 62 | text-transform: uppercase; 63 | white-space: nowrap; 64 | } 65 | } 66 | } 67 | 68 | > a.image.featured { 69 | overflow: hidden; 70 | 71 | img { 72 | @include vendor('transition', 'transform #{_duration(transition)} ease-out'); 73 | } 74 | 75 | &:hover { 76 | img { 77 | @include vendor('transform', 'scale(1.05)'); 78 | } 79 | } 80 | } 81 | 82 | > footer { 83 | @include vendor('display', 'flex'); 84 | @include vendor('align-items', 'center'); 85 | 86 | .actions { 87 | @include vendor('flex-grow', '1'); 88 | } 89 | 90 | .stats { 91 | cursor: default; 92 | list-style: none; 93 | padding: 0; 94 | 95 | li { 96 | border-left: solid 1px _palette(border); 97 | display: inline-block; 98 | font-family: _font(family-heading); 99 | font-size: 0.6em; 100 | font-weight: _font(weight-heading); 101 | letter-spacing: _font(kerning-heading); 102 | line-height: 1; 103 | margin: 0 0 0 2em; 104 | padding: 0 0 0 2em; 105 | text-transform: uppercase; 106 | 107 | &:first-child { 108 | border-left: 0; 109 | margin-left: 0; 110 | padding-left: 0; 111 | } 112 | 113 | .icon { 114 | border-bottom: 0; 115 | 116 | &:before { 117 | color: _palette(border); 118 | margin-right: 0.75em; 119 | } 120 | } 121 | } 122 | } 123 | } 124 | 125 | @include breakpoint(medium) { 126 | border-left: 0; 127 | border-right: 0; 128 | left: _size(section-spacing) * -1; 129 | width: calc(100% + (#{_size(section-spacing)} * 2)); 130 | 131 | > header { 132 | @include vendor('flex-direction', 'column'); 133 | @include padding(_size(section-spacing) * 1.25, _size(section-spacing), (0, 0, -0.5em, 0)); 134 | border-left: 0; 135 | 136 | .title { 137 | -ms-flex: 0 1 auto; 138 | margin: 0 0 _size(element-margin) 0; 139 | padding: 0; 140 | text-align: center; 141 | } 142 | 143 | .meta { 144 | @include vendor('align-items', 'center'); 145 | @include vendor('display', 'flex'); 146 | @include vendor('justify-content', 'center'); 147 | border-left: 0; 148 | margin: 0 0 _size(element-margin) 0; 149 | padding-top: 0; 150 | padding: 0; 151 | text-align: left; 152 | width: 100%; 153 | 154 | > * { 155 | border-left: solid 1px _palette(border); 156 | margin-left: 2em; 157 | padding-left: 2em; 158 | } 159 | 160 | > :first-child { 161 | border-left: 0; 162 | margin-left: 0; 163 | padding-left: 0; 164 | } 165 | 166 | .published { 167 | margin-bottom: 0; 168 | margin-top: 0; 169 | } 170 | 171 | .author { 172 | @include vendor('flex-direction', 'row-reverse'); 173 | margin-bottom: 0; 174 | 175 | .name { 176 | margin: 0 0 0 1.5em; 177 | } 178 | 179 | img { 180 | width: 3.5em; 181 | } 182 | } 183 | } 184 | } 185 | } 186 | 187 | @include breakpoint(small) { 188 | @include padding(_size(section-spacing-small), _size(section-spacing-small)); 189 | left: _size(section-spacing-small) * -1; 190 | margin: 0 0 _size(element-margin) 0; 191 | width: calc(100% + (#{_size(section-spacing-small)} * 2)); 192 | 193 | > header { 194 | @include padding(_size(section-spacing-small) * 2, _size(section-spacing-small), (0, 0, -0.5em, 0)); 195 | left: (_size(section-spacing-small) * -1); 196 | margin: (_size(section-spacing-small) * -1) 0 _size(section-spacing-small) 0; 197 | width: calc(100% + #{_size(section-spacing-small) * 2}); 198 | 199 | .title { 200 | h2 { 201 | font-size: 1.1em; 202 | } 203 | } 204 | } 205 | } 206 | 207 | @include breakpoint(xsmall) { 208 | > header { 209 | .meta { 210 | @include vendor('align-items', 'center'); 211 | @include vendor('flex-direction', 'column'); 212 | 213 | > * { 214 | border-left: 0; 215 | margin: (_size(element-margin) * 0.5) 0 0 0; 216 | padding-left: 0; 217 | } 218 | 219 | .author { 220 | .name { 221 | display: none; 222 | } 223 | } 224 | } 225 | } 226 | 227 | > .image.featured { 228 | margin-left: _size(section-spacing-small) * -1; 229 | margin-top: calc(#{_size(section-spacing-small) * -1} - 1px); 230 | width: calc(100% + #{_size(section-spacing-small) * 2}); 231 | } 232 | 233 | > footer { 234 | @include vendor('align-items', 'stretch'); 235 | @include vendor('flex-direction', 'column-reverse'); 236 | 237 | .stats { 238 | text-align: center; 239 | 240 | li { 241 | margin: 0 0 0 1.25em; 242 | padding: 0 0 0 1.25em; 243 | } 244 | } 245 | } 246 | } 247 | } -------------------------------------------------------------------------------- /webroot/images/perfect-logo.svg: -------------------------------------------------------------------------------- 1 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 40 | 44 | 49 | 54 | 58 | 61 | 65 | 67 | 70 | 75 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /webroot/assets/css/theme.css: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | 1. Colour Palette 3 | ========================================================================== */ 4 | 5 | .blu {color: #005978;} 6 | 7 | .blu_bg {background-color: #005978;color: #fff;} 8 | 9 | a, a:visited { 10 | color: #e43c23 11 | } 12 | 13 | 14 | #loghead th { font-size: .8em; } 15 | #logview td { font-size: .8em; vertical-align: top; padding-bottom: .5em; padding-top: .5em } 16 | 17 | /*warn, info, debug, error, critical*/ 18 | 19 | #logview .info { color: green } 20 | #logview .debug { color: yellowgreen } 21 | #logview .warn { color: orange } 22 | #logview .error { color: red } 23 | #logview .critical { color: black } 24 | 25 | #logtypebar > div { font-weight: bold; font-size: .85em; text-align: center; cursor: pointer; border-radius: 3px; } 26 | 27 | #logtypebar > .linfo { background-color: green; color: white; } 28 | #logtypebar > .ldebug { background-color: yellowgreen; } 29 | #logtypebar > .lwarn { background-color: orange; } 30 | #logtypebar > .lerror { background-color: red; color: white; } 31 | #logtypebar > .lcritical { background-color: black; color: white; } 32 | #logtypebar > .lall { background-color: lightgrey; } 33 | 34 | .filterprop { cursor: pointer } 35 | 36 | .largericons { 37 | font-size: 1.4em 38 | } 39 | 40 | /* ========================================================================== 41 | 2. General Overrides 42 | ========================================================================== */ 43 | @font-face { 44 | font-family: 'sinkin_sans_xlight'; 45 | src: url('/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.eot'); 46 | src: url('/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.eot?#iefix') format('embedded-opentype'), 47 | url('/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.woff') format('woff'), 48 | url('/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.ttf') format('truetype'), 49 | url('/assets/fonts/sinkinsans/SinkinSans-200XLight-webfont.svg#sinkin_sans200_x_light') format('svg'); 50 | font-weight: normal; 51 | font-style: normal; 52 | } 53 | @font-face { 54 | font-family: 'sinkin_sans_light'; 55 | src: url('/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.eot'); 56 | src: url('/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.eot?#iefix') format('embedded-opentype'), 57 | url('/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.woff') format('woff'), 58 | url('/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.ttf') format('truetype'), 59 | url('/assets/fonts/sinkinsans/SinkinSans-300Light-webfont.svg#sinkin_sans300_light') format('svg'); 60 | font-weight: normal; 61 | font-style: normal; 62 | } 63 | @font-face { 64 | font-family: 'sinkin_sans_italic'; 65 | src: url('/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.eot'); 66 | src: url('/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.eot?#iefix') format('embedded-opentype'), 67 | url('/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.woff') format('woff'), 68 | url('/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.ttf') format('truetype'), 69 | url('/assets/fonts/sinkinsans/SinkinSans-400Italic-webfont.svg#sinkin_sans400_italic') format('svg'); 70 | font-weight: normal; 71 | font-style: normal; 72 | } 73 | @font-face { 74 | font-family: 'sinkin_sans_regular'; 75 | src: url('/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.eot'); 76 | src: url('/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.eot?#iefix') format('embedded-opentype'), 77 | url('/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.woff') format('woff'), 78 | url('/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.ttf') format('truetype'), 79 | url('/assets/fonts/sinkinsans/SinkinSans-400Regular-webfont.svg#sinkin_sans400_regular') format('svg'); 80 | font-weight: normal; 81 | font-style: normal; 82 | } 83 | @font-face { 84 | font-family: 'sinkin_sans_medium'; 85 | src: url('/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.eot'); 86 | src: url('/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.eot?#iefix') format('embedded-opentype'), 87 | url('/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.woff') format('woff'), 88 | url('/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.ttf') format('truetype'), 89 | url('/assets/fonts/sinkinsans/SinkinSans-500Medium-webfont.svg#sinkin_sans500_medium') format('svg'); 90 | font-weight: normal; 91 | font-style: normal; 92 | } 93 | @font-face { 94 | font-family: 'sinkin_sans500_medium_italic'; 95 | src: url('/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.eot'); 96 | src: url('/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.eot?#iefix') format('embedded-opentype'), 97 | url('/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.woff') format('woff'), 98 | url('/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.ttf') format('truetype'), 99 | url('/assets/fonts/sinkinsans/SinkinSans-500MediumItalic-webfont.svg#sinkin_sans500_medium_italic') format('svg'); 100 | font-weight: normal; 101 | font-style: normal; 102 | } 103 | 104 | body { 105 | font-family:'sinkin_sans_light', sans-serif; 106 | font-size: 12px; 107 | } 108 | 109 | #leftMenu ul { 110 | list-style: none; 111 | font-size: 9px; 112 | font-family: "sinkin_sans_medium" 113 | } 114 | 115 | a { 116 | text-decoration: none; 117 | } 118 | 119 | /* ========================================================================== 120 | 3. Mastheads 121 | ========================================================================== */ 122 | #masthead { 123 | /* background-color: rgba(0, 128, 198, 0.8);*/ 124 | } 125 | #masthead h1 { 126 | font-size: 24px; 127 | padding-top: 10px; 128 | padding-bottom: 10px; 129 | margin: 0; 130 | } 131 | 132 | #footer { 133 | background-color: rgba(0, 128, 198, 0.4); 134 | font-size: 11px; 135 | } 136 | 137 | 138 | 139 | /* ========================================================================== 140 | 4. Header Styles 141 | ========================================================================== */ 142 | .top-bottom 143 | { 144 | color: #fff; 145 | /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#404040+0,131314+100 */ 146 | background: #404040; /* Old browsers */ 147 | background: -moz-linear-gradient(top, #404040 0%, #131314 100%); /* FF3.6-15 */ 148 | background: -webkit-linear-gradient(top, #404040 0%,#131314 100%); /* Chrome10-25,Safari5.1-6 */ 149 | background: linear-gradient(to bottom, #404040 0%,#131314 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ 150 | } 151 | 152 | 153 | 154 | /* ========================================================================== 155 | 5. Custom icons 156 | ========================================================================== */ 157 | 158 | 159 | /* ========================================================================== 160 | 6. Search Form 161 | ========================================================================== */ 162 | a.button, 163 | button 164 | { 165 | background-color: rgba(0,0,0,0.3); 166 | margin-right: 1em; 167 | margin-bottom: 0.6em; 168 | } 169 | 170 | button:hover, 171 | button:active, 172 | a.button:hover, 173 | a.button:active 174 | { 175 | background-color: rgba(0,0,0,0.6); 176 | } 177 | 178 | 179 | /* ========================================================================== 180 | 7. Custom Animations 181 | ========================================================================== */ 182 | 183 | /* ========================================================================== 184 | 8. Media Queries 185 | ========================================================================== */ 186 | 187 | @-moz-document url-prefix() 188 | { 189 | 190 | 191 | } 192 | 193 | @media only screen and (max-width: 960px) 194 | { 195 | 196 | } 197 | 198 | @media only screen and (max-width: 720px) 199 | { 200 | 201 | } 202 | 203 | @media only screen and (max-width: 620px) 204 | { 205 | 206 | } 207 | 208 | @media only screen and (max-width: 480px) 209 | { 210 | 211 | } 212 | 213 | 214 | @media only screen and (max-width: 400px) 215 | { 216 | 217 | } 218 | 219 | @media only screen and (max-width: 320px) 220 | { 221 | 222 | } 223 | -------------------------------------------------------------------------------- /webroot/images/perfect-logo-2-0.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 20 | 21 | 24 | 27 | 28 | 29 | 30 | 32 | 33 | 34 | 37 | 39 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /webroot/assets/js/old/skel.min.js: -------------------------------------------------------------------------------- 1 | /* skel.js v3.0.1 | (c) skel.io | MIT licensed */ 2 | var skel=function(){"use strict";var t={breakpointIds:null,events:{},isInit:!1,obj:{attachments:{},breakpoints:{},head:null,states:{}},sd:"/",state:null,stateHandlers:{},stateId:"",vars:{},DOMReady:null,indexOf:null,isArray:null,iterate:null,matchesMedia:null,extend:function(e,n){t.iterate(n,function(i){t.isArray(n[i])?(t.isArray(e[i])||(e[i]=[]),t.extend(e[i],n[i])):"object"==typeof n[i]?("object"!=typeof e[i]&&(e[i]={}),t.extend(e[i],n[i])):e[i]=n[i]})},newStyle:function(t){var e=document.createElement("style");return e.type="text/css",e.innerHTML=t,e},_canUse:null,canUse:function(e){t._canUse||(t._canUse=document.createElement("div"));var n=t._canUse.style,i=e.charAt(0).toUpperCase()+e.slice(1);return e in n||"Moz"+i in n||"Webkit"+i in n||"O"+i in n||"ms"+i in n},on:function(e,n){var i=e.split(/[\s]+/);return t.iterate(i,function(e){var a=i[e];if(t.isInit){if("init"==a)return void n();if("change"==a)n();else{var r=a.charAt(0);if("+"==r||"!"==r){var o=a.substring(1);if(o in t.obj.breakpoints)if("+"==r&&t.obj.breakpoints[o].active)n();else if("!"==r&&!t.obj.breakpoints[o].active)return void n()}}}t.events[a]||(t.events[a]=[]),t.events[a].push(n)}),t},trigger:function(e){return t.events[e]&&0!=t.events[e].length?(t.iterate(t.events[e],function(n){t.events[e][n]()}),t):void 0},breakpoint:function(e){return t.obj.breakpoints[e]},breakpoints:function(e){function n(t,e){this.name=this.id=t,this.media=e,this.active=!1,this.wasActive=!1}return n.prototype.matches=function(){return t.matchesMedia(this.media)},n.prototype.sync=function(){this.wasActive=this.active,this.active=this.matches()},t.iterate(e,function(i){t.obj.breakpoints[i]=new n(i,e[i])}),window.setTimeout(function(){t.poll()},0),t},addStateHandler:function(e,n){t.stateHandlers[e]=n},callStateHandler:function(e){var n=t.stateHandlers[e]();t.iterate(n,function(e){t.state.attachments.push(n[e])})},changeState:function(e){t.iterate(t.obj.breakpoints,function(e){t.obj.breakpoints[e].sync()}),t.vars.lastStateId=t.stateId,t.stateId=e,t.breakpointIds=t.stateId===t.sd?[]:t.stateId.substring(1).split(t.sd),t.obj.states[t.stateId]?t.state=t.obj.states[t.stateId]:(t.obj.states[t.stateId]={attachments:[]},t.state=t.obj.states[t.stateId],t.iterate(t.stateHandlers,t.callStateHandler)),t.detachAll(t.state.attachments),t.attachAll(t.state.attachments),t.vars.stateId=t.stateId,t.vars.state=t.state,t.trigger("change"),t.iterate(t.obj.breakpoints,function(e){t.obj.breakpoints[e].active?t.obj.breakpoints[e].wasActive||t.trigger("+"+e):t.obj.breakpoints[e].wasActive&&t.trigger("-"+e)})},generateStateConfig:function(e,n){var i={};return t.extend(i,e),t.iterate(t.breakpointIds,function(e){t.extend(i,n[t.breakpointIds[e]])}),i},getStateId:function(){var e="";return t.iterate(t.obj.breakpoints,function(n){var i=t.obj.breakpoints[n];i.matches()&&(e+=t.sd+i.id)}),e},poll:function(){var e="";e=t.getStateId(),""===e&&(e=t.sd),e!==t.stateId&&t.changeState(e)},_attach:null,attach:function(e){var n=t.obj.head,i=e.element;return i.parentNode&&i.parentNode.tagName?!1:(t._attach||(t._attach=n.firstChild),n.insertBefore(i,t._attach.nextSibling),e.permanent&&(t._attach=i),!0)},attachAll:function(e){var n=[];t.iterate(e,function(t){n[e[t].priority]||(n[e[t].priority]=[]),n[e[t].priority].push(e[t])}),n.reverse(),t.iterate(n,function(e){t.iterate(n[e],function(i){t.attach(n[e][i])})})},detach:function(t){var e=t.element;return t.permanent||!e.parentNode||e.parentNode&&!e.parentNode.tagName?!1:(e.parentNode.removeChild(e),!0)},detachAll:function(e){var n={};t.iterate(e,function(t){n[e[t].id]=!0}),t.iterate(t.obj.attachments,function(e){e in n||t.detach(t.obj.attachments[e])})},attachment:function(e){return e in t.obj.attachments?t.obj.attachments[e]:null},newAttachment:function(e,n,i,a){return t.obj.attachments[e]={id:e,element:n,priority:i,permanent:a}},init:function(){t.initMethods(),t.initVars(),t.initEvents(),t.obj.head=document.getElementsByTagName("head")[0],t.isInit=!0,t.trigger("init")},initEvents:function(){t.on("resize",function(){t.poll()}),t.on("orientationChange",function(){t.poll()}),t.DOMReady(function(){t.trigger("ready")}),window.onload&&t.on("load",window.onload),window.onload=function(){t.trigger("load")},window.onresize&&t.on("resize",window.onresize),window.onresize=function(){t.trigger("resize")},window.onorientationchange&&t.on("orientationChange",window.onorientationchange),window.onorientationchange=function(){t.trigger("orientationChange")}},initMethods:function(){document.addEventListener?!function(e,n){t.DOMReady=n()}("domready",function(){function t(t){for(r=1;t=n.shift();)t()}var e,n=[],i=document,a="DOMContentLoaded",r=/^loaded|^c/.test(i.readyState);return i.addEventListener(a,e=function(){i.removeEventListener(a,e),t()}),function(t){r?t():n.push(t)}}):!function(e,n){t.DOMReady=n()}("domready",function(t){function e(t){for(h=1;t=i.shift();)t()}var n,i=[],a=!1,r=document,o=r.documentElement,s=o.doScroll,c="DOMContentLoaded",d="addEventListener",u="onreadystatechange",l="readyState",f=s?/^loaded|^c/:/^loaded|c/,h=f.test(r[l]);return r[d]&&r[d](c,n=function(){r.removeEventListener(c,n,a),e()},a),s&&r.attachEvent(u,n=function(){/^c/.test(r[l])&&(r.detachEvent(u,n),e())}),t=s?function(e){self!=top?h?e():i.push(e):function(){try{o.doScroll("left")}catch(n){return setTimeout(function(){t(e)},50)}e()}()}:function(t){h?t():i.push(t)}}),Array.prototype.indexOf?t.indexOf=function(t,e){return t.indexOf(e)}:t.indexOf=function(t,e){if("string"==typeof t)return t.indexOf(e);var n,i,a=e?e:0;if(!this)throw new TypeError;if(i=this.length,0===i||a>=i)return-1;for(0>a&&(a=i-Math.abs(a)),n=a;i>n;n++)if(this[n]===t)return n;return-1},Array.isArray?t.isArray=function(t){return Array.isArray(t)}:t.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},Object.keys?t.iterate=function(t,e){if(!t)return[];var n,i=Object.keys(t);for(n=0;i[n]&&e(i[n],t[i[n]])!==!1;n++);}:t.iterate=function(t,e){if(!t)return[];var n;for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])===!1)break},window.matchMedia?t.matchesMedia=function(t){return""==t?!0:window.matchMedia(t).matches}:window.styleMedia||window.media?t.matchesMedia=function(t){if(""==t)return!0;var e=window.styleMedia||window.media;return e.matchMedium(t||"all")}:window.getComputedStyle?t.matchesMedia=function(t){if(""==t)return!0;var e=document.createElement("style"),n=document.getElementsByTagName("script")[0],i=null;e.type="text/css",e.id="matchmediajs-test",n.parentNode.insertBefore(e,n),i="getComputedStyle"in window&&window.getComputedStyle(e,null)||e.currentStyle;var a="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return e.styleSheet?e.styleSheet.cssText=a:e.textContent=a,"1px"===i.width}:t.matchesMedia=function(t){if(""==t)return!0;var e,n,i,a,r={"min-width":null,"max-width":null},o=!1;for(i=t.split(/\s+and\s+/),e=0;er["max-width"]||null!==r["min-height"]&&cr["max-height"]?!1:!0},navigator.userAgent.match(/MSIE ([0-9]+)/)&&RegExp.$1<9&&(t.newStyle=function(t){var e=document.createElement("span");return e.innerHTML=' ",e})},initVars:function(){var e,n,i,a=navigator.userAgent;e="other",n=0,i=[["firefox",/Firefox\/([0-9\.]+)/],["bb",/BlackBerry.+Version\/([0-9\.]+)/],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/],["opera",/OPR\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)/],["edge",/Edge\/([0-9\.]+)/],["safari",/Version\/([0-9\.]+).+Safari/],["chrome",/Chrome\/([0-9\.]+)/],["ie",/MSIE ([0-9]+)/],["ie",/Trident\/.+rv:([0-9]+)/]],t.iterate(i,function(t,i){return a.match(i[1])?(e=i[0],n=parseFloat(RegExp.$1),!1):void 0}),t.vars.browser=e,t.vars.browserVersion=n,e="other",n=0,i=[["ios",/([0-9_]+) like Mac OS X/,function(t){return t.replace("_",".").replace("_","")}],["ios",/CPU like Mac OS X/,function(t){return 0}],["wp",/Windows Phone ([0-9\.]+)/,null],["android",/Android ([0-9\.]+)/,null],["mac",/Macintosh.+Mac OS X ([0-9_]+)/,function(t){return t.replace("_",".").replace("_","")}],["windows",/Windows NT ([0-9\.]+)/,null],["bb",/BlackBerry.+Version\/([0-9\.]+)/,null],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/,null]],t.iterate(i,function(t,i){return a.match(i[1])?(e=i[0],n=parseFloat(i[2]?i[2](RegExp.$1):RegExp.$1),!1):void 0}),t.vars.os=e,t.vars.osVersion=n,t.vars.IEVersion="ie"==t.vars.browser?t.vars.browserVersion:99,t.vars.touch="wp"==t.vars.os?navigator.msMaxTouchPoints>0:!!("ontouchstart"in window),t.vars.mobile="wp"==t.vars.os||"android"==t.vars.os||"ios"==t.vars.os||"bb"==t.vars.os}};return t.init(),t}();!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.skel=e()}(this,function(){return skel}); 3 | -------------------------------------------------------------------------------- /webroot/fonts/perfect.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /webroot/assets/js/scripts.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * A.mphibio.us 1.5.2 3 | * Copyright 2014, @cliveMoore @Treefrog 4 | * http://a.mphibio.us 5 | * Free to use under the MIT license. 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * 21/11/2014 8 | * 9 | */ 10 | 11 | /* ================================================================== 12 | * amp object is the foundation namespaced A.mphibio.us JS 13 | * Do not remove or comment out. 14 | * ================================================================== */ 15 | var amp = {}; 16 | 17 | /* ================================================================== 18 | * amp.init is run on DOM ready 19 | * Do not remove or comment out. 20 | * ================================================================== */ 21 | amp.init = function() { 22 | /* ================================================================== 23 | * cache: uncomment if you wish to enable and add content caching only. 24 | * ================================================================== */ 25 | // amp.cache(); 26 | 27 | /* ================================================================== 28 | * amp.bindlisteners() is an essential function. Do not remove or comment out. 29 | * ================================================================== */ 30 | amp.bindlisteners(); 31 | 32 | /* ================================================================== 33 | * Discern mobile or desktop and init specific behaviour for each. 34 | * ================================================================== */ 35 | if (!Modernizr.touch) { 36 | amp.desktoplisteners(); 37 | } else { 38 | amp.mobilelisteners(); 39 | } 40 | 41 | }; 42 | 43 | amp.cache = function() { 44 | /* ================================================================== 45 | * Add content caching here 46 | * ================================================================== */ 47 | amp.dom = {}; 48 | }; 49 | 50 | amp.bindlisteners = function() { 51 | /* ================================================================== 52 | * Bind Listeners 53 | * These are bound once the scripts, css and DOM are fully loaded 54 | * ================================================================== */ 55 | 56 | /* General layout helpers */ 57 | $('table td:first-child').addClass('first'); 58 | $('table tr:nth-child(2n+1)').addClass('odd'); 59 | $('table tr:nth-child(2n)').addClass('even'); 60 | $('table tr:first-child').addClass('first'); 61 | $('table tr:last-child').addClass('last'); 62 | $('table td:first-child').addClass('first'); 63 | $('table td:last-child').addClass('last'); 64 | $('table th:first-child').addClass('first'); 65 | $('table th:last-child').addClass('last'); 66 | $('ul li:first-child').addClass('first'); 67 | $('ul li:last-child').addClass('last'); 68 | 69 | 70 | $(document).on('click', '.checkall', (function () { 71 | $(this).closest('fieldset').find(':checkbox').prop('checked', this.checked); 72 | })); 73 | 74 | $(document).on('click', '#nav li', (function(){ 75 | if ($(this).hasClass('active')) { 76 | } else { 77 | $('#nav li').removeClass('active'); 78 | $(this).addClass('active'); 79 | /* I May use this later 80 | $(content).show().addClass('active').siblings().hide().removeClass('active'); */ 81 | } 82 | })); 83 | 84 | $(document).on( 'click', '.tabs li a', (function(){ 85 | var parent = $(this).closest('ul').attr('id'); 86 | var content = '#'+$(this).attr('amp-tab-content'); 87 | if ($(this).hasClass('active') && content.length) { 88 | } else { 89 | if (parent > 0) 90 | { 91 | $('#'+parent+'.tabs li a').removeClass('active'); 92 | $(this).addClass('active'); 93 | } else { 94 | $('.tabs li a').removeClass('active'); 95 | $(this).addClass('active'); 96 | } 97 | $(content).show().addClass('active').siblings().hide().removeClass('active'); 98 | } 99 | return false; 100 | })); 101 | 102 | $(document).on('change', '.options_select', (function(){ 103 | 104 | var target = '.options_div.' + $(this).val(); 105 | 106 | $('.options_div').each(function(){ 107 | $(this).addClass('hide'); 108 | }); 109 | console.log(target); 110 | if( $(target).length > 0 ){ 111 | $(target).removeClass('hide'); 112 | } 113 | })); 114 | 115 | 116 | $(document).on( 'click', '.opener', (function(){ 117 | 118 | var thisOfCourse = $(this).attr('amp-target'); 119 | 120 | if($('#'+$(this).attr('amp-target')).hasClass('hide')){ 121 | $('#'+thisOfCourse+'').removeClass('hide'); 122 | } else { 123 | $('#'+thisOfCourse+'').addClass('hide'); 124 | } 125 | })); 126 | 127 | $(document).on( 'click', '.amp_trigger', (function(){ 128 | 129 | var myLocal = $(this).attr('location'); 130 | 131 | if($(this).attr('clicktype') == 'out') { 132 | window.open($(this).attr('location')); 133 | } else { 134 | document.location.href = $(this).attr('location'); 135 | } 136 | })); 137 | 138 | $(document).on( 'click', '.modal_opener', (function(){ 139 | 140 | var thisOfCourse = $(this).attr('amp-target'); 141 | 142 | if($('#'+$(this).attr('amp-target')).hasClass('show')){ 143 | $('body').css('overflow','auto'); 144 | $('#'+thisOfCourse+'').removeClass('show'); 145 | $('.focus').removeClass('blur'); 146 | } else { 147 | $('body').css('overflow','hidden'); 148 | $('#'+thisOfCourse+'').addClass('show').css('overflow','auto'); 149 | $('.focus').addClass('blur'); 150 | 151 | var content = '#'+$(this).attr('amp-tab-content'); 152 | var contenttabheader = '#trigger_'+$(this).attr('amp-tab-content'); 153 | 154 | if ($(contenttabheader).hasClass('active') && content.length) { 155 | } else { 156 | $('.tabs li a').removeClass('active'); 157 | $(contenttabheader).addClass('active'); 158 | $(content).show().addClass('active').siblings().hide().removeClass('active'); 159 | } 160 | 161 | } 162 | })); 163 | 164 | $(document).on( 'click', '.modal_kill', (function(){ 165 | var killIt = $(this).attr('amp-target'); 166 | $('body').css('overflow','auto'); 167 | $('#'+killIt+'').removeClass('show'); 168 | $('.focus').removeClass('blur'); 169 | })); 170 | 171 | $(document).on( 'click', '#searchtoggle, .search_cancel', (function(){ 172 | if($('#searchtoggle').hasClass('active')){ 173 | $('#searchtoggle').removeClass('active'); 174 | $('#search_form').removeClass('open'); 175 | } else { 176 | $('#searchtoggle').addClass('active'); 177 | $('#search_form').addClass('open'); 178 | } 179 | })); 180 | 181 | 182 | $(document).on( 'click', '#navtoggle', (function(){ 183 | 184 | if($('#navtoggle').hasClass('active')){ 185 | $('#navtoggle').removeClass('active'); 186 | $('#mobilenav').removeClass('open'); 187 | } else { 188 | $('#navtoggle').addClass('active'); 189 | $('#mobilenav').addClass('open'); 190 | } 191 | })); 192 | }; 193 | 194 | amp.mobilelisteners = function() { 195 | /* ================================================================== 196 | * Mobile browser specific listeners are placed here 197 | * *** NOT *** executed by desktop browsers. See amp.desktoplisteners instead. 198 | * ================================================================== */ 199 | 200 | //define dragging, set to false by default 201 | var dragging = false 202 | 203 | //set dragging active 204 | $("body").on("touchmove", function(){ 205 | dragging = true; 206 | }); 207 | 208 | //reset dragging 209 | $("body").on("touchstart", function(){ 210 | dragging = false; 211 | }); 212 | 213 | $(document).on('click', '#mobilenav ul.mainnav li a', (function(event){ 214 | 215 | console.log('click'); 216 | 217 | // prevent immediate link following on non iOS and BB devices 218 | var iOS = (navigator.userAgent.match(/iPad|iPhone|iPod/g) ? true : false); 219 | var BB = (navigator.userAgent.match(/Blackberry|BB/g) ? true : false); 220 | 221 | if(iOS == false || BB == false) { 222 | 223 | var siblings = $(this).siblings('ul, .drop').length; 224 | 225 | if($(this).hasClass('activated') || siblings < 1 ) { 226 | //go ahead, follow link 227 | } else { 228 | event.preventDefault(); 229 | $(this).addClass('activated'); 230 | } 231 | 232 | } 233 | 234 | })); 235 | 236 | $(document).on('touchend', '#mobilenav ul.mainnav li a', function(){ 237 | 238 | console.log('touchend'); 239 | 240 | if(dragging = false) { 241 | 242 | var siblings = $(this).siblings('ul').length; 243 | 244 | if(siblings > 1) { 245 | $(this).addClass('okgo'); 246 | } 247 | 248 | } 249 | 250 | }); 251 | 252 | $(document).on('click', '#mobilenav li.okgo > a', function(){ 253 | window.location.href($(this).attr('href')); 254 | }); 255 | 256 | }; 257 | 258 | amp.desktoplisteners = function() { 259 | /* ================================================================== 260 | * Desktop browser specific listeners are placed here 261 | * *** NOT *** executed by mobile browsers. See amp.mobilelisteners instead. 262 | * ================================================================== */ 263 | $(document).on('click', '.makereq', function(){ 264 | amp.makeRequest($(this).attr('data'),$(this).attr('loc')); 265 | return false 266 | }); 267 | $(document).on('click', '.deleteaction', function(){ 268 | var r = confirm("Are you sure you wish to delete this item?"); 269 | if (r == true) { 270 | var dest = $(this).attr('dest'); 271 | $.ajax({ 272 | method: 'DELETE', 273 | url: $(this).attr('href'), 274 | data: {} 275 | }) 276 | .done(function() { 277 | location.href = dest; 278 | }); 279 | } 280 | 281 | return false 282 | }); 283 | 284 | }; 285 | 286 | $(document).ready(function() { 287 | /* ================================================================== 288 | * The document.ready is executed once all scripts and CSS are loaded 289 | * and the DOM has been readied. 290 | * Generally is used to bind listeners for responsive web 291 | * Generally a good thing to add listeners to the object, 292 | * however it is ok to be putting listeners directly in here. 293 | * ================================================================== */ 294 | amp.init(); // don't delete this - it is part of the A.mphibio.us startup 295 | 296 | }); 297 | 298 | amp.makeRequest = function(req, dest) { 299 | $.ajax({ 300 | method: 'POST', 301 | url: req, 302 | data: {} 303 | }) 304 | .done(function() { 305 | location.href = dest; 306 | }); 307 | 308 | } 309 | 310 | amp.openCreate = function(t) { 311 | $('#listDiv').hide(); 312 | $('#typeToggle').text('Create') 313 | $('#createName').val('') 314 | $('#appuuid').val('') 315 | $('#modDiv').show(); 316 | } 317 | 318 | 319 | 320 | amp.openList = function() { 321 | $('#listDiv').show(); 322 | $('#modDiv').hide(); 323 | } 324 | 325 | 326 | 327 | amp.loadLog = function(filter, sessionid) { 328 | $.ajax({ 329 | beforeSend: function(request) { 330 | request.setRequestHeader("Authorization", "Bearer "+sessionid); 331 | }, 332 | method: 'POST', 333 | url: "/api/v1/get/log/", 334 | data: JSON.stringify(filter) 335 | }) 336 | .done(function(data) { 337 | var body = []; 338 | console.log(data) 339 | for(i = 0; i < data.results.length; i++) { 340 | var o = "["+data.results[i].loglevel+"]" 341 | o += ""+data.results[i].dategenerated+"" 342 | o += ""+data.results[i].eventid+"" 343 | o += ""+data.results[i].appName+"" 344 | // Detail display 345 | o += "" 346 | // o += "
> Display
" 347 | 348 | // o += "
" 349 | o += "
" 350 | 351 | 352 | Object.keys(data.results[i].detail).forEach(function (prop) { 353 | o += '
' 354 | o += '
' + prop + '
' 355 | o += '
' + data.results[i].detail[prop] + '
' 356 | o += '
' 357 | }); 358 | o += "
" 359 | 360 | o += "" 361 | 362 | body[body.length] = o 363 | } 364 | $('#logview').html('' + body.join('') + '') 365 | $('.eventid').on('click', function(event){ 366 | event.preventDefault(); 367 | filter.eventid = $(this).attr('data'); 368 | amp.loadLog(filter,sessionid); 369 | }); 370 | $('.appid').on('click', function(event){ 371 | event.preventDefault(); 372 | filter.appid = $(this).attr('data'); 373 | amp.loadLog(filter,sessionid); 374 | }); 375 | $('.nodisplay').on('click', function(event){ 376 | event.preventDefault(); 377 | $(this).hide(); 378 | $(this).siblings('.dodisplay').show(); 379 | }); 380 | 381 | $('.filterprop').on('click', function(){ 382 | filter.prop = $(this).attr('data'); 383 | filter.propdata = encodeURI($(this).siblings('.propdata').text()); 384 | amp.loadLog(filter,sessionid); 385 | }); 386 | 387 | }); 388 | 389 | } 390 | -------------------------------------------------------------------------------- /webroot/assets/js/plugins.min.js: -------------------------------------------------------------------------------- 1 | /*! a.mphibio.us v1.5.3 | Copyright 2015, Clive Moore @cliveMoore @Treefrog | http://a.mphibio.us | http://www.opensource.org/licenses/mit-license.php */ 2 | !function(){for(var a,b=function(){},c=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeline","timelineEnd","timeStamp","trace","warn"],d=c.length,e=window.console=window.console||{};d--;)a=c[d],e[a]||(e[a]=b)}(),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if("object"==typeof a){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;bc;c++)b.push(a[c]);else b.push(a);return b}function g(a,b,c){if(!(this instanceof g))return new g(a,b);"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=f(a),this.options=d({},this.options),"function"==typeof b?c=b:d(this.options,b),c&&this.on("always",c),this.getImages(),j&&(this.jqDeferred=new j.Deferred);var e=this;setTimeout(function(){e.check()})}function h(a){this.img=a}function i(a){this.src=a,n[a]=this}var j=a.jQuery,k=a.console,l="undefined"!=typeof k,m=Object.prototype.toString;g.prototype=new b,g.prototype.options={},g.prototype.getImages=function(){this.images=[];for(var a=0,b=this.elements.length;b>a;a++){var c=this.elements[a];"IMG"===c.nodeName&&this.addImage(c);var d=c.nodeType;if(d&&(1===d||9===d||11===d))for(var e=c.querySelectorAll("img"),f=0,g=e.length;g>f;f++){var h=e[f];this.addImage(h)}}},g.prototype.addImage=function(a){var b=new h(a);this.images.push(b)},g.prototype.check=function(){function a(a,e){return b.options.debug&&l&&k.log("confirm",a,e),b.progress(a),c++,c===d&&b.complete(),!0}var b=this,c=0,d=this.images.length;if(this.hasAnyBroken=!1,!d)return void this.complete();for(var e=0;d>e;e++){var f=this.images[e];f.on("confirm",a),f.check()}},g.prototype.progress=function(a){this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded;var b=this;setTimeout(function(){b.emit("progress",b,a),b.jqDeferred&&b.jqDeferred.notify&&b.jqDeferred.notify(b,a)})},g.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var b=this;setTimeout(function(){if(b.emit(a,b),b.emit("always",b),b.jqDeferred){var c=b.hasAnyBroken?"reject":"resolve";b.jqDeferred[c](b)}})},j&&(j.fn.imagesLoaded=function(a,b){var c=new g(this,a,b);return c.jqDeferred.promise(j(this))}),h.prototype=new b,h.prototype.check=function(){var a=n[this.img.src]||new i(this.img.src);if(a.isConfirmed)return void this.confirm(a.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var b=this;a.on("confirm",function(a,c){return b.confirm(a.isLoaded,c),!0}),a.check()},h.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("confirm",this,b)};var n={};return i.prototype=new b,i.prototype.check=function(){if(!this.isChecked){var a=new Image;c.bind(a,"load",this),c.bind(a,"error",this),a.src=this.src,this.isChecked=!0}},i.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},i.prototype.onload=function(a){this.confirm(!0,"onload"),this.unbindProxyEvents(a)},i.prototype.onerror=function(a){this.confirm(!1,"onerror"),this.unbindProxyEvents(a)},i.prototype.confirm=function(a,b){this.isConfirmed=!0,this.isLoaded=a,this.emit("confirm",this,b)},i.prototype.unbindProxyEvents=function(a){c.unbind(a.target,"load",this),c.unbind(a.target,"error",this)},g}),window.matchMedia||(window.matchMedia=function(){"use strict";var a=window.styleMedia||window.media;if(!a){var b=document.createElement("style"),c=document.getElementsByTagName("script")[0],d=null;b.type="text/css",b.id="matchmediajs-test",c.parentNode.insertBefore(b,c),d="getComputedStyle"in window&&window.getComputedStyle(b,null)||b.currentStyle,a={matchMedium:function(a){var c="@media "+a+"{ #matchmediajs-test { width: 1px; } }";return b.styleSheet?b.styleSheet.cssText=c:b.textContent=c,"1px"===d.width}}}return function(b){return{matches:a.matchMedium(b||"all"),media:b||"all"}}}()),function(a,b,c){"use strict";function d(a){var b,c,d,e,g,h=a||{};b=h.elements||f.getAllElements();for(var i=0,j=b.length;j>i;i++)if(c=b[i],d=c.parentNode,e=void 0,g=void 0,"IMG"===c.nodeName.toUpperCase()&&(c[f.ns]||(c[f.ns]={}),h.reevaluate||!c[f.ns].evaluated)){if("PICTURE"===d.nodeName.toUpperCase()){if(f.removeVideoShim(d),e=f.getMatch(c,d),e===!1)continue}else e=void 0;("PICTURE"===d.nodeName.toUpperCase()||c.srcset&&!f.srcsetSupported||!f.sizesSupported&&c.srcset&&c.srcset.indexOf("w")>-1)&&f.dodgeSrcset(c),e?(g=f.processSourceSet(e),f.applyBestCandidate(g,c)):(g=f.processSourceSet(c),(void 0===c.srcset||c[f.ns].srcset)&&f.applyBestCandidate(g,c)),c[f.ns].evaluated=!0}}function e(){function c(){var b;a._picturefillWorking||(a._picturefillWorking=!0,a.clearTimeout(b),b=a.setTimeout(function(){d({reevaluate:!0}),a._picturefillWorking=!1},60))}d();var e=setInterval(function(){return d(),/^loaded|^i|^c/.test(b.readyState)?void clearInterval(e):void 0},250);a.addEventListener?a.addEventListener("resize",c,!1):a.attachEvent&&a.attachEvent("onresize",c)}if(a.HTMLPictureElement)return void(a.picturefill=function(){});b.createElement("picture");var f={};f.ns="picturefill",function(){f.srcsetSupported="srcset"in c,f.sizesSupported="sizes"in c}(),f.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},f.endsWith=function(a,b){return a.endsWith?a.endsWith(b):-1!==a.indexOf(b,a.length-b.length)},f.restrictsMixedContent=function(){return"https:"===a.location.protocol},f.matchesMedia=function(b){return a.matchMedia&&a.matchMedia(b).matches},f.getDpr=function(){return a.devicePixelRatio||1},f.getWidthFromLength=function(a){a=a&&a.indexOf("%")>-1==!1&&(parseFloat(a)>0||a.indexOf("calc(")>-1)?a:"100vw",a=a.replace("vw","%"),f.lengthEl||(f.lengthEl=b.createElement("div"),f.lengthEl.style.cssText="border:0;display:block;font-size:1em;left:0;margin:0;padding:0;position:absolute;visibility:hidden"),f.lengthEl.style.width=a,b.body.appendChild(f.lengthEl),f.lengthEl.className="helper-from-picturefill-js",f.lengthEl.offsetWidth<=0&&(f.lengthEl.style.width=b.documentElement.offsetWidth+"px");var c=f.lengthEl.offsetWidth;return b.body.removeChild(f.lengthEl),c},f.types={},f.types["image/jpeg"]=!0,f.types["image/gif"]=!0,f.types["image/png"]=!0,f.types["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),f.types["image/webp"]=function(){var a="image/webp";c.onerror=function(){f.types[a]=!1,d()},c.onload=function(){f.types[a]=1===c.width,d()},c.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="},f.verifyTypeSupport=function(a){var b=a.getAttribute("type");return null===b||""===b?!0:"function"==typeof f.types[b]?(f.types[b](),"pending"):f.types[b]},f.parseSize=function(a){var b=/(\([^)]+\))?\s*(.+)/g.exec(a);return{media:b&&b[1],length:b&&b[2]}},f.findWidthFromSourceSize=function(a){for(var b,c=f.trim(a).split(/\s*,\s*/),d=0,e=c.length;e>d;d++){var g=c[d],h=f.parseSize(g),i=h.length,j=h.media;if(i&&(!j||f.matchesMedia(j))){b=i;break}}return f.getWidthFromLength(b)},f.parseSrcset=function(a){for(var b=[];""!==a;){a=a.replace(/^\s+/g,"");var c,d=a.search(/\s/g),e=null;if(-1!==d){c=a.slice(0,d);var f=c.slice(-1);if((","===f||""===c)&&(c=c.replace(/,+$/,""),e=""),a=a.slice(d+1),null===e){var g=a.indexOf(",");-1!==g?(e=a.slice(0,g),a=a.slice(g+1)):(e=a,a="")}}else c=a,a="";(c||e)&&b.push({url:c,descriptor:e})}return b},f.parseDescriptor=function(a,b){var c,d=b||"100vw",e=a&&a.replace(/(^\s+|\s+$)/g,""),g=f.findWidthFromSourceSize(d);if(e)for(var h=e.split(" "),i=h.length-1;i>=0;i--){var j=h[i],k=j&&j.slice(j.length-1);if("h"!==k&&"w"!==k||f.sizesSupported){if("x"===k){var l=j&&parseFloat(j,10);c=l&&!isNaN(l)?l:1}}else c=parseFloat(parseInt(j,10)/g)}return c||1},f.getCandidatesFromSourceSet=function(a,b){for(var c=f.parseSrcset(a),d=[],e=0,g=c.length;g>e;e++){var h=c[e];d.push({url:h.url,resolution:f.parseDescriptor(h.descriptor,b)})}return d},f.dodgeSrcset=function(a){a.srcset&&(a[f.ns].srcset=a.srcset,a.removeAttribute("srcset"))},f.processSourceSet=function(a){var b=a.getAttribute("srcset"),c=a.getAttribute("sizes"),d=[];return"IMG"===a.nodeName.toUpperCase()&&a[f.ns]&&a[f.ns].srcset&&(b=a[f.ns].srcset),b&&(d=f.getCandidatesFromSourceSet(b,c)),d},f.applyBestCandidate=function(a,b){var c,d,e;a.sort(f.ascendingSort),d=a.length,e=a[d-1];for(var g=0;d>g;g++)if(c=a[g],c.resolution>=f.getDpr()){e=c;break}if(e&&!f.endsWith(b.src,e.url))if(f.restrictsMixedContent()&&"http:"===e.url.substr(0,"http:".length).toLowerCase())void 0!==typeof console&&console.warn("Blocked mixed content image "+e.url);else{b.src=e.url,b.currentSrc=b.src;var h=b.style||{},i="webkitBackfaceVisibility"in h,j=h.zoom;i&&(h.zoom=".999",i=b.offsetWidth,h.zoom=j)}},f.ascendingSort=function(a,b){return a.resolution-b.resolution},f.removeVideoShim=function(a){var b=a.getElementsByTagName("video");if(b.length){for(var c=b[0],d=c.getElementsByTagName("source");d.length;)a.insertBefore(d[0],c);c.parentNode.removeChild(c)}},f.getAllElements=function(){for(var a=[],c=b.getElementsByTagName("img"),d=0,e=c.length;e>d;d++){var g=c[d];("PICTURE"===g.parentNode.nodeName.toUpperCase()||null!==g.getAttribute("srcset")||g[f.ns]&&null!==g[f.ns].srcset)&&a.push(g)}return a},f.getMatch=function(a,b){for(var c,d=b.childNodes,e=0,g=d.length;g>e;e++){var h=d[e];if(1===h.nodeType){if(h===a)return c;if("SOURCE"===h.nodeName.toUpperCase()){null!==h.getAttribute("src")&&void 0!==typeof console&&console.warn("The `src` attribute is invalid on `picture` `source` element; instead, use `srcset`.");var i=h.getAttribute("media");if(h.getAttribute("srcset")&&(!i||f.matchesMedia(i))){var j=f.verifyTypeSupport(h);if(j===!0){c=h;break}if("pending"===j)return!1}}}}return c},e(),d._=f,"object"==typeof module&&"object"==typeof module.exports?module.exports=d:"function"==typeof define&&define.amd?define(function(){return d}):"object"==typeof a&&(a.picturefill=d)}(this,this.document,new this.Image); -------------------------------------------------------------------------------- /webroot/assets/js/js/modernizr-2.6.2.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f