diff --git a/config.toml b/config.toml index c5427af6c..18b2c8864 100644 --- a/config.toml +++ b/config.toml @@ -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 @@ -17,7 +17,7 @@ relativeURLs = false weight = 1 [[menu.main]] name = "COVIDcast" - url = "https://covidcast.cmu.edu" + url = "/covidcast" weight = 2 [[menu.main]] name = "Data" diff --git a/content/covidcast/_index.md b/content/covidcast/_index.md new file mode 100644 index 000000000..2889d6bb1 --- /dev/null +++ b/content/covidcast/_index.md @@ -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 +--- + + +{{}} \ No newline at end of file diff --git a/content/indicators/cases.md b/content/covidcast/indicators/cases.md similarity index 100% rename from content/indicators/cases.md rename to content/covidcast/indicators/cases.md diff --git a/content/indicators/combined.md b/content/covidcast/indicators/combined.md similarity index 100% rename from content/indicators/combined.md rename to content/covidcast/indicators/combined.md diff --git a/content/indicators/deaths.md b/content/covidcast/indicators/deaths.md similarity index 100% rename from content/indicators/deaths.md rename to content/covidcast/indicators/deaths.md diff --git a/content/indicators/doctor-visits.md b/content/covidcast/indicators/doctor-visits.md similarity index 100% rename from content/indicators/doctor-visits.md rename to content/covidcast/indicators/doctor-visits.md diff --git a/content/indicators/google-trends.md b/content/covidcast/indicators/google-trends.md similarity index 100% rename from content/indicators/google-trends.md rename to content/covidcast/indicators/google-trends.md diff --git a/content/indicators/hospital-admissions.md b/content/covidcast/indicators/hospital-admissions.md similarity index 100% rename from content/indicators/hospital-admissions.md rename to content/covidcast/indicators/hospital-admissions.md diff --git a/content/indicators/index.md b/content/covidcast/indicators/index.md similarity index 100% rename from content/indicators/index.md rename to content/covidcast/indicators/index.md diff --git a/content/indicators/quidel-flu.md b/content/covidcast/indicators/quidel-flu.md similarity index 100% rename from content/indicators/quidel-flu.md rename to content/covidcast/indicators/quidel-flu.md diff --git a/content/indicators/quidel.md b/content/covidcast/indicators/quidel.md similarity index 100% rename from content/indicators/quidel.md rename to content/covidcast/indicators/quidel.md diff --git a/content/indicators/safegraph.md b/content/covidcast/indicators/safegraph.md similarity index 100% rename from content/indicators/safegraph.md rename to content/covidcast/indicators/safegraph.md diff --git a/content/indicators/survey-google.md b/content/covidcast/indicators/survey-google.md similarity index 100% rename from content/indicators/survey-google.md rename to content/covidcast/indicators/survey-google.md diff --git a/content/indicators/symptoms-community-fb.md b/content/covidcast/indicators/symptoms-community-fb.md similarity index 100% rename from content/indicators/symptoms-community-fb.md rename to content/covidcast/indicators/symptoms-community-fb.md diff --git a/content/indicators/symptoms-fb.md b/content/covidcast/indicators/symptoms-fb.md similarity index 100% rename from content/indicators/symptoms-fb.md rename to content/covidcast/indicators/symptoms-fb.md diff --git a/content/methodology.md b/content/covidcast/methodology.md similarity index 100% rename from content/methodology.md rename to content/covidcast/methodology.md diff --git a/content/release-notes/index.md b/content/covidcast/release-notes/index.md similarity index 100% rename from content/release-notes/index.md rename to content/covidcast/release-notes/index.md diff --git a/content/release-notes/v1.0.md b/content/covidcast/release-notes/v1.0.md similarity index 100% rename from content/release-notes/v1.0.md rename to content/covidcast/release-notes/v1.0.md diff --git a/content/release-notes/v1.1.md b/content/covidcast/release-notes/v1.1.md similarity index 100% rename from content/release-notes/v1.1.md rename to content/covidcast/release-notes/v1.1.md diff --git a/content/release-notes/v1.10.0.md b/content/covidcast/release-notes/v1.10.0.md similarity index 100% rename from content/release-notes/v1.10.0.md rename to content/covidcast/release-notes/v1.10.0.md diff --git a/content/release-notes/v1.2.1.md b/content/covidcast/release-notes/v1.2.1.md similarity index 100% rename from content/release-notes/v1.2.1.md rename to content/covidcast/release-notes/v1.2.1.md diff --git a/content/release-notes/v1.2.md b/content/covidcast/release-notes/v1.2.md similarity index 100% rename from content/release-notes/v1.2.md rename to content/covidcast/release-notes/v1.2.md diff --git a/content/release-notes/v1.3.md b/content/covidcast/release-notes/v1.3.md similarity index 100% rename from content/release-notes/v1.3.md rename to content/covidcast/release-notes/v1.3.md diff --git a/content/release-notes/v1.4.1.md b/content/covidcast/release-notes/v1.4.1.md similarity index 100% rename from content/release-notes/v1.4.1.md rename to content/covidcast/release-notes/v1.4.1.md diff --git a/content/release-notes/v1.4.md b/content/covidcast/release-notes/v1.4.md similarity index 100% rename from content/release-notes/v1.4.md rename to content/covidcast/release-notes/v1.4.md diff --git a/content/release-notes/v1.5.md b/content/covidcast/release-notes/v1.5.md similarity index 100% rename from content/release-notes/v1.5.md rename to content/covidcast/release-notes/v1.5.md diff --git a/content/release-notes/v1.6.md b/content/covidcast/release-notes/v1.6.md similarity index 100% rename from content/release-notes/v1.6.md rename to content/covidcast/release-notes/v1.6.md diff --git a/content/release-notes/v1.7.md b/content/covidcast/release-notes/v1.7.md similarity index 100% rename from content/release-notes/v1.7.md rename to content/covidcast/release-notes/v1.7.md diff --git a/content/release-notes/v1.8.md b/content/covidcast/release-notes/v1.8.md similarity index 100% rename from content/release-notes/v1.8.md rename to content/covidcast/release-notes/v1.8.md diff --git a/content/release-notes/v1.9.2.md b/content/covidcast/release-notes/v1.9.2.md similarity index 100% rename from content/release-notes/v1.9.2.md rename to content/covidcast/release-notes/v1.9.2.md diff --git a/content/release-notes/v1.9.3.md b/content/covidcast/release-notes/v1.9.3.md similarity index 100% rename from content/release-notes/v1.9.3.md rename to content/covidcast/release-notes/v1.9.3.md diff --git a/content/release-notes/v1.9.md b/content/covidcast/release-notes/v1.9.md similarity index 100% rename from content/release-notes/v1.9.md rename to content/covidcast/release-notes/v1.9.md diff --git a/content/surveys.md b/content/covidcast/surveys.md similarity index 100% rename from content/surveys.md rename to content/covidcast/surveys.md diff --git a/content/terms-of-use.md b/content/covidcast/terms-of-use.md similarity index 100% rename from content/terms-of-use.md rename to content/covidcast/terms-of-use.md diff --git a/layouts/covidcast_app/baseof.html b/layouts/covidcast_app/baseof.html new file mode 100644 index 000000000..8cf5dccf2 --- /dev/null +++ b/layouts/covidcast_app/baseof.html @@ -0,0 +1,11 @@ + + + + {{ partial "head.html" . }} + + {{ partial "nav.html" . }} + {{ block "main" . }} + {{ end }} + {{ partial "footer.html" . }} + + diff --git a/layouts/covidcast_app/list.html b/layouts/covidcast_app/list.html new file mode 100644 index 000000000..d975ecbd1 --- /dev/null +++ b/layouts/covidcast_app/list.html @@ -0,0 +1 @@ +{{ define "main" }} {{ .Content }} {{ end }} diff --git a/layouts/shortcodes/covidcast.html b/layouts/shortcodes/covidcast.html new file mode 100644 index 000000000..38ab20304 --- /dev/null +++ b/layouts/shortcodes/covidcast.html @@ -0,0 +1,8 @@ +
+ +
diff --git a/layouts/shortcodes/indicators.html b/layouts/shortcodes/indicators.html index 114db7bee..df6c2c47f 100644 --- a/layouts/shortcodes/indicators.html +++ b/layouts/shortcodes/indicators.html @@ -1,6 +1,6 @@
-{{ $tools := .Site.GetPage "/indicators" }} +{{ $tools := .Site.GetPage "/covidcast/indicators" }} {{ range sort (where ($tools.Resources.ByType "page") ".Params.category" "eq" (.Get "category")) ".Params.order" }}

{{ .Title }}

diff --git a/layouts/shortcodes/releasenotes.html b/layouts/shortcodes/releasenotes.html index 72c3346ba..5b95494fa 100644 --- a/layouts/shortcodes/releasenotes.html +++ b/layouts/shortcodes/releasenotes.html @@ -1,5 +1,5 @@ -{{ $tools := .Site.GetPage "/release-notes" }} +{{ $tools := .Site.GetPage "/covidcast/release-notes" }} {{ range sort ($tools.Resources.ByType "page") "PublishDate" "desc" }}

{{ .Title}} {{ .PublishDate.Format "Monday, January 2, 2006" }}

{{ .Content }} diff --git a/netlify.toml b/netlify.toml index a6954b92e..33a481fdc 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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" diff --git a/package-lock.json b/package-lock.json index 71e34680e..61ecef595 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1590,6 +1590,13 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "www-covidcast": { + "version": "github:cmu-delphi/www-covidcast#7a5af5713f6c4c76960ff8458d5c3a24af566fd2", + "from": "github:cmu-delphi/www-covidcast#sgratzl/uikit_deploy", + "requires": { + "uikit": "^3.5.9" + } + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index b47649b81..82c74e0bc 100644 --- a/package.json +++ b/package.json @@ -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#sgratzl/uikit_deploy" }, "devDependencies": { "hugo-bin": "^0.66.2", @@ -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", diff --git a/static/covidcast/.gitignore b/static/covidcast/.gitignore new file mode 100644 index 000000000..8b42cac9a --- /dev/null +++ b/static/covidcast/.gitignore @@ -0,0 +1,4 @@ +*.js +*.txt +*.html +*.css \ No newline at end of file diff --git a/themes/delphi/assets/js/main.js b/themes/delphi/assets/js/main.js index 7e9663458..409ac6b7c 100644 --- a/themes/delphi/assets/js/main.js +++ b/themes/delphi/assets/js/main.js @@ -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; \ No newline at end of file +window.UIkit = UIkit; \ No newline at end of file