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
30 changes: 25 additions & 5 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,49 @@ relativeURLs = false
weight = 2
[[menu.main]]
parent = "covidcast"
name = "Map"
name = "Map Overview"
url = "/covidcast"
weight = 1
[[menu.main]]
parent = "covidcast"
name = "Timelapse"
url = "/covidcast/timelapse"
weight = 2
[[menu.main]]
parent = "covidcast"
name = "Top 10"
url = "/covidcast/top10"
weight = 3
[[menu.main]]
parent = "covidcast"
name = "Single Region"
url = "/covidcast/single"
weight = 4
[[menu.main]]
parent = "covidcast"
name = "Surveys"
url = "/covidcast/surveys"
weight = 2
weight = 5
[[menu.main]]
parent = "covidcast"
name = "Survey Results"
url = "/covidcast/survey-results"
weight = 3
weight = 6
[[menu.main]]
parent = "covidcast"
name = "Export Data"
url = "/covidcast/export"
weight = 7
[[menu.main]]
parent = "covidcast"
name = "Release Log"
url = "/covidcast/release-log"
weight = 4
weight = 8
[[menu.main]]
parent = "covidcast"
name = "Terms Of Use"
url = "/covidcast/terms-of-use"
weight = 5
weight = 9
[[menu.main]]
identifier = "flu"
name = "Flu and Other Diseases"
Expand Down
6 changes: 5 additions & 1 deletion content/covidcast/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: COVIDcast
layout: covidcast_app
description: COVIDcast tracks and forecasts the spread of COVID-19. By Carnegie Mellon's Delphi Research Group.
layout: covidcast_app
app_mode: overview
order: 1
modeTitle: Map Overview
icon: solid/map
heroImage: /images/landing-page/hero-images/covidcast_withfill.jpg
---
3 changes: 3 additions & 0 deletions content/covidcast/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ title: COVIDCast Export Data
linkTitle: Export Data
description: Use COVIDcast data in your own analysis
layout: covidcast_app
app_mode: export
order: 6
icon: solid/download
heroImage: /images/landing-page/hero-images/covidcast_withfill.jpg
---
3 changes: 3 additions & 0 deletions content/covidcast/single.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ title: COVIDCast Region Details
linkTitle: Region Details
description: COVIDcast tracks and forecasts the spread of COVID-19. By Carnegie Mellon's Delphi Research Group.
layout: covidcast_app
app_mode: single
order: 4
icon: location-solid
heroImage: /images/landing-page/hero-images/covidcast_withfill.jpg
---
3 changes: 3 additions & 0 deletions content/covidcast/survey-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ linkTitle: Survey Results
description: |
In collaboration with Facebook Data for Good, along with a consortium of universities and public health officials, the Delphi Group at Carnegie Mellon University conducts research surveys to monitor the spread and impact of the COVID-19 pandemic in the United States. This survey is advertised through Facebook. It has run continuously since early April 2020.
layout: covidcast_app
app_mode: survey-results
order: 5
icon: solid/poll
heroImage: /images/landing-page/hero-images/covidcast_survey.jpg
---
3 changes: 3 additions & 0 deletions content/covidcast/timelapse.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ title: COVIDCast Timelapse
linkTitle: Timelapse
description: COVIDcast tracks and forecasts the spread of COVID-19. By Carnegie Mellon's Delphi Research Group.
layout: covidcast_app
app_mode: timelapse
order: 2
icon: solid/clock
heroImage: /images/landing-page/hero-images/covidcast_withfill.jpg
---
3 changes: 3 additions & 0 deletions content/covidcast/top10.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ title: COVIDCast Top 10
linkTitle: Top 10
description: COVIDcast tracks and forecasts the spread of COVID-19. By Carnegie Mellon's Delphi Research Group.
layout: covidcast_app
app_mode: top10
order: 3
icon: solid/list
heroImage: /images/landing-page/hero-images/covidcast_withfill.jpg
---
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"highlight.js": "^10.4.1",
"katex": "^0.12.0",
"uikit": "^3.5.9",
"www-covidcast": "https://github.com/cmu-delphi/www-covidcast/releases/download/v1.12.0/www-covidcast-1.12.0.tgz"
"www-covidcast": "github:cmu-delphi/www-covidcast#e7f0a2c6041859683649124152bf7a17654419cb"
},
"devDependencies": {
"cpx": "^1.5.0",
Expand Down
4 changes: 4 additions & 0 deletions themes/delphi/assets/location-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion themes/delphi/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body class="{{ block "body_class" . }}{{ end }}">
{{ partial "nav.html" . }}
{{ block "breadcrumb" . }}{{ partial "menu/breadcrumb.html" . }}{{ end }}
{{ partial "menu/breadcrumb.html" . }}
{{ block "main" . }} {{ end }}
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
Expand Down
2 changes: 1 addition & 1 deletion themes/delphi/layouts/_default/covidcast_app.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<script src="{{ "./covidcast/styles.js" | relURL }}"></script>
<script src="{{ "./covidcast/bundle.js" | relURL }}"></script>
{{ end }}
{{ define "breadcrumb" }}<!--no breadcrumb -->{{ end }}
{{ define "body_class" }}covidcast_wrapper{{ end }}
{{ define "main" }}
{{ partial "covidcast/modes.html" . }}
<div id="vizbox">
<div class="ie-banner" style="display: none">
<div>
Expand Down
5 changes: 5 additions & 0 deletions themes/delphi/layouts/partials/covidcast/get-modes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- $mainPage := $.GetPage "/covidcast" -}}
{{- $pages := where $mainPage.Pages ".Params.layout" "eq" "covidcast_app" -}}
{{- $pages = append (slice $mainPage) $pages -}}
{{- $pages = sort $pages ".Params.order" -}}
{{- return $pages -}}
18 changes: 18 additions & 0 deletions themes/delphi/layouts/partials/covidcast/modes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="uk-visible@s covidcast-modes">
<div class="uk-container uk-margin-remove-vertical">
{{ $currentPage := . }}
<ul class="uk-tab">
{{ range (partial "covidcast/get-modes.html" .) }}
<li
data-mode="{{ .Params.app_mode }}"
class="covidcast-mode {{ if eq $currentPage.Permalink .Permalink }}uk-active{{ end }}"
>
<a href="{{ .RelPermalink }}">
{{ partial "font-awesome.html" .Params.icon }}
{{ .Params.modeTitle | default .LinkTitle }}
</a>
</li>
{{ end }}
</ul>
</div>
</div>
9 changes: 8 additions & 1 deletion themes/delphi/layouts/partials/font-awesome.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<span class="inline-svg-icon">
{{ readFile (print "./node_modules/@fortawesome/fontawesome-free/svgs/" . ".svg" ) | safeHTML }}
{{- $fileName := (print . ".svg" ) -}}
{{- $faPath := path.Join "./node_modules/@fortawesome/fontawesome-free/svgs/" $fileName -}}
{{- $localPath := path.Join "./themes/delphi/assets/" $fileName -}}
{{- if fileExists $localPath -}}
{{ readFile $localPath | safeHTML }}
{{- else -}}
{{ readFile $faPath | safeHTML }}
{{- end -}}
</span>