Skip to content

Commit 54449a1

Browse files
authored
Merge pull request #398 from cmu-delphi/sgratzl/covidcast-classic
integrate www-covidcast-classic
2 parents 891cc34 + db9dd65 commit 54449a1

File tree

6 files changed

+49
-4
lines changed

6 files changed

+49
-4
lines changed

content/covidcast/classic.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
title: COVIDcast | Classic Map
33
linkTitle: Classic Map
44
description: COVIDcast tracks and forecasts the spread of COVID-19. By Carnegie Mellon's Delphi Research Group.
5-
layout: covidcast_app
6-
app_mode: classic
5+
layout: covidcast_classic_app
76
order: 3
87
heroImage: images/landing-page/hero-images/covidcast_v2.jpg
98
feedback: true

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"katex": "^0.13.11",
99
"uikit": "^3.7.0",
1010
"www-covidcast": "https://github.com/cmu-delphi/www-covidcast/releases/download/v2.5.2/www-covidcast-2.5.2.tgz",
11-
"www-epivis": "https://github.com/cmu-delphi/www-epivis/releases/download/v2.0.1/www-epivis-2.0.1.tgz"
11+
"www-epivis": "https://github.com/cmu-delphi/www-epivis/releases/download/v2.0.1/www-epivis-2.0.1.tgz",
12+
"www-covidcast-classic": "https://github.com/cmu-delphi/www-covidcast-classic/releases/download/v2.5.3/www-covidcast-classic-2.5.3.tgz"
1213
},
1314
"devDependencies": {
1415
"hugo-bin": "^0.72.4",
@@ -26,8 +27,9 @@
2627
"clean": "rimraf \"*.tgz\" public",
2728
"copy_fonts": "shx cp -r \"node_modules/katex/dist/fonts/*\" themes/delphi/static/css/fonts/",
2829
"copy_covidcast": "shx rm -rf \"static/covidcast/*\" && shx cp \"node_modules/www-covidcast/public/**/*.{js,txt,css,map}\" static/covidcast/",
30+
"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/",
2931
"copy_epivis": "shx rm -rf \"static/epivis/*\" && shx cp \"node_modules/www-epivis/public/**/*.{js,txt,css,map}\" static/epivis/",
30-
"postinstall": "npm run copy_fonts && npm run copy_covidcast && npm run copy_epivis",
32+
"postinstall": "npm run copy_fonts && npm run copy_covidcast && npm run copy_epivis && npm run copy_covidcast_classic",
3133
"build:blog": "Rscript -e \"blogdown::build_site(local=FALSE, run_hugo=FALSE, build_rmd='md5sum')\"",
3234
"prebuild": "npm run clean",
3335
"build": "hugo --gc --minify",

themes/delphi/assets/js/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ window.UIkit = UIkit;
88
// define for covidcast at which base url it is embedded
99
window.DELPHI_COVIDCAST_PAGE = "/covidcast/";
1010
// define for covidcast at which base url it is embedded
11+
window.DELPHI_COVIDCAST_CLASSIC_PAGE = "/covidcast/classic/";
12+
// define for covidcast at which base url it is embedded
1113
window.DELPHI_EPIVIS_PAGE = "/epivis/";
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{ define "styles" }}
2+
<link rel="stylesheet" href="{{ (partial "covidcast_classic/find-file.html" "styles.*\\.css$")| relURL }}" />
3+
{{ end }}
4+
{{ define "scripts" }}
5+
<script src="{{ (partial "covidcast_classic/find-file.html" "bundle.*\\.js$")| relURL }}"></script>
6+
{{ end }}
7+
{{ define "breadcrumb" }}<!-- no breadcrumb -->{{ end }}
8+
{{ define "body_class" }}{{ if eq .Params.footer false }}covidcast_wrapper{{ end }}{{ end }}
9+
{{ define "main" }}
10+
<div id="covidcast-classic">
11+
<div class="ie-banner" style="display: none">
12+
<div>
13+
Internet Explorer 11 is no longer supported. We encourage you to use a more modern web browser, such as Firefox,
14+
Chrome, or Safari.
15+
</div>
16+
</div>
17+
</div>
18+
{{ end }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!--find a file given a prefix and directory -->
2+
{{ $pattern := . }}
3+
{{ $matchedFile := false }}
4+
{{ range (readDir "./static/covidcast/classic") }}
5+
{{ $testFile := . }}
6+
{{ with (index (findRE $pattern .Name 1) 0) }}
7+
{{ $matchedFile = path.Join "./covidcast/classic" $testFile.Name }}
8+
{{ end }}
9+
{{ end }}
10+
{{ return $matchedFile }}

0 commit comments

Comments
 (0)