Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4c9c376
feat: add covidcast page as embedded from
sgratzl Nov 12, 2020
ec6983c
Merge branch 'sgratzl/covidcast' into sgratzl/npm_covidcast
sgratzl Nov 16, 2020
a9ced5c
refactor: move files to match desired hierarchy
sgratzl Nov 16, 2020
ea6cc95
feat: install covidcast from package/branch
sgratzl Nov 16, 2020
bb8886e
build: reduce build size by ignoring not needed files
sgratzl Nov 16, 2020
8a3ef0e
build: enforce npm install
sgratzl Nov 16, 2020
0998662
build: dummy change to trigger build
sgratzl Nov 16, 2020
8c94094
build: invalidate netlify www-covidcast cache
sgratzl Nov 16, 2020
82e1fe2
Merge remote-tracking branch 'origin/dev' into sgratzl/npm_covidcast
sgratzl Nov 16, 2020
c140715
build: fix hash reference
sgratzl Nov 16, 2020
56e8355
build: trigger build
sgratzl Nov 16, 2020
e9821bb
feat: switch to other covidcast branch
sgratzl Nov 17, 2020
d310a7e
refactor: restructure content to reflect structure
sgratzl Nov 17, 2020
9a8a65a
refactor: use ref for links
sgratzl Nov 17, 2020
4b841d1
Merge remote-tracking branch 'origin/dev' into sgratzl/restructure
sgratzl Nov 17, 2020
69fdfbb
fix: merge error
sgratzl Nov 17, 2020
fd9a514
fix: restore mobile nav menu
sgratzl Nov 17, 2020
a1e3860
build: update to latest dev branch
sgratzl Nov 18, 2020
2e47496
feat: remove mobile highlight
sgratzl Nov 18, 2020
a5c72e7
Merge remote-tracking branch 'origin/dev' into sgratzl/npm_covidcast2
sgratzl Nov 18, 2020
a136789
Merge branch 'sgratzl/restructure' into sgratzl/npm_covidcast2
sgratzl Nov 18, 2020
301fef5
style: move box a bit for better style
sgratzl Nov 18, 2020
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
7 changes: 5 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ languageCode = "en-us"
title = "The Delphi Team"
theme = "delphi"
googleAnalytics = "UA-88748454-1"
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_cache$", "\\.knit\\.md$", "\\.utf8\\.md$"]
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_cache$", "\\.knit\\.md$", "\\.utf8\\.md$", "\\.rda$"]
disqusShortname = ""
relativeURLs = false

Expand All @@ -16,27 +16,30 @@ relativeURLs = false
post = "angle-down"
weight = 1
[[menu.main]]
identifier = "team"
parent = "about"
name = "Team"
url = "/about/team"
weight = 1
[[menu.main]]
identifier = "covidcast"
name = "COVIDcast"
pre = "map"
url = "/covidcast"
weight = 2
[[menu.main]]
identifier = "blog"
name = "Blog"
pre = "blog"
url = "/blog"
weight = 3
[[menu.main]]
identifier = "github"
name = "GitHub"
pre = "github"
url = "https://github.com/cmu-delphi/"
weight = 4
[[menu.main]]
identifier = "api"
name = "API"
pre = "api"
url = "https://cmu-delphi.github.io/delphi-epidata/"
Expand Down
1 change: 1 addition & 0 deletions content/about.md → content/about/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
date: "2020-07-28"
title: About
layout: single
---

In March 2020, the [Delphi group](https://delphi.cmu.edu) at Carnegie Mellon
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions content/covidcast/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: COVIDCast
type: covidcast_app
scripts:
- ./covidcast/vendors.js
- ./covidcast/styles.js
- ./covidcast/bundle.js
styles:
- ./covidcast/vendors.css
- ./covidcast/styles.css
---


{{<covidcast >}}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions layouts/covidcast_app/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<!-- Default base template. Other templates define the "main" portion in this template -->
<html lang="{{ $.Site.LanguageCode | default "en" }}">
{{ partial "head.html" . }}
<body style="height: 100vh; display: flex; flex-direction: column;">
{{ partial "nav.html" . }}
{{ block "main" . }}
{{ end }}
{{ partial "footer.html" . }}
</body>
</html>
1 change: 1 addition & 0 deletions layouts/covidcast_app/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ define "main" }} {{ .Content }} {{ end }}
8 changes: 8 additions & 0 deletions layouts/shortcodes/covidcast.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div id="vizbox">
<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>
2 changes: 1 addition & 1 deletion layouts/shortcodes/indicators.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<section>
{{ $tools := .Site.GetPage "/indicators" }}
{{ $tools := .Site.GetPage "/covidcast/indicators" }}
{{ range sort (where ($tools.Resources.ByType "page") ".Params.category" "eq" (.Get "category")) ".Params.order" }}
<article>
<h4>{{ .Title }}</h4>
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/releasenotes.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

{{ $tools := .Site.GetPage "/release-notes" }}
{{ $tools := .Site.GetPage "/covidcast/release-notes" }}
{{ range sort ($tools.Resources.ByType "page") "PublishDate" "desc" }}
<h3>{{ .Title}} {{ .PublishDate.Format "Monday, January 2, 2006" }}</h3>
{{ .Content }}
Expand Down
6 changes: 3 additions & 3 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[build]
publish = "public"
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
command = "npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.production.environment]
HUGO_VERSION = "0.78.0"
HUGO_ENV = "production"

[context.deploy-preview]
command = "hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL"
command = "npm ci && hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL"

[context.deploy-preview.environment]
HUGO_VERSION = "0.78.0"
HUGO_ENABLEGITINFO = "true"

[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
command = "npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.branch-deploy.environment]
HUGO_VERSION = "0.78.0"
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.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"dependencies": {
"highlight.js": "^10.3.2",
"katex": "^0.12.0",
"uikit": "^3.5.9"
"uikit": "^3.5.9",
"www-covidcast": "github:cmu-delphi/www-covidcast#dev"
},
"devDependencies": {
"hugo-bin": "^0.66.2",
Expand All @@ -12,7 +13,9 @@
"buildTags": "extended"
},
"scripts": {
"postinstall": "ncp node_modules/katex/dist/fonts themes/delphi/static/css/fonts/",
"copy_fonts": "ncp node_modules/katex/dist/fonts themes/delphi/static/css/fonts/",
"copy_covidcast": "ncp node_modules/www-covidcast/public static/covidcast/",
"postinstall": "npm run copy_fonts && npm run copy_covidcast",
"build:blog": "Rscript -e \"blogdown::build_site(local=FALSE, run_hugo=FALSE, build_rmd=TRUE)\"",
"build": "hugo --gc --minify",
"start": "hugo server -D",
Expand Down
4 changes: 4 additions & 0 deletions static/covidcast/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.js
*.txt
*.html
*.css
4 changes: 4 additions & 0 deletions themes/delphi/assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,7 @@ svg {
.footer-small div {
padding-top: 10px;
}

#vizbox {
margin-top: 5px !important;
}
6 changes: 3 additions & 3 deletions themes/delphi/assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit from 'uikit/dist/js/uikit.js';
import UIkit from 'uikit/dist/js/uikit.js';
import plugin from 'uikit/dist/js/uikit-icons.js';

UIKit.use(plugin);
UIkit.use(plugin);

window.UIKit = UIKit;
window.UIkit = UIkit;
2 changes: 1 addition & 1 deletion themes/delphi/layouts/partials/delphi-text-logo.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a class="delphi-text-logo" href="https://delphi.cmu.edu/">DELPHI</a>
<a class="delphi-text-logo" href="{{ relref . "/" }}">DELPHI</a>
5 changes: 2 additions & 3 deletions themes/delphi/layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<footer>
<!-- {{ partial "footer/legal.html" . }} -->
{{ partial "footer/desktop.html" }}
{{ partial "footer/mobile.html" }}
{{ partial "footer/desktop.html" . }}
{{ partial "footer/mobile.html" . }}

{{ $script := resources.Get "js/main.js" | js.Build | minify | fingerprint -}}
<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }}></script>
Expand Down
2 changes: 1 addition & 1 deletion themes/delphi/layouts/partials/footer/blog.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a href="https://delphi.cmu.edu/blog/">Blog</a>
<a href="{{ relref . "/blog" }}">Blog</a>
18 changes: 9 additions & 9 deletions themes/delphi/layouts/partials/footer/desktop.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<thead>
<tr>
<th class="header">
{{partial "delphi-text-logo.html"}}
{{partial "delphi-text-logo.html" . }}
</th>
<th class="footer-header">COVIDcast</th>
<th class="footer-header">Resources</th>
Expand All @@ -14,25 +14,25 @@
<tbody>
<tr>
<td></td>
<td>{{partial "footer/methods.html"}}</td>
<td>{{partial "footer/cmu.html"}}</td>
<td>{{partial "footer/twitter.html"}}</td>
<td>{{partial "footer/methods.html" .}}</td>
<td>{{partial "footer/cmu.html" . }}</td>
<td>{{partial "footer/twitter.html" . }}</td>
</tr>
<tr>
<td></td>
<td>{{partial "footer/surveys.html"}}</td>
<td>{{partial "footer/api.html"}}</td>
<td>{{partial "footer/terms.html"}}</td>
<td>{{partial "footer/surveys.html" . }}</td>
<td>{{partial "footer/api.html" . }}</td>
<td>{{partial "footer/terms.html" . }}</td>
</tr>
<tr>
<td></td>
<td></td>
<td>{{partial "footer/github.html"}}</td>
<td>{{partial "footer/github.html" . }}</td>
</tr>
<tr>
<td></td>
<td></td>
<td>{{partial "footer/blog.html"}}</td>
<td>{{partial "footer/blog.html" . }}</td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion themes/delphi/layouts/partials/footer/methods.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a href="https://delphi.cmu.edu/methodology/">Methods</a>
<a href="{{ relref . "/covidcast/methodology" }}">Methods</a>
18 changes: 9 additions & 9 deletions themes/delphi/layouts/partials/footer/mobile.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<div class="uk-hidden@s footer footer-small">
{{partial "delphi-text-logo.html"}}
{{partial "delphi-text-logo.html" . }}

<div class="footer-header">COVIDcast</div>
<div>{{partial "footer/methods.html"}}</div>
<div>{{partial "footer/surveys.html"}}</div>
<div>{{partial "footer/methods.html" . }}</div>
<div>{{partial "footer/surveys.html" . }}</div>

<div class="footer-header">Resources</div>
<div>{{partial "footer/api.html"}}</div>
<div>{{partial "footer/github.html"}}</div>
<div>{{partial "footer/blog.html"}}</div>
<div>{{partial "footer/api.html" . }}</div>
<div>{{partial "footer/github.html" . }}</div>
<div>{{partial "footer/blog.html" . }}</div>

<div class="footer-header">About</div>
<div>{{partial "footer/cmu.html"}}</div>
<div>{{partial "footer/terms.html"}}</div>
<div>{{partial "footer/cmu.html" . }}</div>
<div>{{partial "footer/terms.html" . }}</div>

<div class="footer-header">Contact</div>
<div>{{partial "footer/twitter.html"}}</div>
<div>{{partial "footer/twitter.html" . }}</div>
</div>
2 changes: 1 addition & 1 deletion themes/delphi/layouts/partials/footer/surveys.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a href="https://delphi.cmu.edu/surveys/">Surveys</a>
<a href="{{ relref . "/covidcast/surveys" }}">Surveys</a>
2 changes: 1 addition & 1 deletion themes/delphi/layouts/partials/footer/terms.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a href="https://delphi.cmu.edu/terms-of-use/">Terms</a>
<a href="{{ relref . "/covidcast/terms-of-use" }}">Terms</a>
11 changes: 5 additions & 6 deletions themes/delphi/layouts/partials/nav.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- $currentPage := . -}}
<nav class="uk-visible@s uk-navbar-container" data-uk-navbar>
<div class="uk-navbar-left">
<ul class="uk-navbar-nav">
<li>
{{partial "delphi-text-logo.html"}}
<a class="delphi-text-logo" href="{{ relref . "/" }}">DELPHI</a>
</li>
{{ $currentPage := . }}
{{ range .Site.Menus.main.ByWeight }}
<li class="{{ if (eq $currentPage.URL .URL) }}nav-active{{ end }}">
<li class="{{ if (eq $currentPage.Section .Identifier) }}nav-active{{ end }}">
<a href="{{ .URL | relLangURL }}">
{{ if .Pre }}
{{ partial "font-awesome.html" .Pre }}
Expand All @@ -31,10 +31,9 @@
</div>
</nav>


<!-- Mobile nav -->
<nav class="uk-hidden@s mobile-nav">
{{partial "delphi-text-logo.html"}}
{{partial "delphi-text-logo.html" . }}
<a class="uk-navbar-toggle" uk-navbar-toggle-icon href=""></a>
<div uk-dropdown="mode: click" class="dropdown-mobile">
<ul class="uk-nav uk-navbar-dropdown-nav">
Expand All @@ -55,4 +54,4 @@
{{ end }}
</ul>
</div>
</nav>
</nav>