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
41 changes: 25 additions & 16 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"@fortawesome/fontawesome-free": "^5.15.3",
"highlight.js": "^11.0.1",
"katex": "^0.13.11",
"uikit": "^3.6.22",
"uikit": "^3.7.0",
"www-covidcast": "https://github.com/cmu-delphi/www-covidcast/releases/download/v2.5.2/www-covidcast-2.5.2.tgz",
"www-epivis": "https://github.com/cmu-delphi/www-epivis/releases/download/v2.0.1/www-epivis-2.0.1.tgz"
},
"devDependencies": {
"hugo-bin": "^0.72.3",
"husky": "^6.0.0",
"hugo-bin": "^0.72.4",
"husky": "^7.0.0",
"lint-staged": "^11.0.0",
"prettier": "~2.2.1",
"prettier-plugin-go-template": "^0.0.10",
"prettier": "^2.3.2",
"prettier-plugin-go-template": "^0.0.11",
"rimraf": "^3.0.2",
"shx": "^0.3.3"
},
Expand Down
6 changes: 3 additions & 3 deletions themes/delphi/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<head>
{{ partial "head/meta.html" . }}
{{ partial "head/styles.html" . }}
{{ block "styles" . }} {{ end }}
{{ block "styles" . }}{{ end }}
</head>
<body class="{{ block "body_class" . }}{{ end }}">
{{ partial "nav.html" . }}
{{ block "breadcrumb" . }}{{ partial "menu/breadcrumb.html" . }}{{ end }}
{{ block "main" . }} {{ end }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
{{ block "scripts" . }} {{ end }}
{{ block "scripts" . }}{{ end }}
</body>
</html>
1 change: 1 addition & 0 deletions themes/delphi/layouts/_default/coe.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h2>We work closely with</h2>

{{ partial "coe/research-papers.html" . }}


<div class="about-collaborators coe-section about-collaborators-v2">
<div class="uk-container">
<h2>Supporters</h2>
Expand Down
1 change: 1 addition & 0 deletions themes/delphi/layouts/_default/team.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ <h1 class="team-header">

{{ .Content }}


<hr />

<strong>Abbreviations</strong>
Expand Down
14 changes: 7 additions & 7 deletions themes/delphi/layouts/_internal/pagination.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{ $pag := $.Paginator }}
{{ if gt $pag.TotalPages 1 -}}
<ul class="uk-pagination uk-flex-center">
<li class="{{ if not $pag.HasPrev }} uk-disabled{{ end }}">
<li class="{{ if not $pag.HasPrev }}uk-disabled{{ end }}">
{{ if $pag.HasPrev }}
<a href="{{ $pag.Prev.URL }}" aria-label="Previous"><span uk-pagination-previous></span></a>
{{ else }}
{{ else }}
<a aria-label="Previous"><span uk-pagination-previous></span></a>
{{ end }}
</li>
Expand All @@ -18,24 +18,24 @@
{{- if $showNumber -}}
{{- $ellipsed = false -}}
{{- $shouldEllipse = false -}}
{{- else -}}
{{- else -}}
{{- $shouldEllipse = not $ellipsed -}}
{{- $ellipsed = true -}}
{{- end -}}
{{- if $showNumber }}
<li class="{{ if eq . $pag }} uk-active{{ end }}">
<li class="{{ if eq . $pag }}uk-active{{ end }}">
<a href="{{ .URL }}">{{ .PageNumber }}</a>
</li>
{{- else if $shouldEllipse }}
{{- else if $shouldEllipse }}
<li class="uk-disabled">
<span aria-hidden="true">&nbsp;&hellip;&nbsp;</span>
</li>
{{- end -}}
{{- end }}
<li class="{{ if not $pag.HasNext }} uk-disabled{{ end }}">
<li class="{{ if not $pag.HasNext }}uk-disabled{{ end }}">
{{ if $pag.HasNext }}
<a href="{{ $pag.Next.URL }}" aria-label="Next"><span uk-pagination-next></span></a>
{{ else }}
{{ else }}
<a aria-label="Next"><span uk-pagination-next></span></a>
{{ end }}
</li>
Expand Down
7 changes: 3 additions & 4 deletions themes/delphi/layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<link rel="stylesheet" href="{{ $blog_style.RelPermalink }}" />
{{ end }}
{{ define "scripts" }}
{{ $script_blog := resources.Get "js/blog/index.js" | js.Build | minify | fingerprint -}}
<script src="{{ $script_blog.RelPermalink }}"></script>
{{ $script_blog := resources.Get "js/blog/index.js" | js.Build | minify | fingerprint -}} <script src="{{ $script_blog.RelPermalink }}"></script>
{{ end }}
{{ define "main" }}
{{ $currentPage := . }}
Expand Down Expand Up @@ -33,7 +32,7 @@ <h1>{{ .Title }}</h1>
<span class="uk-icon-button">
{{ if gt (len .Params.authors) 1 }}
{{ partial "font-awesome.html" "solid/users" }}
{{ else }}
{{ else }}
{{ partial "font-awesome.html" "solid/user" }}
{{ end }}
</span>
Expand Down Expand Up @@ -78,7 +77,7 @@ <h5>Outline</h5>
{{ with (partial "get-person.html" (dict "Site" $currentPage.Site "key" .)) }}
{{ if isset . "link" }}
<a href="{{ .link }}" class="uk-text-bold-600 uk-link-text">{{ .name | safeHTML }}</a>
{{ else }}
{{ else }}
<span>{{ .name | safeHTML }}</span>
{{ end }}
{{ .description }}
Expand Down
2 changes: 1 addition & 1 deletion themes/delphi/layouts/partials/about/collaborators.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2 class="uk-text-center">Collaborators</h2>
<ul>
{{ range .Params.collaborators }}
<li>
{{ if eq .group "sponsor" }}With support from {{ end }}
{{ if eq .group "sponsor" }}With support from{{ end }}

{{ .name }}
</li>
Expand Down
3 changes: 2 additions & 1 deletion themes/delphi/layouts/partials/blog/license.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class="blog-license">
&#169; <span id="js-current-year">{{ now.Format "2006" }}</span> Delphi group authors. Text and figures released under
<a href="https://creativecommons.org/licenses/by/4.0">
CC BY 4.0 {{ partial "font-awesome.html" "brands/creative-commons" }}
CC BY 4.0
{{ partial "font-awesome.html" "brands/creative-commons" }}
{{ partial "font-awesome.html" "brands/creative-commons-by" }} </a
>; code under the <a href="https://opensource.org/licenses/MIT">MIT license</a>.
</div>
2 changes: 1 addition & 1 deletion themes/delphi/layouts/partials/font-awesome.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{- $localPath := path.Join "./themes/delphi/assets/" $fileName -}}
{{- if fileExists $localPath -}}
{{ readFile $localPath | safeHTML }}
{{- else -}}
{{- else -}}
{{ readFile $faPath | safeHTML }}
{{- end -}}
</span>
1 change: 1 addition & 0 deletions themes/delphi/layouts/partials/head/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

{{ partial "head/socialmedia.html" . }}


<!-- Icons -->
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" />
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}" />
Expand Down
30 changes: 22 additions & 8 deletions themes/delphi/layouts/partials/head/socialmedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@

<meta
name="description"
content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"
content="{{- with .Description -}}
{{ . }}
{{- else -}}
{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}
{{- end -}}"
/>
<meta
name="twitter:description"
content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"
content="{{- with .Description -}}
{{ . }}
{{- else -}}
{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}
{{- end -}}"
/>
<meta
property="og:description"
content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"
content="{{- with .Description -}}
{{ . }}
{{- else -}}
{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}
{{- end -}}"
/>

<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
Expand All @@ -26,6 +38,7 @@
{{- end -}}
{{- end -}}


<meta name="author" content="Delphi Group" />
<meta name="twitter:site" content="@{{ .Site.Params.twitter }}" />

Expand All @@ -46,20 +59,21 @@
<meta name="twitter:image" content="{{ ($img.Resize "1120x440 jpg").Permalink }}" />
<meta property="og:image" content="{{ ($img.Resize "1120x440 jpg").Permalink }}" />
<meta name="twitter:card" content="summary_large_image" />
{{- else -}}
{{- else -}}
<meta name="twitter:card" content="summary" />
{{- end -}}

{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
{{- if .IsPage }}
{{- if not .PublishDate.IsZero }}
<meta property="article:published_time" content="{{ .PublishDate.Format $iso8601 }}" />
{{ else if not .Date.IsZero }}<meta property="article:published_time" content="{{ .Date.Format $iso8601 }}" />
{{ else if not .Date.IsZero }}
<meta property="article:published_time" content="{{ .Date.Format $iso8601 }}" />
{{ end }}
{{- if not .Lastmod.IsZero }}
<meta property="article:modified_time" content="{{ .Lastmod.Format $iso8601 }}"
/>{{ end }}
{{- else }}
<meta property="article:modified_time" content="{{ .Lastmod.Format $iso8601 }}" />
{{ end }}
{{- else }}
{{- if not .Date.IsZero }}
<meta property="og:updated_time" content="{{ .Date.Format $iso8601 }}" />
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion themes/delphi/layouts/partials/landing/carousel.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2>{{ .pre }}</h2>
<p>{{ .title }}</p>
{{ if isset . "ref" }}
{{ partial "arrow-link.html" (dict "link" (relref $currentPage .ref) "alt" .alt) }}
{{ else }}
{{ else }}
{{ partial "arrow-link.html" (dict "link" .link "alt" .alt) }}
{{ end }}
</div>
Expand Down
1 change: 1 addition & 0 deletions themes/delphi/layouts/partials/landing/latest-news.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ <h2 class="uk-text-center">Latest News</h2>

{{ $top := 10 }}


<div class="uk-position-relative" tabindex="-1" uk-slider>
<div class="uk-slider-container">
<ul class="uk-slider-items uk-child-width-1-2@s uk-child-width-1-3@m uk-grid uk-grid-match">
Expand Down
10 changes: 7 additions & 3 deletions themes/delphi/layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
<ul class="uk-navbar-nav nav-entries">
{{ range .Site.Menus.main.ByWeight }}
<li
class="nav-entry {{ if (eq $currentPage.Section .Identifier) }}uk-active{{ end }} {{ if .HasChildren }}uk-parent{{ end }}"
class="nav-entry {{- if (eq $currentPage.Section .Identifier) -}}uk-active{{- end -}} {{- if .HasChildren -}}
uk-parent
{{- end -}}"
>
{{ if .HasChildren }}
<a href="{{ .URL | relLangURL }}">
{{ partial "menu/item.html" . }}
{{ partial "font-awesome.html" "solid/angle-down" }}
</a>
{{ else }}
{{ else }}
<a href="{{ .URL | relLangURL }}">
{{ partial "menu/item.html" . }}
</a>
Expand Down Expand Up @@ -50,7 +52,9 @@
<ul class="uk-nav uk-navbar-dropdown-nav">
{{ range .Site.Menus.main.ByWeight }}
<li
class="nav-dropdown-parent {{ if .HasChildren }}uk-nav-header{{ end }} {{ if (eq $currentPage.Section .Identifier) }}uk-active{{ end }}"
class="nav-dropdown-parent {{ if .HasChildren -}}
uk-nav-header
{{- end -}} {{ if (eq $currentPage.Section .Identifier) -}}uk-active{{- end -}}"
>
<a href="{{ .URL | relLangURL }}">
{{ partial "menu/item.html" . }}
Expand Down
3 changes: 1 addition & 2 deletions themes/delphi/layouts/partials/scripts.html
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{{ $script := resources.Get "js/main.js" | js.Build | minify | fingerprint -}}
<script src="{{ $script.RelPermalink }}"></script>
{{ $script := resources.Get "js/main.js" | js.Build | minify | fingerprint -}}<script src="{{ $script.RelPermalink }}"></script>
5 changes: 3 additions & 2 deletions themes/delphi/layouts/shortcodes/bibliography.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<a href="{{ .link }}"><b>{{ .title }} </b> </a>
<br />
{{ .authors }} <br />
<i>{{ .journal }} </i> {{ .issue }} {{ if isset . "year" }} ({{ .year }}) {{ end }}
{{ if isset . "doi" }} DOI: <a href="https://doi.org/{{ .doi }}">{{ .doi }}</a>{{ end }}
<i>{{ .journal }} </i> {{ .issue }}
{{ if isset . "year" }}({{ .year }}){{ end }}
{{ if isset . "doi" }}DOI: <a href="https://doi.org/{{ .doi }}">{{ .doi }}</a>{{ end }}
</p>
</li>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion themes/delphi/layouts/shortcodes/systems.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h3>
{{ if isset .Params "externallink" }}
<a href="{{ .Params.externallink }}">{{ .Title }}</a>
{{ else }}
{{ else }}
{{ .Title }}
{{ end }}
</h3>
Expand Down
8 changes: 6 additions & 2 deletions themes/delphi/layouts/shortcodes/team.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div
uk-grid
class="team-members uk-grid-small uk-child-width-1-6@l uk-child-width-1-4@m uk-child-width-1-{{ with .Get "small" }}{{ . }}{{ else }}3{{ end }}"
class="team-members uk-grid-small uk-child-width-1-6@l uk-child-width-1-4@m uk-child-width-1-{{- with .Get "small" -}}
{{ . }}
{{- else -}}
3
{{- end -}}"
>
{{ $team := where (partial "get-persons.html" .) ".team" "intersect" (slice (.Get "team")) }}
{{ range $team }}
Expand All @@ -18,7 +22,7 @@
</picture>
</a>
<a href="{{ .link }}" class="team-member-name uk-link-muted">{{ .name | safeHTML }}</a>
{{ else }}
{{ else }}
<picture>
<source srcset="{{ (.img.Resize "250x webp Gaussian").RelPermalink }}" type="image/webp" />
<img src="{{ (.img.Resize "250x jpg Gaussian").RelPermalink }}" alt="{{ .name }}" width="250" height="250" />
Expand Down