Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epa header conflict with plotly #96

Merged
merged 6 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions R/epa_markup.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
crossorigin = "anonymous",
referrerpolicy = "no-referrer"
),
# use updated EPA template (https://www.epa.gov/themes/epa_theme/pattern-lab/?p=pages-standalone-template) provided by Brad instead?
tags$meta(property = "og:url", content = "https://www.epa.gov/themes/epa_theme/pattern-lab/.markup-only.html"),
tags$link(rel = "canonical", href = "https://www.epa.gov/themes/epa_theme/pattern-lab/.markup-only.html"),
tags$link(rel = "shortlink", href = "https://www.epa.gov/themes/epa_theme/pattern-lab/.markup-only.html"),
tags$meta(property = "og:url", content = "https://www.epa.gov/themes/epa_theme/pattern-lab/.markup-only.html"),
tags$meta(property = "og:image", content = "https://www.epa.gov/sites/all/themes/epa/img/epa-standard-og.jpg"),
#tags$meta(property = "og:url", content = "https://www.epa.gov/themes/epa_theme/pattern-lab/?p=pages-standalone-template"),
#tags$link(rel = "canonical", href = "https://www.epa.gov/themes/epa_theme/pattern-lab/?p=pages-standalone-template"),
#tags$link(rel = "shortlink", href = "https://www.epa.gov/themes/epa_theme/pattern-lab/?p=pages-standalone-template"),
#tags$meta(property = "og:url", content = "https://www.epa.gov/themes/epa_theme/pattern-lab/?p=pages-standalone-template"),
# jpg below
tags$meta(property = "og:image", content = "https://www.epa.gov/sites/all/themes/epa/img/epa-standard-og.jpg"),
tags$meta(property = "og:image:width", content = "1200"),
tags$meta(property = "og:image:height", content = "630"),
tags$meta(property = "og:image:alt", content = "U.S. Environmental Protection Agency"),
Expand Down Expand Up @@ -91,11 +97,22 @@
tags$link(rel = "stylesheet", media = "all", href = "https://www.epa.gov/core/themes/stable/css/system/components/tabledrag.module.css?r6lsex"),
tags$link(rel = "stylesheet", media = "all", href = "https://www.epa.gov/core/themes/stable/css/system/components/tablesort.module.css?r6lsex"),
tags$link(rel = "stylesheet", media = "all", href = "https://www.epa.gov/core/themes/stable/css/system/components/tree-child.module.css?r6lsex"),
tags$link(rel = "stylesheet", media = "all", href = "https://www.epa.gov/themes/epa_theme/css/styles.css?r6lsex"),
tags$link(rel = "stylesheet", media = "all", href = "https://www.epa.gov/themes/epa_theme/css-lib/colorbox.min.css?r6lsex"),

tags$script(src = 'https://cdnjs.cloudflare.com/ajax/libs/uswds/3.0.0-beta.3/js/uswds-init.min.js'),
#fix container-fluid that boostrap RShiny uses

#################
# BELOW (https://www.epa.gov/themes/epa_theme/css/styles.css?r6lsex) CAUSES ISSUES WITH PLOTLY AND LEAFLET
# tags$link(rel = "stylesheet", media = "all", href = "https://www.epa.gov/themes/epa_theme/css/styles.css?r6lsex"),
# try referencing locally using file shared by Garrett (styles.css in www folder), not sure if this is the same
# this file doesnt look right but doesnt cause the PLOTLY or LEAFLET issues
# tags$link(rel = "stylesheet", type = "text/css", href = "styles.css"),
# try copying https://www.epa.gov/themes/epa_theme/css/styles.css?r6lsex into css file and reference that locally (see styles2.css in www folder)
# doing this doesnt look right AND still causes the PLOTLY and LEAFLET issues
# tags$link(rel = "stylesheet", type = "text/css", href = "styles2.css"),
#################

tags$link(rel = "stylesheet", media = "all", href = "https://www.epa.gov/themes/epa_theme/css-lib/colorbox.min.css?r6lsex"),
# this is a beta file, may have issues, js files tend to have issues
tags$script(src = 'https://cdnjs.cloudflare.com/ajax/libs/uswds/3.0.0-beta.3/js/uswds-init.min.js'),
# fix container-fluid that boostrap RShiny uses
tags$style(
HTML(
'.container-fluid {
Expand Down
Loading