Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
19 changes: 0 additions & 19 deletions _includes/news_banner.html

This file was deleted.

File renamed without changes.
44 changes: 44 additions & 0 deletions layouts/partials/edit_button.html
Comment thread
MakisH marked this conversation as resolved.
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>
20 changes: 20 additions & 0 deletions layouts/partials/news_banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{/*
News banner template, disabled by default. To publish a banner, change `false`
below to `true` and edit only the announcement text and link below. The base
layout already calls this partial, and the existing classes should be kept for
consistent styling. To hide the banner from the front page, wrap the banner
block with `{{ if not .onlanding }}` and `{{ end }}`; without that condition,
it appears on every page.
Comment thread
MuhammadAashirAslam marked this conversation as resolved.
Outdated
*/}}

{{ if false }}
<aside role="banner" class="background-light banner-container">
<div class="container">
<div class="row m-0">
<div class="col-lg-12 news-banner">
<p class="m-0">This is a site-wide news banner. Learn more about preCICE on the <a href="{{ "about.html" | relURL }}">About page</a>.</p>
</div>
</div>
</div>
</aside>
{{ end }}
File renamed without changes.
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 "assets/xmlreference.md" -}}
{{- .RenderString $raw -}}
Loading