├── Dashboards └── Dashboards - Shiny Dev Conf - Palo Alto 2016 v2.pdf ├── Debugging ├── .gitignore ├── README.md ├── fonts │ ├── ODelI1aHBYDBqgeIAH2zlIa1YDtoarzwSXxTHggEXMw.woff2 │ ├── ODelI1aHBYDBqgeIAH2zlJbPFduIYtoLzwST68uhz_Y.woff2 │ ├── mrl8jkM18OlOQN8JLgasD4a1YDtoarzwSXxTHggEXMw.woff2 │ ├── mrl8jkM18OlOQN8JLgasD5bPFduIYtoLzwST68uhz_Y.woff2 │ ├── toadOcfmlt9b38dHJxOBGCP2LEk6lMzYsRqr3dHFImA.woff2 │ ├── toadOcfmlt9b38dHJxOBGDOFnJNygIkrHciC8BWzbCz3rGVtsTkPsbDajuO5ueQw.woff2 │ ├── toadOcfmlt9b38dHJxOBGJkF8H8ye47wsfpWywda8og.woff2 │ ├── toadOcfmlt9b38dHJxOBGKyGJhAh-RE0BxGcd_izyev3rGVtsTkPsbDajuO5ueQw.woff2 │ ├── toadOcfmlt9b38dHJxOBGMzFoXZ-Kj537nB_-9jJhlA.woff2 │ └── toadOcfmlt9b38dHJxOBGO4s1Ux4PuImWPk5fSr6HPL3rGVtsTkPsbDajuO5ueQw.woff2 ├── images │ ├── breakpoint-hit.png │ ├── breakpoint.png │ ├── browser.png │ ├── chrome-devtools.png │ ├── console.png │ ├── inspectelement.png │ ├── kmeans-showcase.gif │ ├── pauseoncaught.png │ ├── reactlog.png │ ├── shiny-error.png │ ├── shiny-logo.png │ └── texturebg.png ├── shiny-breakpoints │ ├── server.R │ └── ui.R ├── shiny-debug-doc.Rmd ├── shiny-debugging.Rmd ├── shiny-debugging.html ├── shiny-debugging_files │ ├── ioslides-13.5.1 │ │ ├── fonts │ │ │ ├── OpenSans.ttf │ │ │ ├── OpenSansItalic.ttf │ │ │ ├── OpenSansSemibold.ttf │ │ │ ├── OpenSansSemiboldItalic.ttf │ │ │ ├── SourceCodePro.ttf │ │ │ └── fonts.css │ │ ├── images │ │ │ └── google_developers_icon_128.png │ │ ├── js │ │ │ ├── hammer.js │ │ │ ├── modernizr.custom.45394.js │ │ │ ├── order.js │ │ │ ├── polyfills │ │ │ │ ├── classList.min.js │ │ │ │ ├── dataset.min.js │ │ │ │ └── history.min.js │ │ │ ├── prettify │ │ │ │ ├── lang-r.js │ │ │ │ ├── lang-tex.js │ │ │ │ ├── lang-yaml.js │ │ │ │ ├── prettify.css │ │ │ │ └── prettify.js │ │ │ ├── require-1.0.8.min.js │ │ │ ├── slide-controller.js │ │ │ └── slide-deck.js │ │ └── theme │ │ │ └── css │ │ │ ├── default.css │ │ │ └── phone.css │ └── logo.png └── shiny-slides.css ├── Gadgets ├── .gitignore ├── brush.R ├── brush2.R ├── gadgets.pdf └── password.R ├── Modules ├── 01-Modules.pdf ├── Demo │ ├── app.R │ └── modularized │ │ ├── app.R │ │ └── gapModule.R ├── Exercise-1 │ ├── app.R │ ├── solution* │ │ └── app.R │ └── solution │ │ ├── app.R │ │ └── gapModule.R ├── Exercise-2 │ ├── app.R │ ├── gapModule.R │ ├── solution* │ │ └── app.R │ └── solution │ │ ├── app.R │ │ └── gapModule.R ├── Exercise-3 │ ├── app.R │ ├── solution* │ │ └── app.R │ ├── solution │ │ ├── app.R │ │ ├── storms.csv │ │ └── uploadModule.R │ ├── storms.csv │ └── uploadModule.R ├── Exercise-4 │ ├── app.R │ ├── downloadModule.R │ ├── solution* │ │ └── app.R │ ├── solution │ │ ├── app.R │ │ ├── downloadModule.R │ │ ├── storms.csv │ │ └── uploadModule.R │ ├── storms.csv │ └── uploadModule.R ├── solution-1.Rmd ├── solution-2.Rmd ├── solution-3.Rmd ├── solution-4.Rmd ├── warm-up-1.Rmd ├── warm-up-1.html ├── warm-up-2.Rmd ├── warm-up-2.html └── warm-ups.R ├── Profiling ├── profiling-examples.Rmd ├── profiling-examples.html └── shiny-profiling.pdf ├── README.md ├── Reactivity ├── .gitignore ├── Exercise_00.R ├── Exercise_01.R ├── Exercise_02.R ├── Exercise_03.R ├── Exercise_04.R ├── Exercise_05.R ├── Exercise_07.R ├── Solution_00.R ├── Solution_01.R ├── Solution_02.R ├── Solution_03.R ├── Solution_04.R ├── Solution_05a.R ├── Solution_05b.R ├── Solution_07a.R ├── Solution_07b.R ├── Unsolution_00.R ├── Unsolution_01.R ├── Unsolution_01b.R ├── Unsolution_02.R ├── slides.Rmd ├── slides.css └── slides.html └── UI ├── Understanding-UI.Rmd ├── Understanding-UI.pdf ├── index-demo ├── server.R └── www │ └── index.html ├── scorecard-app ├── .gitignore ├── README.md ├── flickr_api.R ├── scorecard-app.Rproj ├── server.R ├── ui.R └── www │ ├── assets │ ├── _scss │ │ ├── all.scss │ │ ├── components │ │ │ ├── _accordions.scss │ │ │ ├── _alerts.scss │ │ │ ├── _disclaimer.scss │ │ │ ├── _footer.scss │ │ │ ├── _forms.scss │ │ │ ├── _search.scss │ │ │ ├── _sidenav.scss │ │ │ └── _skipnav.scss │ │ ├── core │ │ │ ├── _base.scss │ │ │ ├── _defaults.scss │ │ │ ├── _grid-settings.scss │ │ │ ├── _grid.scss │ │ │ ├── _utilities.scss │ │ │ └── _variables.scss │ │ ├── elements │ │ │ ├── _buttons.scss │ │ │ ├── _figure.scss │ │ │ ├── _inputs.scss │ │ │ ├── _labels.scss │ │ │ ├── _list.scss │ │ │ ├── _table.scss │ │ │ └── _typography.scss │ │ └── lib │ │ │ ├── _normalize.scss │ │ │ ├── bourbon │ │ │ ├── _bourbon-deprecated-upcoming.scss │ │ │ ├── _bourbon.scss │ │ │ ├── addons │ │ │ │ ├── _border-color.scss │ │ │ │ ├── _border-radius.scss │ │ │ │ ├── _border-style.scss │ │ │ │ ├── _border-width.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _ellipsis.scss │ │ │ │ ├── _font-stacks.scss │ │ │ │ ├── _hide-text.scss │ │ │ │ ├── _margin.scss │ │ │ │ ├── _padding.scss │ │ │ │ ├── _position.scss │ │ │ │ ├── _prefixer.scss │ │ │ │ ├── _retina-image.scss │ │ │ │ ├── _size.scss │ │ │ │ ├── _text-inputs.scss │ │ │ │ ├── _timing-functions.scss │ │ │ │ ├── _triangle.scss │ │ │ │ └── _word-wrap.scss │ │ │ ├── css3 │ │ │ │ ├── _animation.scss │ │ │ │ ├── _appearance.scss │ │ │ │ ├── _backface-visibility.scss │ │ │ │ ├── _background-image.scss │ │ │ │ ├── _background.scss │ │ │ │ ├── _border-image.scss │ │ │ │ ├── _calc.scss │ │ │ │ ├── _columns.scss │ │ │ │ ├── _filter.scss │ │ │ │ ├── _flex-box.scss │ │ │ │ ├── _font-face.scss │ │ │ │ ├── _font-feature-settings.scss │ │ │ │ ├── _hidpi-media-query.scss │ │ │ │ ├── _hyphens.scss │ │ │ │ ├── _image-rendering.scss │ │ │ │ ├── _keyframes.scss │ │ │ │ ├── _linear-gradient.scss │ │ │ │ ├── _perspective.scss │ │ │ │ ├── _placeholder.scss │ │ │ │ ├── _radial-gradient.scss │ │ │ │ ├── _selection.scss │ │ │ │ ├── _text-decoration.scss │ │ │ │ ├── _transform.scss │ │ │ │ ├── _transition.scss │ │ │ │ └── _user-select.scss │ │ │ ├── functions │ │ │ │ ├── _assign-inputs.scss │ │ │ │ ├── _contains-falsy.scss │ │ │ │ ├── _contains.scss │ │ │ │ ├── _is-length.scss │ │ │ │ ├── _is-light.scss │ │ │ │ ├── _is-number.scss │ │ │ │ ├── _is-size.scss │ │ │ │ ├── _modular-scale.scss │ │ │ │ ├── _px-to-em.scss │ │ │ │ ├── _px-to-rem.scss │ │ │ │ ├── _shade.scss │ │ │ │ ├── _strip-units.scss │ │ │ │ ├── _tint.scss │ │ │ │ ├── _transition-property-name.scss │ │ │ │ └── _unpack.scss │ │ │ ├── helpers │ │ │ │ ├── _convert-units.scss │ │ │ │ ├── _directional-values.scss │ │ │ │ ├── _font-source-declaration.scss │ │ │ │ ├── _gradient-positions-parser.scss │ │ │ │ ├── _linear-angle-parser.scss │ │ │ │ ├── _linear-gradient-parser.scss │ │ │ │ ├── _linear-positions-parser.scss │ │ │ │ ├── _linear-side-corner-parser.scss │ │ │ │ ├── _radial-arg-parser.scss │ │ │ │ ├── _radial-gradient-parser.scss │ │ │ │ ├── _radial-positions-parser.scss │ │ │ │ ├── _render-gradients.scss │ │ │ │ ├── _shape-size-stripper.scss │ │ │ │ └── _str-to-num.scss │ │ │ └── settings │ │ │ │ ├── _asset-pipeline.scss │ │ │ │ ├── _prefixer.scss │ │ │ │ └── _px-to-em.scss │ │ │ └── neat │ │ │ ├── _neat-helpers.scss │ │ │ ├── _neat.scss │ │ │ ├── functions │ │ │ ├── _new-breakpoint.scss │ │ │ └── _private.scss │ │ │ ├── grid │ │ │ ├── _box-sizing.scss │ │ │ ├── _direction-context.scss │ │ │ ├── _display-context.scss │ │ │ ├── _fill-parent.scss │ │ │ ├── _media.scss │ │ │ ├── _omega.scss │ │ │ ├── _outer-container.scss │ │ │ ├── _pad.scss │ │ │ ├── _private.scss │ │ │ ├── _row.scss │ │ │ ├── _shift.scss │ │ │ ├── _span-columns.scss │ │ │ ├── _to-deprecate.scss │ │ │ └── _visual-grid.scss │ │ │ └── settings │ │ │ ├── _disable-warnings.scss │ │ │ ├── _grid.scss │ │ │ └── _visual-grid.scss │ ├── css │ │ ├── google-fonts.css │ │ ├── main.css │ │ ├── main.scss │ │ └── normalize.min.css │ ├── fonts │ │ ├── merriweather-bold-webfont.eot │ │ ├── merriweather-bold-webfont.ttf │ │ ├── merriweather-bold-webfont.woff │ │ ├── merriweather-bold-webfont.woff2 │ │ ├── merriweather-italic-webfont.eot │ │ ├── merriweather-italic-webfont.ttf │ │ ├── merriweather-italic-webfont.woff │ │ ├── merriweather-italic-webfont.woff2 │ │ ├── merriweather-light-webfont.eot │ │ ├── merriweather-light-webfont.ttf │ │ ├── merriweather-light-webfont.woff │ │ ├── merriweather-light-webfont.woff2 │ │ ├── merriweather-regular-webfont.eot │ │ ├── merriweather-regular-webfont.ttf │ │ ├── merriweather-regular-webfont.woff │ │ ├── merriweather-regular-webfont.woff2 │ │ ├── sourcesanspro-bold-webfont.eot │ │ ├── sourcesanspro-bold-webfont.ttf │ │ ├── sourcesanspro-bold-webfont.woff │ │ ├── sourcesanspro-bold-webfont.woff2 │ │ ├── sourcesanspro-italic-webfont.eot │ │ ├── sourcesanspro-italic-webfont.ttf │ │ ├── sourcesanspro-italic-webfont.woff │ │ ├── sourcesanspro-italic-webfont.woff2 │ │ ├── sourcesanspro-light-webfont.eot │ │ ├── sourcesanspro-light-webfont.ttf │ │ ├── sourcesanspro-light-webfont.woff │ │ ├── sourcesanspro-light-webfont.woff2 │ │ ├── sourcesanspro-regular-webfont.eot │ │ ├── sourcesanspro-regular-webfont.ttf │ │ ├── sourcesanspro-regular-webfont.woff │ │ └── sourcesanspro-regular-webfont.woff2 │ ├── img │ │ ├── alerts │ │ │ ├── error.png │ │ │ ├── error.svg │ │ │ ├── info.png │ │ │ ├── info.svg │ │ │ ├── success.png │ │ │ ├── success.svg │ │ │ ├── warning.png │ │ │ └── warning.svg │ │ ├── arrow-down.png │ │ ├── arrow-down.svg │ │ ├── arrow-right.png │ │ ├── arrow-right.svg │ │ ├── correct8.png │ │ ├── correct8.svg │ │ ├── correct9.png │ │ ├── correct9.svg │ │ ├── favicons │ │ │ ├── favicon-114.png │ │ │ ├── favicon-144.png │ │ │ ├── favicon-16.png │ │ │ ├── favicon-192.png │ │ │ ├── favicon-57.png │ │ │ ├── favicon-72.png │ │ │ ├── favicon.ico │ │ │ └── favicon.png │ │ ├── logo-img.png │ │ ├── minus.png │ │ ├── minus.svg │ │ ├── plus.png │ │ ├── plus.svg │ │ ├── search.png │ │ ├── search.svg │ │ ├── social-icons │ │ │ ├── png │ │ │ │ ├── facebook25.png │ │ │ │ ├── rss25.png │ │ │ │ ├── twitter16.png │ │ │ │ └── youtube15.png │ │ │ └── svg │ │ │ │ ├── facebook25.svg │ │ │ │ ├── rss25.svg │ │ │ │ ├── twitter16.svg │ │ │ │ └── youtube15.svg │ │ └── us_flag_small.png │ └── js │ │ ├── components.js │ │ └── vendor │ │ ├── html5shiv.js │ │ ├── jquery-1.11.3.min.js │ │ ├── jquery-1.11.3.min.map │ │ ├── rem.min.js │ │ ├── respond.js │ │ └── selectivizr-min.js │ ├── header-image.jpg │ ├── index.html │ └── ring-alt.svg └── templates-demo ├── app.R └── template.html /Dashboards/Dashboards - Shiny Dev Conf - Palo Alto 2016 v2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Dashboards/Dashboards - Shiny Dev Conf - Palo Alto 2016 v2.pdf -------------------------------------------------------------------------------- /Debugging/.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | -------------------------------------------------------------------------------- /Debugging/README.md: -------------------------------------------------------------------------------- 1 | # Shiny Debugging Talk 2 | 3 | This repo contains an article, slide deck, and sample code for the Shiny Debugging talk given at the [2016 Shiny Developer Conference](http://blog.rstudio.org/2015/10/29/shiny-developer-conference-stanford-university-january-2016/). 4 | -------------------------------------------------------------------------------- /Debugging/fonts/ODelI1aHBYDBqgeIAH2zlIa1YDtoarzwSXxTHggEXMw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/ODelI1aHBYDBqgeIAH2zlIa1YDtoarzwSXxTHggEXMw.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/ODelI1aHBYDBqgeIAH2zlJbPFduIYtoLzwST68uhz_Y.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/ODelI1aHBYDBqgeIAH2zlJbPFduIYtoLzwST68uhz_Y.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/mrl8jkM18OlOQN8JLgasD4a1YDtoarzwSXxTHggEXMw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/mrl8jkM18OlOQN8JLgasD4a1YDtoarzwSXxTHggEXMw.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/mrl8jkM18OlOQN8JLgasD5bPFduIYtoLzwST68uhz_Y.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/mrl8jkM18OlOQN8JLgasD5bPFduIYtoLzwST68uhz_Y.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/toadOcfmlt9b38dHJxOBGCP2LEk6lMzYsRqr3dHFImA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/toadOcfmlt9b38dHJxOBGCP2LEk6lMzYsRqr3dHFImA.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/toadOcfmlt9b38dHJxOBGDOFnJNygIkrHciC8BWzbCz3rGVtsTkPsbDajuO5ueQw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/toadOcfmlt9b38dHJxOBGDOFnJNygIkrHciC8BWzbCz3rGVtsTkPsbDajuO5ueQw.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/toadOcfmlt9b38dHJxOBGJkF8H8ye47wsfpWywda8og.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/toadOcfmlt9b38dHJxOBGJkF8H8ye47wsfpWywda8og.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/toadOcfmlt9b38dHJxOBGKyGJhAh-RE0BxGcd_izyev3rGVtsTkPsbDajuO5ueQw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/toadOcfmlt9b38dHJxOBGKyGJhAh-RE0BxGcd_izyev3rGVtsTkPsbDajuO5ueQw.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/toadOcfmlt9b38dHJxOBGMzFoXZ-Kj537nB_-9jJhlA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/toadOcfmlt9b38dHJxOBGMzFoXZ-Kj537nB_-9jJhlA.woff2 -------------------------------------------------------------------------------- /Debugging/fonts/toadOcfmlt9b38dHJxOBGO4s1Ux4PuImWPk5fSr6HPL3rGVtsTkPsbDajuO5ueQw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/fonts/toadOcfmlt9b38dHJxOBGO4s1Ux4PuImWPk5fSr6HPL3rGVtsTkPsbDajuO5ueQw.woff2 -------------------------------------------------------------------------------- /Debugging/images/breakpoint-hit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/breakpoint-hit.png -------------------------------------------------------------------------------- /Debugging/images/breakpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/breakpoint.png -------------------------------------------------------------------------------- /Debugging/images/browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/browser.png -------------------------------------------------------------------------------- /Debugging/images/chrome-devtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/chrome-devtools.png -------------------------------------------------------------------------------- /Debugging/images/console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/console.png -------------------------------------------------------------------------------- /Debugging/images/inspectelement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/inspectelement.png -------------------------------------------------------------------------------- /Debugging/images/kmeans-showcase.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/kmeans-showcase.gif -------------------------------------------------------------------------------- /Debugging/images/pauseoncaught.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/pauseoncaught.png -------------------------------------------------------------------------------- /Debugging/images/reactlog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/reactlog.png -------------------------------------------------------------------------------- /Debugging/images/shiny-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/shiny-error.png -------------------------------------------------------------------------------- /Debugging/images/shiny-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/shiny-logo.png -------------------------------------------------------------------------------- /Debugging/images/texturebg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/images/texturebg.png -------------------------------------------------------------------------------- /Debugging/shiny-breakpoints/server.R: -------------------------------------------------------------------------------- 1 | # 2 | # This is the server logic of a Shiny web application. You can run the 3 | # application by clicking 'Run App' above. 4 | # 5 | # Find out more about building applications with Shiny here: 6 | # 7 | # http://shiny.rstudio.com/ 8 | # 9 | 10 | library(shiny) 11 | 12 | # Define server logic required to draw a histogram 13 | shinyServer(function(input, output) { 14 | 15 | output$distPlot <- renderPlot({ 16 | 17 | # generate bins based on input$bins from ui.R 18 | x <- faithful[, 2] 19 | bins <- seq(min(x), max(x), length.out = input$bins + 1) 20 | cat("drawing histogram with", input$bins, "bins\n") 21 | 22 | # draw the histogram with the specified number of bins 23 | hist(x, breaks = bins, col = 'darkgray', border = 'white') 24 | }) 25 | 26 | }) 27 | -------------------------------------------------------------------------------- /Debugging/shiny-breakpoints/ui.R: -------------------------------------------------------------------------------- 1 | # 2 | # This is the user-interface definition of a Shiny web application. You can 3 | # run the application by clicking 'Run App' above. 4 | # 5 | # Find out more about building applications with Shiny here: 6 | # 7 | # http://shiny.rstudio.com/ 8 | # 9 | 10 | library(shiny) 11 | 12 | # Define UI for application that draws a histogram 13 | shinyUI(fluidPage( 14 | 15 | # Application title 16 | titlePanel("Old Faithful Geyser Data"), 17 | 18 | # Sidebar with a slider input for number of bins 19 | sidebarLayout( 20 | sidebarPanel( 21 | sliderInput("bins", 22 | "Number of bins:", 23 | min = 1, 24 | max = 50, 25 | value = 30) 26 | ), 27 | 28 | # Show a plot of the generated distribution 29 | mainPanel( 30 | plotOutput("distPlot") 31 | ) 32 | ) 33 | )) 34 | -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/OpenSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/OpenSans.ttf -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/OpenSansItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/OpenSansItalic.ttf -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/OpenSansSemibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/OpenSansSemibold.ttf -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/OpenSansSemiboldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/OpenSansSemiboldItalic.ttf -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/SourceCodePro.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/SourceCodePro.ttf -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Open Sans'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url(OpenSans.ttf) format('truetype'); 6 | } 7 | @font-face { 8 | font-family: 'Open Sans'; 9 | font-style: normal; 10 | font-weight: 600; 11 | src: url(OpenSansSemibold.ttf) format('truetype'); 12 | } 13 | @font-face { 14 | font-family: 'Open Sans'; 15 | font-style: italic; 16 | font-weight: 400; 17 | src: url(OpenSansItalic.ttf) format('truetype'); 18 | } 19 | @font-face { 20 | font-family: 'Open Sans'; 21 | font-style: italic; 22 | font-weight: 600; 23 | src: url(OpenSansSemiboldItalic.ttf) format('truetype'); 24 | } 25 | @font-face { 26 | font-family: 'Source Code Pro'; 27 | font-style: normal; 28 | font-weight: 400; 29 | src: url(SourceCodePro.ttf) format('truetype'); 30 | } 31 | -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/images/google_developers_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/shiny-debugging_files/ioslides-13.5.1/images/google_developers_icon_128.png -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/js/order.js: -------------------------------------------------------------------------------- 1 | /* 2 | RequireJS order 1.0.5 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. 3 | Available via the MIT or new BSD license. 4 | see: http://github.com/jrburke/requirejs for details 5 | */ 6 | (function(){function k(a){var b=a.currentTarget||a.srcElement,c;if(a.type==="load"||l.test(b.readyState)){a=b.getAttribute("data-requiremodule");j[a]=!0;for(a=0;c=g[a];a++)if(j[c.name])c.req([c.name],c.onLoad);else break;a>0&&g.splice(0,a);setTimeout(function(){b.parentNode.removeChild(b)},15)}}function m(a){var b,c;a.setAttribute("data-orderloaded","loaded");for(a=0;c=h[a];a++)if((b=i[c])&&b.getAttribute("data-orderloaded")==="loaded")delete i[c],require.addScriptToDom(b);else break;a>0&&h.splice(0, 7 | a)}var f=typeof document!=="undefined"&&typeof window!=="undefined"&&document.createElement("script"),n=f&&(f.async||window.opera&&Object.prototype.toString.call(window.opera)==="[object Opera]"||"MozAppearance"in document.documentElement.style),o=f&&f.readyState==="uninitialized",l=/^(complete|loaded)$/,g=[],j={},i={},h=[],f=null;define({version:"1.0.5",load:function(a,b,c,e){var d;b.nameToUrl?(d=b.nameToUrl(a,null),require.s.skipAsync[d]=!0,n||e.isBuild?b([a],c):o?(e=require.s.contexts._,!e.urlFetched[d]&& 8 | !e.loaded[a]&&(e.urlFetched[d]=!0,require.resourcesReady(!1),e.scriptCount+=1,d=require.attach(d,e,a,null,null,m),i[a]=d,h.push(a)),b([a],c)):b.specified(a)?b([a],c):(g.push({name:a,req:b,onLoad:c}),require.attach(d,null,a,k,"script/cache"))):b([a],c)}})})(); 9 | -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/js/polyfills/classList.min.js: -------------------------------------------------------------------------------- 1 | /* @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | "use strict";if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(a){var f="classList",d="prototype",e=(a.HTMLElement||a.Element)[d],g=Object;strTrim=String[d].trim||function(){return this.replace(/^\s+|\s+$/g,"")},arrIndexOf=Array[d].indexOf||function(k){for(var j=0,h=this.length;j?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/ioslides-13.5.1/theme/css/phone.css: -------------------------------------------------------------------------------- 1 | slides>slide{-webkit-transition:none !important;-webkit-transition:none !important;-moz-transition:none !important;-o-transition:none !important;transition:none !important} 2 | -------------------------------------------------------------------------------- /Debugging/shiny-debugging_files/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Debugging/shiny-debugging_files/logo.png -------------------------------------------------------------------------------- /Gadgets/.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | -------------------------------------------------------------------------------- /Gadgets/brush.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | library(miniUI) 3 | library(ggplot2) 4 | 5 | ggbrush <- function(data, xvar, yvar) { 6 | ui <- miniPage( 7 | gadgetTitleBar("Drag to select points"), 8 | miniContentPanel( 9 | # The brush="brush" argument means we can listen for 10 | # brush events on the plot using input$brush. 11 | plotOutput("plot", height = "100%", brush = "brush") 12 | ) 13 | ) 14 | 15 | server <- function(input, output, session) { 16 | # Render the plot 17 | output$plot <- renderPlot({ 18 | # Plot the data with x/y vars indicated by the caller. 19 | ggplot(data, aes_(xvar, yvar)) + geom_point() 20 | }) 21 | 22 | # Handle the Done button being pressed. 23 | observeEvent(input$done, { 24 | # Return the brushed points. See ?shiny::brushedPoints. 25 | stopApp(brushedPoints(data, input$brush)) 26 | }) 27 | } 28 | 29 | runGadget(ui, server) 30 | } 31 | x <- ggbrush(mpg, ~displ, ~cty) 32 | -------------------------------------------------------------------------------- /Gadgets/brush2.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | library(miniUI) 3 | library(ggplot2) 4 | 5 | pick_points <- function(data, x, y, name = deparse(substitute(data))) { 6 | ui <- miniPage( 7 | gadgetTitleBar(paste("Select points in", name)), 8 | miniContentPanel(padding = 0, 9 | plotOutput("plot1", height = "100%", brush = "brush") 10 | ), 11 | miniButtonBlock( 12 | actionButton("add", "", icon = icon("thumbs-up")), 13 | actionButton("sub", "", icon = icon("thumbs-down")), 14 | actionButton("none", "" , icon = icon("ban")), 15 | actionButton("all", "", icon = icon("refresh")) 16 | ) 17 | ) 18 | 19 | server <- function(input, output) { 20 | # For storing selected points 21 | vals <- reactiveValues(keep = rep(TRUE, nrow(data))) 22 | 23 | output$plot1 <- renderPlot({ 24 | # Plot the kept and excluded points as two separate data sets 25 | keep <- data[ vals$keep, , drop = FALSE] 26 | exclude <- data[!vals$keep, , drop = FALSE] 27 | 28 | ggplot(keep, aes_(x, y)) + 29 | geom_point(data = exclude, color = "grey80") + 30 | geom_point() 31 | }) 32 | 33 | # Update selected points 34 | selected <- reactive({ 35 | brushedPoints(data, input$brush, allRows = TRUE)$selected_ 36 | }) 37 | observeEvent(input$add, vals$keep <- vals$keep | selected()) 38 | observeEvent(input$sub, vals$keep <- vals$keep & !selected()) 39 | observeEvent(input$all, vals$keep <- rep(TRUE, nrow(data))) 40 | observeEvent(input$none, vals$keep <- rep(FALSE, nrow(data))) 41 | 42 | observeEvent(input$done, { 43 | stopApp(vals$keep) 44 | }) 45 | observeEvent(input$cancel, { 46 | stopApp(NULL) 47 | }) 48 | 49 | } 50 | 51 | runGadget(ui, server) 52 | } 53 | pick_points(mtcars, ~wt, ~mpg) 54 | # pick_points(ggplot2::mpg, aes(displ, hwy)) 55 | -------------------------------------------------------------------------------- /Gadgets/gadgets.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Gadgets/gadgets.pdf -------------------------------------------------------------------------------- /Gadgets/password.R: -------------------------------------------------------------------------------- 1 | get_password <- function() { 2 | ui <- miniPage( 3 | gadgetTitleBar("Please enter your password"), 4 | miniContentPanel( 5 | passwordInput("password", "") 6 | ) 7 | ) 8 | 9 | server <- function(input, output) { 10 | observeEvent(input$done, { 11 | stopApp(input$password) 12 | }) 13 | observeEvent(input$cancel, { 14 | stopApp(stop("No password.", call. = FALSE)) 15 | }) 16 | } 17 | 18 | runGadget(ui, server) 19 | } 20 | get_password() 21 | -------------------------------------------------------------------------------- /Modules/01-Modules.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Modules/01-Modules.pdf -------------------------------------------------------------------------------- /Modules/Demo/modularized/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 2 - sol 2 | 3 | library(shiny) 4 | library(gapminder) 5 | library(dplyr) 6 | source("gapModule.R") 7 | 8 | # Note: This code creates data sets to use in each tab. 9 | # It removes Kuwait since Kuwait distorts the gdp scale 10 | all_data <- filter(gapminder, country != "Kuwait") 11 | africa_data <- filter(gapminder, continent == "Africa") 12 | americas_data <- filter(gapminder, continent == "Americas") 13 | asia_data <- filter(gapminder, continent == "Asia", country != "Kuwait") 14 | europe_data <- filter(gapminder, continent == "Europe") 15 | oceania_data <- filter(gapminder, continent == "Oceania") 16 | 17 | ui <- fluidPage( 18 | titlePanel("Gapminder"), 19 | tabsetPanel(id = "continent", 20 | tabPanel("All", gapModuleUI("all")), 21 | tabPanel("Africa", gapModuleUI("africa")), 22 | tabPanel("Americas", gapModuleUI("americas")), 23 | tabPanel("Asia", gapModuleUI("asia")), 24 | tabPanel("Europe", gapModuleUI("europe")), 25 | tabPanel("Oceania", gapModuleUI("oceania")) 26 | ) 27 | ) 28 | 29 | server <- function(input, output) { 30 | callModule(gapModule, "all", all_data) 31 | callModule(gapModule, "africa", africa_data) 32 | callModule(gapModule, "americas", americas_data) 33 | callModule(gapModule, "asia", asia_data) 34 | callModule(gapModule, "europe", europe_data) 35 | callModule(gapModule, "oceania", oceania_data) 36 | } 37 | 38 | # Run the application 39 | shinyApp(ui = ui, server = server) 40 | 41 | -------------------------------------------------------------------------------- /Modules/Demo/modularized/gapModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 2 - solution 2 | 3 | gapModuleUI <- function(id) { 4 | ns <- NS(id) 5 | 6 | tagList( 7 | plotOutput(ns("plot")), 8 | sliderInput(ns("year"), "Select Year", value = 1952, 9 | min = 1952, max = 2007, step = 5, 10 | animate = animationOptions(interval = 500)) 11 | ) 12 | } 13 | 14 | gapModule <- function(input, output, session, data) { 15 | 16 | # collect one year of data 17 | ydata <- reactive({ 18 | filter(data, year == input$year) 19 | }) 20 | 21 | xrange <- range(data$gdpPercap) 22 | yrange <- range(data$lifeExp) 23 | 24 | output$plot <- renderPlot({ 25 | 26 | # draw background plot with legend 27 | plot(data$gdpPercap, data$lifeExp, type = "n", 28 | xlab = "GDP per capita", ylab = "Life Expectancy", 29 | panel.first = { 30 | grid() 31 | text(mean(xrange), mean(yrange), input$year, 32 | col = "grey90", cex = 5) 33 | }) 34 | 35 | legend("bottomright", legend = levels(data$continent), 36 | cex = 1.3, inset = 0.01, text.width = diff(xrange)/5, 37 | fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 38 | "#984EA399", "#FF7F0099")) 39 | 40 | # Determine bubble colors 41 | cols <- c("Africa" = "#E41A1C99", 42 | "Americas" = "#377EB899", 43 | "Asia" = "#4DAF4A99", 44 | "Europe" = "#984EA399", 45 | "Oceania" = "#FF7F0099")[ydata()$continent] 46 | 47 | # add bubbles 48 | symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop), 49 | bg = cols, inches = 0.5, fg = "white", add = TRUE) 50 | }) 51 | } -------------------------------------------------------------------------------- /Modules/Exercise-1/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 1 2 | 3 | library(shiny) 4 | library(gapminder) 5 | library(dplyr) 6 | 7 | ui <- fluidPage( 8 | tags$style(type="text/css", "plot.recalculating { opacity: 1.0; }"), 9 | plotOutput("plot"), 10 | sliderInput("year", "Select Year", value = 1952, 11 | min = 1952, max = 2007, step = 5, 12 | animate = animationOptions(interval = 500)) 13 | ) 14 | 15 | server <- shinyServer(function(input, output) { 16 | 17 | # collect one year of data 18 | ydata <- reactive({ 19 | filter(gapminder, year == input$year) 20 | }) 21 | 22 | xrange <- range(gapminder$gdpPercap) 23 | yrange <- range(gapminder$lifeExp) 24 | 25 | output$plot <- renderPlot({ 26 | 27 | # draw background plot with legend 28 | plot(gapminder$gdpPercap, gapminder$lifeExp, type = "n", 29 | xlab = "GDP per capita", ylab = "Life Expectancy", 30 | panel.first = { 31 | grid() 32 | text(mean(xrange), mean(yrange), input$year, 33 | col = "grey90", cex = 5) 34 | }) 35 | 36 | legend("bottomright", legend = levels(gapminder$continent), 37 | cex = 1.3, inset = 0.01, text.width = diff(xrange)/5, 38 | fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 39 | "#984EA399", "#FF7F0099")) 40 | 41 | # Determine bubble colors 42 | cols <- c("Africa" = "#E41A1C99", 43 | "Americas" = "#377EB899", 44 | "Asia" = "#4DAF4A99", 45 | "Europe" = "#984EA399", 46 | "Oceania" = "#FF7F0099")[ydata()$continent] 47 | 48 | # add bubbles 49 | symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop), 50 | bg = cols, inches = 0.5, fg = "white", add = TRUE) 51 | }) 52 | }) 53 | 54 | shinyApp(ui = ui, server = server) 55 | 56 | -------------------------------------------------------------------------------- /Modules/Exercise-1/solution*/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 1 - solution 2 | 3 | library(shiny) 4 | library(gapminder) 5 | library(dplyr) 6 | 7 | gapModuleUI <- function(id) { 8 | ns <- NS(id) 9 | 10 | tagList( 11 | plotOutput(ns("plot")), 12 | sliderInput(ns("year"), "Select Year", value = 1952, 13 | min = 1952, max = 2007, step = 5, 14 | animate = animationOptions(interval = 500)) 15 | ) 16 | } 17 | 18 | gapModule <- function(input, output, session) { 19 | 20 | # collect one year of data 21 | ydata <- reactive({ 22 | filter(gapminder, year == input$year) 23 | }) 24 | 25 | xrange <- range(gapminder$gdpPercap) 26 | yrange <- range(gapminder$lifeExp) 27 | 28 | output$plot <- renderPlot({ 29 | 30 | # draw background plot with legend 31 | plot(gapminder$gdpPercap, gapminder$lifeExp, type = "n", 32 | xlab = "GDP per capita", ylab = "Life Expectancy", 33 | panel.first = { 34 | grid() 35 | text(mean(xrange), mean(yrange), input$year, 36 | col = "grey90", cex = 5) 37 | }) 38 | 39 | legend("bottomright", legend = levels(gapminder$continent), 40 | cex = 1.3, inset = 0.01, text.width = diff(xrange)/5, 41 | fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 42 | "#984EA399", "#FF7F0099")) 43 | 44 | # Determine bubble colors 45 | cols <- c("Africa" = "#E41A1C99", 46 | "Americas" = "#377EB899", 47 | "Asia" = "#4DAF4A99", 48 | "Europe" = "#984EA399", 49 | "Oceania" = "#FF7F0099")[ydata()$continent] 50 | 51 | # add bubbles 52 | symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop), 53 | bg = cols, inches = 0.5, fg = "white", add = TRUE) 54 | }) 55 | } 56 | 57 | 58 | ui <- fluidPage( 59 | gapModuleUI("all") 60 | ) 61 | 62 | server <- function(input, output) { 63 | callModule(gapModule, "all") 64 | } 65 | 66 | # Run the application 67 | shinyApp(ui = ui, server = server) 68 | -------------------------------------------------------------------------------- /Modules/Exercise-1/solution/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 1 - solution 2 | 3 | library(shiny) 4 | library(gapminder) 5 | library(dplyr) 6 | source("gapModule.R") 7 | 8 | ui <- fluidPage( 9 | gapModuleUI("all") 10 | ) 11 | 12 | server <- function(input, output) { 13 | callModule(gapModule, "all") 14 | } 15 | 16 | # Run the application 17 | shinyApp(ui = ui, server = server) 18 | -------------------------------------------------------------------------------- /Modules/Exercise-1/solution/gapModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 1 - solution 2 | 3 | gapModuleUI <- function(id) { 4 | ns <- NS(id) 5 | 6 | tagList( 7 | plotOutput(ns("plot")), 8 | sliderInput(ns("year"), "Select Year", value = 1952, 9 | min = 1952, max = 2007, step = 5, 10 | animate = animationOptions(interval = 500)) 11 | ) 12 | } 13 | 14 | gapModule <- function(input, output, session) { 15 | 16 | # collect one year of data 17 | ydata <- reactive({ 18 | filter(gapminder, year == input$year) 19 | }) 20 | 21 | xrange <- range(gapminder$gdpPercap) 22 | yrange <- range(gapminder$lifeExp) 23 | 24 | output$plot <- renderPlot({ 25 | 26 | # draw background plot with legend 27 | plot(gapminder$gdpPercap, gapminder$lifeExp, type = "n", 28 | xlab = "GDP per capita", ylab = "Life Expectancy", 29 | panel.first = { 30 | grid() 31 | text(mean(xrange), mean(yrange), input$year, 32 | col = "grey90", cex = 5) 33 | }) 34 | 35 | legend("bottomright", legend = levels(gapminder$continent), 36 | cex = 1.3, inset = 0.01, text.width = diff(xrange)/5, 37 | fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 38 | "#984EA399", "#FF7F0099")) 39 | 40 | # Determine bubble colors 41 | cols <- c("Africa" = "#E41A1C99", 42 | "Americas" = "#377EB899", 43 | "Asia" = "#4DAF4A99", 44 | "Europe" = "#984EA399", 45 | "Oceania" = "#FF7F0099")[ydata()$continent] 46 | 47 | # add bubbles 48 | symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop), 49 | bg = cols, inches = 0.5, fg = "white", add = TRUE) 50 | }) 51 | } -------------------------------------------------------------------------------- /Modules/Exercise-2/gapModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 2 2 | # 3 | # Adapt gapModule() to: 4 | # 1. take a data set as one of its arguments 5 | # 2. to use the data set instead of the gapminder data set 6 | 7 | gapModuleUI <- function(id) { 8 | ns <- NS(id) 9 | 10 | tagList( 11 | plotOutput(ns("plot")), 12 | sliderInput(ns("year"), "Select Year", value = 1952, 13 | min = 1952, max = 2007, step = 5, 14 | animate = animationOptions(interval = 500)) 15 | ) 16 | } 17 | 18 | gapModule <- function(input, output, session) { 19 | 20 | # collect one year of data 21 | ydata <- reactive({ 22 | filter(gapminder, year == input$year) 23 | }) 24 | 25 | xrange <- range(gapminder$gdpPercap) 26 | yrange <- range(gapminder$lifeExp) 27 | 28 | output$plot <- renderPlot({ 29 | 30 | # draw background plot with legend 31 | plot(gapminder$gdpPercap, gapminder$lifeExp, type = "n", 32 | xlab = "GDP per capita", ylab = "Life Expectancy", 33 | panel.first = { 34 | grid() 35 | text(mean(xrange), mean(yrange), input$year, 36 | col = "grey90", cex = 5) 37 | }) 38 | 39 | legend("bottomright", legend = levels(gapminder$continent), 40 | cex = 1.3, inset = 0.01, text.width = diff(xrange)/5, 41 | fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 42 | "#984EA399", "#FF7F0099")) 43 | 44 | # Determine bubble colors 45 | cols <- c("Africa" = "#E41A1C99", 46 | "Americas" = "#377EB899", 47 | "Asia" = "#4DAF4A99", 48 | "Europe" = "#984EA399", 49 | "Oceania" = "#FF7F0099")[ydata()$continent] 50 | 51 | # add bubbles 52 | symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop), 53 | bg = cols, inches = 0.5, fg = "white", add = TRUE) 54 | }) 55 | } -------------------------------------------------------------------------------- /Modules/Exercise-2/solution/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 2 - solution 2 | 3 | library(shiny) 4 | library(gapminder) 5 | library(dplyr) 6 | source("gapModule.R") 7 | 8 | # Note: This code creates data sets to use in each tab. 9 | # It removes Kuwait since Kuwait distorts the gdp scale 10 | all_data <- filter(gapminder, country != "Kuwait") 11 | africa_data <- filter(gapminder, continent == "Africa") 12 | americas_data <- filter(gapminder, continent == "Americas") 13 | asia_data <- filter(gapminder, continent == "Asia", country != "Kuwait") 14 | europe_data <- filter(gapminder, continent == "Europe") 15 | oceania_data <- filter(gapminder, continent == "Oceania") 16 | 17 | ui <- fluidPage( 18 | titlePanel("Gapminder"), 19 | tabsetPanel(id = "continent", 20 | tabPanel("All", gapModuleUI("all")), 21 | tabPanel("Africa", gapModuleUI("africa")), 22 | tabPanel("Americas", gapModuleUI("americas")), 23 | tabPanel("Asia", gapModuleUI("asia")), 24 | tabPanel("Europe", gapModuleUI("europe")), 25 | tabPanel("Oceania", gapModuleUI("oceania")) 26 | ) 27 | ) 28 | 29 | server <- function(input, output) { 30 | callModule(gapModule, "all", all_data) 31 | callModule(gapModule, "africa", africa_data) 32 | callModule(gapModule, "americas", americas_data) 33 | callModule(gapModule, "asia", asia_data) 34 | callModule(gapModule, "europe", europe_data) 35 | callModule(gapModule, "oceania", oceania_data) 36 | } 37 | 38 | # Run the application 39 | shinyApp(ui = ui, server = server) 40 | 41 | -------------------------------------------------------------------------------- /Modules/Exercise-2/solution/gapModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 2 - solution 2 | 3 | gapModuleUI <- function(id) { 4 | ns <- NS(id) 5 | 6 | tagList( 7 | plotOutput(ns("plot")), 8 | sliderInput(ns("year"), "Select Year", value = 1952, 9 | min = 1952, max = 2007, step = 5, 10 | animate = animationOptions(interval = 500)) 11 | ) 12 | } 13 | 14 | gapModule <- function(input, output, session, data) { 15 | 16 | # collect one year of data 17 | ydata <- reactive({ 18 | filter(data, year == input$year) 19 | }) 20 | 21 | xrange <- range(data$gdpPercap) 22 | yrange <- range(data$lifeExp) 23 | 24 | output$plot <- renderPlot({ 25 | 26 | # draw background plot with legend 27 | plot(data$gdpPercap, data$lifeExp, type = "n", 28 | xlab = "GDP per capita", ylab = "Life Expectancy", 29 | panel.first = { 30 | grid() 31 | text(mean(xrange), mean(yrange), input$year, 32 | col = "grey90", cex = 5) 33 | }) 34 | 35 | legend("bottomright", legend = levels(data$continent), 36 | cex = 1.3, inset = 0.01, text.width = diff(xrange)/5, 37 | fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 38 | "#984EA399", "#FF7F0099")) 39 | 40 | # Determine bubble colors 41 | cols <- c("Africa" = "#E41A1C99", 42 | "Americas" = "#377EB899", 43 | "Asia" = "#4DAF4A99", 44 | "Europe" = "#984EA399", 45 | "Oceania" = "#FF7F0099")[ydata()$continent] 46 | 47 | # add bubbles 48 | symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop), 49 | bg = cols, inches = 0.5, fg = "white", add = TRUE) 50 | }) 51 | } -------------------------------------------------------------------------------- /Modules/Exercise-3/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 3 2 | # 3 | # 1. Open uploadModule.R. Finish updloadModuleInput() and uploadModule() 4 | # so that each returns an object in the correct format to use below. 5 | # 6 | # 2. Finish the app below so that 7 | # a. The uploadModule input objects appear in the sidebar, and 8 | # b. The uploaded data appears in output$dataTable 9 | 10 | library(shiny) 11 | source("uploadModule.R") 12 | 13 | ui <- fluidPage( 14 | sidebarLayout( 15 | sidebarPanel( 16 | # Hint: Place input objects here, but how? 17 | ), 18 | mainPanel( 19 | dataTableOutput("table") 20 | ) 21 | ) 22 | ) 23 | 24 | server <- function(input, output, session) { 25 | 26 | # Hint: Make datafile here, but how? 27 | 28 | output$table <- renderDataTable({ 29 | datafile() 30 | }) 31 | } 32 | 33 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Modules/Exercise-3/solution*/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 3 - Solution 2 | 3 | uploadModuleInput <- function(id) { 4 | ns <- NS(id) 5 | 6 | tagList( 7 | fileInput(ns("file"), "Select a csv file"), 8 | checkboxInput(ns("heading"), "Has header row"), 9 | checkboxInput(ns("strings"), "Coerce strings to factors"), 10 | textInput(ns("na.string"), "NA symbol", value = "NA") 11 | ) 12 | } 13 | 14 | uploadModule <- function(input, output, session, ...) { 15 | 16 | userFile <- reactive({ 17 | # If no file is selected, don't do anything 18 | req(input$file) 19 | }) 20 | 21 | # The user's data, parsed into a data frame 22 | reactive({ 23 | read.csv(userFile()$datapath, 24 | header = input$heading, 25 | stringsAsFactors = input$strings, 26 | na.string = input$na.string, 27 | ...) 28 | }) 29 | } 30 | 31 | ui <- fluidPage( 32 | sidebarLayout( 33 | sidebarPanel( 34 | uploadModuleInput("datafile") 35 | ), 36 | mainPanel( 37 | dataTableOutput("table") 38 | ) 39 | ) 40 | ) 41 | 42 | server <- function(input, output, session) { 43 | 44 | datafile <- callModule(uploadModule, "datafile") 45 | 46 | output$table <- renderDataTable({ 47 | datafile() 48 | }) 49 | } 50 | 51 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Modules/Exercise-3/solution/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 3 - solution 2 | 3 | library(shiny) 4 | source("uploadModule.R") 5 | 6 | ui <- fluidPage( 7 | sidebarLayout( 8 | sidebarPanel( 9 | uploadModuleInput("datafile") 10 | ), 11 | mainPanel( 12 | dataTableOutput("table") 13 | ) 14 | ) 15 | ) 16 | 17 | server <- function(input, output, session) { 18 | 19 | datafile <- callModule(uploadModule, "datafile") 20 | 21 | output$table <- renderDataTable({ 22 | datafile() 23 | }) 24 | } 25 | 26 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Modules/Exercise-3/solution/uploadModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 3 - solution 2 | 3 | uploadModuleInput <- function(id) { 4 | ns <- NS(id) 5 | 6 | tagList( 7 | fileInput(ns("file"), "Select a csv file"), 8 | checkboxInput(ns("heading"), "Has header row"), 9 | checkboxInput(ns("strings"), "Coerce strings to factors"), 10 | textInput(ns("na.string"), "NA symbol", value = "NA") 11 | ) 12 | } 13 | 14 | uploadModule <- function(input, output, session, ...) { 15 | 16 | userFile <- reactive({ 17 | # If no file is selected, don't do anything 18 | req(input$file) 19 | }) 20 | 21 | # The user's data, parsed into a data frame 22 | reactive({ 23 | read.csv(userFile()$datapath, 24 | header = input$heading, 25 | stringsAsFactors = input$strings, 26 | na.string = input$na.string, 27 | ...) 28 | }) 29 | } -------------------------------------------------------------------------------- /Modules/Exercise-3/uploadModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 3 2 | # 3 | # 1. Arrange for uploadModuleInput() to return its output objects 4 | # in the correct format for a module ui function 5 | # 6 | # 2. Arrange for uploadModule() to return the parsed data frame 7 | # in the correct output format for a module server function 8 | 9 | uploadModuleInput <- function(id) { 10 | ns <- NS(id) 11 | 12 | fileInput(ns("file"), "Select a csv file") 13 | checkboxInput(ns("heading"), "Has header row") 14 | checkboxInput(ns("strings"), "Coerce strings to factors") 15 | textInput(ns("na.string"), "NA symbol", value = "NA") 16 | } 17 | 18 | uploadModule <- function(input, output, session, ...) { 19 | 20 | userFile <- reactive({ 21 | # If no file is selected, don't do anything 22 | req(input$file) 23 | }) 24 | 25 | # The user's data, parsed into a data frame 26 | read.csv(userFile()$datapath, 27 | header = input$heading, 28 | stringsAsFactors = input$strings, 29 | na.string = input$na.string, 30 | ...) 31 | } -------------------------------------------------------------------------------- /Modules/Exercise-4/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 4 2 | # 3 | # 1. Open downloadModule.R and finish the downloadModule() function 4 | # 5 | # 2. Finish the call to callModule() below 6 | 7 | library(shiny) 8 | source("uploadModule.R") 9 | source("downloadModule.R") 10 | 11 | ui <- fluidPage( 12 | sidebarLayout( 13 | sidebarPanel( 14 | uploadModuleInput("datafile"), 15 | tags$hr(), 16 | checkboxInput("row.names", "Append row names"), 17 | downloadModuleInput("download") 18 | ), 19 | mainPanel( 20 | dataTableOutput("table") 21 | ) 22 | ) 23 | ) 24 | 25 | server <- function(input, output, session) { 26 | 27 | datafile <- callModule(uploadModule, "datafile") 28 | 29 | output$table <- renderDataTable({ 30 | datafile() 31 | }) 32 | 33 | callModule(downloadModule, "download", # pass datafile and input$row.names to downloadModule(), but how?) 34 | } 35 | 36 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Modules/Exercise-4/downloadModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 4 2 | # 3 | # 1. Add two arguments to downloadModule() to collect 4 | # the values of datafile and input$row.names 5 | # 6 | # 2. Finish the code in downloadModule() so that 7 | # downloadModule() correctly calls the values of datafile 8 | # and input$row.names. Consider which type of object each 9 | # is when downloadModule() receives it 10 | 11 | downloadModuleInput <- function(id) { 12 | ns <- NS(id) 13 | 14 | tagList( 15 | textInput(ns("filename"), "Save as", value = "data.csv"), 16 | downloadButton(ns("save"), "Save") 17 | ) 18 | } 19 | 20 | downloadModule <- function(input, output, session) { 21 | output$save <- downloadHandler( 22 | filename = function() input$filename, 23 | content = function(file) { 24 | if (# check if input$row.names is true, but how?) 25 | write.csv(# call datafile(), but how?, file) 26 | else 27 | write.csv(# call datafile(), but how?, file, row.names = FALSE) 28 | } 29 | ) 30 | } -------------------------------------------------------------------------------- /Modules/Exercise-4/solution*/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 4 - solution 2 | 3 | library(shiny) 4 | 5 | uploadModuleInput <- function(id) { 6 | ns <- NS(id) 7 | 8 | tagList( 9 | fileInput(ns("file"), "Select a csv file"), 10 | checkboxInput(ns("heading"), "Has header row"), 11 | checkboxInput(ns("strings"), "Coerce strings to factors"), 12 | textInput(ns("na.string"), "NA symbol", value = "NA") 13 | ) 14 | } 15 | 16 | uploadModule <- function(input, output, session, ...) { 17 | 18 | userFile <- reactive({ 19 | # If no file is selected, don't do anything 20 | req(input$file) 21 | }) 22 | 23 | # The user's data, parsed into a data frame 24 | reactive({ 25 | read.csv(userFile()$datapath, 26 | header = input$heading, 27 | stringsAsFactors = input$strings, 28 | na.string = input$na.string, 29 | ...) 30 | }) 31 | } 32 | 33 | downloadModuleInput <- function(id) { 34 | ns <- NS(id) 35 | 36 | tagList( 37 | textInput(ns("filename"), "Save as", value = "data.csv"), 38 | downloadButton(ns("save"), "Save") 39 | ) 40 | } 41 | 42 | downloadModule <- function(input, output, session, data, rnames) { 43 | output$save <- downloadHandler( 44 | filename = function() input$filename, 45 | content = function(file) { 46 | if (rnames()) 47 | write.csv(data(), file) 48 | else 49 | write.csv(data(), file, row.names = FALSE) 50 | } 51 | ) 52 | } 53 | 54 | ui <- fluidPage( 55 | sidebarLayout( 56 | sidebarPanel( 57 | uploadModuleInput("datafile"), 58 | tags$hr(), 59 | checkboxInput("row.names", "Append row names"), 60 | downloadModuleInput("download") 61 | ), 62 | mainPanel( 63 | dataTableOutput("table") 64 | ) 65 | ) 66 | ) 67 | 68 | server <- function(input, output, session) { 69 | 70 | datafile <- callModule(uploadModule, "datafile") 71 | 72 | output$table <- renderDataTable({ 73 | datafile() 74 | }) 75 | 76 | callModule(downloadModule, "download", datafile, reactive(input$row.names)) 77 | } 78 | 79 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Modules/Exercise-4/solution/app.R: -------------------------------------------------------------------------------- 1 | # Exercise 4 - solution 2 | 3 | library(shiny) 4 | source("uploadModule.R") 5 | source("downloadModule.R") 6 | 7 | ui <- fluidPage( 8 | sidebarLayout( 9 | sidebarPanel( 10 | uploadModuleInput("datafile"), 11 | tags$hr(), 12 | checkboxInput("row.names", "Append row names"), 13 | downloadModuleInput("download") 14 | ), 15 | mainPanel( 16 | dataTableOutput("table") 17 | ) 18 | ) 19 | ) 20 | 21 | server <- function(input, output, session) { 22 | 23 | datafile <- callModule(uploadModule, "datafile") 24 | 25 | output$table <- renderDataTable({ 26 | datafile() 27 | }) 28 | 29 | callModule(downloadModule, "download", datafile, reactive(input$row.names)) 30 | } 31 | 32 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Modules/Exercise-4/solution/downloadModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 4 - solution 2 | 3 | downloadModuleInput <- function(id) { 4 | ns <- NS(id) 5 | 6 | tagList( 7 | textInput(ns("filename"), "Save as", value = "data.csv"), 8 | downloadButton(ns("save"), "Save") 9 | ) 10 | } 11 | 12 | downloadModule <- function(input, output, session, data, rnames) { 13 | output$save <- downloadHandler( 14 | filename = function() input$filename, 15 | content = function(file) { 16 | if (rnames()) 17 | write.csv(data(), file) 18 | else 19 | write.csv(data(), file, row.names = FALSE) 20 | } 21 | ) 22 | } -------------------------------------------------------------------------------- /Modules/Exercise-4/solution/uploadModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 4 - solution 2 | 3 | uploadModuleInput <- function(id) { 4 | ns <- NS(id) 5 | 6 | tagList( 7 | fileInput(ns("file"), "Select a csv file"), 8 | checkboxInput(ns("heading"), "Has header row"), 9 | checkboxInput(ns("strings"), "Coerce strings to factors"), 10 | textInput(ns("na.string"), "NA symbol", value = "NA") 11 | ) 12 | } 13 | 14 | uploadModule <- function(input, output, session, ...) { 15 | 16 | userFile <- reactive({ 17 | # If no file is selected, don't do anything 18 | req(input$file) 19 | }) 20 | 21 | # The user's data, parsed into a data frame 22 | reactive({ 23 | read.csv(userFile()$datapath, 24 | header = input$heading, 25 | stringsAsFactors = input$strings, 26 | na.string = input$na.string, 27 | ...) 28 | }) 29 | } -------------------------------------------------------------------------------- /Modules/Exercise-4/uploadModule.R: -------------------------------------------------------------------------------- 1 | # Exercise 4 2 | # 3 | # You do not need to do anything with this file 4 | 5 | uploadModuleInput <- function(id) { 6 | ns <- NS(id) 7 | 8 | tagList( 9 | fileInput(ns("file"), "Select a csv file"), 10 | checkboxInput(ns("heading"), "Has header row"), 11 | checkboxInput(ns("strings"), "Coerce strings to factors"), 12 | textInput(ns("na.string"), "NA symbol", value = "NA") 13 | ) 14 | } 15 | 16 | uploadModule <- function(input, output, session, ...) { 17 | 18 | userFile <- reactive({ 19 | # If no file is selected, don't do anything 20 | req(input$file) 21 | }) 22 | 23 | # The user's data, parsed into a data frame 24 | reactive({ 25 | read.csv(userFile()$datapath, 26 | header = input$heading, 27 | stringsAsFactors = input$strings, 28 | na.string = input$na.string, 29 | ...) 30 | }) 31 | } -------------------------------------------------------------------------------- /Modules/solution-3.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: Solution 3 3 | subtitle: Data upload app 4 | runtime: shiny 5 | output: 6 | html_document: 7 | theme: cosmo 8 | --- 9 | 10 | ```{r setup, include=FALSE} 11 | knitr::opts_chunk$set(echo = TRUE) 12 | ``` 13 | 14 | ```{r messages = FALSE} 15 | # Exercise 3 - Solution 16 | 17 | uploadModuleInput <- function(id) { 18 | ns <- NS(id) 19 | 20 | tagList( 21 | fileInput(ns("file"), "Select a csv file"), 22 | checkboxInput(ns("heading"), "Has header row"), 23 | checkboxInput(ns("strings"), "Coerce strings to factors"), 24 | textInput(ns("na.string"), "NA symbol", value = "NA") 25 | ) 26 | } 27 | 28 | uploadModule <- function(input, output, session, ...) { 29 | 30 | userFile <- reactive({ 31 | # If no file is selected, don't do anything 32 | req(input$file) 33 | }) 34 | 35 | # The user's data, parsed into a data frame 36 | reactive({ 37 | read.csv(userFile()$datapath, 38 | header = input$heading, 39 | stringsAsFactors = input$strings, 40 | na.string = input$na.string, 41 | ...) 42 | }) 43 | } 44 | 45 | ui <- fluidPage( 46 | sidebarLayout( 47 | sidebarPanel( 48 | uploadModuleInput("datafile") 49 | ), 50 | mainPanel( 51 | dataTableOutput("table") 52 | ) 53 | ) 54 | ) 55 | 56 | server <- function(input, output, session) { 57 | 58 | datafile <- callModule(uploadModule, "datafile") 59 | 60 | output$table <- renderDataTable({ 61 | datafile() 62 | }) 63 | } 64 | 65 | shinyApp(ui, server) 66 | ``` -------------------------------------------------------------------------------- /Profiling/profiling-examples.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Profiling Shiny apps" 3 | output: html_document 4 | --- 5 | 6 | ```{r setup, include=FALSE} 7 | knitr::opts_chunk$set(echo = TRUE) 8 | ``` 9 | 10 | 11 | ```{r} 12 | library(profvis) 13 | library(ggplot2) 14 | 15 | profvis({ 16 | plot(price ~ carat, data = diamonds) 17 | m <- lm(price ~ carat, data = diamonds) 18 | abline(m, col = "red") 19 | }) 20 | ``` 21 | 22 | -------------------------------------------------------------------------------- /Profiling/shiny-profiling.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/Profiling/shiny-profiling.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ShinyDeveloperConference 2 | Materials collected from the First Shiny Developer Conference Palo Alto, CA January 30-31 2016 3 | -------------------------------------------------------------------------------- /Reactivity/.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | -------------------------------------------------------------------------------- /Reactivity/Exercise_00.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10) 8 | ), 9 | mainPanel( 10 | plotOutput("plot") 11 | ) 12 | ) 13 | ) 14 | 15 | server <- function(input, output, session) { 16 | # Assignment: Plot the first input$nrows columns of a 17 | # data frame of your choosing, using head() and plot() 18 | } 19 | 20 | shinyApp(ui, server) 21 | -------------------------------------------------------------------------------- /Reactivity/Exercise_01.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10) 8 | ), 9 | mainPanel( 10 | plotOutput("plot"), 11 | tableOutput("table") 12 | ) 13 | ) 14 | ) 15 | 16 | server <- function(input, output, session) { 17 | # Assignment: Factor out the head(cars, input$nrows) so 18 | # that the code isn't duplicated and the operation isn't 19 | # performed twice for each change to input$nrows. 20 | 21 | output$plot <- renderPlot({ 22 | plot(head(cars, input$nrows)) 23 | }) 24 | 25 | output$table <- renderTable({ 26 | head(cars, input$nrows) 27 | }) 28 | } 29 | 30 | shinyApp(ui, server) 31 | -------------------------------------------------------------------------------- /Reactivity/Exercise_02.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | sidebarLayout( 5 | sidebarPanel( 6 | selectInput("xcol", "X variable", names(iris)), 7 | selectInput("ycol", "Y variable", names(iris), names(iris)[2]), 8 | numericInput("rows", "Rows to show", 10) 9 | ), 10 | mainPanel( 11 | tabsetPanel( 12 | tabPanel("Data", br(), 13 | tableOutput("table") 14 | ), 15 | tabPanel("Summary", br(), 16 | verbatimTextOutput("dataInfo"), 17 | verbatimTextOutput("modelInfo") 18 | ), 19 | tabPanel("Plot", br(), 20 | plotOutput("plot") 21 | ) 22 | ) 23 | ) 24 | ) 25 | ) 26 | 27 | server <- function(input, output, session) { 28 | # Assignment: Remove duplication of `selected` and `model` 29 | # code/calculations. 30 | 31 | output$plot <- renderPlot({ 32 | 33 | selected <- iris[, c(input$xcol, input$ycol)] 34 | model <- lm(paste(input$ycol, "~", input$xcol), selected) 35 | 36 | plot(selected) 37 | abline(model) 38 | }) 39 | 40 | output$modelInfo <- renderPrint({ 41 | 42 | selected <- iris[, c(input$xcol, input$ycol)] 43 | model <- lm(paste(input$ycol, "~", input$xcol), selected) 44 | 45 | summary(model) 46 | }) 47 | 48 | output$dataInfo <- renderPrint({ 49 | 50 | selected <- iris[, c(input$xcol, input$ycol)] 51 | 52 | summary(selected) 53 | }) 54 | 55 | output$table <- renderTable({ 56 | 57 | selected <- iris[, c(input$xcol, input$ycol)] 58 | 59 | head(selected, input$rows) 60 | }) 61 | } 62 | 63 | shinyApp(ui, server) 64 | -------------------------------------------------------------------------------- /Reactivity/Exercise_03.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10), 8 | actionButton("save", "Save") 9 | ), 10 | mainPanel( 11 | plotOutput("plot"), 12 | tableOutput("table") 13 | ) 14 | ) 15 | ) 16 | 17 | server <- function(input, output, session) { 18 | df <- reactive({ 19 | head(cars, input$nrows) 20 | }) 21 | 22 | output$plot <- renderPlot({ 23 | plot(df()) 24 | }) 25 | 26 | output$table <- renderTable({ 27 | df() 28 | }) 29 | 30 | # Assignment: Add logic so that when the "save" button 31 | # is pressed, the data is saved to a CSV file called 32 | # "data.csv" in the current directory. 33 | } 34 | 35 | shinyApp(ui, server) 36 | -------------------------------------------------------------------------------- /Reactivity/Exercise_04.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app 4"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | actionButton("rnorm", "Normal"), 8 | actionButton("runif", "Uniform") 9 | ), 10 | mainPanel( 11 | plotOutput("plot") 12 | ) 13 | ) 14 | ) 15 | 16 | server <- function(input, output, session) { 17 | # Assignment: When "rnorm" button is clicked, the plot should 18 | # show a new batch of rnorm(100). When "runif" button is clicked, 19 | # the plot should show a new batch of runif(100). 20 | 21 | output$plot <- renderPlot({ 22 | hist(rnorm(100)) 23 | }) 24 | } 25 | 26 | shinyApp(ui, server) 27 | -------------------------------------------------------------------------------- /Reactivity/Exercise_05.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fillPage( 4 | plotOutput("plot", click = "click", height = "100%") 5 | ) 6 | 7 | # Assignment: This app doesn't work! It's supposed to let 8 | # the user click on the plot, and have a data point appear 9 | # where the click occurs. But as written, the data point 10 | # only appears for a moment before disappearing. 11 | # 12 | # This happens because each time the plot is re-rendered, 13 | # the value of input$click is reset to NULL, and thus 14 | # userPoint() becomes NULL as well. 15 | # 16 | # Can you get a single user-added data point to stay? 17 | # 18 | # Bonus points: Can you include not just the single most 19 | # recent click, but ALL clicks made by the user? 20 | # 21 | # Hint: You'll need to replace reactive() with a combo 22 | # of reactiveValues() and observeEvent(). 23 | 24 | server <- function(input, output, session) { 25 | # Either NULL, or a 1-row data frame that represents 26 | # the point that the user clicked on the plot 27 | userPoint <- reactive({ 28 | # input$click will be either NULL or list(x=num, y=num) 29 | click <- input$click 30 | 31 | if (is.null(click)) { 32 | # The user didn't click on the plot (or the previous 33 | # click was cleared by the plot being re-rendered) 34 | return(NULL) 35 | } 36 | 37 | data.frame(speed = click$x, dist = click$y) 38 | }) 39 | 40 | output$plot <- renderPlot({ 41 | # Before plotting, combine the original dataset with 42 | # the user data. (rbind ignores NULL args.) 43 | df <- rbind(cars, userPoint()) 44 | plot(df, pch = 19) 45 | 46 | model <- lm(dist ~ speed, df) 47 | abline(model) 48 | }) 49 | } 50 | 51 | shinyApp(ui, server) 52 | -------------------------------------------------------------------------------- /Reactivity/Exercise_07.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | dedupe <- function(r) { 4 | # Assignment: Implement this function. The parameter is 5 | # a reactive expression. The return value should be a 6 | # reactive expression that, when invalidated, does *not* 7 | # invalidate its dependencies. In other words, the line 8 | # "Executing renderText" would get printed when x changes 9 | # from 9 to 10, but not get printed when it changes from 10 | # 8 to 9. 11 | 12 | r 13 | } 14 | 15 | ui <- fluidPage( 16 | numericInput("x", "x", 2), 17 | textOutput("msg") 18 | ) 19 | 20 | server <- function(input, output, session) { 21 | rounded <- reactive({ 22 | floor(input$x / 5) * 5 23 | }) 24 | 25 | rounded <- dedupe(rounded) 26 | 27 | output$msg <- renderText({ 28 | cat(as.character(Sys.time()), " Executing renderText\n") 29 | rounded() 30 | }) 31 | } 32 | 33 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Reactivity/Solution_00.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10) 8 | ), 9 | mainPanel( 10 | plotOutput("plot") 11 | ) 12 | ) 13 | ) 14 | 15 | server <- function(input, output, session) { 16 | output$plot <- renderPlot({ 17 | plot(head(cars, input$nrows)) 18 | }) 19 | } 20 | 21 | shinyApp(ui, server) 22 | -------------------------------------------------------------------------------- /Reactivity/Solution_01.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10) 8 | ), 9 | mainPanel( 10 | plotOutput("plot"), 11 | tableOutput("table") 12 | ) 13 | ) 14 | ) 15 | 16 | server <- function(input, output, session) { 17 | df <- reactive({ 18 | head(cars, input$nrows) 19 | }) 20 | 21 | output$plot <- renderPlot({ 22 | plot(df()) 23 | }) 24 | 25 | output$table <- renderTable({ 26 | df() 27 | }) 28 | } 29 | 30 | shinyApp(ui, server) 31 | -------------------------------------------------------------------------------- /Reactivity/Solution_02.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | sidebarLayout( 5 | sidebarPanel( 6 | selectInput("xcol", "X variable", names(iris)), 7 | selectInput("ycol", "Y variable", names(iris), names(iris)[2]), 8 | numericInput("rows", "Rows to show", 10) 9 | ), 10 | mainPanel( 11 | tabsetPanel( 12 | tabPanel("Data", br(), 13 | tableOutput("table") 14 | ), 15 | tabPanel("Summary", br(), 16 | verbatimTextOutput("dataInfo"), 17 | verbatimTextOutput("modelInfo") 18 | ), 19 | tabPanel("Plot", br(), 20 | plotOutput("plot") 21 | ) 22 | ) 23 | ) 24 | ) 25 | ) 26 | 27 | server <- function(input, output, session) { 28 | 29 | # Introduce reactive expression for each calculated value 30 | 31 | selected <- reactive({ 32 | iris[, c(input$xcol, input$ycol)] 33 | }) 34 | 35 | model <- reactive({ 36 | lm(paste(input$ycol, "~", input$xcol), selected()) 37 | }) 38 | 39 | # And now the outputs can just use the reactive expressions 40 | 41 | output$plot <- renderPlot({ 42 | 43 | plot(selected()) 44 | abline(model()) 45 | }) 46 | 47 | output$modelInfo <- renderPrint({ 48 | 49 | summary(model()) 50 | }) 51 | 52 | output$dataInfo <- renderPrint({ 53 | 54 | summary(selected()) 55 | }) 56 | 57 | output$table <- renderTable({ 58 | 59 | head(selected(), input$rows) 60 | }) 61 | } 62 | 63 | shinyApp(ui, server) 64 | -------------------------------------------------------------------------------- /Reactivity/Solution_03.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10), 8 | actionButton("save", "Save") 9 | ), 10 | mainPanel( 11 | plotOutput("plot"), 12 | tableOutput("table") 13 | ) 14 | ) 15 | ) 16 | 17 | server <- function(input, output, session) { 18 | df <- reactive({ 19 | head(cars, input$nrows) 20 | }) 21 | 22 | output$plot <- renderPlot({ 23 | plot(df()) 24 | }) 25 | 26 | output$table <- renderTable({ 27 | df() 28 | }) 29 | 30 | # Use observeEvent to tell Shiny what action to take 31 | # when input$save is clicked. 32 | observeEvent(input$save, { 33 | write.csv(df(), "data.csv") 34 | }) 35 | } 36 | 37 | shinyApp(ui, server) 38 | -------------------------------------------------------------------------------- /Reactivity/Solution_04.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app 4"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | actionButton("rnorm", "Normal"), 8 | actionButton("runif", "Uniform") 9 | ), 10 | mainPanel( 11 | plotOutput("plot") 12 | ) 13 | ) 14 | ) 15 | 16 | server <- function(input, output, session) { 17 | v <- reactiveValues(data = runif(100)) 18 | 19 | observeEvent(input$runif, { 20 | v$data <- runif(100) 21 | }) 22 | 23 | observeEvent(input$rnorm, { 24 | v$data <- rnorm(100) 25 | }) 26 | 27 | output$plot <- renderPlot({ 28 | hist(v$data) 29 | }) 30 | } 31 | 32 | shinyApp(ui, server) 33 | -------------------------------------------------------------------------------- /Reactivity/Solution_05a.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fillPage( 4 | plotOutput("plot", click = "click", height = "100%") 5 | ) 6 | 7 | server <- function(input, output, session) { 8 | # Instead of a reactive expression for userPoint, we 9 | # use a reactive value. This gives us more control 10 | # over when userPoint gets updated. 11 | rv <- reactiveValues(userPoint = NULL) 12 | 13 | observeEvent(input$click, { 14 | # Replace rv$userPoint, but only if input$click isn't NULL 15 | if (!is.null(input$click)) { 16 | rv$userPoint <- data.frame( 17 | speed = input$click$x, 18 | dist = input$click$y 19 | ) 20 | } 21 | }) 22 | 23 | output$plot <- renderPlot({ 24 | # Now refers to rv$userPoint instead of userPoint(). 25 | df <- rbind(cars, rv$userPoint) 26 | plot(df, pch = 19) 27 | 28 | model <- lm(dist ~ speed, df) 29 | abline(model) 30 | }) 31 | } 32 | 33 | shinyApp(ui, server) 34 | -------------------------------------------------------------------------------- /Reactivity/Solution_05b.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fillPage( 4 | plotOutput("plot", click = "click", height = "100%") 5 | ) 6 | 7 | server <- function(input, output, session) { 8 | rv <- reactiveValues(userPoints = NULL) 9 | 10 | # Same as Solution_05a.R, but instead of keeping 11 | # track of the single most recent point, we accumulate 12 | # all previous points using rbind(). 13 | observeEvent(input$click, { 14 | if (!is.null(input$click)) { 15 | thisPoint <- data.frame( 16 | speed = input$click$x, 17 | dist = input$click$y 18 | ) 19 | rv$userPoints <- rbind(rv$userPoints, thisPoint) 20 | } 21 | }) 22 | 23 | output$plot <- renderPlot({ 24 | df <- rbind(cars, rv$userPoints) 25 | plot(df, pch = 19) 26 | 27 | model <- lm(dist ~ speed, df) 28 | abline(model) 29 | }) 30 | } 31 | 32 | shinyApp(ui, server) 33 | -------------------------------------------------------------------------------- /Reactivity/Solution_07a.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | # Simple version. Works, unless the `r` reactive can error. 4 | dedupe <- function(r) { 5 | rv <- reactiveValues(value = isolate(r())) 6 | 7 | observe({ 8 | # Takes advantage of a little-known feature: reactive 9 | # values ignore assignment if the new value is identical 10 | # to the current value. If you didn't know that, you 11 | # could achieve the equivalent behavior with: 12 | # if (identical(isolate(rv$value), r())) 13 | # rv$value <- r() 14 | rv$value <- r() 15 | }) 16 | reactive({ 17 | rv$value 18 | }) 19 | } 20 | 21 | ui <- fluidPage( 22 | numericInput("x", "x", 2), 23 | textOutput("msg") 24 | ) 25 | 26 | server <- function(input, output, session) { 27 | rounded <- reactive({ 28 | floor(input$x / 5) * 5 29 | }) 30 | 31 | rounded <- dedupe(rounded) 32 | 33 | output$msg <- renderText({ 34 | cat(as.character(Sys.time()), " Executing renderText\n") 35 | rounded() 36 | }) 37 | } 38 | 39 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Reactivity/Solution_07b.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | # Simple version. Works, unless the `r` reactive can error. 4 | dedupe <- function(r) { 5 | rv <- reactiveValues(value = isolate(try(r(), silent = TRUE))) 6 | 7 | observe({ 8 | rv$value <- try(r(), silent = TRUE) 9 | }) 10 | 11 | reactive({ 12 | if (inherits(rv$value, "try-error")) 13 | stop(attr(rv$value, "condition")) 14 | 15 | rv$value 16 | }) 17 | } 18 | 19 | ui <- fluidPage( 20 | numericInput("x", "x", 2), 21 | textOutput("msg") 22 | ) 23 | 24 | server <- function(input, output, session) { 25 | rounded <- reactive({ 26 | floor(input$x / 5) * 5 27 | }) 28 | 29 | rounded <- dedupe(rounded) 30 | 31 | output$msg <- renderText({ 32 | cat(as.character(Sys.time()), " Executing renderText\n") 33 | rounded() 34 | }) 35 | } 36 | 37 | shinyApp(ui, server) -------------------------------------------------------------------------------- /Reactivity/Unsolution_00.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10) 8 | ), 9 | mainPanel( 10 | plotOutput("plot") 11 | ) 12 | ) 13 | ) 14 | 15 | server <- function(input, output, session) { 16 | # Don't do this! 17 | observe({ 18 | df <- head(cars, input$nrows) 19 | output$plot <- renderPlot(plot(df)) 20 | }) 21 | } 22 | 23 | shinyApp(ui, server) 24 | -------------------------------------------------------------------------------- /Reactivity/Unsolution_01.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10) 8 | ), 9 | mainPanel( 10 | plotOutput("plot"), 11 | tableOutput("table") 12 | ) 13 | ) 14 | ) 15 | 16 | server <- function(input, output, session) { 17 | # Don't do this! 18 | 19 | df <- cars 20 | 21 | observeEvent(input$nrows, { 22 | df <<- head(cars, input$nrows) 23 | }) 24 | 25 | output$plot <- renderPlot({ 26 | plot(df) 27 | }) 28 | 29 | output$table <- renderTable({ 30 | df 31 | }) 32 | } 33 | 34 | shinyApp(ui, server) 35 | -------------------------------------------------------------------------------- /Reactivity/Unsolution_01b.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | h1("Example app"), 5 | sidebarLayout( 6 | sidebarPanel( 7 | numericInput("nrows", "Number of rows", 10) 8 | ), 9 | mainPanel( 10 | plotOutput("plot"), 11 | tableOutput("table") 12 | ) 13 | ) 14 | ) 15 | 16 | server <- function(input, output, session) { 17 | # Don't do this! 18 | 19 | rv <- reactiveValues(df = NULL) 20 | 21 | observeEvent(input$nrows, { 22 | rv$df <- head(cars, input$nrows) 23 | }) 24 | 25 | output$plot <- renderPlot({ 26 | plot(rv$df) 27 | }) 28 | 29 | output$table <- renderTable({ 30 | rv$df 31 | }) 32 | } 33 | 34 | shinyApp(ui, server) 35 | -------------------------------------------------------------------------------- /Reactivity/Unsolution_02.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- fluidPage( 4 | sidebarLayout( 5 | sidebarPanel( 6 | selectInput("xcol", "X variable", names(iris)), 7 | selectInput("ycol", "Y variable", names(iris), names(iris)[2]), 8 | numericInput("rows", "Rows to show", 10) 9 | ), 10 | mainPanel( 11 | tabsetPanel( 12 | tabPanel("Data", br(), 13 | tableOutput("table") 14 | ), 15 | tabPanel("Summary", br(), 16 | verbatimTextOutput("dataInfo"), 17 | verbatimTextOutput("modelInfo") 18 | ), 19 | tabPanel("Plot", br(), 20 | plotOutput("plot") 21 | ) 22 | ) 23 | ) 24 | ) 25 | ) 26 | 27 | server <- function(input, output, session) { 28 | # Don't do this! 29 | 30 | # Introduce reactive value for each calculated value 31 | values <- reactiveValues(selected = NULL, model = NULL) 32 | 33 | # Use observers to keep the values up-to-date 34 | observe({ 35 | values$selected <- iris[, c(input$xcol, input$ycol)] 36 | }) 37 | 38 | observe({ 39 | values$model <- lm(paste(input$ycol, "~", input$xcol), values$selected) 40 | }) 41 | 42 | # The outputs all use the reactive values 43 | 44 | output$plot <- renderPlot({ 45 | 46 | plot(values$selected) 47 | abline(values$model) 48 | }) 49 | 50 | output$modelInfo <- renderPrint({ 51 | 52 | summary(values$model) 53 | }) 54 | 55 | output$dataInfo <- renderPrint({ 56 | 57 | summary(values$selected) 58 | }) 59 | 60 | output$table <- renderTable({ 61 | 62 | head(values$selected, input$rows) 63 | }) 64 | } 65 | 66 | shinyApp(ui, server) 67 | -------------------------------------------------------------------------------- /Reactivity/slides.css: -------------------------------------------------------------------------------- 1 | .reveal .sourceCode.r .kw, .sourceCode.r .er { 2 | color:inherit; 3 | font-weight: normal; 4 | } 5 | .reveal .sourceCode.r .co { 6 | font-style: normal; 7 | } 8 | 9 | .reveal .slides { 10 | text-align: inherit; 11 | } 12 | 13 | .reveal .slide.level2 h1 { 14 | font-size: 48px; 15 | } 16 | 17 | .reveal pre code { 18 | font-size: 20px; 19 | line-height: 1.3; 20 | } -------------------------------------------------------------------------------- /UI/Understanding-UI.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/Understanding-UI.pdf -------------------------------------------------------------------------------- /UI/index-demo/server.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | # Define server logic for random distribution application 4 | shinyServer(function(input, output) { 5 | 6 | # Reactive expression to generate the requested distribution. This is 7 | # called whenever the inputs change. The output renderers defined 8 | # below then all used the value computed from this expression 9 | data <- reactive({ 10 | dist <- switch(input$dist, 11 | norm = rnorm, 12 | unif = runif, 13 | lnorm = rlnorm, 14 | exp = rexp, 15 | rnorm) 16 | 17 | dist(input$n) 18 | }) 19 | 20 | # Generate a plot of the data. Also uses the inputs to build the 21 | # plot label. Note that the dependencies on both the inputs and 22 | # the data reactive expression are both tracked, and all expressions 23 | # are called in the sequence implied by the dependency graph 24 | output$plot <- renderPlot({ 25 | dist <- input$dist 26 | n <- input$n 27 | 28 | hist(data(), 29 | main=paste('r', dist, '(', n, ')', sep='')) 30 | }) 31 | 32 | # Generate a summary of the data 33 | output$summary <- renderPrint({ 34 | summary(data()) 35 | }) 36 | 37 | # Generate an HTML table view of the data 38 | output$table <- renderTable({ 39 | data.frame(x=data()) 40 | }) 41 | }) -------------------------------------------------------------------------------- /UI/index-demo/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |

HTML UI

11 | 12 |

13 |
14 | 20 |

21 | 22 |

23 |
24 | 25 |

26 | 27 |
 
28 |   
29 |   
31 | 32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /UI/scorecard-app/.gitignore: -------------------------------------------------------------------------------- 1 | CollegeScorecard.sqlite 2 | .Rproj.user 3 | -------------------------------------------------------------------------------- /UI/scorecard-app/README.md: -------------------------------------------------------------------------------- 1 | # Shiny demo app: College Scorecard 2 | 3 | This app is an example of Shiny's [HTML templates](http://shiny.rstudio.com/articles/templates.html) feature. It uses R and Shiny to present interesting information from the [College Scorecard Data](https://collegescorecard.ed.gov/data/) and is styled based on the [U.S. Web Design Standards](https://playbook.cio.gov/designstandards/). 4 | 5 | Live app here: https://beta.rstudioconnect.com/jcheng/scorecard-app/ 6 | 7 | ### Instructions 8 | 9 | To run this app yourself, you'll need the following CRAN packages: 10 | 11 | ```r 12 | install.packages(c("shiny", "dplyr", "RSQLite", "leaflet", "ggplot2", 13 | "showtext", "Cairo", "RCurl", "stringr", "scales")) 14 | ``` 15 | 16 | You'll also need to download this [CollegeScorecard.sqlite database](https://www.dropbox.com/s/rw846tfjj73eqin/CollegeScorecard.sqlite?dl=0) and put it in the scorecard-app directory. 17 | 18 | ### License 19 | 20 | All content under `www/assets` is licensed according to [this page](https://github.com/18F/web-design-standards/blob/18f-pages-staging/LICENSE.md). 21 | 22 | All R code and `www/index.html` are [CC0](https://creativecommons.org/publicdomain/zero/1.0/) (public domain). However, I do request that you not reuse the Flickr API key or MapBox (Leaflet) tile URL that are included in the code. -------------------------------------------------------------------------------- /UI/scorecard-app/flickr_api.R: -------------------------------------------------------------------------------- 1 | library(httr) 2 | 3 | # Please don't copy my API key. Get your own here, it's fast and free: 4 | # https://www.flickr.com/services/api/keys/apply/ 5 | api_key <- "4f9974ed9c4ba04650ae725d743c9986" 6 | 7 | # Get a data frame for the search term; one photo will be selected at random 8 | # from the top 10 most relevant 9 | flickr_photos_search_one <- function(api_key, query) { 10 | resp <- GET( 11 | sprintf( 12 | "https://api.flickr.com/services/rest/?method=flickr.photos.search&format=json&api_key=%s&text=%s&safe_search=1&content_type=1&per_page=10&sort=relevance", 13 | api_key, 14 | utils::URLencode(query) 15 | ), 16 | accept_json() 17 | ) 18 | resp <- jsonlite::fromJSON(sub("^jsonFlickrApi\\((.*)\\)$", "\\1", rawToChar(resp$content))) 19 | if (length(resp$photos$photo) == 0 || nrow(resp$photos$photo) == 0) 20 | return(NULL) 21 | resp$photos$photo[sample.int(nrow(resp$photos$photo), 1),] 22 | } 23 | 24 | # Form image URLs from flickr photos data frame 25 | flickr_photo_url <- function(photo) { 26 | if (is.null(photo) || nrow(photo) == 0) 27 | return(character(0)) 28 | 29 | sprintf( 30 | "https://farm%s.staticflickr.com/%s/%s_%s.jpg", 31 | photo$farm, 32 | photo$server, 33 | photo$id, 34 | photo$secret 35 | ) 36 | } 37 | -------------------------------------------------------------------------------- /UI/scorecard-app/scorecard-app.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | -------------------------------------------------------------------------------- /UI/scorecard-app/ui.R: -------------------------------------------------------------------------------- 1 | library(leaflet) 2 | 3 | function(req) { 4 | htmlTemplate("www/index.html") 5 | } 6 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/all.scss: -------------------------------------------------------------------------------- 1 | // Vendor -------------- // 2 | 3 | @import 'lib/bourbon/bourbon'; 4 | @import 'lib/neat/neat'; 5 | @import 'lib/normalize'; 6 | 7 | 8 | // Core -------------- // 9 | 10 | @import 'core/grid-settings'; 11 | @import 'core/defaults'; 12 | @import 'core/variables'; 13 | @import 'core/base'; 14 | @import 'core/grid'; 15 | @import 'core/utilities'; 16 | 17 | 18 | // Elements -------------- // 19 | // Styles basic html elements 20 | 21 | @import 'elements/typography'; 22 | @import 'elements/list'; 23 | @import 'elements/inputs'; 24 | @import 'elements/buttons'; 25 | @import 'elements/table'; 26 | @import 'elements/figure'; 27 | @import 'elements/labels'; 28 | 29 | 30 | // Components -------------- // 31 | 32 | @import 'components/skipnav'; 33 | @import 'components/disclaimer'; 34 | @import 'components/sidenav'; 35 | @import 'components/footer'; 36 | @import 'components/forms'; 37 | @import 'components/search'; 38 | @import 'components/alerts'; 39 | @import 'components/accordions'; 40 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/components/_accordions.scss: -------------------------------------------------------------------------------- 1 | // Variables 2 | 3 | $accordion-border: 3px solid $color-gray-lightest; 4 | 5 | // Accordion Styles 6 | 7 | .usa-accordion, 8 | .usa-accordion-bordered { 9 | 10 | + .usa-accordion, 11 | + .usa-accordion-bordered { 12 | margin-top: 1rem; 13 | } 14 | 15 | > ul { 16 | color: $color-base; 17 | margin: 0; 18 | padding: 0; 19 | width: 100%; 20 | 21 | > li { 22 | background-color: $color-gray-lightest; 23 | font-family: $font-sans; 24 | list-style: none; 25 | margin-bottom: 6px; 26 | width: 100%; 27 | } 28 | } 29 | 30 | button[aria-expanded=false] { 31 | background-image: url('../img/plus.png'); 32 | background-image: url('../img/plus.svg'); 33 | background-repeat: no-repeat; 34 | background-size: 1.3rem; 35 | } 36 | 37 | button { 38 | background-color: $color-gray-lightest; 39 | background-image: url('../img/minus.png'); 40 | background-image: url('../img/minus.svg'); 41 | background-position: right 3rem center; 42 | background-repeat: no-repeat; 43 | background-size: 13px; 44 | color: $color-base; 45 | cursor: pointer; 46 | display: inline-block; 47 | font-family: $font-sans; 48 | margin: 0; 49 | padding: { 50 | bottom: 1.5rem; 51 | left: 3rem; 52 | right: 5.5rem; 53 | top: 1.5rem; 54 | } 55 | width: 100%; 56 | 57 | &:focus { 58 | box-shadow: $focus-shadow; 59 | } 60 | 61 | &:hover { 62 | background-color: $color-gray-lighter; 63 | color: $color-base; 64 | } 65 | 66 | h1, h2, h3, h4, h5, h6 { 67 | margin: 0; 68 | } 69 | } 70 | } 71 | 72 | .usa-accordion-bordered { 73 | .usa-accordion-content { 74 | border: { 75 | bottom: $accordion-border; 76 | left: $accordion-border; 77 | right: $accordion-border; 78 | } 79 | } 80 | } 81 | 82 | .usa-accordion-content { 83 | display: block; 84 | background-color: white; 85 | overflow: auto; 86 | padding: 3rem; 87 | 88 | > *:first-child { 89 | margin-top: 0; 90 | } 91 | 92 | > *:last-child { 93 | margin-bottom: 0; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/components/_alerts.scss: -------------------------------------------------------------------------------- 1 | .usa-alert { 2 | @include media($medium-screen) { 3 | background-size: 5.2rem; 4 | } 5 | background-color: $color-gray-lightest; 6 | background-position: 1rem 2rem; 7 | background-repeat: no-repeat; 8 | background-size: 4rem; 9 | margin-top: 1.5em; 10 | padding: 1em; 11 | 12 | ul { 13 | margin: { 14 | bottom: 0; 15 | top: 1em; 16 | } 17 | } 18 | } 19 | 20 | .usa-alert-icon { 21 | display: table-cell; 22 | padding-right: 1rem; 23 | } 24 | 25 | .usa-alert-body { 26 | @include media($medium-screen) { 27 | padding-left: 5rem; 28 | } 29 | display: table-cell; 30 | padding-left: 3.5rem; 31 | vertical-align: top; 32 | } 33 | 34 | .usa-alert-heading { 35 | @include media($medium-screen) { 36 | margin-top: .3rem; 37 | } 38 | margin: { 39 | bottom: .3rem; 40 | top: 0; 41 | } 42 | } 43 | 44 | .usa-alert-text { 45 | font-family: $font-sans; 46 | margin: { 47 | bottom: 0; 48 | top: 0; 49 | } 50 | } 51 | 52 | .usa-alert-success { 53 | background-color: $color-green-lightest; 54 | background-image: url('../img/alerts/success.png'); 55 | background-image: url('../img/alerts/success.svg'); 56 | } 57 | 58 | .usa-alert-warning { 59 | background-color: $color-gold-lightest; 60 | background-image: url('../img/alerts/warning.png'); 61 | background-image: url('../img/alerts/warning.svg'); 62 | } 63 | 64 | .usa-alert-error { 65 | background-color: $color-secondary-lightest; 66 | background-image: url('../img/alerts/error.png'); 67 | background-image: url('../img/alerts/error.svg'); 68 | } 69 | 70 | .usa-alert-info { 71 | background-color: $color-primary-alt-lightest; 72 | background-image: url('../img/alerts/info.png'); 73 | background-image: url('../img/alerts/info.svg'); 74 | } 75 | 76 | .usa-alert-no_icon { 77 | background-image: none; 78 | } 79 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/components/_disclaimer.scss: -------------------------------------------------------------------------------- 1 | .usa-disclaimer { 2 | @include media($small-screen) { 3 | font-size: $h5-font-size; 4 | } 5 | background-color: $color-gray-lightest; 6 | font-size: $h6-font-size; 7 | padding: { 8 | bottom: .5rem; 9 | top: .5rem; 10 | } 11 | } 12 | 13 | // This hides the stage note (i.e. alpha, beta, etc) of the disclaimer for 14 | // anything smaller than large screen sizes 15 | .usa-disclaimer-stage { 16 | @include media($large-screen) { 17 | display: block; 18 | } 19 | display: none; 20 | float: right; 21 | } 22 | 23 | .usa-flag_icon { 24 | margin-right: .2rem; 25 | } 26 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/components/_sidenav.scss: -------------------------------------------------------------------------------- 1 | .usa-sidenav-list { 2 | @include unstyled-list(); 3 | 4 | li { 5 | border-top: 1px solid $color-gray; 6 | font-size: $h4-font-size; 7 | 8 | &:first-child { 9 | border-top: none; 10 | } 11 | } 12 | 13 | a { 14 | border: none; 15 | color: $color-base; 16 | display: block; 17 | font-family: $font-sans; 18 | line-height: 1; 19 | padding: { 20 | bottom: 1rem; 21 | left: 1.8rem; 22 | right: 1rem; 23 | top: 1rem; 24 | } 25 | 26 | &:hover { 27 | background-color: $color-gray-lightest; 28 | color: $color-primary; 29 | text-decoration: none; 30 | } 31 | 32 | &:focus { 33 | position: relative; 34 | z-index: 1; 35 | } 36 | 37 | &.usa-current { 38 | color: $color-primary; 39 | font-weight: $font-bold; 40 | } 41 | 42 | &.usa-current { 43 | border-left: 4px solid $color-primary; 44 | padding-left: 1.4rem; 45 | } 46 | } 47 | } 48 | 49 | .usa-sidenav-sub_list { 50 | margin: 0; 51 | width: 100%; 52 | 53 | li { 54 | border: none; 55 | font-size: $h5-font-size; 56 | } 57 | 58 | a { 59 | padding-left: 2.8rem; 60 | line-height: $heading-line-height; 61 | } 62 | 63 | a:hover, 64 | a.usa-current { 65 | border: none; 66 | padding-left: 2.8rem; 67 | } 68 | 69 | .usa-sidenav-sub_list { 70 | a { 71 | padding-left: 3.8rem; 72 | } 73 | 74 | a:hover { 75 | padding-left: 3.8rem; 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/components/_skipnav.scss: -------------------------------------------------------------------------------- 1 | .skipnav { 2 | @include transition(all .2s ease-in-out); 3 | background: transparent; 4 | color: $color-base; 5 | left: 0; 6 | padding: { 7 | bottom: 1rem; 8 | left: 1.5rem; 9 | right: 1.5rem; 10 | top: 1rem; 11 | } 12 | position: absolute; 13 | top: -4.2rem; 14 | z-index: 100; 15 | 16 | &:focus { 17 | @include transition(all .2s ease-in-out); 18 | background: $color-white; 19 | left: 0; 20 | outline: 0; 21 | position: absolute; 22 | top: 0; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/core/_base.scss: -------------------------------------------------------------------------------- 1 | /* apply a natural box layout model to all elements, but allowing components to change */ 2 | 3 | html { 4 | box-sizing: border-box; 5 | } 6 | 7 | *, *:before, *:after { 8 | box-sizing: inherit; 9 | } 10 | 11 | body { 12 | background-color: #ffffff; 13 | } 14 | 15 | .lt-ie9 { 16 | // Hack for clearfixes 17 | * { 18 | filter: none !important; 19 | } 20 | } 21 | 22 | [aria-hidden=true] { 23 | display: none !important; 24 | } 25 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/core/_grid-settings.scss: -------------------------------------------------------------------------------- 1 | // Add custom grid settings here (i.e. gutters, columns, etc) 2 | 3 | // Mobile First Breakpoints 4 | $small-screen: 481px; 5 | $medium-screen: 600px; 6 | $large-screen: 1201px; 7 | 8 | $large: new-breakpoint(min-width $large-screen 12); 9 | $medium: new-breakpoint(min-width $medium-screen 6); 10 | $small: new-breakpoint(min-width $small-screen 1); 11 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/core/_utilities.scss: -------------------------------------------------------------------------------- 1 | // Mobile-first media query helper 2 | @mixin media($bp) { 3 | @media screen and (min-width: #{$bp}) { 4 | @content; 5 | } 6 | } 7 | 8 | // Clearfix helper 9 | @mixin clearfix() { 10 | &:after { 11 | content: "."; 12 | display: block; 13 | height: 0; 14 | clear: both; 15 | visibility: hidden; 16 | } 17 | } 18 | 19 | // Screen reader only helper 20 | .usa-sr-only { 21 | position: absolute; 22 | left:-999em; 23 | } 24 | 25 | @mixin sr-only() { 26 | position: absolute; 27 | left:-999em; 28 | } 29 | 30 | // Unstyled list helper 31 | 32 | @mixin unstyled-list() { 33 | display: block; 34 | margin: 0; 35 | padding: 0; 36 | list-style-type: none; 37 | 38 | li { 39 | display: list-item; 40 | margin: 0; 41 | 42 | &:before { 43 | display: none; 44 | } 45 | 46 | &:after { 47 | display: none; 48 | } 49 | } 50 | } 51 | 52 | // Content size helpers 53 | @mixin allow-layout-classes { 54 | 55 | margin: { 56 | left: auto; 57 | right: auto; 58 | } 59 | 60 | &.width-one-half { 61 | @include media($medium-screen) { 62 | width: 50%; 63 | } 64 | } 65 | 66 | &.width-one-third { 67 | @include media($medium-screen) { 68 | width: 33%; 69 | } 70 | } 71 | 72 | &.width-two-thirds { 73 | @include media($medium-screen) { 74 | width: 67%; 75 | } 76 | } 77 | 78 | &.width-one-fourth { 79 | @include media($medium-screen) { 80 | width: 25%; 81 | } 82 | } 83 | 84 | &.width-three-fourths { 85 | @include media($medium-screen) { 86 | width: 75%; 87 | } 88 | } 89 | 90 | &.align-left { 91 | @include media($medium-screen) { 92 | float: left; 93 | margin-top: .5em; 94 | margin-right: 2em; 95 | } 96 | } 97 | 98 | &.align-right { 99 | @include media($medium-screen) { 100 | float: right; 101 | margin-top: .5em; 102 | margin-left: 2em; 103 | } 104 | } 105 | } -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/elements/_figure.scss: -------------------------------------------------------------------------------- 1 | img { 2 | max-width: 100%; 3 | } 4 | 5 | // TODO: Add documentation instructions for using this class on image links 6 | .media_link { 7 | display: inline-block; 8 | line-height: 0; 9 | } 10 | 11 | // Patch for Firefox: max-width:100% is not respected within auto-width inline 12 | // blocks 13 | @-moz-document url-prefix() { 14 | .media_link { 15 | display: table; 16 | table-layout: fixed; 17 | width: 100%; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/elements/_labels.scss: -------------------------------------------------------------------------------- 1 | .usa-label { 2 | background-color: $color-primary; 3 | border-radius: $border-radius; 4 | color: $color-white; 5 | font-size: $h5-font-size; 6 | margin-right: .5rem; 7 | padding: { 8 | bottom: 0.1rem; 9 | left: 0.7rem; 10 | right: 0.7rem; 11 | top: 0.3rem; 12 | } 13 | text-transform: uppercase; 14 | 15 | &:only-of-type { 16 | margin-right: 0; 17 | } 18 | } 19 | 20 | .usa-label-big { 21 | @extend .usa-label; 22 | font-size: $base-font-size; 23 | padding: { 24 | left: .9rem; 25 | right: .9rem; 26 | } 27 | } 28 | 29 | a { 30 | &.usa-label { 31 | border-bottom: none; 32 | 33 | &:hover { 34 | background-color: $color-primary-darker; 35 | border-bottom: none; 36 | color: $color-white; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/elements/_list.scss: -------------------------------------------------------------------------------- 1 | ul, ol { 2 | margin: { 3 | top: 2em; 4 | bottom: 2em; 5 | } 6 | 7 | li { 8 | line-height: $base-line-height; 9 | margin: { 10 | top: .75em; 11 | bottom: .75em; 12 | } 13 | } 14 | } 15 | 16 | h1, h2, h3, h4, h5, h6, p { 17 | + ul, 18 | + ol { 19 | margin: { 20 | top: 0; 21 | } 22 | } 23 | } 24 | 25 | ul, ol { 26 | list-style: none; 27 | padding-left: 0; 28 | display: table; 29 | 30 | li:after { 31 | content: ""; 32 | display: block; 33 | margin-bottom: 0.5em; 34 | } 35 | } 36 | 37 | ul li { 38 | display: table-row; 39 | 40 | &:before { 41 | content: "•"; 42 | display: table-cell; 43 | padding-right: 0.4em; 44 | } 45 | } 46 | 47 | ol li { 48 | display: table-row; 49 | counter-increment: table-ol; 50 | 51 | &:before { 52 | content: counter(table-ol) "."; 53 | display: table-cell; 54 | padding-right: 0.4em; 55 | text-align: right; 56 | } 57 | } 58 | 59 | li { 60 | margin-bottom: 0.5em; 61 | } 62 | 63 | // Unstyled lists 64 | 65 | .usa-unstyled-list { 66 | margin: 0; 67 | padding: 0; 68 | list-style-type: none; 69 | 70 | li { 71 | display: list-item; 72 | margin: 0; 73 | 74 | &:before { 75 | display: none; 76 | } 77 | 78 | &:after { 79 | display: none; 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/elements/_table.scss: -------------------------------------------------------------------------------- 1 | table { 2 | border-spacing: 0; 3 | margin: 2em 0; 4 | min-width: 100%; 5 | 6 | thead { 7 | tr { 8 | background-color: $color-gray-lightest; 9 | } 10 | 11 | th { 12 | text-align: left; 13 | } 14 | } 15 | 16 | th, td { 17 | border: 1px solid $color-gray; 18 | padding: 1.5rem; 19 | } 20 | } 21 | 22 | .usa-table-borderless { 23 | thead { 24 | tr { 25 | background-color: transparent; 26 | 27 | th { 28 | border-top: 0; 29 | } 30 | } 31 | } 32 | 33 | th, td { 34 | border: { 35 | left: 0; 36 | right: 0; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_border-color.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `border-color` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include border-color(#a60b55 #76cd9c null #e8ae1a); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// border-left-color: #e8ae1a; 16 | /// border-right-color: #76cd9c; 17 | /// border-top-color: #a60b55; 18 | /// } 19 | /// 20 | /// @require {mixin} directional-property 21 | /// 22 | /// @output `border-color` 23 | 24 | @mixin border-color($vals...) { 25 | @include directional-property(border, color, $vals...); 26 | } 27 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_border-radius.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `border-radius` on both corners on the side of a box. 4 | /// 5 | /// @param {Number} $radii 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element-one { 10 | /// @include border-top-radius(5px); 11 | /// } 12 | /// 13 | /// .element-two { 14 | /// @include border-left-radius(3px); 15 | /// } 16 | /// 17 | /// @example css - CSS Output 18 | /// .element-one { 19 | /// border-top-left-radius: 5px; 20 | /// border-top-right-radius: 5px; 21 | /// } 22 | /// 23 | /// .element-two { 24 | /// border-bottom-left-radius: 3px; 25 | /// border-top-left-radius: 3px; 26 | /// } 27 | /// 28 | /// @output `border-radius` 29 | 30 | @mixin border-top-radius($radii) { 31 | border-top-left-radius: $radii; 32 | border-top-right-radius: $radii; 33 | } 34 | 35 | @mixin border-right-radius($radii) { 36 | border-bottom-right-radius: $radii; 37 | border-top-right-radius: $radii; 38 | } 39 | 40 | @mixin border-bottom-radius($radii) { 41 | border-bottom-left-radius: $radii; 42 | border-bottom-right-radius: $radii; 43 | } 44 | 45 | @mixin border-left-radius($radii) { 46 | border-bottom-left-radius: $radii; 47 | border-top-left-radius: $radii; 48 | } 49 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_border-style.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `border-style` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include border-style(dashed null solid); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// border-bottom-style: solid; 16 | /// border-top-style: dashed; 17 | /// } 18 | /// 19 | /// @require {mixin} directional-property 20 | /// 21 | /// @output `border-style` 22 | 23 | @mixin border-style($vals...) { 24 | @include directional-property(border, style, $vals...); 25 | } 26 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_border-width.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `border-width` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include border-width(1em null 20px); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// border-bottom-width: 20px; 16 | /// border-top-width: 1em; 17 | /// } 18 | /// 19 | /// @require {mixin} directional-property 20 | /// 21 | /// @output `border-width` 22 | 23 | @mixin border-width($vals...) { 24 | @include directional-property(border, width, $vals...); 25 | } 26 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_buttons.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Generates variables for all buttons. Please note that you must use interpolation on the variable: `#{$all-buttons}`. 4 | /// 5 | /// @example scss - Usage 6 | /// #{$all-buttons} { 7 | /// background-color: #f00; 8 | /// } 9 | /// 10 | /// #{$all-buttons-focus}, 11 | /// #{$all-buttons-hover} { 12 | /// background-color: #0f0; 13 | /// } 14 | /// 15 | /// #{$all-buttons-active} { 16 | /// background-color: #00f; 17 | /// } 18 | /// 19 | /// @example css - CSS Output 20 | /// button, 21 | /// input[type="button"], 22 | /// input[type="reset"], 23 | /// input[type="submit"] { 24 | /// background-color: #f00; 25 | /// } 26 | /// 27 | /// button:focus, 28 | /// input[type="button"]:focus, 29 | /// input[type="reset"]:focus, 30 | /// input[type="submit"]:focus, 31 | /// button:hover, 32 | /// input[type="button"]:hover, 33 | /// input[type="reset"]:hover, 34 | /// input[type="submit"]:hover { 35 | /// background-color: #0f0; 36 | /// } 37 | /// 38 | /// button:active, 39 | /// input[type="button"]:active, 40 | /// input[type="reset"]:active, 41 | /// input[type="submit"]:active { 42 | /// background-color: #00f; 43 | /// } 44 | /// 45 | /// @require assign-inputs 46 | /// 47 | /// @type List 48 | /// 49 | /// @todo Remove double assigned variables (Lines 59–62) in v5.0.0 50 | 51 | $buttons-list: 'button', 52 | 'input[type="button"]', 53 | 'input[type="reset"]', 54 | 'input[type="submit"]'; 55 | 56 | $all-buttons: assign-inputs($buttons-list); 57 | $all-buttons-active: assign-inputs($buttons-list, active); 58 | $all-buttons-focus: assign-inputs($buttons-list, focus); 59 | $all-buttons-hover: assign-inputs($buttons-list, hover); 60 | 61 | $all-button-inputs: $all-buttons; 62 | $all-button-inputs-active: $all-buttons-active; 63 | $all-button-inputs-focus: $all-buttons-focus; 64 | $all-button-inputs-hover: $all-buttons-hover; 65 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides an easy way to include a clearfix for containing floats. 4 | /// 5 | /// @link http://cssmojo.com/latest_new_clearfix_so_far/ 6 | /// 7 | /// @example scss - Usage 8 | /// .element { 9 | /// @include clearfix; 10 | /// } 11 | /// 12 | /// @example css - CSS Output 13 | /// .element::after { 14 | /// clear: both; 15 | /// content: ""; 16 | /// display: table; 17 | /// } 18 | 19 | @mixin clearfix { 20 | &::after { 21 | clear: both; 22 | content: ""; 23 | display: table; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_ellipsis.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Truncates text and adds an ellipsis to represent overflow. 4 | /// 5 | /// @param {Number} $width [100%] 6 | /// Max-width for the string to respect before being truncated 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include ellipsis; 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// display: inline-block; 16 | /// max-width: 100%; 17 | /// overflow: hidden; 18 | /// text-overflow: ellipsis; 19 | /// white-space: nowrap; 20 | /// word-wrap: normal; 21 | /// } 22 | 23 | @mixin ellipsis($width: 100%) { 24 | display: inline-block; 25 | max-width: $width; 26 | overflow: hidden; 27 | text-overflow: ellipsis; 28 | white-space: nowrap; 29 | word-wrap: normal; 30 | } 31 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_font-stacks.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Georgia font stack. 4 | /// 5 | /// @type List 6 | 7 | $georgia: "Georgia", "Cambria", "Times New Roman", "Times", serif; 8 | 9 | /// Helvetica font stack. 10 | /// 11 | /// @type List 12 | 13 | $helvetica: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; 14 | 15 | /// Lucida Grande font stack. 16 | /// 17 | /// @type List 18 | 19 | $lucida-grande: "Lucida Grande", "Tahoma", "Verdana", "Arial", sans-serif; 20 | 21 | /// Monospace font stack. 22 | /// 23 | /// @type List 24 | 25 | $monospace: "Bitstream Vera Sans Mono", "Consolas", "Courier", monospace; 26 | 27 | /// Verdana font stack. 28 | /// 29 | /// @type List 30 | 31 | $verdana: "Verdana", "Geneva", sans-serif; 32 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_hide-text.scss: -------------------------------------------------------------------------------- 1 | /// Hides the text in an element, commonly used to show an image. Some elements will need block-level styles applied. 2 | /// 3 | /// @link http://zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement 4 | /// 5 | /// @example scss - Usage 6 | /// .element { 7 | /// @include hide-text; 8 | /// } 9 | /// 10 | /// @example css - CSS Output 11 | /// .element { 12 | /// overflow: hidden; 13 | /// text-indent: 101%; 14 | /// white-space: nowrap; 15 | /// } 16 | /// 17 | /// @todo Remove height argument in v5.0.0 18 | 19 | @mixin hide-text($height: null) { 20 | overflow: hidden; 21 | text-indent: 101%; 22 | white-space: nowrap; 23 | 24 | @if $height { 25 | @warn "The `hide-text` mixin has changed and no longer requires a height. The height argument will no longer be accepted in v5.0.0"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_margin.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `margin` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include margin(null 10px 3em 20vh); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// margin-bottom: 3em; 16 | /// margin-left: 20vh; 17 | /// margin-right: 10px; 18 | /// } 19 | /// 20 | /// @require {mixin} directional-property 21 | /// 22 | /// @output `margin` 23 | 24 | @mixin margin($vals...) { 25 | @include directional-property(margin, false, $vals...); 26 | } 27 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_padding.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `padding` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include padding(12vh null 10px 5%); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// padding-bottom: 10px; 16 | /// padding-left: 5%; 17 | /// padding-top: 12vh; 18 | /// } 19 | /// 20 | /// @require {mixin} directional-property 21 | /// 22 | /// @output `padding` 23 | 24 | @mixin padding($vals...) { 25 | @include directional-property(padding, false, $vals...); 26 | } 27 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_position.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for setting an element’s position. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Position} $position [relative] 6 | /// A CSS position value 7 | /// 8 | /// @param {Arglist} $coordinates [null null null null] 9 | /// List of values that correspond to the 4-value syntax for the edges of a box 10 | /// 11 | /// @example scss - Usage 12 | /// .element { 13 | /// @include position(absolute, 0 null null 10em); 14 | /// } 15 | /// 16 | /// @example css - CSS Output 17 | /// .element { 18 | /// left: 10em; 19 | /// position: absolute; 20 | /// top: 0; 21 | /// } 22 | /// 23 | /// @require {function} is-length 24 | /// @require {function} unpack 25 | 26 | @mixin position($position: relative, $coordinates: null null null null) { 27 | @if type-of($position) == list { 28 | $coordinates: $position; 29 | $position: relative; 30 | } 31 | 32 | $coordinates: unpack($coordinates); 33 | 34 | $offsets: ( 35 | top: nth($coordinates, 1), 36 | right: nth($coordinates, 2), 37 | bottom: nth($coordinates, 3), 38 | left: nth($coordinates, 4) 39 | ); 40 | 41 | position: $position; 42 | 43 | @each $offset, $value in $offsets { 44 | @if is-length($value) { 45 | #{$offset}: $value; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_prefixer.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// A mixin for generating vendor prefixes on non-standardized properties. 4 | /// 5 | /// @param {String} $property 6 | /// Property to prefix 7 | /// 8 | /// @param {*} $value 9 | /// Value to use 10 | /// 11 | /// @param {List} $prefixes 12 | /// Prefixes to define 13 | /// 14 | /// @example scss - Usage 15 | /// .element { 16 | /// @include prefixer(border-radius, 10px, webkit ms spec); 17 | /// } 18 | /// 19 | /// @example css - CSS Output 20 | /// .element { 21 | /// -webkit-border-radius: 10px; 22 | /// -moz-border-radius: 10px; 23 | /// border-radius: 10px; 24 | /// } 25 | /// 26 | /// @require {variable} $prefix-for-webkit 27 | /// @require {variable} $prefix-for-mozilla 28 | /// @require {variable} $prefix-for-microsoft 29 | /// @require {variable} $prefix-for-opera 30 | /// @require {variable} $prefix-for-spec 31 | 32 | @mixin prefixer($property, $value, $prefixes) { 33 | @each $prefix in $prefixes { 34 | @if $prefix == webkit { 35 | @if $prefix-for-webkit { 36 | -webkit-#{$property}: $value; 37 | } 38 | } @else if $prefix == moz { 39 | @if $prefix-for-mozilla { 40 | -moz-#{$property}: $value; 41 | } 42 | } @else if $prefix == ms { 43 | @if $prefix-for-microsoft { 44 | -ms-#{$property}: $value; 45 | } 46 | } @else if $prefix == o { 47 | @if $prefix-for-opera { 48 | -o-#{$property}: $value; 49 | } 50 | } @else if $prefix == spec { 51 | @if $prefix-for-spec { 52 | #{$property}: $value; 53 | } 54 | } @else { 55 | @warn "Unrecognized prefix: #{$prefix}"; 56 | } 57 | } 58 | } 59 | 60 | @mixin disable-prefix-for-all() { 61 | $prefix-for-webkit: false !global; 62 | $prefix-for-mozilla: false !global; 63 | $prefix-for-microsoft: false !global; 64 | $prefix-for-opera: false !global; 65 | $prefix-for-spec: false !global; 66 | } 67 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_retina-image.scss: -------------------------------------------------------------------------------- 1 | @mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) { 2 | @if $asset-pipeline { 3 | background-image: image-url("#{$filename}.#{$extension}"); 4 | } @else { 5 | background-image: url("#{$filename}.#{$extension}"); 6 | } 7 | 8 | @include hidpi { 9 | @if $asset-pipeline { 10 | @if $retina-filename { 11 | background-image: image-url("#{$retina-filename}.#{$extension}"); 12 | } @else { 13 | background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}"); 14 | } 15 | } @else { 16 | @if $retina-filename { 17 | background-image: url("#{$retina-filename}.#{$extension}"); 18 | } @else { 19 | background-image: url("#{$filename}#{$retina-suffix}.#{$extension}"); 20 | } 21 | } 22 | 23 | background-size: $background-size; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_size.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Sets the `width` and `height` of the element. 4 | /// 5 | /// @param {List} $size 6 | /// A list of at most 2 size values. 7 | /// 8 | /// If there is only a single value in `$size` it is used for both width and height. All units are supported. 9 | /// 10 | /// @example scss - Usage 11 | /// .first-element { 12 | /// @include size(2em); 13 | /// } 14 | /// 15 | /// .second-element { 16 | /// @include size(auto 10em); 17 | /// } 18 | /// 19 | /// @example css - CSS Output 20 | /// .first-element { 21 | /// width: 2em; 22 | /// height: 2em; 23 | /// } 24 | /// 25 | /// .second-element { 26 | /// width: auto; 27 | /// height: 10em; 28 | /// } 29 | /// 30 | /// @todo Refactor in 5.0.0 to use a comma-separated argument 31 | 32 | @mixin size($value) { 33 | $width: nth($value, 1); 34 | $height: $width; 35 | 36 | @if length($value) > 1 { 37 | $height: nth($value, 2); 38 | } 39 | 40 | @if is-size($height) { 41 | height: $height; 42 | } @else { 43 | @warn "`#{$height}` is not a valid length for the `$height` parameter in the `size` mixin."; 44 | } 45 | 46 | @if is-size($width) { 47 | width: $width; 48 | } @else { 49 | @warn "`#{$width}` is not a valid length for the `$width` parameter in the `size` mixin."; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_timing-functions.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie) 4 | /// 5 | /// Timing functions are the same as demoed here: http://jqueryui.com/resources/demos/effect/easing.html 6 | /// 7 | /// @type cubic-bezier 8 | 9 | $ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530); 10 | $ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); 11 | $ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); 12 | $ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); 13 | $ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); 14 | $ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035); 15 | $ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335); 16 | $ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); 17 | 18 | $ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940); 19 | $ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000); 20 | $ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000); 21 | $ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000); 22 | $ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000); 23 | $ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000); 24 | $ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000); 25 | $ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275); 26 | 27 | $ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955); 28 | $ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000); 29 | $ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000); 30 | $ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000); 31 | $ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950); 32 | $ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000); 33 | $ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860); 34 | $ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550); 35 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_word-wrap.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides an easy way to change the `word-wrap` property. 4 | /// 5 | /// @param {String} $wrap [break-word] 6 | /// Value for the `word-break` property. 7 | /// 8 | /// @example scss - Usage 9 | /// .wrapper { 10 | /// @include word-wrap(break-word); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .wrapper { 15 | /// overflow-wrap: break-word; 16 | /// word-break: break-all; 17 | /// word-wrap: break-word; 18 | /// } 19 | 20 | @mixin word-wrap($wrap: break-word) { 21 | overflow-wrap: $wrap; 22 | word-wrap: $wrap; 23 | 24 | @if $wrap == break-word { 25 | word-break: break-all; 26 | } @else { 27 | word-break: $wrap; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_animation.scss: -------------------------------------------------------------------------------- 1 | // http://www.w3.org/TR/css3-animations/#the-animation-name-property- 2 | // Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties. 3 | 4 | @mixin animation($animations...) { 5 | @include prefixer(animation, $animations, webkit moz spec); 6 | } 7 | 8 | @mixin animation-name($names...) { 9 | @include prefixer(animation-name, $names, webkit moz spec); 10 | } 11 | 12 | @mixin animation-duration($times...) { 13 | @include prefixer(animation-duration, $times, webkit moz spec); 14 | } 15 | 16 | @mixin animation-timing-function($motions...) { 17 | // ease | linear | ease-in | ease-out | ease-in-out 18 | @include prefixer(animation-timing-function, $motions, webkit moz spec); 19 | } 20 | 21 | @mixin animation-iteration-count($values...) { 22 | // infinite | 23 | @include prefixer(animation-iteration-count, $values, webkit moz spec); 24 | } 25 | 26 | @mixin animation-direction($directions...) { 27 | // normal | alternate 28 | @include prefixer(animation-direction, $directions, webkit moz spec); 29 | } 30 | 31 | @mixin animation-play-state($states...) { 32 | // running | paused 33 | @include prefixer(animation-play-state, $states, webkit moz spec); 34 | } 35 | 36 | @mixin animation-delay($times...) { 37 | @include prefixer(animation-delay, $times, webkit moz spec); 38 | } 39 | 40 | @mixin animation-fill-mode($modes...) { 41 | // none | forwards | backwards | both 42 | @include prefixer(animation-fill-mode, $modes, webkit moz spec); 43 | } 44 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_appearance.scss: -------------------------------------------------------------------------------- 1 | @mixin appearance($value) { 2 | @include prefixer(appearance, $value, webkit moz ms o spec); 3 | } 4 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_backface-visibility.scss: -------------------------------------------------------------------------------- 1 | @mixin backface-visibility($visibility) { 2 | @include prefixer(backface-visibility, $visibility, webkit spec); 3 | } 4 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_background-image.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Background-image property for adding multiple background images with 3 | // gradients, or for stringing multiple gradients together. 4 | //************************************************************************// 5 | 6 | @mixin background-image($images...) { 7 | $webkit-images: (); 8 | $spec-images: (); 9 | 10 | @each $image in $images { 11 | $webkit-image: (); 12 | $spec-image: (); 13 | 14 | @if (type-of($image) == string) { 15 | $url-str: str-slice($image, 0, 3); 16 | $gradient-type: str-slice($image, 0, 6); 17 | 18 | @if $url-str == "url" { 19 | $webkit-image: $image; 20 | $spec-image: $image; 21 | } 22 | 23 | @else if $gradient-type == "linear" { 24 | $gradients: _linear-gradient-parser($image); 25 | $webkit-image: map-get($gradients, webkit-image); 26 | $spec-image: map-get($gradients, spec-image); 27 | } 28 | 29 | @else if $gradient-type == "radial" { 30 | $gradients: _radial-gradient-parser($image); 31 | $webkit-image: map-get($gradients, webkit-image); 32 | $spec-image: map-get($gradients, spec-image); 33 | } 34 | } 35 | 36 | $webkit-images: append($webkit-images, $webkit-image, comma); 37 | $spec-images: append($spec-images, $spec-image, comma); 38 | } 39 | 40 | background-image: $webkit-images; 41 | background-image: $spec-images; 42 | } 43 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_background.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Background property for adding multiple backgrounds using shorthand 3 | // notation. 4 | //************************************************************************// 5 | 6 | @mixin background($backgrounds...) { 7 | $webkit-backgrounds: (); 8 | $spec-backgrounds: (); 9 | 10 | @each $background in $backgrounds { 11 | $webkit-background: (); 12 | $spec-background: (); 13 | $background-type: type-of($background); 14 | 15 | @if $background-type == string or $background-type == list { 16 | $background-str: if($background-type == list, nth($background, 1), $background); 17 | 18 | $url-str: str-slice($background-str, 0, 3); 19 | $gradient-type: str-slice($background-str, 0, 6); 20 | 21 | @if $url-str == "url" { 22 | $webkit-background: $background; 23 | $spec-background: $background; 24 | } 25 | 26 | @else if $gradient-type == "linear" { 27 | $gradients: _linear-gradient-parser("#{$background}"); 28 | $webkit-background: map-get($gradients, webkit-image); 29 | $spec-background: map-get($gradients, spec-image); 30 | } 31 | 32 | @else if $gradient-type == "radial" { 33 | $gradients: _radial-gradient-parser("#{$background}"); 34 | $webkit-background: map-get($gradients, webkit-image); 35 | $spec-background: map-get($gradients, spec-image); 36 | } 37 | 38 | @else { 39 | $webkit-background: $background; 40 | $spec-background: $background; 41 | } 42 | } 43 | 44 | @else { 45 | $webkit-background: $background; 46 | $spec-background: $background; 47 | } 48 | 49 | $webkit-backgrounds: append($webkit-backgrounds, $webkit-background, comma); 50 | $spec-backgrounds: append($spec-backgrounds, $spec-background, comma); 51 | } 52 | 53 | background: $webkit-backgrounds; 54 | background: $spec-backgrounds; 55 | } 56 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_border-image.scss: -------------------------------------------------------------------------------- 1 | @mixin border-image($borders...) { 2 | $webkit-borders: (); 3 | $spec-borders: (); 4 | 5 | @each $border in $borders { 6 | $webkit-border: (); 7 | $spec-border: (); 8 | $border-type: type-of($border); 9 | 10 | @if $border-type == string or list { 11 | $border-str: if($border-type == list, nth($border, 1), $border); 12 | 13 | $url-str: str-slice($border-str, 0, 3); 14 | $gradient-type: str-slice($border-str, 0, 6); 15 | 16 | @if $url-str == "url" { 17 | $webkit-border: $border; 18 | $spec-border: $border; 19 | } 20 | 21 | @else if $gradient-type == "linear" { 22 | $gradients: _linear-gradient-parser("#{$border}"); 23 | $webkit-border: map-get($gradients, webkit-image); 24 | $spec-border: map-get($gradients, spec-image); 25 | } 26 | 27 | @else if $gradient-type == "radial" { 28 | $gradients: _radial-gradient-parser("#{$border}"); 29 | $webkit-border: map-get($gradients, webkit-image); 30 | $spec-border: map-get($gradients, spec-image); 31 | } 32 | 33 | @else { 34 | $webkit-border: $border; 35 | $spec-border: $border; 36 | } 37 | } 38 | 39 | @else { 40 | $webkit-border: $border; 41 | $spec-border: $border; 42 | } 43 | 44 | $webkit-borders: append($webkit-borders, $webkit-border, comma); 45 | $spec-borders: append($spec-borders, $spec-border, comma); 46 | } 47 | 48 | -webkit-border-image: $webkit-borders; 49 | border-image: $spec-borders; 50 | border-style: solid; 51 | } 52 | 53 | //Examples: 54 | // @include border-image(url("image.png")); 55 | // @include border-image(url("image.png") 20 stretch); 56 | // @include border-image(linear-gradient(45deg, orange, yellow)); 57 | // @include border-image(linear-gradient(45deg, orange, yellow) stretch); 58 | // @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round); 59 | // @include border-image(radial-gradient(top, cover, orange, yellow, orange)); 60 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_calc.scss: -------------------------------------------------------------------------------- 1 | @mixin calc($property, $value) { 2 | #{$property}: -webkit-calc(#{$value}); 3 | #{$property}: calc(#{$value}); 4 | } 5 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_columns.scss: -------------------------------------------------------------------------------- 1 | @mixin columns($arg: auto) { 2 | // || 3 | @include prefixer(columns, $arg, webkit moz spec); 4 | } 5 | 6 | @mixin column-count($int: auto) { 7 | // auto || integer 8 | @include prefixer(column-count, $int, webkit moz spec); 9 | } 10 | 11 | @mixin column-gap($length: normal) { 12 | // normal || length 13 | @include prefixer(column-gap, $length, webkit moz spec); 14 | } 15 | 16 | @mixin column-fill($arg: auto) { 17 | // auto || length 18 | @include prefixer(column-fill, $arg, webkit moz spec); 19 | } 20 | 21 | @mixin column-rule($arg) { 22 | // || || 23 | @include prefixer(column-rule, $arg, webkit moz spec); 24 | } 25 | 26 | @mixin column-rule-color($color) { 27 | @include prefixer(column-rule-color, $color, webkit moz spec); 28 | } 29 | 30 | @mixin column-rule-style($style: none) { 31 | // none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid 32 | @include prefixer(column-rule-style, $style, webkit moz spec); 33 | } 34 | 35 | @mixin column-rule-width ($width: none) { 36 | @include prefixer(column-rule-width, $width, webkit moz spec); 37 | } 38 | 39 | @mixin column-span($arg: none) { 40 | // none || all 41 | @include prefixer(column-span, $arg, webkit moz spec); 42 | } 43 | 44 | @mixin column-width($length: auto) { 45 | // auto || length 46 | @include prefixer(column-width, $length, webkit moz spec); 47 | } 48 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_filter.scss: -------------------------------------------------------------------------------- 1 | @mixin filter($function: none) { 2 | // [ 3 | @include prefixer(perspective, $depth, webkit moz spec); 4 | } 5 | 6 | @mixin perspective-origin($value: 50% 50%) { 7 | @include prefixer(perspective-origin, $value, webkit moz spec); 8 | } 9 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_placeholder.scss: -------------------------------------------------------------------------------- 1 | @mixin placeholder { 2 | $placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input"; 3 | @each $placeholder in $placeholders { 4 | &:#{$placeholder}-placeholder { 5 | @content; 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_radial-gradient.scss: -------------------------------------------------------------------------------- 1 | // Requires Sass 3.1+ 2 | @mixin radial-gradient($g1, $g2, 3 | $g3: null, $g4: null, 4 | $g5: null, $g6: null, 5 | $g7: null, $g8: null, 6 | $g9: null, $g10: null, 7 | $pos: null, 8 | $shape-size: null, 9 | $fallback: null) { 10 | 11 | $data: _radial-arg-parser($g1, $g2, $pos, $shape-size); 12 | $g1: nth($data, 1); 13 | $g2: nth($data, 2); 14 | $pos: nth($data, 3); 15 | $shape-size: nth($data, 4); 16 | 17 | $full: $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10; 18 | 19 | // Strip deprecated cover/contain for spec 20 | $shape-size-spec: _shape-size-stripper($shape-size); 21 | 22 | // Set $g1 as the default fallback color 23 | $first-color: nth($full, 1); 24 | $fallback-color: nth($first-color, 1); 25 | 26 | @if (type-of($fallback) == color) or ($fallback == "transparent") { 27 | $fallback-color: $fallback; 28 | } 29 | 30 | // Add Commas and spaces 31 | $shape-size: if($shape-size, "#{$shape-size}, ", null); 32 | $pos: if($pos, "#{$pos}, ", null); 33 | $pos-spec: if($pos, "at #{$pos}", null); 34 | $shape-size-spec: if(($shape-size-spec != " ") and ($pos == null), "#{$shape-size-spec}, ", "#{$shape-size-spec} "); 35 | 36 | background-color: $fallback-color; 37 | background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full})); 38 | background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})"); 39 | } 40 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_selection.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Outputs the spec and prefixed versions of the `::selection` pseudo-element. 4 | /// 5 | /// @param {Bool} $current-selector [false] 6 | /// If set to `true`, it takes the current element into consideration. 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include selection(true) { 11 | /// background-color: #ffbb52; 12 | /// } 13 | /// } 14 | /// 15 | /// @example css - CSS Output 16 | /// .element::-moz-selection { 17 | /// background-color: #ffbb52; 18 | /// } 19 | /// 20 | /// .element::selection { 21 | /// background-color: #ffbb52; 22 | /// } 23 | 24 | @mixin selection($current-selector: false) { 25 | @if $current-selector { 26 | &::-moz-selection { 27 | @content; 28 | } 29 | 30 | &::selection { 31 | @content; 32 | } 33 | } @else { 34 | ::-moz-selection { 35 | @content; 36 | } 37 | 38 | ::selection { 39 | @content; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_text-decoration.scss: -------------------------------------------------------------------------------- 1 | @mixin text-decoration($value) { 2 | // || || 3 | @include prefixer(text-decoration, $value, moz); 4 | } 5 | 6 | @mixin text-decoration-line($line: none) { 7 | // none || underline || overline || line-through 8 | @include prefixer(text-decoration-line, $line, moz); 9 | } 10 | 11 | @mixin text-decoration-style($style: solid) { 12 | // solid || double || dotted || dashed || wavy 13 | @include prefixer(text-decoration-style, $style, moz webkit); 14 | } 15 | 16 | @mixin text-decoration-color($color: currentColor) { 17 | // currentColor || 18 | @include prefixer(text-decoration-color, $color, moz); 19 | } 20 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_transform.scss: -------------------------------------------------------------------------------- 1 | @mixin transform($property: none) { 2 | // none | 3 | @include prefixer(transform, $property, webkit moz ms o spec); 4 | } 5 | 6 | @mixin transform-origin($axes: 50%) { 7 | // x-axis - left | center | right | length | % 8 | // y-axis - top | center | bottom | length | % 9 | // z-axis - length 10 | @include prefixer(transform-origin, $axes, webkit moz ms o spec); 11 | } 12 | 13 | @mixin transform-style($style: flat) { 14 | @include prefixer(transform-style, $style, webkit moz ms o spec); 15 | } 16 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_user-select.scss: -------------------------------------------------------------------------------- 1 | @mixin user-select($value: none) { 2 | @include prefixer(user-select, $value, webkit moz ms spec); 3 | } 4 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_assign-inputs.scss: -------------------------------------------------------------------------------- 1 | @function assign-inputs($inputs, $pseudo: null) { 2 | $list: (); 3 | 4 | @each $input in $inputs { 5 | $input: unquote($input); 6 | $input: if($pseudo, $input + ":" + $pseudo, $input); 7 | $list: append($list, $input, comma); 8 | } 9 | 10 | @return $list; 11 | } 12 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_contains-falsy.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks if a list does not contains a value. 4 | /// 5 | /// @access private 6 | /// 7 | /// @param {List} $list 8 | /// The list to check against. 9 | /// 10 | /// @return {Bool} 11 | 12 | @function contains-falsy($list) { 13 | @each $item in $list { 14 | @if not $item { 15 | @return true; 16 | } 17 | } 18 | 19 | @return false; 20 | } 21 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_contains.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks if a list contains a value(s). 4 | /// 5 | /// @access private 6 | /// 7 | /// @param {List} $list 8 | /// The list to check against. 9 | /// 10 | /// @param {List} $values 11 | /// A single value or list of values to check for. 12 | /// 13 | /// @example scss - Usage 14 | /// contains($list, $value) 15 | /// 16 | /// @return {Bool} 17 | 18 | @function contains($list, $values...) { 19 | @each $value in $values { 20 | @if type-of(index($list, $value)) != "number" { 21 | @return false; 22 | } 23 | } 24 | 25 | @return true; 26 | } 27 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_is-length.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid CSS length. 4 | /// 5 | /// @param {String} $value 6 | 7 | @function is-length($value) { 8 | @return type-of($value) != "null" and (str-slice($value + "", 1, 4) == "calc" 9 | or index(auto inherit initial 0, $value) 10 | or (type-of($value) == "number" and not(unitless($value)))); 11 | } 12 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_is-light.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Programatically determines whether a color is light or dark. 4 | /// 5 | /// @link http://robots.thoughtbot.com/closer-look-color-lightness 6 | /// 7 | /// @param {Color (Hex)} $color 8 | /// 9 | /// @example scss - Usage 10 | /// is-light($color) 11 | /// 12 | /// @return {Bool} 13 | 14 | @function is-light($hex-color) { 15 | $-local-red: red(rgba($hex-color, 1)); 16 | $-local-green: green(rgba($hex-color, 1)); 17 | $-local-blue: blue(rgba($hex-color, 1)); 18 | $-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255; 19 | 20 | @return $-local-lightness > 0.6; 21 | } 22 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_is-number.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid number. 4 | /// 5 | /// @param {Number} $value 6 | /// 7 | /// @require {function} contains 8 | 9 | @function is-number($value) { 10 | @return contains("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" 0 1 2 3 4 5 6 7 8 9, $value); 11 | } 12 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_is-size.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid CSS size. 4 | /// 5 | /// @param {String} $value 6 | /// 7 | /// @require {function} contains 8 | /// @require {function} is-length 9 | 10 | @function is-size($value) { 11 | @return is-length($value) 12 | or contains("fill" "fit-content" "min-content" "max-content", $value); 13 | } 14 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_modular-scale.scss: -------------------------------------------------------------------------------- 1 | // Scaling Variables 2 | $golden: 1.618; 3 | $minor-second: 1.067; 4 | $major-second: 1.125; 5 | $minor-third: 1.2; 6 | $major-third: 1.25; 7 | $perfect-fourth: 1.333; 8 | $augmented-fourth: 1.414; 9 | $perfect-fifth: 1.5; 10 | $minor-sixth: 1.6; 11 | $major-sixth: 1.667; 12 | $minor-seventh: 1.778; 13 | $major-seventh: 1.875; 14 | $octave: 2; 15 | $major-tenth: 2.5; 16 | $major-eleventh: 2.667; 17 | $major-twelfth: 3; 18 | $double-octave: 4; 19 | 20 | $modular-scale-ratio: $perfect-fourth !default; 21 | $modular-scale-base: em($em-base) !default; 22 | 23 | @function modular-scale($increment, $value: $modular-scale-base, $ratio: $modular-scale-ratio) { 24 | $v1: nth($value, 1); 25 | $v2: nth($value, length($value)); 26 | $value: $v1; 27 | 28 | // scale $v2 to just above $v1 29 | @while $v2 > $v1 { 30 | $v2: ($v2 / $ratio); // will be off-by-1 31 | } 32 | @while $v2 < $v1 { 33 | $v2: ($v2 * $ratio); // will fix off-by-1 34 | } 35 | 36 | // check AFTER scaling $v2 to prevent double-counting corner-case 37 | $double-stranded: $v2 > $v1; 38 | 39 | @if $increment > 0 { 40 | @for $i from 1 through $increment { 41 | @if $double-stranded and ($v1 * $ratio) > $v2 { 42 | $value: $v2; 43 | $v2: ($v2 * $ratio); 44 | } @else { 45 | $v1: ($v1 * $ratio); 46 | $value: $v1; 47 | } 48 | } 49 | } 50 | 51 | @if $increment < 0 { 52 | // adjust $v2 to just below $v1 53 | @if $double-stranded { 54 | $v2: ($v2 / $ratio); 55 | } 56 | 57 | @for $i from $increment through -1 { 58 | @if $double-stranded and ($v1 / $ratio) < $v2 { 59 | $value: $v2; 60 | $v2: ($v2 / $ratio); 61 | } @else { 62 | $v1: ($v1 / $ratio); 63 | $value: $v1; 64 | } 65 | } 66 | } 67 | 68 | @return $value; 69 | } 70 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_px-to-em.scss: -------------------------------------------------------------------------------- 1 | // Convert pixels to ems 2 | // eg. for a relational value of 12px write em(12) when the parent is 16px 3 | // if the parent is another value say 24px write em(12, 24) 4 | 5 | @function em($pxval, $base: $em-base) { 6 | @if not unitless($pxval) { 7 | $pxval: strip-units($pxval); 8 | } 9 | @if not unitless($base) { 10 | $base: strip-units($base); 11 | } 12 | @return ($pxval / $base) * 1em; 13 | } 14 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_px-to-rem.scss: -------------------------------------------------------------------------------- 1 | // Convert pixels to rems 2 | // eg. for a relational value of 12px write rem(12) 3 | // Assumes $em-base is the font-size of 4 | 5 | @function rem($pxval) { 6 | @if not unitless($pxval) { 7 | $pxval: strip-units($pxval); 8 | } 9 | 10 | $base: $em-base; 11 | @if not unitless($base) { 12 | $base: strip-units($base); 13 | } 14 | @return ($pxval / $base) * 1rem; 15 | } 16 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_shade.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Mixes a color with black. 4 | /// 5 | /// @param {Color} $color 6 | /// 7 | /// @param {Number (Percentage)} $percent 8 | /// The amount of black to be mixed in. 9 | /// 10 | /// @example scss - Usage 11 | /// .element { 12 | /// background-color: shade(#ffbb52, 60%); 13 | /// } 14 | /// 15 | /// @example css - CSS Output 16 | /// .element { 17 | /// background-color: #664a20; 18 | /// } 19 | /// 20 | /// @return {Color} 21 | 22 | @function shade($color, $percent) { 23 | @return mix(#000, $color, $percent); 24 | } 25 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_strip-units.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Strips the unit from a number. 4 | /// 5 | /// @param {Number (With Unit)} $value 6 | /// 7 | /// @example scss - Usage 8 | /// $dimension: strip-units(10em); 9 | /// 10 | /// @example css - CSS Output 11 | /// $dimension: 10; 12 | /// 13 | /// @return {Number (Unitless)} 14 | 15 | @function strip-units($value) { 16 | @return ($value / ($value * 0 + 1)); 17 | } 18 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_tint.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Mixes a color with white. 4 | /// 5 | /// @param {Color} $color 6 | /// 7 | /// @param {Number (Percentage)} $percent 8 | /// The amount of white to be mixed in. 9 | /// 10 | /// @example scss - Usage 11 | /// .element { 12 | /// background-color: tint(#6ecaa6, 40%); 13 | /// } 14 | /// 15 | /// @example css - CSS Output 16 | /// .element { 17 | /// background-color: #a8dfc9; 18 | /// } 19 | /// 20 | /// @return {Color} 21 | 22 | @function tint($color, $percent) { 23 | @return mix(#fff, $color, $percent); 24 | } 25 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_transition-property-name.scss: -------------------------------------------------------------------------------- 1 | // Return vendor-prefixed property names if appropriate 2 | // Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background 3 | //************************************************************************// 4 | @function transition-property-names($props, $vendor: false) { 5 | $new-props: (); 6 | 7 | @each $prop in $props { 8 | $new-props: append($new-props, transition-property-name($prop, $vendor), comma); 9 | } 10 | 11 | @return $new-props; 12 | } 13 | 14 | @function transition-property-name($prop, $vendor: false) { 15 | // put other properties that need to be prefixed here aswell 16 | @if $vendor and $prop == transform { 17 | @return unquote('-'+$vendor+'-'+$prop); 18 | } 19 | @else { 20 | @return $prop; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_unpack.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Converts shorthand to the 4-value syntax. 4 | /// 5 | /// @param {List} $shorthand 6 | /// 7 | /// @example scss - Usage 8 | /// .element { 9 | /// margin: unpack(1em 2em); 10 | /// } 11 | /// 12 | /// @example css - CSS Output 13 | /// .element { 14 | /// margin: 1em 2em 1em 2em; 15 | /// } 16 | 17 | @function unpack($shorthand) { 18 | @if length($shorthand) == 1 { 19 | @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1); 20 | } @else if length($shorthand) == 2 { 21 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2); 22 | } @else if length($shorthand) == 3 { 23 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2); 24 | } @else { 25 | @return $shorthand; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_convert-units.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Helper function for str-to-num fn. 3 | // Source: http://sassmeister.com/gist/9647408 4 | //************************************************************************// 5 | @function _convert-units($number, $unit) { 6 | $strings: "px", "cm", "mm", "%", "ch", "pica", "in", "em", "rem", "pt", "pc", "ex", "vw", "vh", "vmin", "vmax", "deg", "rad", "grad", "turn"; 7 | $units: 1px, 1cm, 1mm, 1%, 1ch, 1pica, 1in, 1em, 1rem, 1pt, 1pc, 1ex, 1vw, 1vh, 1vmin, 1vmax, 1deg, 1rad, 1grad, 1turn; 8 | $index: index($strings, $unit); 9 | 10 | @if not $index { 11 | @warn "Unknown unit `#{$unit}`."; 12 | @return false; 13 | } 14 | 15 | @if type-of($number) != "number" { 16 | @warn "`#{$number} is not a number`"; 17 | @return false; 18 | } 19 | 20 | @return $number * nth($units, $index); 21 | } 22 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_font-source-declaration.scss: -------------------------------------------------------------------------------- 1 | // Used for creating the source string for fonts using @font-face 2 | // Reference: http://goo.gl/Ru1bKP 3 | 4 | @function font-url-prefixer($asset-pipeline) { 5 | @if $asset-pipeline == true { 6 | @return font-url; 7 | } @else { 8 | @return url; 9 | } 10 | } 11 | 12 | @function font-source-declaration( 13 | $font-family, 14 | $file-path, 15 | $asset-pipeline, 16 | $file-formats, 17 | $font-url) { 18 | 19 | $src: (); 20 | 21 | $formats-map: ( 22 | eot: "#{$file-path}.eot?#iefix" format("embedded-opentype"), 23 | woff2: "#{$file-path}.woff2" format("woff2"), 24 | woff: "#{$file-path}.woff" format("woff"), 25 | ttf: "#{$file-path}.ttf" format("truetype"), 26 | svg: "#{$file-path}.svg##{$font-family}" format("svg") 27 | ); 28 | 29 | @each $key, $values in $formats-map { 30 | @if contains($file-formats, $key) { 31 | $file-path: nth($values, 1); 32 | $font-format: nth($values, 2); 33 | 34 | @if $asset-pipeline == true { 35 | $src: append($src, font-url($file-path) $font-format, comma); 36 | } @else { 37 | $src: append($src, url($file-path) $font-format, comma); 38 | } 39 | } 40 | } 41 | 42 | @return $src; 43 | } 44 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_gradient-positions-parser.scss: -------------------------------------------------------------------------------- 1 | @function _gradient-positions-parser($gradient-type, $gradient-positions) { 2 | @if $gradient-positions 3 | and ($gradient-type == linear) 4 | and (type-of($gradient-positions) != color) { 5 | $gradient-positions: _linear-positions-parser($gradient-positions); 6 | } 7 | @else if $gradient-positions 8 | and ($gradient-type == radial) 9 | and (type-of($gradient-positions) != color) { 10 | $gradient-positions: _radial-positions-parser($gradient-positions); 11 | } 12 | @return $gradient-positions; 13 | } 14 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_linear-angle-parser.scss: -------------------------------------------------------------------------------- 1 | // Private function for linear-gradient-parser 2 | @function _linear-angle-parser($image, $first-val, $prefix, $suffix) { 3 | $offset: null; 4 | $unit-short: str-slice($first-val, str-length($first-val) - 2, str-length($first-val)); 5 | $unit-long: str-slice($first-val, str-length($first-val) - 3, str-length($first-val)); 6 | 7 | @if ($unit-long == "grad") or 8 | ($unit-long == "turn") { 9 | $offset: if($unit-long == "grad", -100grad * 3, -0.75turn); 10 | } 11 | 12 | @else if ($unit-short == "deg") or 13 | ($unit-short == "rad") { 14 | $offset: if($unit-short == "deg", -90 * 3, 1.6rad); 15 | } 16 | 17 | @if $offset { 18 | $num: _str-to-num($first-val); 19 | 20 | @return ( 21 | webkit-image: -webkit- + $prefix + ($offset - $num) + $suffix, 22 | spec-image: $image 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_linear-gradient-parser.scss: -------------------------------------------------------------------------------- 1 | @function _linear-gradient-parser($image) { 2 | $image: unquote($image); 3 | $gradients: (); 4 | $start: str-index($image, "("); 5 | $end: str-index($image, ","); 6 | $first-val: str-slice($image, $start + 1, $end - 1); 7 | 8 | $prefix: str-slice($image, 0, $start); 9 | $suffix: str-slice($image, $end, str-length($image)); 10 | 11 | $has-multiple-vals: str-index($first-val, " "); 12 | $has-single-position: unquote(_position-flipper($first-val) + ""); 13 | $has-angle: is-number(str-slice($first-val, 0, 0)); 14 | 15 | @if $has-multiple-vals { 16 | $gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals); 17 | } 18 | 19 | @else if $has-single-position != "" { 20 | $pos: unquote($has-single-position + ""); 21 | 22 | $gradients: ( 23 | webkit-image: -webkit- + $image, 24 | spec-image: $prefix + "to " + $pos + $suffix 25 | ); 26 | } 27 | 28 | @else if $has-angle { 29 | // Rotate degree for webkit 30 | $gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix); 31 | } 32 | 33 | @else { 34 | $gradients: ( 35 | webkit-image: -webkit- + $image, 36 | spec-image: $image 37 | ); 38 | } 39 | 40 | @return $gradients; 41 | } 42 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_linear-side-corner-parser.scss: -------------------------------------------------------------------------------- 1 | // Private function for linear-gradient-parser 2 | @function _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals) { 3 | $val-1: str-slice($first-val, 0, $has-multiple-vals - 1 ); 4 | $val-2: str-slice($first-val, $has-multiple-vals + 1, str-length($first-val)); 5 | $val-3: null; 6 | $has-val-3: str-index($val-2, " "); 7 | 8 | @if $has-val-3 { 9 | $val-3: str-slice($val-2, $has-val-3 + 1, str-length($val-2)); 10 | $val-2: str-slice($val-2, 0, $has-val-3 - 1); 11 | } 12 | 13 | $pos: _position-flipper($val-1) _position-flipper($val-2) _position-flipper($val-3); 14 | $pos: unquote($pos + ""); 15 | 16 | // Use old spec for webkit 17 | @if $val-1 == "to" { 18 | @return ( 19 | webkit-image: -webkit- + $prefix + $pos + $suffix, 20 | spec-image: $image 21 | ); 22 | } 23 | 24 | // Bring the code up to spec 25 | @else { 26 | @return ( 27 | webkit-image: -webkit- + $image, 28 | spec-image: $prefix + "to " + $pos + $suffix 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_radial-gradient-parser.scss: -------------------------------------------------------------------------------- 1 | @function _radial-gradient-parser($image) { 2 | $image: unquote($image); 3 | $gradients: (); 4 | $start: str-index($image, "("); 5 | $end: str-index($image, ","); 6 | $first-val: str-slice($image, $start + 1, $end - 1); 7 | 8 | $prefix: str-slice($image, 0, $start); 9 | $suffix: str-slice($image, $end, str-length($image)); 10 | 11 | $is-spec-syntax: str-index($first-val, "at"); 12 | 13 | @if $is-spec-syntax and $is-spec-syntax > 1 { 14 | $keyword: str-slice($first-val, 1, $is-spec-syntax - 2); 15 | $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val)); 16 | $pos: append($pos, $keyword, comma); 17 | 18 | $gradients: ( 19 | webkit-image: -webkit- + $prefix + $pos + $suffix, 20 | spec-image: $image 21 | ); 22 | } 23 | 24 | @else if $is-spec-syntax == 1 { 25 | $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val)); 26 | 27 | $gradients: ( 28 | webkit-image: -webkit- + $prefix + $pos + $suffix, 29 | spec-image: $image 30 | ); 31 | } 32 | 33 | @else if str-index($image, "cover") or str-index($image, "contain") { 34 | @warn "Radial-gradient needs to be updated to conform to latest spec."; 35 | 36 | $gradients: ( 37 | webkit-image: null, 38 | spec-image: $image 39 | ); 40 | } 41 | 42 | @else { 43 | $gradients: ( 44 | webkit-image: -webkit- + $image, 45 | spec-image: $image 46 | ); 47 | } 48 | 49 | @return $gradients; 50 | } 51 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_radial-positions-parser.scss: -------------------------------------------------------------------------------- 1 | @function _radial-positions-parser($gradient-pos) { 2 | $shape-size: nth($gradient-pos, 1); 3 | $pos: nth($gradient-pos, 2); 4 | $shape-size-spec: _shape-size-stripper($shape-size); 5 | 6 | $pre-spec: unquote(if($pos, "#{$pos}, ", null)) 7 | unquote(if($shape-size, "#{$shape-size},", null)); 8 | $pos-spec: if($pos, "at #{$pos}", null); 9 | 10 | $spec: "#{$shape-size-spec} #{$pos-spec}"; 11 | 12 | // Add comma 13 | @if ($spec != " ") { 14 | $spec: "#{$spec},"; 15 | } 16 | 17 | @return $pre-spec $spec; 18 | } 19 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_render-gradients.scss: -------------------------------------------------------------------------------- 1 | // User for linear and radial gradients within background-image or border-image properties 2 | 3 | @function _render-gradients($gradient-positions, $gradients, $gradient-type, $vendor: false) { 4 | $pre-spec: null; 5 | $spec: null; 6 | $vendor-gradients: null; 7 | @if $gradient-type == linear { 8 | @if $gradient-positions { 9 | $pre-spec: nth($gradient-positions, 1); 10 | $spec: nth($gradient-positions, 2); 11 | } 12 | } 13 | @else if $gradient-type == radial { 14 | $pre-spec: nth($gradient-positions, 1); 15 | $spec: nth($gradient-positions, 2); 16 | } 17 | 18 | @if $vendor { 19 | $vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient(#{$pre-spec} $gradients); 20 | } 21 | @else if $vendor == false { 22 | $vendor-gradients: "#{$gradient-type}-gradient(#{$spec} #{$gradients})"; 23 | $vendor-gradients: unquote($vendor-gradients); 24 | } 25 | @return $vendor-gradients; 26 | } 27 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_shape-size-stripper.scss: -------------------------------------------------------------------------------- 1 | @function _shape-size-stripper($shape-size) { 2 | $shape-size-spec: null; 3 | @each $value in $shape-size { 4 | @if ($value == "cover") or ($value == "contain") { 5 | $value: null; 6 | } 7 | $shape-size-spec: "#{$shape-size-spec} #{$value}"; 8 | } 9 | @return $shape-size-spec; 10 | } 11 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_str-to-num.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Helper function for linear/radial-gradient-parsers. 3 | // Source: http://sassmeister.com/gist/9647408 4 | //************************************************************************// 5 | @function _str-to-num($string) { 6 | // Matrices 7 | $strings: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; 8 | $numbers: 0 1 2 3 4 5 6 7 8 9; 9 | 10 | // Result 11 | $result: 0; 12 | $divider: 0; 13 | $minus: false; 14 | 15 | // Looping through all characters 16 | @for $i from 1 through str-length($string) { 17 | $character: str-slice($string, $i, $i); 18 | $index: index($strings, $character); 19 | 20 | @if $character == "-" { 21 | $minus: true; 22 | } 23 | 24 | @else if $character == "." { 25 | $divider: 1; 26 | } 27 | 28 | @else { 29 | @if not $index { 30 | $result: if($minus, $result * -1, $result); 31 | @return _convert-units($result, str-slice($string, $i)); 32 | } 33 | 34 | $number: nth($numbers, $index); 35 | 36 | @if $divider == 0 { 37 | $result: $result * 10; 38 | } 39 | 40 | @else { 41 | // Move the decimal dot to the left 42 | $divider: $divider * 10; 43 | $number: $number / $divider; 44 | } 45 | 46 | $result: $result + $number; 47 | } 48 | } 49 | @return if($minus, $result * -1, $result); 50 | } 51 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/settings/_asset-pipeline.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// A global setting to enable or disable the `$asset-pipeline` variable for all functions that accept it. 4 | /// 5 | /// @type Bool 6 | 7 | $asset-pipeline: false !default; 8 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/settings/_prefixer.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Global variables to enable or disable vendor prefixes 4 | 5 | $prefix-for-webkit: true !default; 6 | $prefix-for-mozilla: true !default; 7 | $prefix-for-microsoft: true !default; 8 | $prefix-for-opera: true !default; 9 | $prefix-for-spec: true !default; 10 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/bourbon/settings/_px-to-em.scss: -------------------------------------------------------------------------------- 1 | $em-base: 16px !default; 2 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/_neat-helpers.scss: -------------------------------------------------------------------------------- 1 | // Functions 2 | @import "functions/private"; 3 | @import "functions/new-breakpoint"; 4 | 5 | // Settings 6 | @import "settings/grid"; 7 | @import "settings/visual-grid"; 8 | @import "settings/disable-warnings"; 9 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/_neat.scss: -------------------------------------------------------------------------------- 1 | // Neat 1.7.2 2 | // http://neat.bourbon.io 3 | // Copyright 2012-2015 thoughtbot, inc. 4 | // MIT License 5 | 6 | // Helpers 7 | @import "neat-helpers"; 8 | 9 | // Grid 10 | @import "grid/private"; 11 | @import "grid/box-sizing"; 12 | @import "grid/omega"; 13 | @import "grid/outer-container"; 14 | @import "grid/span-columns"; 15 | @import "grid/row"; 16 | @import "grid/shift"; 17 | @import "grid/pad"; 18 | @import "grid/fill-parent"; 19 | @import "grid/media"; 20 | @import "grid/to-deprecate"; 21 | @import "grid/visual-grid"; 22 | @import "grid/display-context"; 23 | @import "grid/direction-context"; 24 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/functions/_new-breakpoint.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Returns a media context (media query / grid context) that can be stored in a variable and passed to `media()` as a single-keyword argument. Media contexts defined using `new-breakpoint` are used by the visual grid, as long as they are defined before importing Neat. 4 | /// 5 | /// @param {List} $query 6 | /// A list of media query features and values. Each `$feature` should have a corresponding `$value`. 7 | /// 8 | /// If there is only a single `$value` in `$query`, `$default-feature` is going to be used. 9 | /// 10 | /// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`). For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1). 11 | /// 12 | /// @param {Number (unitless)} $total-columns [$grid-columns] 13 | /// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter. 14 | /// 15 | /// @example scss - Usage 16 | /// $mobile: new-breakpoint(max-width 480px 4); 17 | /// 18 | /// .element { 19 | /// @include media($mobile) { 20 | /// @include span-columns(4); 21 | /// } 22 | /// } 23 | /// 24 | /// @example css - CSS Output 25 | /// @media screen and (max-width: 480px) { 26 | /// .element { 27 | /// display: block; 28 | /// float: left; 29 | /// margin-right: 7.42297%; 30 | /// width: 100%; 31 | /// } 32 | /// .element:last-child { 33 | /// margin-right: 0; 34 | /// } 35 | /// } 36 | 37 | @function new-breakpoint($query: $feature $value $columns, $total-columns: $grid-columns) { 38 | @if length($query) == 1 { 39 | $query: $default-feature nth($query, 1) $total-columns; 40 | } @else if is-even(length($query)) { 41 | $query: append($query, $total-columns); 42 | } 43 | 44 | @if is-not(belongs-to($query, $visual-grid-breakpoints)) { 45 | $visual-grid-breakpoints: append($visual-grid-breakpoints, $query, comma) !global; 46 | } 47 | 48 | @return $query; 49 | } 50 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_box-sizing.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @if $border-box-sizing == true { 4 | html { // http://bit.ly/1qk2tVR 5 | box-sizing: border-box; 6 | } 7 | 8 | * { 9 | &, 10 | &::after, 11 | &::before { 12 | box-sizing: inherit; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_direction-context.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Changes the direction property used by other mixins called in the code block argument. 4 | /// 5 | /// @param {String} $direction [left-to-right] 6 | /// Layout direction to be used within the block. Can be `left-to-right` or `right-to-left`. 7 | /// 8 | /// @example scss - Usage 9 | /// @include direction-context(right-to-left) { 10 | /// .right-to-left-block { 11 | /// @include span-columns(6); 12 | /// } 13 | /// } 14 | /// 15 | /// @example css - CSS Output 16 | /// .right-to-left-block { 17 | /// float: right; 18 | /// ... 19 | /// } 20 | 21 | @mixin direction-context($direction: left-to-right) { 22 | $scope-direction: $layout-direction; 23 | 24 | @if to-lower-case($direction) == "left-to-right" { 25 | $layout-direction: LTR !global; 26 | } @else if to-lower-case($direction) == "right-to-left" { 27 | $layout-direction: RTL !global; 28 | } 29 | 30 | @content; 31 | 32 | $layout-direction: $scope-direction !global; 33 | } 34 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_display-context.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Changes the display property used by other mixins called in the code block argument. 4 | /// 5 | /// @param {String} $display [block] 6 | /// Display value to be used within the block. Can be `table` or `block`. 7 | /// 8 | /// @example scss 9 | /// @include display-context(table) { 10 | /// .display-table { 11 | /// @include span-columns(6); 12 | /// } 13 | /// } 14 | /// 15 | /// @example css 16 | /// .display-table { 17 | /// display: table-cell; 18 | /// ... 19 | /// } 20 | 21 | @mixin display-context($display: block) { 22 | $scope-display: $container-display-table; 23 | $container-display-table: $display == table !global; 24 | 25 | @content; 26 | 27 | $container-display-table: $scope-display !global; 28 | } 29 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_fill-parent.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Forces the element to fill its parent container. 4 | /// 5 | /// @example scss - Usage 6 | /// .element { 7 | /// @include fill-parent; 8 | /// } 9 | /// 10 | /// @example css - CSS Output 11 | /// .element { 12 | /// width: 100%; 13 | /// box-sizing: border-box; 14 | /// } 15 | 16 | @mixin fill-parent() { 17 | width: 100%; 18 | 19 | @if $border-box-sizing == false { 20 | box-sizing: border-box; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_outer-container.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Makes an element a outer container by centring it in the viewport, clearing its floats, and setting its `max-width`. 4 | /// Although optional, using `outer-container` is recommended. The mixin can be called on more than one element per page, as long as they are not nested. 5 | /// 6 | /// @param {Number [unit]} $local-max-width [$max-width] 7 | /// Max width to be applied to the element. Can be a percentage or a measure. 8 | /// 9 | /// @example scss - Usage 10 | /// .element { 11 | /// @include outer-container(100%); 12 | /// } 13 | /// 14 | /// @example css - CSS Output 15 | /// .element { 16 | /// *zoom: 1; 17 | /// max-width: 100%; 18 | /// margin-left: auto; 19 | /// margin-right: auto; 20 | /// } 21 | /// 22 | /// .element:before, .element:after { 23 | /// content: " "; 24 | /// display: table; 25 | /// } 26 | /// 27 | /// .element:after { 28 | /// clear: both; 29 | /// } 30 | 31 | @mixin outer-container($local-max-width: $max-width) { 32 | @include clearfix; 33 | max-width: $local-max-width; 34 | margin: { 35 | left: auto; 36 | right: auto; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_pad.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Adds padding to the element. 4 | /// 5 | /// @param {List} $padding [flex-gutter()] 6 | /// A list of padding value(s) to use. Passing `default` in the list will result in using the gutter width as a padding value. 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include pad(30px -20px 10px default); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// padding: 30px -20px 10px 2.35765%; 16 | /// } 17 | 18 | @mixin pad($padding: flex-gutter()) { 19 | $padding-list: null; 20 | @each $value in $padding { 21 | $value: if($value == 'default', flex-gutter(), $value); 22 | $padding-list: join($padding-list, $value); 23 | } 24 | padding: $padding-list; 25 | } 26 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_private.scss: -------------------------------------------------------------------------------- 1 | $parent-columns: $grid-columns !default; 2 | $fg-column: $column; 3 | $fg-gutter: $gutter; 4 | $fg-max-columns: $grid-columns; 5 | $container-display-table: false !default; 6 | $layout-direction: LTR !default; 7 | 8 | @function flex-grid($columns, $container-columns: $fg-max-columns) { 9 | $width: $columns * $fg-column + ($columns - 1) * $fg-gutter; 10 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; 11 | @return percentage($width / $container-width); 12 | } 13 | 14 | @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) { 15 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; 16 | @return percentage($gutter / $container-width); 17 | } 18 | 19 | @function grid-width($n) { 20 | @return $n * $gw-column + ($n - 1) * $gw-gutter; 21 | } 22 | 23 | @function get-parent-columns($columns) { 24 | @if $columns != $grid-columns { 25 | $parent-columns: $columns !global; 26 | } @else { 27 | $parent-columns: $grid-columns !global; 28 | } 29 | 30 | @return $parent-columns; 31 | } 32 | 33 | @function is-display-table($container-is-display-table, $display) { 34 | @return $container-is-display-table == true or $display == table; 35 | } 36 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_row.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Designates the element as a row of columns in the grid layout. It clears the floats on the element and sets its display property. Rows can't be nested, but there can be more than one row element—with different display properties—per layout. 4 | /// 5 | /// @param {String} $display [default] 6 | /// Sets the display property of the element and the display context that will be used by its children. Can be `block` or `table`. 7 | /// 8 | /// @param {String} $direction [$default-layout-direction] 9 | /// Sets the layout direction. Can be `LTR` (left-to-right) or `RTL` (right-to-left). 10 | /// 11 | /// @example scss - Usage 12 | /// .element { 13 | /// @include row(); 14 | /// } 15 | /// 16 | /// @example css - CSS Output 17 | /// .element { 18 | /// *zoom: 1; 19 | /// display: block; 20 | /// } 21 | /// 22 | /// .element:before, .element:after { 23 | /// content: " "; 24 | /// display: table; 25 | /// } 26 | /// 27 | /// .element:after { 28 | /// clear: both; 29 | /// } 30 | 31 | @mixin row($display: default, $direction: $default-layout-direction) { 32 | @if $direction != $default-layout-direction { 33 | @include -neat-warn("The $direction argument will be deprecated in future versions in favor of the direction(){...} mixin."); 34 | } 35 | 36 | $layout-direction: $direction !global; 37 | 38 | @if $display != default { 39 | @include -neat-warn("The $display argument will be deprecated in future versions in favor of the display(){...} mixin."); 40 | } 41 | 42 | @if $display == table { 43 | display: table; 44 | @include fill-parent; 45 | table-layout: fixed; 46 | $container-display-table: true !global; 47 | } @else { 48 | @include clearfix; 49 | display: block; 50 | $container-display-table: false !global; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_shift.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Translates an element horizontally by a number of columns. Positive arguments shift the element to the active layout direction, while negative ones shift it to the opposite direction. 4 | /// 5 | /// @param {Number (unitless)} $n-columns [1] 6 | /// Number of columns by which the element shifts. 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include shift(-3); 11 | /// } 12 | /// 13 | /// @example css - CSS output 14 | /// .element { 15 | /// margin-left: -25.58941%; 16 | /// } 17 | 18 | @mixin shift($n-columns: 1) { 19 | @include shift-in-context($n-columns); 20 | } 21 | 22 | /// Translates an element horizontally by a number of columns, in a specific nesting context. 23 | /// 24 | /// @param {List} $shift 25 | /// A list containing the number of columns to shift (`$columns`) and the number of columns of the parent element (`$container-columns`). 26 | /// 27 | /// The two values can be separated with any string such as `of`, `/`, etc. 28 | /// 29 | /// @example scss - Usage 30 | /// .element { 31 | /// @include shift(-3 of 6); 32 | /// } 33 | /// 34 | /// @example css - CSS output 35 | /// .element { 36 | /// margin-left: -52.41458%; 37 | /// } 38 | 39 | @mixin shift-in-context($shift: $columns of $container-columns) { 40 | $n-columns: nth($shift, 1); 41 | $parent-columns: container-shift($shift) !global; 42 | 43 | $direction: get-direction($layout-direction, $default-layout-direction); 44 | $opposite-direction: get-opposite-direction($direction); 45 | 46 | margin-#{$opposite-direction}: $n-columns * flex-grid(1, $parent-columns) + $n-columns * flex-gutter($parent-columns); 47 | 48 | // Reset nesting context 49 | $parent-columns: $grid-columns !global; 50 | } 51 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/grid/_visual-grid.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @mixin grid-column-gradient($values...) { 4 | background-image: -webkit-linear-gradient(left, $values); 5 | background-image: -moz-linear-gradient(left, $values); 6 | background-image: -ms-linear-gradient(left, $values); 7 | background-image: -o-linear-gradient(left, $values); 8 | background-image: unquote("linear-gradient(to left, #{$values})"); 9 | } 10 | 11 | @if $visual-grid == true or $visual-grid == yes { 12 | body:before { 13 | @include grid-column-gradient(gradient-stops($grid-columns)); 14 | content: ""; 15 | display: inline-block; 16 | height: 100%; 17 | left: 0; 18 | margin: 0 auto; 19 | max-width: $max-width; 20 | opacity: $visual-grid-opacity; 21 | pointer-events: none; 22 | position: fixed; 23 | right: 0; 24 | width: 100%; 25 | 26 | @if $visual-grid-index == back { 27 | z-index: -1; 28 | } 29 | 30 | @else if $visual-grid-index == front { 31 | z-index: 9999; 32 | } 33 | 34 | @each $breakpoint in $visual-grid-breakpoints { 35 | @if $breakpoint { 36 | @include media($breakpoint) { 37 | @include grid-column-gradient(gradient-stops($grid-columns)); 38 | } 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/settings/_disable-warnings.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Disable all deprecation warnings. Defaults to `false`. Set with a `!global` flag. 4 | /// 5 | /// @type Bool 6 | 7 | $disable-warnings: false !default; 8 | 9 | @mixin -neat-warn($message) { 10 | @if $disable-warnings == false { 11 | @warn "#{$message}"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/settings/_grid.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Sets the relative width of a single grid column. The unit used should be the same one used to define `$gutter`. To learn more about modular-scale() see [Bourbon docs](http://bourbon.io/docs/#modular-scale). Set with a `!global` flag. 4 | /// 5 | /// @type Number (Unit) 6 | 7 | $column: modular-scale(3, 1em, $golden) !default; 8 | 9 | /// Sets the relative width of a single grid gutter. The unit used should be the same one used to define `$column`. To learn more about modular-scale() see [Bourbon docs](http://bourbon.io/docs/#modular-scale). Set with the `!global` flag. 10 | /// 11 | /// @type Number (Unit) 12 | 13 | $gutter: modular-scale(1, 1em, $golden) !default; 14 | 15 | /// Sets the total number of columns in the grid. Its value can be overridden inside a media query using the `media()` mixin. Set with the `!global` flag. 16 | /// 17 | /// @type Number (Unitless) 18 | 19 | $grid-columns: 12 !default; 20 | 21 | /// Sets the max-width property of the element that includes `outer-container()`. To learn more about `em()` see [Bourbon docs](http://bourbon.io/docs/#px-to-em). Set with the `!global` flag. 22 | /// 23 | /// @type Number (Unit) 24 | /// 25 | $max-width: em(1088) !default; 26 | 27 | /// When set to true, it sets the box-sizing property of all elements to `border-box`. Set with a `!global` flag. 28 | /// 29 | /// @type Bool 30 | /// 31 | /// @example css - CSS Output 32 | /// html { 33 | /// box-sizing: border-box; } 34 | /// 35 | /// *, *::after, *::before { 36 | /// box-sizing: inherit; 37 | /// } 38 | 39 | $border-box-sizing: true !default; 40 | 41 | /// Sets the default [media feature](http://www.w3.org/TR/css3-mediaqueries/#media) that `media()` and `new-breakpoint()` revert to when only a breakpoint value is passed. Set with a `!global` flag. 42 | /// 43 | /// @type String 44 | 45 | $default-feature: min-width; // Default @media feature for the breakpoint() mixin 46 | 47 | ///Sets the default layout direction of the grid. Can be `LTR` or `RTL`. Set with a `!global` flag. 48 | /// 49 | ///@type String 50 | 51 | $default-layout-direction: LTR !default; 52 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/_scss/lib/neat/settings/_visual-grid.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Displays the visual grid when set to true. The overlaid grid may be few pixels off depending on the browser's rendering engine and pixel rounding algorithm. Set with the `!global` flag. 4 | /// 5 | /// @type Bool 6 | 7 | $visual-grid: false !default; 8 | 9 | /// Sets the visual grid color. Set with `!global` flag. 10 | /// 11 | /// @type Color 12 | 13 | $visual-grid-color: #eee !default; 14 | 15 | /// Sets the `z-index` property of the visual grid. Can be `back` (behind content) or `front` (in front of content). Set with `!global` flag. 16 | /// 17 | /// @type String 18 | 19 | $visual-grid-index: back !default; 20 | 21 | /// Sets the opacity property of the visual grid. Set with `!global` flag. 22 | /// 23 | /// @type Number (unitless) 24 | 25 | $visual-grid-opacity: 0.4 !default; 26 | 27 | $visual-grid-breakpoints: () !default; 28 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/css/main.scss: -------------------------------------------------------------------------------- 1 | --- 2 | # Front matter comment to ensure Jekyll properly reads the file. 3 | --- 4 | 5 | // Place list of your partial imports below, located in assets/_scss. 6 | 7 | @import 'all'; 8 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/css/normalize.min.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-bold-webfont.eot -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-bold-webfont.ttf -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-bold-webfont.woff -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-bold-webfont.woff2 -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-italic-webfont.eot -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-italic-webfont.ttf -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-italic-webfont.woff -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-italic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-italic-webfont.woff2 -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-light-webfont.eot -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-light-webfont.ttf -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-light-webfont.woff -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-light-webfont.woff2 -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-regular-webfont.eot -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-regular-webfont.ttf -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-regular-webfont.woff -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/merriweather-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/merriweather-regular-webfont.woff2 -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-bold-webfont.eot -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-bold-webfont.ttf -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-bold-webfont.woff -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-bold-webfont.woff2 -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-italic-webfont.eot -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-italic-webfont.ttf -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-italic-webfont.woff -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-italic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-italic-webfont.woff2 -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-light-webfont.eot -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-light-webfont.ttf -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-light-webfont.woff -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-light-webfont.woff2 -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-regular-webfont.eot -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-regular-webfont.ttf -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-regular-webfont.woff -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/fonts/sourcesanspro-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/fonts/sourcesanspro-regular-webfont.woff2 -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/alerts/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/alerts/error.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/alerts/error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 17 | 18 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/alerts/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/alerts/info.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/alerts/info.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 18 | 19 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/alerts/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/alerts/success.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/alerts/success.svg: -------------------------------------------------------------------------------- 1 | 3 | 12 | 13 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/alerts/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/alerts/warning.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/alerts/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 16 | 17 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/arrow-down.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/arrow-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/arrow-right.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/arrow-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/correct8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/correct8.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/correct8.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/correct9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/correct9.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/correct9.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/favicons/favicon-114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/favicons/favicon-114.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/favicons/favicon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/favicons/favicon-144.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/favicons/favicon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/favicons/favicon-16.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/favicons/favicon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/favicons/favicon-192.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/favicons/favicon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/favicons/favicon-57.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/favicons/favicon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/favicons/favicon-72.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/favicons/favicon.ico -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/favicons/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/favicons/favicon.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/logo-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/logo-img.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/minus.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/plus.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/search.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/social-icons/png/facebook25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/social-icons/png/facebook25.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/social-icons/png/rss25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/social-icons/png/rss25.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/social-icons/png/twitter16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/social-icons/png/twitter16.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/social-icons/png/youtube15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/social-icons/png/youtube15.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/social-icons/svg/facebook25.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/social-icons/svg/rss25.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/social-icons/svg/twitter16.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/scorecard-app/www/assets/img/us_flag_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/assets/img/us_flag_small.png -------------------------------------------------------------------------------- /UI/scorecard-app/www/header-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio/ShinyDeveloperConference/45737f1f3386fb3a9194c40f9a999b58f60971de/UI/scorecard-app/www/header-image.jpg -------------------------------------------------------------------------------- /UI/scorecard-app/www/ring-alt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/templates-demo/app.R: -------------------------------------------------------------------------------- 1 | ui <- htmlTemplate("template.html", 2 | plot = plotOutput("dist"), 3 | slider = sliderInput("num", "Number of points", 1, 100, 50) 4 | ) 5 | 6 | server <- function(input, output) { 7 | output$dist <- renderPlot({ 8 | x <- rnorm(input$num) 9 | y <- rnorm(input$num) 10 | plot(x, y) 11 | }) 12 | } 13 | 14 | shinyApp(ui, server) -------------------------------------------------------------------------------- /UI/templates-demo/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ headContent() }} 6 | {{ bootstrapLib() }} 7 | 8 | 9 |

A Bivariate Normal Distribution

10 |
11 | {{ plot }} 12 | {{ slider }} 13 |
14 | 15 | --------------------------------------------------------------------------------