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
8 changes: 8 additions & 0 deletions content/epivis/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: EPIVis
description: EpiVis is an interactive tool for visualizing epidemiological time-series data.
layout: epivis_app
order: 1
feedback: true
footer: false
---
2 changes: 1 addition & 1 deletion content/tools/epivis.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: EpiVis
link: https://delphi.cmu.edu/epivis/epivis.html
link: /epivis/
order: 1
---

Expand Down
7 changes: 7 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 @@ -7,7 +7,8 @@
"highlight.js": "^10.7.2",
"katex": "^0.13.11",
"uikit": "^3.6.22",
"www-covidcast": "https://github.com/cmu-delphi/www-covidcast/releases/download/v2.4.0/www-covidcast-2.4.0.tgz"
"www-covidcast": "https://github.com/cmu-delphi/www-covidcast/releases/download/v2.4.0/www-covidcast-2.4.0.tgz",
"www-epivis": "github:cmu-delphi/www-epivis#dev"
},
"devDependencies": {
"hugo-bin": "^0.71.1",
Expand All @@ -25,7 +26,8 @@
"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/",
"postinstall": "npm run copy_fonts && npm run copy_covidcast",
"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",
"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
3 changes: 2 additions & 1 deletion static/covidcast/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.js
*.txt
*.html
*.css
*.css
*.map
5 changes: 5 additions & 0 deletions static/epivis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.js
*.txt
*.html
*.css
*.map
7 changes: 6 additions & 1 deletion themes/delphi/assets/css/pages/_covidcast.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#vizbox {
#vizbox,
#epivis {
margin-top: 5px !important;
}

#epivis {
flex-grow: 1;
}

.covidcast_wrapper {
display: flex;
flex-direction: column;
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 @@ -7,3 +7,5 @@ UIkit.use(plugin);
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_EPIVIS_PAGE = "/epivis/";
11 changes: 11 additions & 0 deletions themes/delphi/layouts/_default/epivis_app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ define "styles" }}
<link rel="stylesheet" href="{{ (partial "epivis/find-file.html" "bundle.*\\.css$")| relURL }}" />
{{ end }}
{{ define "scripts" }}
<script src="{{ (partial "epivis/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="epivis"></div>
{{ end }}
10 changes: 10 additions & 0 deletions themes/delphi/layouts/partials/epivis/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/epivis") }}
{{ $testFile := . }}
{{ with (index (findRE $pattern .Name 1) 0) }}
{{ $matchedFile = path.Join "./epivis" $testFile.Name }}
{{ end }}
{{ end }}
{{ return $matchedFile }}