Skip to content
Open
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
44 changes: 44 additions & 0 deletions layouts/partials/edit_metadata.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{{- if ne (.Param "editme") false -}}
{{- $filePath := "" -}}
{{- $sourcePath := "" -}}
{{- with .File -}}
{{- $filePath = .Path -}}
{{- $filename := replace .Filename "\\" "/" -}}
{{- $sourcePath = replaceRE `^.*/(content|imported)/` `$1/` $filename -}}
{{- $sourcePath = replaceRE `^.*/pkg/mod/(github\.com/[^/]+/[^/@]+)(@[^/]+)?/(.*)$` `$1/$3` $sourcePath -}}
{{- if eq $sourcePath $filename -}}
{{- $sourcePath = replaceRE `^.*/([^/]+\.[^/.]+)$` `$1` $filename -}}
{{- end -}}
{{- if eq $sourcePath "" -}}
{{- $sourcePath = $filePath -}}
{{- end -}}
{{- end -}}
{{- $editBase := site.Params.github_editme_path -}}
{{- $editPath := $sourcePath -}}

{{- range $prefix, $base := site.Params.github_editme_paths -}}
{{- if hasPrefix $sourcePath (printf "%s/" $prefix) -}}
{{- $editBase = $base -}}
{{- if ne $prefix "content" -}}
{{- $editPath = strings.TrimPrefix (printf "%s/" $prefix) $sourcePath -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- with .Params.github_editme_path -}}
{{- $editBase = . -}}
{{- end -}}

{{- if and $editBase $editPath -}}
<aside>
<div class="text-end">
<a target="_blank" rel="noopener" href="{{ printf "%s%s" $editBase $editPath | safeURL }}" class="btn btn-outline-secondary githubEditButton" role="button"><i class="fab fa-github fa-lg"></i> Edit me</a>
</div>
{{- if ne (.Lastmod.Format "2006") "0001" }}
<div class="text-end">
<small>Updated {{ .Lastmod.Format "02 Jan 06" }}</small>
</div>
{{- end }}
</aside>
{{- end -}}
{{- end -}}
25 changes: 25 additions & 0 deletions layouts/partials/funding.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<div class="row gy-3">
{{- range hugo.Data.funding }}
<div class="col-md-6 d-flex flex-column">
<div class="card h-100">
<div class="card-body">
<a href="{{ .url }}" target="_blank" rel="noopener" class="no-icon card-title">
<strong>{{ .title }}</strong>
</a>
<div class="row align-items-center">
<div class="col-sm-4">
<a href="{{ .url }}" target="_blank" rel="noopener" class="no-icon">
<img src="{{ .img | relURL }}" alt="{{ .alt | default "Logo" }}" class="img-fluid">
</a>
</div>
<div class="col-sm-8">
{{- with .description }}<p><small>{{ . }}</small></p>{{ end }}
{{- with .number }}<p>Funding number: {{ . }}</p>{{ end }}
{{- with .period }}<p>Years running: {{ . }}</p>{{ end }}
</div>
</div>
</div>
</div>
</div>
{{- end }}
</div>
1 change: 1 addition & 0 deletions layouts/partials/image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- /* Jekyll include is currently empty; keep this partial as a no-op for parity. */ -}}
1 change: 1 addition & 0 deletions layouts/partials/initialize_shuffle.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- /* Legacy shuffle.js initializer. The current Hugo Bootstrap pass keeps this as a no-op until the logowall/testimonial components are ported. */ -}}
3 changes: 3 additions & 0 deletions layouts/partials/inline_image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- $file := .file | default "" -}}
{{- $alt := .alt | default "" -}}
<img class="inline" src="{{ printf "/images/%s" $file | relURL }}" alt="{{ $alt }}">
16 changes: 16 additions & 0 deletions layouts/partials/links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- range $sidebarName := site.Params.sidebars -}}
{{- with (index hugo.Data.sidebars $sidebarName) -}}
{{- range .entries -}}
{{- range (.folders | default slice) -}}
{{- partial "links_entry.html" . -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- range hugo.Data.topnav.topnav -}}
{{- range .items -}}
{{- if and .url (not .external_url) -}}
[{{ .url | strings.TrimPrefix "/" | strings.TrimSuffix ".html" }}]: {{ .url | strings.TrimPrefix "/" }}
{{- end -}}
{{- end -}}
{{- end -}}
12 changes: 12 additions & 0 deletions layouts/partials/links_entry.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- with .url -}}
[{{ . | strings.TrimPrefix "/" | strings.TrimSuffix ".html" }}]: {{ . | strings.TrimPrefix "/" }}
{{ end -}}
{{- range (.folderitems | default slice) -}}
{{ partial "links_entry.html" . }}
{{- end -}}
{{- range (.subfolders | default slice) -}}
{{ partial "links_entry.html" . }}
{{- end -}}
{{- range (.subfolderitems | default slice) -}}
{{ partial "links_entry.html" . }}
{{- end -}}
1 change: 1 addition & 0 deletions layouts/partials/news_banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- /* Disabled in the current Jekyll include. Keep the partial for parity. */ -}}
9 changes: 9 additions & 0 deletions layouts/partials/newsletter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script charset="utf-8" type="text/javascript" src="https://js.mailercloud.com/form/form.js"></script>
<script>
(function() {
mcform.create({
formId: "V3dEdUAzMTQ0NkAwMDAwMA==",
targetElement: "form_element_id"
})
})();
</script>
6 changes: 6 additions & 0 deletions layouts/partials/url.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- $url := . -}}
{{- if hasPrefix $url "http" -}}
{{- $url -}}
{{- else -}}
{{- $url | relURL -}}
{{- end -}}
2 changes: 2 additions & 0 deletions layouts/partials/xmlreference.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{- $raw := readFile "_includes/xmlreference.md" -}}
{{- .RenderString $raw -}}
Loading