diff options
author | Naeem Model <me@nmode.ca> | 2025-01-06 23:55:43 +0000 |
---|---|---|
committer | Naeem Model <me@nmode.ca> | 2025-01-06 23:55:43 +0000 |
commit | e920b3e514e717fc05ed524267d3b53e272fec51 (patch) | |
tree | 353cfb36aca946d69da6d6dcacc0cb66177050ef /inst/web/www | |
parent | 2d34b71c7a8da7fd0fac59b934145286b2be7b1f (diff) |
Update web app entry point
- Rename 'app' -> 'web'
- Return shiny app object in entry point function
Diffstat (limited to 'inst/web/www')
-rw-r--r-- | inst/web/www/script.js | 21 | ||||
-rw-r--r-- | inst/web/www/styles.css | 23 |
2 files changed, 44 insertions, 0 deletions
diff --git a/inst/web/www/script.js b/inst/web/www/script.js new file mode 100644 index 0000000..30066d1 --- /dev/null +++ b/inst/web/www/script.js @@ -0,0 +1,21 @@ +$(document).ready(() => { + // Enable tooltips. + $('[data-bs-toggle="tooltip"]').tooltip(); + + // Toggle the text in the bulk data help button. + $('#data-format-toggle').on('click', event => { + btn = $(event.target); + show_format = 'Show required format'; + btn.text(btn.text() === show_format ? 'Hide required format' : show_format); + }); + + // Trigger the file selector via a custom button. + $('#data-upload-select').on('click', () => { + $('#data_upload').trigger('click'); + }); + + // Display the name of the uploaded file. + $('#data_upload').on('change', event => { + $('#data-upload-name').attr('placeholder', event.target.files[0].name); + }); +}); diff --git a/inst/web/www/styles.css b/inst/web/www/styles.css new file mode 100644 index 0000000..a6fc3cd --- /dev/null +++ b/inst/web/www/styles.css @@ -0,0 +1,23 @@ +body { + min-height: 100vh; + height: 100%; + width: 100%; +} + +noscript { + text-align: center; +} + +.shiny-notification { + background-color: black; + color: white; +} + +.plotly-notifier .notifier-note { + background-color: black !important; + color: white !important; +} + +#data_upload { + display: none; +} |