Skip to content
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
3 changes: 1 addition & 2 deletions content/covidcast/classic.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
title: COVIDcast | Classic Map
linkTitle: Classic Map
description: COVIDcast tracks and forecasts the spread of COVID-19. By Carnegie Mellon's Delphi Research Group.
layout: covidcast_app
app_mode: classic
layout: covidcast_classic_app
order: 3
heroImage: images/landing-page/hero-images/covidcast_v2.jpg
feedback: true
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"katex": "^0.13.11",
"uikit": "^3.6.22",
"www-covidcast": "https://github.com/cmu-delphi/www-covidcast/releases/download/v2.5.2/www-covidcast-2.5.2.tgz",
"www-epivis": "https://github.com/cmu-delphi/www-epivis/releases/download/v2.0.1/www-epivis-2.0.1.tgz"
"www-epivis": "https://github.com/cmu-delphi/www-epivis/releases/download/v2.0.1/www-epivis-2.0.1.tgz",
"www-covidcast-classic": "https://github.com/cmu-delphi/www-covidcast-classic/releases/download/v2.5.3/www-covidcast-classic-2.5.3.tgz"
},
"devDependencies": {
"hugo-bin": "^0.72.3",
Expand All @@ -26,8 +27,9 @@
"clean": "rimraf \"*.tgz\" public",
"copy_fonts": "shx cp -r \"node_modules/katex/dist/fonts/*\" themes/delphi/static/css/fonts/",
"copy_covidcast": "shx rm -rf \"static/covidcast/*\" && shx cp \"node_modules/www-covidcast/public/**/*.{js,txt,css,map}\" static/covidcast/",
"copy_covidcast_classic": "shx rm -rf \"static/covidcast/classic/*\" && shx mkdir -p static/covidcast/classic/ && shx cp \"node_modules/www-covidcast-classic/public/**/*.{js,txt,css,map}\" static/covidcast/classic/",
"copy_epivis": "shx rm -rf \"static/epivis/*\" && shx cp \"node_modules/www-epivis/public/**/*.{js,txt,css,map}\" static/epivis/",
"postinstall": "npm run copy_fonts && npm run copy_covidcast && npm run copy_epivis",
"postinstall": "npm run copy_fonts && npm run copy_covidcast && npm run copy_epivis && npm run copy_covidcast_classic",
"build:blog": "Rscript -e \"blogdown::build_site(local=FALSE, run_hugo=FALSE, build_rmd='md5sum')\"",
"prebuild": "npm run clean",
"build": "hugo --gc --minify",
Expand Down
2 changes: 2 additions & 0 deletions themes/delphi/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ window.UIkit = UIkit;
// define for covidcast at which base url it is embedded
window.DELPHI_COVIDCAST_PAGE = "/covidcast/";
// define for covidcast at which base url it is embedded
window.DELPHI_COVIDCAST_CLASSIC_PAGE = "/covidcast/classic/";
// define for covidcast at which base url it is embedded
window.DELPHI_EPIVIS_PAGE = "/epivis/";
18 changes: 18 additions & 0 deletions themes/delphi/layouts/_default/covidcast_classic_app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ define "styles" }}
<link rel="stylesheet" href="{{ (partial "covidcast_classic/find-file.html" "styles.*\\.css$")| relURL }}" />
{{ end }}
{{ define "scripts" }}
<script src="{{ (partial "covidcast_classic/find-file.html" "bundle.*\\.js$")| relURL }}"></script>
{{ end }}
{{ define "breadcrumb" }}<!-- no breadcrumb -->{{ end }}
{{ define "body_class" }}{{ if eq .Params.footer false }}covidcast_wrapper{{ end }}{{ end }}
{{ define "main" }}
<div id="covidcast-classic">
<div class="ie-banner" style="display: none">
<div>
Internet Explorer 11 is no longer supported. We encourage you to use a more modern web browser, such as Firefox,
Chrome, or Safari.
</div>
</div>
</div>
{{ end }}
10 changes: 10 additions & 0 deletions themes/delphi/layouts/partials/covidcast_classic/find-file.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--find a file given a prefix and directory -->
{{ $pattern := . }}
{{ $matchedFile := false }}
{{ range (readDir "./static/covidcast/classic") }}
{{ $testFile := . }}
{{ with (index (findRE $pattern .Name 1) 0) }}
{{ $matchedFile = path.Join "./covidcast/classic" $testFile.Name }}
{{ end }}
{{ end }}
{{ return $matchedFile }}