mirror of
https://gitlab.com/ansol/web-ansol.org.git
synced 2024-12-22 03:54:07 +00:00
Improve news list page
This commit is contained in:
parent
7725683f5f
commit
3024225072
BIN
assets/images/default-news-cover.png
Normal file
BIN
assets/images/default-news-cover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
@ -198,10 +198,17 @@ nav.main .nav-search:hover {
|
||||
|
||||
p { margin: 0px; }
|
||||
|
||||
.news-list-title {
|
||||
margin: 2rem auto;
|
||||
font-weight: 300;
|
||||
font-size: 2.25rem;
|
||||
}
|
||||
|
||||
.news-list li {
|
||||
padding: 0px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.news-list li .text {
|
||||
@ -236,6 +243,7 @@ p { margin: 0px; }
|
||||
width: 320px;
|
||||
height: 160px;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.campaign-cover {
|
||||
|
@ -1,39 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
{{/* Author profile page. */}}
|
||||
|
||||
{{/* If an account has not been created for this user, just display their name as the title. */}}
|
||||
{{ if not .File }}
|
||||
<div class="universal-wrapper pt-3">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<section id="profile-page" class="pt-5">
|
||||
<div class="container">
|
||||
{{/* Show the About widget if an account exists for this user. */}}
|
||||
{{ if .File }}
|
||||
{{ $widget := "widgets/about.html" }}
|
||||
{{ $username := (path.Base (path.Split .Path).Dir) }}{{/* Alternatively, use `index .Params.authors 0` */}}
|
||||
{{ $params := dict "root" $ "page" . "author" $username }}
|
||||
{{ partial $widget $params }}
|
||||
{{end}}
|
||||
|
||||
{{ $query := where .Pages ".IsNode" false }}
|
||||
{{ $count := len $query }}
|
||||
{{ if $count }}
|
||||
<div class="article-widget content-widget-hr">
|
||||
<h3>{{ i18n "user_profile_latest" | default "Latest" }}</h3>
|
||||
<ul>
|
||||
{{ range $query }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{- end -}}
|
@ -1,23 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
{{/* List of all authors. */}}
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="universal-wrapper">
|
||||
{{ with .Content }}
|
||||
<div class="article-style">{{ . }}</div>
|
||||
{{ end }}
|
||||
|
||||
<ul>
|
||||
{{ $paginator := .Paginate .Data.Pages }}
|
||||
{{ range $k, $v := $paginator.Pages }}
|
||||
{{ $name := $v.Title }}
|
||||
<li><a href="{{$v.Permalink}}">{{$name}}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ partial "pagination" . }}
|
||||
</div>
|
||||
|
||||
{{- end -}}
|
@ -1,3 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
{{ partial "docs_layout.html" . }}
|
||||
{{- end -}}
|
@ -1,3 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
{{ partial "docs_layout.html" . }}
|
||||
{{- end -}}
|
36
themes/academic/layouts/noticias/list.html
Normal file
36
themes/academic/layouts/noticias/list.html
Normal file
@ -0,0 +1,36 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
<h1 class='news-list-title body-width'>Notícias</h1>
|
||||
|
||||
<ul class="news-list body-width">
|
||||
{{ $paginator := .Paginate .Data.Pages }}
|
||||
{{ range $paginator.Pages }}
|
||||
<li>
|
||||
<a class='cover' href="{{ .Permalink }}">
|
||||
{{ $cover := (index (.Resources.ByType "image") 0) }}
|
||||
{{ if not $cover }}
|
||||
{{ $cover = resources.Get "images/default-news-cover.png" }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $cover }}
|
||||
<img class='news-cover' src="{{ .Permalink }}" />
|
||||
{{ end }}
|
||||
</a>
|
||||
|
||||
<div class='text'>
|
||||
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
||||
|
||||
<p class="published-date">{{ time.Format "2 de January de 2006" .PublishDate }}</p>
|
||||
|
||||
<div class="summary">
|
||||
{{ .Summary }}
|
||||
<p><a href="{{ .Permalink }}">Ler tudo</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination" . }}
|
||||
</ul>
|
||||
|
||||
{{- end -}}
|
@ -1,91 +0,0 @@
|
||||
{{/* Notify JS that this is a widget page */}}
|
||||
<span class="js-widget-page d-none"></span>
|
||||
|
||||
{{/* Get widget page */}}
|
||||
{{ $page := "" }}
|
||||
{{ $headless_bundle := "" }}
|
||||
{{ if .IsHome }}
|
||||
{{ $page = "/home/index.md" }}
|
||||
{{ $headless_bundle = site.GetPage $page }}
|
||||
{{/* Check homepage exists */}}
|
||||
{{ if not $headless_bundle }}
|
||||
{{ errorf "Homepage not found at %s!" $page }}
|
||||
{{ errorf "Add the `/home/index.md` homepage file to each language's content folder. For example, your site should have a `content/home/` folder containing `index.md` and your homepage sections, or for multi-language sites, `content/en/home/` and `content/zh/home/` etc. Refer to the 'Build Your Homepage' and 'Language' documentation at https://sourcethemes.com/academic/docs/ and the example homepage at https://github.com/gcushen/hugo-academic/tree/master/exampleSite/content/home/index.md ." }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $page = .File.Path }}
|
||||
{{ $headless_bundle = site.GetPage $page }}
|
||||
{{/* Check widget page exists. */}}
|
||||
{{ if not $headless_bundle }}
|
||||
{{ errorf "Widget Page not found at %s!" $page }}
|
||||
{{ errorf "View the Widget Page documentation at https://sourcethemes.com/academic/docs/managing-content/#create-a-widget-page ." }}
|
||||
{{ errorf "If the Hugo version is between 0.65 and 0.68, it may be a confirmed Hugo bug that is expected to be fixed in Hugo v0.69: https://github.com/gcushen/hugo-academic/issues/1595#issuecomment-605514973 ." }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Load page sections */}}
|
||||
{{ range $index, $st := where ( $headless_bundle.Resources.ByType "page" ) ".Params.active" "!=" false }}
|
||||
{{/* Begin widget styling */}}
|
||||
{{ $bg := $st.Params.design.background }}
|
||||
{{ $style := "" }}
|
||||
|
||||
{{ if $bg.color }}
|
||||
{{ $style = printf "background-color: %s;" ($bg.color | default "transparent") }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and $bg.gradient_start $bg.gradient_end }}
|
||||
{{ $style = printf "%sbackground-image: linear-gradient(%s, %s);" $style $bg.gradient_start $bg.gradient_end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $bg.image }}
|
||||
{{ $darken := "" }}
|
||||
{{ if $bg.image_darken }}
|
||||
{{ $darken = printf "linear-gradient(rgba(0, 0, 0, %s), rgba(0, 0, 0, %s))," (string $bg.image_darken) (string $bg.image_darken) }}
|
||||
{{ end }}
|
||||
{{/* See Hugo note on linking assets in styles: https://github.com/gohugoio/hugoThemes#common-permalink-issues */}}
|
||||
{{ $style = printf "%sbackground-image: %s url('%s');" $style $darken (printf "img/%s" $bg.image | absURL) }}
|
||||
{{ with $bg.image_size }}
|
||||
{{/* Allow sizes: actual, cover, and contain. */}}
|
||||
{{ $style = printf "%sbackground-size: %s;" $style (replace . "actual" "auto") }}
|
||||
{{ end }}
|
||||
{{ with $bg.image_position }}
|
||||
{{/* Allow valid CSS positions including left, center, and right. */}}
|
||||
{{ $style = printf "%sbackground-position: %s;" $style . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $st.Params.design.spacing.padding }}
|
||||
{{ $style_pad := printf "padding: %s;" (delimit . " ") }}
|
||||
{{ $style = print $style $style_pad }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $st.Params.advanced.css_style }}
|
||||
{{ $style = print $style . }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Fix Hugo's ContentBaseName returning wrong file base name when page section is within a bundle. */}}
|
||||
{{ $hash_id := replace $st.File.ContentBaseName "index" (path.Base (path.Split .Path).Dir) }}
|
||||
|
||||
{{ $widget := or $st.Params.widget "blank" }}
|
||||
{{ if eq $widget "custom" }}{{ $widget = "blank" }}{{ end }}{{/* Support legacy Custom widget */}}
|
||||
{{ if eq $widget "projects" }}{{ $widget = "portfolio" }}{{ end }}{{/* Support legacy Projects widget */}}
|
||||
|
||||
{{ $widget_path := printf "widgets/%s.html" $widget }}
|
||||
{{ $widget_args := dict "root" $ "page" $st "hash_id" $hash_id }}
|
||||
{{ $css_classes := $st.Params.advanced.css_class | default "" }}
|
||||
{{ $extra_attributes := "" }}
|
||||
{{ $use_container := true }}
|
||||
|
||||
{{/* Special case: Slider widget. */}}
|
||||
{{ if in (slice "slider") $widget }}
|
||||
{{ $css_classes = print $css_classes " carousel slide" }}
|
||||
{{ $extra_attributes = printf "data-ride=\"carousel\" data-interval=\"%s\"" (string $st.Params.interval | default "5000") }}
|
||||
{{ $use_container = false }}
|
||||
{{ end }}
|
||||
|
||||
<section id="{{$hash_id}}" class="home-section {{printf "wg-%s" (replace $widget "_" "-")}} {{if $bg.text_color_light}}dark{{end}} {{if $bg.image}} bg-image{{if ($bg.image_parallax | default true) }} parallax{{end}}{{end}} {{with $css_classes}}{{.}}{{end}}" {{with $style}}style="{{. | safeCSS}}"{{end}} {{print $extra_attributes | safeHTMLAttr}}>
|
||||
{{if $use_container}}<div class="container">{{end}}
|
||||
{{ partial $widget_path $widget_args }}
|
||||
{{if $use_container}}</div>{{end}}
|
||||
</section>
|
||||
{{ end }}
|
@ -1,109 +0,0 @@
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
|
||||
{{ $author := "" }}
|
||||
{{ if .author }}
|
||||
{{ $author = .author }}
|
||||
{{ else }}
|
||||
{{ $author = $page.Params.author }}
|
||||
{{end}}
|
||||
|
||||
{{ $person_page_path := (printf "/authors/%s" $author) }}
|
||||
{{ $person_page := site.GetPage $person_page_path }}
|
||||
{{ if not $person_page }}
|
||||
{{ errorf "Could not find an author page at `%s`. Please check the value of `author` in your About widget and create an associated author page if one does not already exist. See https://sourcethemes.com/academic/docs/page-builder/#about " $person_page_path }}
|
||||
{{end}}
|
||||
{{ $person := $person_page.Params }}
|
||||
{{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }}
|
||||
{{ $avatar_shape := site.Params.avatar.shape | default "circle" }}
|
||||
|
||||
<!-- About widget -->
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4">
|
||||
<div id="profile">
|
||||
|
||||
{{ if site.Params.avatar.gravatar }}
|
||||
<img class="avatar {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="https://s.gravatar.com/avatar/{{ md5 $person.email }}?s=270')" alt="{{$person_page.Title}}">
|
||||
{{ else if $avatar }}
|
||||
{{ $avatar_image := $avatar.Fill "270x270 Center" }}
|
||||
<img class="avatar {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="{{ $avatar_image.RelPermalink }}" alt="{{$person_page.Title}}">
|
||||
{{ end }}
|
||||
|
||||
<div class="portrait-title">
|
||||
<h2>{{ $person_page.Title }}</h2>
|
||||
{{ with $person.role }}<h3>{{ . | markdownify | emojify }}</h3>{{ end }}
|
||||
|
||||
{{ range $person.organizations }}
|
||||
<h3>
|
||||
{{ with .url }}<a href="{{ . }}" target="_blank" rel="noopener">{{ end }}
|
||||
<span>{{ .name }}</span>
|
||||
{{ if .url }}</a>{{ end }}
|
||||
</h3>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<ul class="network-icon" aria-hidden="true">
|
||||
{{ range $person.social }}
|
||||
{{ $pack := or .icon_pack "fas" }}
|
||||
{{ $pack_prefix := $pack }}
|
||||
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
|
||||
{{ $pack_prefix = "fa" }}
|
||||
{{ end }}
|
||||
{{ $link := .link }}
|
||||
{{ $scheme := (urls.Parse $link).Scheme }}
|
||||
{{ $target := "" }}
|
||||
{{ if not $scheme }}
|
||||
{{ $link = .link | relLangURL }}
|
||||
{{ else if in (slice "http" "https") $scheme }}
|
||||
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ end }}
|
||||
<li>
|
||||
<a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }}>
|
||||
<i class="{{ $pack }} {{ $pack_prefix }}-{{ .icon }} big-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
|
||||
{{/* Only display widget title in explicit instances of about widget, not in author pages. */}}
|
||||
{{ if and $page.Params.widget $page.Title }}<h1>{{ $page.Title | markdownify | emojify }}</h1>{{ end }}
|
||||
|
||||
{{ $person_page.Content }}
|
||||
|
||||
<div class="row">
|
||||
|
||||
{{ with $person.interests }}
|
||||
<div class="col-md-5">
|
||||
<h3>{{ i18n "interests" | markdownify }}</h3>
|
||||
<ul class="ul-interests">
|
||||
{{ range . }}
|
||||
<li>{{ . | markdownify | emojify }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with $person.education }}
|
||||
<div class="col-md-7">
|
||||
<h3>{{ i18n "education" | markdownify }}</h3>
|
||||
<ul class="ul-edu fa-ul">
|
||||
{{ range .courses }}
|
||||
<li>
|
||||
<i class="fa-li fas fa-graduation-cap"></i>
|
||||
<div class="description">
|
||||
<p class="course">{{ .course }}{{ with .year }}, {{ . }}{{ end }}</p>
|
||||
<p class="institution">{{ .institution }}</p>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,48 +0,0 @@
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
|
||||
<!-- Accomplishments widget -->
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4 section-heading">
|
||||
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
|
||||
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
{{ with $page.Content }}{{ . }}{{ end }}
|
||||
|
||||
{{ if $page.Params.item }}
|
||||
{{ range $idx, $key := sort $page.Params.item ".date_start" "desc" }}
|
||||
<div class="card experience course">
|
||||
<div class="card-body">
|
||||
{{- with .url -}}<a href="{{.}}" target="_blank" rel="noopener">{{- end -}}
|
||||
<h4 class="card-title exp-title text-muted my-0">{{.title | markdownify | emojify}}</h4>
|
||||
{{- with .url -}}</a>{{- end -}}
|
||||
|
||||
<div class="card-subtitle my-0 article-metadata">
|
||||
{{- with .organization_url}}<a href="{{.}}" target="_blank" rel="noopener">{{end -}}
|
||||
{{- .organization | markdownify | emojify -}}
|
||||
{{- with .organization_url}}</a>{{end -}}
|
||||
|
||||
<span class="middot-divider"></span>
|
||||
|
||||
{{ (time .date_start).Format ($page.Params.date_format | default "Jan 2006") }}
|
||||
{{ if .date_end}}
|
||||
– {{ (time .date_end).Format ($page.Params.date_format | default "Jan 2006") }}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{with .description}}
|
||||
<div class="card-text">{{. | markdownify | emojify}}</div>
|
||||
{{end}}
|
||||
|
||||
{{ with .certificate_url }}
|
||||
<a class="card-link" href="{{.}}" target="_blank" rel="noopener">
|
||||
{{ i18n "see_certificate" | default "See certificate" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
@ -1,20 +0,0 @@
|
||||
{{ $st := .page }}
|
||||
{{ $columns := $st.Params.design.columns | default "2" }}
|
||||
|
||||
<div class="row">
|
||||
{{ if ne $columns "1" }}
|
||||
<div class="col-12 col-lg-4 section-heading">
|
||||
{{ with $st.Title }}<h1>{{ . | markdownify | emojify }}</h1>{{ end }}
|
||||
{{ with $st.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
{{ $st.Content }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="col-lg-12">
|
||||
{{ with $st.Title }}<h1>{{ . | markdownify | emojify }}</h1>{{ end }}
|
||||
{{ with $st.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
{{ $st.Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
@ -1,138 +0,0 @@
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
{{ $autolink := default true $page.Params.autolink }}
|
||||
{{ $data := site.Params }}
|
||||
|
||||
<!-- Contact widget -->
|
||||
<div class="row contact-widget">
|
||||
<div class="col-12 col-lg-4 section-heading">
|
||||
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
|
||||
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
{{ with $page.Content }}{{ . }}{{ end }}
|
||||
|
||||
{{ if $page.Params.email_form }}
|
||||
|
||||
{{ $post_action := "" }}
|
||||
{{ if eq $page.Params.email_form 1 }}
|
||||
{{ $post_action = "netlify" }}
|
||||
{{ else }}
|
||||
{{ if not $data.email }}
|
||||
{{ errorf "Please set an email address for the contact form using the `email` parameter in `params.toml`. Otherwise, set `email_form = 0` to disable the contact form." }}
|
||||
{{ end }}
|
||||
{{ $post_action = printf "action=\"https://formspree.io/%s\"" $data.email }}
|
||||
{{end}}
|
||||
|
||||
<div class="mb-3">
|
||||
<form name="contact" method="POST" {{ $post_action | safeHTMLAttr }}>
|
||||
<div class="form-group form-inline">
|
||||
<label class="sr-only" for="inputName">{{ i18n "contact_name" }}</label>
|
||||
<input type="text" name="name" class="form-control w-100" id="inputName" placeholder="{{ i18n "contact_name" | default "Name" }}" required>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="sr-only" for="inputEmail">{{ i18n "contact_email" }}</label>
|
||||
<input type="email" name="email" class="form-control w-100" id="inputEmail" placeholder="{{ i18n "contact_email" | default "Email" }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="inputMessage">{{ i18n "contact_message" }}</label>
|
||||
<textarea name="message" class="form-control" id="inputMessage" rows="5" placeholder="{{ i18n "contact_message" | default "Message" }}" required></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-outline-primary px-3 py-2">{{ i18n "contact_send" | default "Send" }}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<ul class="fa-ul">
|
||||
|
||||
{{ if and $data.email (not $page.Params.email_form) }}
|
||||
<li>
|
||||
<i class="fa-li fas fa-envelope fa-2x" aria-hidden="true"></i>
|
||||
<span id="person-email">
|
||||
{{- if $autolink }}<a href="mailto:{{ $data.email }}">{{ $data.email }}</a>{{ else }}{{ $data.email }}{{ end -}}
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with $data.phone }}
|
||||
<li>
|
||||
<i class="fa-li fas fa-phone fa-2x" aria-hidden="true"></i>
|
||||
<span id="person-telephone">
|
||||
{{- if $autolink }}<a href="tel:{{ . }}">{{ . }}</a>{{ else }}{{ . }}{{ end -}}
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ $addr_formatted := "" }}{{/* Scoping for maps. */}}
|
||||
{{ if $data.address.street | or $data.address.city | or $data.address.region | or $data.address.postcode | or $data.address.country }}
|
||||
{{ $addr_formatted = partial "functions/get_address" (dict "root" . "address" $data.address) }}
|
||||
<li>
|
||||
<i class="fa-li fas fa-map-marker fa-2x" aria-hidden="true"></i>
|
||||
<span id="person-address">{{$addr_formatted}}</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with $data.directions }}
|
||||
<li>
|
||||
<i class="fa-li fas fa-compass fa-2x" aria-hidden="true"></i>
|
||||
<span>{{ . | markdownify | emojify }}</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with $data.office_hours }}
|
||||
<li>
|
||||
<i class="fa-li fas fa-clock fa-2x" aria-hidden="true"></i>
|
||||
<span>
|
||||
{{- if not (reflect.IsSlice .)}}{{/* Support legacy string format. */}}
|
||||
{{- . | markdownify | emojify -}}
|
||||
{{else}}
|
||||
{{- delimit . "<br>" | markdownify | emojify -}}
|
||||
{{end -}}
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with $data.appointment_url }}
|
||||
<li>
|
||||
<i class="fa-li fas fa-calendar-check fa-2x" aria-hidden="true"></i>
|
||||
<a href="{{ . }}" target="_blank" rel="noopener">{{ i18n "book_appointment" | default "Book an appointment" }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{/* Contact links. */}}
|
||||
{{ range $data.contact_links }}
|
||||
{{ $pack := or .icon_pack "fas" }}
|
||||
{{ $pack_prefix := $pack }}
|
||||
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
|
||||
{{ $pack_prefix = "fa" }}
|
||||
{{ end }}
|
||||
{{ $link := .link }}
|
||||
{{ $scheme := (urls.Parse $link).Scheme }}
|
||||
{{ $target := "" }}
|
||||
{{ if not $scheme }}
|
||||
{{ $link = .link | relLangURL }}
|
||||
{{ else if in (slice "http" "https") $scheme }}
|
||||
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ end }}
|
||||
<li>
|
||||
<i class="fa-li {{ $pack }} {{ $pack_prefix }}-{{ .icon }} fa-2x" aria-hidden="true"></i>
|
||||
<a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }}>{{.name|markdownify|emojify|safeHTML}}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
</ul>
|
||||
|
||||
{{ if and site.Params.map.engine $data.coordinates.latitude }}
|
||||
<div class="d-none">
|
||||
<input id="map-provider" value="{{ site.Params.map.engine }}">
|
||||
<input id="map-lat" value="{{ $data.coordinates.latitude }}">
|
||||
<input id="map-lng" value="{{ $data.coordinates.longitude }}">
|
||||
<input id="map-dir" value="{{ $addr_formatted }}">
|
||||
<input id="map-zoom" value="{{ site.Params.map.zoom | default "15" }}">
|
||||
<input id="map-api-key" value="{{ site.Params.map.api_key }}">
|
||||
</div>
|
||||
<div id="map"></div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1,59 +0,0 @@
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
|
||||
<!-- Experience widget -->
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4 section-heading">
|
||||
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
|
||||
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
{{ with $page.Content }}{{ . }}{{ end }}
|
||||
|
||||
{{ if $page.Params.experience }}
|
||||
{{ $exp_len := len $page.Params.experience }}
|
||||
{{ range $idx, $key := sort $page.Params.experience ".date_start" "asc" }}
|
||||
<div class="row experience">
|
||||
<!-- Timeline -->
|
||||
<div class="col-auto text-center flex-column d-none d-sm-flex">
|
||||
<div class="row h-50">
|
||||
<div class="col {{if gt $idx 0}}border-right{{end}}"> </div>
|
||||
<div class="col"> </div>
|
||||
</div>
|
||||
<div class="m-2">
|
||||
<span class="badge badge-pill border {{if not .date_end}}exp-fill{{end}}"> </span>
|
||||
</div>
|
||||
<div class="row h-50">
|
||||
<div class="col {{if lt $idx (sub $exp_len 1)}}border-right{{end}}"> </div>
|
||||
<div class="col"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Content -->
|
||||
<div class="col py-2">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title exp-title text-muted mt-0 mb-1">{{.title | markdownify | emojify}}</h4>
|
||||
<h4 class="card-title exp-company text-muted my-0">
|
||||
{{- with .company_url}}<a href="{{.}}" target="_blank" rel="noopener">{{end}}{{.company | markdownify | emojify}}{{with .company_url}}</a>{{end -}}
|
||||
</h4>
|
||||
<div class="text-muted exp-meta">
|
||||
{{ (time .date_start).Format ($page.Params.date_format | default "January 2006") }} –
|
||||
{{ if .date_end}}
|
||||
{{ (time .date_end).Format ($page.Params.date_format | default "January 2006") }}
|
||||
{{else}}
|
||||
{{ i18n "present" | default "Present" }}
|
||||
{{end}}
|
||||
{{with .location}}
|
||||
<span class="middot-divider"></span>
|
||||
<span>{{.}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
{{with .description}}<div class="card-text">{{. | markdownify | emojify}}</div>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
@ -1,82 +0,0 @@
|
||||
{{/* Featured Content Widget */}}
|
||||
|
||||
{{/* Initialise */}}
|
||||
{{ $ := .root }}
|
||||
{{ $st := .page }}
|
||||
{{ $items_type := $st.Params.content.page_type | default "post" }}
|
||||
{{ $items_count := $st.Params.content.count | default 65535 }}
|
||||
{{ $items_sort := $st.Params.content.order| default "desc" }}
|
||||
|
||||
{{/* Query */}}
|
||||
{{ $query := where (where site.RegularPages "Type" $items_type) "Params.featured" true }}
|
||||
{{ $archive_page := site.GetPage "Section" $items_type }}
|
||||
|
||||
{{/* Filters */}}
|
||||
{{ if $st.Params.content.filters.tag }}
|
||||
{{ $archive_page := site.GetPage (printf "tags/%s" (urlize $st.Params.content.filters.tag)) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.category }}
|
||||
{{ $archive_page := site.GetPage (printf "categories/%s" (urlize $st.Params.content.filters.category)) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.publication_type }}
|
||||
{{ $archive_page := site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.author }}
|
||||
{{ $archive_page = site.GetPage (printf "authors/%s" (urlize $st.Params.content.filters.author)) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Sort */}}
|
||||
{{ $sort_by := "Date" }}
|
||||
{{ $query = sort $query $sort_by $items_sort }}
|
||||
|
||||
{{/* Limit */}}
|
||||
{{ $query = first $items_count $query }}
|
||||
|
||||
{{/* Localisation */}}
|
||||
{{ $i18n := "" }}
|
||||
{{ if eq $items_type "post" }}
|
||||
{{ $i18n = "more_posts" }}
|
||||
{{ else if eq $items_type "talk" }}
|
||||
{{ $i18n = "more_talks" }}
|
||||
{{ else if eq $items_type "publication" }}
|
||||
{{ $i18n = "more_publications" }}
|
||||
{{ else }}
|
||||
{{ $i18n = "more_pages" }}
|
||||
{{ end }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4 section-heading">
|
||||
<h1>{{ with $st.Title }}{{ . | markdownify | emojify }}{{ end }}</h1>
|
||||
{{ with $st.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
|
||||
{{ with $st.Content }}{{ . }}{{ end }}
|
||||
|
||||
{{ range $post := $query }}
|
||||
{{ if eq $st.Params.design.view 1 }}
|
||||
{{ partial "li_list" . }}
|
||||
{{ else if eq $st.Params.design.view 3 }}
|
||||
{{ partial "li_card" . }}
|
||||
{{ else if eq $st.Params.design.view 4 | and (eq $items_type "publication") }}
|
||||
{{ partial "li_citation" . }}
|
||||
{{ else }}
|
||||
{{ partial "li_compact" . }}
|
||||
{{ end }}
|
||||
{{end}}
|
||||
|
||||
{{ if $st.Params.content.link_to_archive }}
|
||||
<div class="see-all">
|
||||
<a href="{{ $archive_page.RelPermalink }}">
|
||||
{{ i18n $i18n | default "See all" }}
|
||||
<i class="fas fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1,41 +0,0 @@
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
|
||||
<div class="row featurette">
|
||||
{{ with $page.Title }}
|
||||
<div class="col-md-12 section-heading">
|
||||
<h1>{{ . | markdownify | emojify }}</h1>
|
||||
{{ if $page.Params.subtitle }}<p>{{ $page.Params.subtitle | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Content }}
|
||||
<div class="col-md-12">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ range $page.Params.feature }}
|
||||
{{ $pack := or .icon_pack "fas" }}
|
||||
{{ $pack_prefix := $pack }}
|
||||
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
|
||||
{{ $pack_prefix = "fa" }}
|
||||
{{ end }}
|
||||
<div class="col-12 col-sm-4">
|
||||
{{ with .icon }}
|
||||
<div class="featurette-icon">
|
||||
{{- if eq $pack "emoji" -}}
|
||||
{{- . | emojify -}}
|
||||
{{- else if eq $pack "custom" -}}
|
||||
{{- $svg_icon := resources.Get (printf "images/icon-pack/%s.svg" .) -}}
|
||||
{{- if $svg_icon -}}<img src="{{ $svg_icon.RelPermalink }}" alt="{{.}}" class="svg-icon svg-baseline">{{- end -}}
|
||||
{{- else -}}
|
||||
<i class="{{ $pack }} {{ $pack_prefix }}-{{ . }}"></i>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
<h3>{{ .name | markdownify | emojify }}</h3>
|
||||
{{ with .description }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
@ -1,67 +0,0 @@
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
{{ $bg := $page.Params.design.background }}
|
||||
|
||||
{{ if $page.Params.hero_media }}
|
||||
<div class="row">
|
||||
<div class="col-md-6 order-md-1 text-center text-md-left">
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Content }}
|
||||
<div class="hero-lead">{{ . }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Call-to-action link */}}
|
||||
{{ if $page.Params.cta.url }}
|
||||
{{ $pack := or $page.Params.cta.icon_pack "fas" }}
|
||||
{{ $pack_prefix := $pack }}
|
||||
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
|
||||
{{ $pack_prefix = "fa" }}
|
||||
{{ end }}
|
||||
{{ $link := $page.Params.cta.url }}
|
||||
{{ $scheme := (urls.Parse $link).Scheme }}
|
||||
{{ $target := "" }}
|
||||
{{ if not $scheme }}
|
||||
{{ $link = $link | relLangURL }}
|
||||
{{ else if in (slice "http" "https") $scheme }}
|
||||
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ end }}
|
||||
<p class="cta-btns">
|
||||
<a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }} class="btn {{if $bg.text_color_light}}btn-light{{else}}btn-primary{{end}} btn-lg">{{ if $page.Params.cta.icon }}<i class="{{ $pack }} {{ $pack_prefix }}-{{ $page.Params.cta.icon }} pr-1" aria-hidden="true"></i>{{end}}{{ $page.Params.cta.label | markdownify | emojify | safeHTML }}</a>
|
||||
|
||||
{{/* Alternative Call-to-action link */}}
|
||||
{{ if $page.Params.cta_alt.url }}
|
||||
{{ $link := $page.Params.cta_alt.url }}
|
||||
{{ $scheme := (urls.Parse $link).Scheme }}
|
||||
{{ $target := "" }}
|
||||
{{ if not $scheme }}
|
||||
{{ $link = $link | relLangURL }}
|
||||
{{ else if in (slice "http" "https") $scheme }}
|
||||
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ end }}
|
||||
<a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }} class="hero-cta-alt pl-4">{{ $page.Params.cta_alt.label | markdownify | emojify | safeHTML }} <i class="fas fa-angle-right"></i></a>
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{/* Call-to-action note */}}
|
||||
{{ with $page.Params.cta_note }}
|
||||
<p class="hero-note text-muted mb-0">
|
||||
{{ .label | markdownify | emojify | safeHTML }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{/* Hero image */}}
|
||||
{{ if $page.Params.hero_media }}
|
||||
</div>
|
||||
<div class="col-6 mx-auto col-md-6 order-md-2 hero-media text-left">
|
||||
<p style="background-color: rgba(0,0,0, .3); padding: 20px">
|
||||
A “ANSOL - Associação Nacional para o Software Livre” é uma associação
|
||||
portuguesa sem fins lucrativos que tem como fim a divulgação, promoção,
|
||||
desenvolvimento, investigação e estudo da Informática Livre e das suas
|
||||
repercussões sociais, políticas, filosóficas, culturais, técnicas e
|
||||
científicas.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -1,103 +0,0 @@
|
||||
{{/* Pages Widget */}}
|
||||
|
||||
{{/* Initialise */}}
|
||||
{{ $ := .root }}
|
||||
{{ $st := .page }}
|
||||
{{ $items_type := $st.Params.content.page_type | default "post" }}
|
||||
{{ $items_offset := $st.Params.content.offset | default 0 }}
|
||||
{{ $items_count := $st.Params.content.count }}
|
||||
{{ if eq $items_count 0 }}
|
||||
{{ $items_count = 65535 }}
|
||||
{{ else }}
|
||||
{{ $items_count = $items_count | default 5 }}
|
||||
{{ end }}
|
||||
{{ $items_sort := $st.Params.content.order | default "desc" }}
|
||||
|
||||
{{/* Query */}}
|
||||
{{ $query := where site.RegularPages "Type" $items_type }}
|
||||
{{ $archive_page := site.GetPage "Section" $items_type }}
|
||||
|
||||
{{/* Filters */}}
|
||||
{{ if $st.Params.content.filters.tag }}
|
||||
{{ $archive_page = site.GetPage (printf "tags/%s" (urlize $st.Params.content.filters.tag)) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.category }}
|
||||
{{ $archive_page = site.GetPage (printf "categories/%s" (urlize $st.Params.content.filters.category)) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.publication_type }}
|
||||
{{ $archive_page = site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.author }}
|
||||
{{ $archive_page = site.GetPage (printf "authors/%s" (urlize $st.Params.content.filters.author)) }}
|
||||
{{ $query = $query | intersect $archive_page.Pages }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.exclude_featured }}
|
||||
{{ $query = where $query "Params.featured" "!=" true }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.exclude_past }}
|
||||
{{ $query = where $query "Date" ">=" now }}
|
||||
{{ end }}
|
||||
{{ if $st.Params.content.filters.exclude_future }}
|
||||
{{ $query = where $query "Date" "<" now }}
|
||||
{{ end }}
|
||||
|
||||
{{ $count := len $query }}
|
||||
|
||||
{{/* Sort */}}
|
||||
{{ $sort_by := "Date" }}
|
||||
{{ $query = sort $query $sort_by $items_sort }}
|
||||
|
||||
{{/* Offset and Limit */}}
|
||||
{{ if gt $items_offset 0 }}
|
||||
{{ $query = first $items_count (after $items_offset $query) }}
|
||||
{{ else }}
|
||||
{{ $query = first $items_count $query }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Localisation */}}
|
||||
{{ $i18n := "" }}
|
||||
{{ if eq $items_type "post" }}
|
||||
{{ $i18n = "more_posts" }}
|
||||
{{ else if eq $items_type "talk" }}
|
||||
{{ $i18n = "more_talks" }}
|
||||
{{ else if eq $items_type "publication" }}
|
||||
{{ $i18n = "more_publications" }}
|
||||
{{ else }}
|
||||
{{ $i18n = "more_pages" }}
|
||||
{{ end }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4 section-heading">
|
||||
<h1>{{ with $st.Title }}{{ . | markdownify | emojify }}{{ end }}</h1>
|
||||
{{ with $st.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
|
||||
{{ with $st.Content }}{{ . }}{{ end }}
|
||||
|
||||
{{ range $post := $query }}
|
||||
{{ if eq $st.Params.design.view 1 }}
|
||||
{{ partial "li_list" . }}
|
||||
{{ else if eq $st.Params.design.view 3 }}
|
||||
{{ partial "li_card" . }}
|
||||
{{ else if eq $st.Params.design.view 4 | and (eq $items_type "publication") }}
|
||||
{{ partial "li_citation" . }}
|
||||
{{ else }}
|
||||
{{ partial "li_compact" . }}
|
||||
{{ end }}
|
||||
{{end}}
|
||||
|
||||
{{ if gt $count $items_count }}
|
||||
<div class="see-all">
|
||||
<a href="{{ $archive_page.RelPermalink }}">
|
||||
{{ i18n $i18n | default "See all" }}
|
||||
<i class="fas fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1,61 +0,0 @@
|
||||
{{/* People Widget */}}
|
||||
|
||||
{{/* Initialise */}}
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
{{ $show_social := $page.Params.design.show_social | default false }}
|
||||
{{ $show_interests := $page.Params.design.show_interests | default true }}
|
||||
|
||||
<div class="row justify-content-center people-widget">
|
||||
{{ with $page.Title }}
|
||||
<div class="col-md-12 section-heading">
|
||||
<h1>{{ . | markdownify | emojify }}</h1>
|
||||
{{ if $page.Params.subtitle }}<p>{{ $page.Params.subtitle | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Content }}
|
||||
<div class="col-md-12">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ range $page.Params.content.user_groups }}
|
||||
{{ $query := where (where site.Pages "Section" "authors") ".Params.user_groups" "intersect" (slice .) }}
|
||||
|
||||
{{if $query}}
|
||||
<div class="col-md-12">
|
||||
<h2 class="mb-4">{{ . | markdownify }}</h2>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{ range $query }}
|
||||
{{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }}
|
||||
{{/* Get link to user's profile page. */}}
|
||||
{{ $link := "" }}
|
||||
{{ with site.GetPage (printf "/authors/%s" (path.Base (path.Split .Path).Dir)) }}
|
||||
{{ $link = .RelPermalink }}
|
||||
{{ end }}
|
||||
<div class="col-12 col-sm-auto people-person">
|
||||
{{ $src := "" }}
|
||||
{{ if site.Params.avatar.gravatar }}
|
||||
{{ $src = printf "https://s.gravatar.com/avatar/%s?s=150" (md5 .Params.email) }}
|
||||
{{ else if $avatar }}
|
||||
{{ $avatar_image := $avatar.Fill "270x270 Center" }}
|
||||
{{ $src = $avatar_image.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ if $src }}
|
||||
{{ $avatar_shape := site.Params.avatar.shape | default "circle" }}
|
||||
{{with $link}}<a href="{{.}}">{{end}}<img class="avatar {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="{{ $src }}" alt="Avatar">{{if $link}}</a>{{end}}
|
||||
{{ end }}
|
||||
|
||||
<div class="portrait-title">
|
||||
<h2>{{with $link}}<a href="{{.}}">{{end}}{{ .Title }}{{if $link}}</a>{{end}}</h2>
|
||||
{{ with .Params.role }}<h3>{{ . | markdownify | emojify }}</h3>{{ end }}
|
||||
{{ if $show_social }}{{ partial "social_links" . }}{{ end }}
|
||||
{{ if and $show_interests .Params.interests }}<p class="people-interests">{{ delimit .Params.interests ", " | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
@ -1,93 +0,0 @@
|
||||
{{/* Portfolio Widget */}}
|
||||
|
||||
{{/* Initialise */}}
|
||||
{{ $ := .root }}
|
||||
{{ $st := .page }}
|
||||
{{ $items_type := $st.Params.content.page_type | default "project" }}
|
||||
{{ $columns := $st.Params.design.columns | default "2" }}
|
||||
|
||||
{{ if ne $columns "1" }}
|
||||
{{/* Standard dual-column layout. */}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4 section-heading">
|
||||
|
||||
{{ with $st.Title }}<h1>{{ . | markdownify | emojify }}</h1>{{ end }}
|
||||
{{ with $st.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
|
||||
{{ else }}
|
||||
{{/* Single column layout. */}}
|
||||
|
||||
<div class="margin-auto">
|
||||
|
||||
<div class="center-text">
|
||||
{{ with $st.Title }}<h1 class="mt-0">{{ . | markdownify | emojify }}</h1>{{ end }}
|
||||
{{ with $st.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
<div>
|
||||
{{ end }}
|
||||
|
||||
{{ with $st.Content }}{{ . }}{{ end }}
|
||||
|
||||
{{ if $st.Params.content.filter_button }}
|
||||
|
||||
{{ $filter_default := default (int $st.Params.content.filter_default) 0 }}
|
||||
|
||||
{{/* Parse default filter tag from front matter in the form of either tag name or CSS class name. */}}
|
||||
{{ $default_filter_tag_raw := (index $st.Params.content.filter_button ($filter_default)).tag }}
|
||||
{{ $default_filter_tag := printf ".js-id-%s" (replace $default_filter_tag_raw " " "-") }}
|
||||
{{ if or (eq (substr $default_filter_tag_raw 0 1) "*") (eq (substr $default_filter_tag_raw 0 1) ".") }}
|
||||
{{ $default_filter_tag = $default_filter_tag_raw }}
|
||||
{{ end }}
|
||||
|
||||
<span class="d-none default-project-filter">{{ $default_filter_tag }}</span>
|
||||
|
||||
{{/* Only show filter buttons if there are multiple filters. */}}
|
||||
{{ if gt (len $st.Params.content.filter_button) 1 }}
|
||||
<div class="project-toolbar">
|
||||
<div class="project-filters">
|
||||
<div class="btn-toolbar">
|
||||
<div class="btn-group flex-wrap">
|
||||
{{ range $idx, $item := $st.Params.content.filter_button }}
|
||||
{{/* Parse filter tag from front matter in the form of either tag name or CSS class name. */}}
|
||||
{{ $data_filter := printf ".js-id-%s" (replace .tag " " "-") }}
|
||||
{{ if or (eq (substr .tag 0 1) "*") (eq (substr .tag 0 1) ".") }}
|
||||
{{ $data_filter = .tag }}
|
||||
{{ end }}
|
||||
<a href="#" data-filter="{{ $data_filter | safeHTMLAttr }}" class="btn btn-primary btn-lg{{ if eq $idx $filter_default }} active{{ end }}">{{ .name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="{{ if or $st.Params.content.filter_button (eq $st.Params.design.view 3) }}isotope projects-container{{end}} {{if eq $st.Params.design.view 3}}js-layout-masonry{{else}}row js-layout-row{{end}} {{ if eq $st.Params.design.view 5 }}project-showcase mt-5{{end}}">
|
||||
{{ range $idx, $item := where site.RegularPages "Type" $items_type }}
|
||||
|
||||
{{ $link := $item.RelPermalink }}
|
||||
{{ $target := "" }}
|
||||
{{ if $item.Params.external_link }}
|
||||
{{ $link = $item.Params.external_link }}
|
||||
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $st.Params.design.view 1 }}
|
||||
{{ partial "portfolio_li_list" (dict "item" $item) }}
|
||||
{{ else if eq $st.Params.design.view 2 }}
|
||||
{{ partial "portfolio_li_compact" (dict "item" $item) }}
|
||||
{{ else if eq $st.Params.design.view 3 }}
|
||||
{{ partial "portfolio_li_card" (dict "widget" $st "index" $idx "item" $item "link" $link "target" $target) }}
|
||||
{{ else }}
|
||||
{{ partial "portfolio_li_showcase" (dict "widget" $st "index" $idx "item" $item "link" $link "target" $target) }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1,62 +0,0 @@
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
{{ $hash_id := .hash_id }}
|
||||
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators">
|
||||
{{ range $index, $item := $page.Params.item }}
|
||||
<li data-target="#{{$hash_id}}" data-slide-to="{{$index}}" {{if eq $index 0}}class="active"{{end}}></li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
|
||||
<!-- Carousel slides wrapper -->
|
||||
<div class="carousel-inner">
|
||||
{{ range $index, $item := $page.Params.item }}
|
||||
<div class="wg-hero dark carousel-item{{if eq $index 0}} active{{end}}" style="{{with $page.Params.height}}{{printf "height: %s;" . | safeCSS}}{{end}}
|
||||
{{ if $item.overlay_color }}
|
||||
background-color: {{ $item.overlay_color | default "transparent" }};
|
||||
{{ end }}
|
||||
{{ if $item.overlay_img }}
|
||||
background-image:
|
||||
{{ if $item.overlay_filter }}linear-gradient(rgba(0, 0, 0, {{ $item.overlay_filter }}), rgba(0, 0, 0, {{ $item.overlay_filter }})), {{ end }}
|
||||
url('{{ printf "img/%s" $item.overlay_img | absURL }}');
|
||||
{{ end }}
|
||||
;">
|
||||
<div class="container" style="text-align: {{$item.align | default "left"}};">
|
||||
<h1 class="hero-title">
|
||||
{{ with $item.title }}{{ . | markdownify | emojify }}{{ end }}
|
||||
</h1>
|
||||
|
||||
{{ with $item.content }}
|
||||
<p class="hero-lead" style="{{if eq $item.align "center"}}margin: 0 auto 0 auto;{{else if eq $item.align "right"}}margin-left: auto; margin-right: 0{{end}}">
|
||||
{{ . | markdownify | emojify }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if $item.cta_url }}
|
||||
{{ $pack := or .cta_icon_pack "fas" }}
|
||||
{{ $pack_prefix := $pack }}
|
||||
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
|
||||
{{ $pack_prefix = "fa" }}
|
||||
{{ end }}
|
||||
<p>
|
||||
<a href="{{ $item.cta_url }}" class="btn btn-light btn-lg">
|
||||
{{- with $item.cta_icon -}}<i class="{{ $pack }} {{ $pack_prefix }}-{{ . }}" style="padding-right: 10px;"></i>{{- end -}}
|
||||
{{- $item.cta_label | emojify | safeHTML -}}
|
||||
</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Left and right controls -->
|
||||
<a class="carousel-control-prev" href="#{{$hash_id}}" data-slide="prev">
|
||||
<span class="carousel-control-prev-icon"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#{{$hash_id}}" data-slide="next">
|
||||
<span class="carousel-control-next-icon"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
@ -1,49 +0,0 @@
|
||||
{{/* Pages Widget */}}
|
||||
|
||||
{{/* Initialise */}}
|
||||
{{ $ := .root }}
|
||||
{{ $st := .page }}
|
||||
{{ $taxonomy := $st.Params.content.taxonomy | default "tags" }}
|
||||
{{ $fontSmall := $st.Params.design.font_size_min | default 0.8 }}
|
||||
{{ $fontBig := $st.Params.design.font_size_max | default 2.5 }}
|
||||
|
||||
{{ $items_count := $st.Params.content.count }}
|
||||
{{ if eq $items_count 0 }}
|
||||
{{ $items_count = 65535 }}
|
||||
{{ else }}
|
||||
{{ $items_count = $items_count | default 20 }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Query */}}
|
||||
{{ $tags := first $items_count (index site.Taxonomies $taxonomy).ByCount }}
|
||||
{{ $count := len $tags }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4 section-heading">
|
||||
<h1>{{ with $st.Title }}{{ . | markdownify | emojify }}{{ end }}</h1>
|
||||
{{ with $st.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
{{ with $st.Content }}{{ . }}{{ end }}
|
||||
|
||||
{{ if ne $count 0 }}
|
||||
|
||||
{{ $fontDelta := sub $fontBig $fontSmall }}
|
||||
{{/* Warning: Hugo's `Reverse` function appears to operate in-place, hence the order of performing $max/$min matters. */}}
|
||||
{{ $max := add (len (index $tags 0).Pages) 1 }}
|
||||
{{ $min := len (index ($tags).Reverse 0).Pages }}
|
||||
{{ $delta := sub $max $min }}
|
||||
{{ $fontStep := div $fontDelta $delta }}
|
||||
|
||||
<div class="tag-cloud">
|
||||
{{ range $name, $term := (sort $tags ".Page.Title" "asc") }}
|
||||
{{ $tagCount := len $term.Pages }}
|
||||
{{ $weight := div (sub (math.Log $tagCount) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
|
||||
{{ $fontSize := add $fontSmall (mul (sub $fontBig $fontSmall) $weight) }}
|
||||
<a href="{{ .Page.RelPermalink }}" style="font-size:{{ $fontSize }}rem">{{ .Page.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1,68 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
<article class="article article-project">
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="article-container">
|
||||
|
||||
<div class="article-style">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{ partial "page_footer" . }}
|
||||
|
||||
<div class="project-related-pages content-widget-hr">
|
||||
{{ $page := . }}
|
||||
{{ $project := .File.ContentBaseName }}
|
||||
|
||||
{{ $items := where (where site.RegularPages "Type" "post") ".Params.projects" "intersect" (slice $project) }}
|
||||
{{ $count := len $items }}
|
||||
{{ if ge $count 1 }}
|
||||
<h2>{{ (i18n "posts") }}</h2>
|
||||
{{ range $items }}
|
||||
{{ if eq site.Params.projects.post_view 1 }}
|
||||
{{ partial "li_list" . }}
|
||||
{{ else if eq site.Params.projects.post_view 3 }}
|
||||
{{ partial "li_card" . }}
|
||||
{{ else }}
|
||||
{{ partial "li_compact" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $items := where (where site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }}
|
||||
{{ $pubs_len := len $items }}
|
||||
{{ if ge $pubs_len 1 }}
|
||||
<h2>{{ (i18n "publications") }}</h2>
|
||||
{{ range $items }}
|
||||
{{ if eq site.Params.projects.publication_view 1 }}
|
||||
{{ partial "li_list" . }}
|
||||
{{ else if eq site.Params.projects.publication_view 3 }}
|
||||
{{ partial "li_card" . }}
|
||||
{{ else if eq site.Params.projects.publication_view 4 }}
|
||||
{{ partial "li_citation" . }}
|
||||
{{ else }}
|
||||
{{ partial "li_compact" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $items := where (where site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
|
||||
{{ $talks_len := len $items }}
|
||||
{{ if ge $talks_len 1 }}
|
||||
<h2>{{ (i18n "talks") }}</h2>
|
||||
{{ range $items }}
|
||||
{{ if eq site.Params.projects.talk_view 1 }}
|
||||
{{ partial "li_list" . }}
|
||||
{{ else if eq site.Params.projects.talk_view 3 }}
|
||||
{{ partial "li_card" . }}
|
||||
{{ else }}
|
||||
{{ partial "li_compact" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{{- end -}}
|
@ -1,57 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
<div class="pub">
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="article-container">
|
||||
|
||||
{{ if .Params.abstract }}
|
||||
<h3>{{ i18n "abstract" }}</h3>
|
||||
<p class="pub-abstract">{{ .Params.abstract | markdownify }}</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.publication_types) (ne (index .Params.publication_types 0) "0") }}
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-3 pub-row-heading">{{ i18n "publication_type" }}</div>
|
||||
<div class="col-12 col-md-9">
|
||||
{{ $pub_types := partial "functions/get_pub_types" $ }}
|
||||
{{ range $index, $pubtype := .Params.publication_types }}
|
||||
<a href="{{ (site.GetPage "section" "publication").RelPermalink }}#{{ . | urlize }}">
|
||||
{{ index $pub_types (int .) }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
</div>
|
||||
<div class="d-md-none space-below"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.publication }}
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-3 pub-row-heading">{{ i18n "publication" }}</div>
|
||||
<div class="col-12 col-md-9">{{ .Params.publication | markdownify }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
</div>
|
||||
<div class="d-md-none space-below"></div>
|
||||
{{ end }}
|
||||
|
||||
<div class="space-below"></div>
|
||||
|
||||
<div class="article-style">{{ .Content }}</div>
|
||||
|
||||
{{ partial "page_footer" . }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
@ -1,18 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="universal-wrapper">
|
||||
{{ with .Content }}
|
||||
<div class="article-style">{{ . }}</div>
|
||||
{{ end }}
|
||||
<ul class="list-unstyled">
|
||||
{{ if gt (len .Sections) 0}}
|
||||
{{ range .Sections }}
|
||||
<li><h5><a href="{{.RelPermalink}}">{{.LinkTitle}}</a></h5> {{with .Params.summary}}<p>{{. | plainify | emojify}}</p>{{end}}</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{- end -}}
|
@ -1,26 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="universal-wrapper">
|
||||
|
||||
{{ with .Content }}
|
||||
<div class="article-style">{{ . }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ $paginator := .Paginate .Data.Pages }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ if eq $.Params.view 1 }}
|
||||
{{ partial "li_list" . }}
|
||||
{{ else if eq $.Params.view 3 }}
|
||||
{{ partial "li_card" . }}
|
||||
{{ else }}
|
||||
{{ partial "li_compact" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination" . }}
|
||||
|
||||
</div>
|
||||
|
||||
{{- end -}}
|
@ -1,78 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="universal-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
{{ with .Content }}
|
||||
<div class="article-style">{{ . }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Array of distinct years. */}}
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
{{ $year := print (.Date.Format "2006") }}
|
||||
{{ $.Scratch.SetInMap "years" $year $year }}
|
||||
{{ end }}
|
||||
|
||||
<div class="form-row mb-4">
|
||||
<div class="col-auto">
|
||||
<input type="search" class="filter-search" placeholder="{{ i18n "search_placeholder" }}" autocapitalize="off"
|
||||
autocomplete="off" autocorrect="off" role="textbox" spellcheck="false">
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="pub-filters pubtype-select form-control form-control-sm" data-filter-group="pubtype">
|
||||
<option value="*">{{ i18n "publication_type" }}</option>
|
||||
{{ $pub_types := partial "functions/get_pub_types" $ }}
|
||||
{{ range $index, $taxonomy := site.Taxonomies.publication_types }}
|
||||
<option value=".pubtype-{{ (int $index) }}">
|
||||
{{ index $pub_types (int $index) }}
|
||||
</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="pub-filters form-control form-control-sm" data-filter-group="year">
|
||||
<option value="*">{{ i18n "date" }}</option>
|
||||
{{ $years_sorted := $.Scratch.GetSortedMapValues "years" }}
|
||||
{{ if $years_sorted }}
|
||||
{{ range $year := sort $years_sorted "" "desc" }}
|
||||
<option value=".year-{{ $year }}">
|
||||
{{ $year }}
|
||||
</option>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="container-publications">
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
|
||||
{{ if .Params.publication_types }}
|
||||
{{ $.Scratch.Set "pubtype" (index .Params.publication_types 0) }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "pubtype" 0 }}
|
||||
{{ end }}
|
||||
|
||||
<div class="grid-sizer col-lg-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}">
|
||||
{{ if eq $.Params.view 1 }}
|
||||
{{ partial "li_list" . }}
|
||||
{{ else if eq $.Params.view 3 }}
|
||||
{{ partial "li_card" . }}
|
||||
{{ else if eq $.Params.view 4 }}
|
||||
{{ partial "li_citation" . }}
|
||||
{{ else }}
|
||||
{{ partial "li_compact" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{- end -}}
|
@ -1,39 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="universal-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
{{ with .Content }}
|
||||
<div class="article-style">{{ . }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ range .Data.Pages.GroupByDate "2006" }}
|
||||
<div class="row" id="talk_list">
|
||||
<div class="col-lg-2">
|
||||
<h3>{{ .Key }}</h3>
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
|
||||
{{ range .Pages }}
|
||||
{{ if eq $.Params.view 1 }}
|
||||
{{ partial "li_list" . }}
|
||||
{{ else if eq $.Params.view 3 }}
|
||||
{{ partial "li_card" . }}
|
||||
{{ else }}
|
||||
{{ partial "li_compact" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{- end -}}
|
@ -1,71 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ site.LanguageCode | default "en-us" }}">
|
||||
<head>
|
||||
{{ $css := site.Data.assets.css }}
|
||||
{{ $cdn_url_reveal := "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.8.0" }}
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Source Themes Academic {{ site.Data.academic.version }}">
|
||||
|
||||
<link rel="manifest" href="{{ "index.webmanifest" | relLangURL }}">
|
||||
<link rel="icon" type="image/png" href="{{(partial "functions/get_icon" 32).RelPermalink}}">
|
||||
<link rel="apple-touch-icon" type="image/png" href="{{(partial "functions/get_icon" 192).RelPermalink}}">
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
<title>{{ .Title }} | {{ site.Title }}</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ $cdn_url_reveal }}/css/reveal.min.css">
|
||||
{{- $theme := $.Param "slides.theme" | default "black" -}}
|
||||
<link rel="stylesheet" href="{{ $cdn_url_reveal }}/css/theme/{{ $theme }}.min.css">
|
||||
|
||||
{{- $highlight_style := $.Param "slides.highlight_style" | default "dracula" -}}
|
||||
{{ printf "<link rel=\"stylesheet\" href=\"%s\" crossorigin=\"anonymous\">" (printf $css.highlight.url $css.highlight.version $highlight_style) | safeHTML }}
|
||||
|
||||
{{ $css := resources.Get "css/reveal.css" }}
|
||||
{{ $css_custom := resources.Get "css/reveal_custom.css" }}
|
||||
{{ $style := slice $css $css_custom | resources.Concat "css/reveal_custom.css" | resources.Minify }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
|
||||
<!-- Printing and PDF exports -->
|
||||
<script>
|
||||
var link = document.createElement( 'link' );
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
link.href = window.location.search.match( /print-pdf/gi ) ? '{{ $cdn_url_reveal }}/css/print/pdf.css' : '{{ $cdn_url_reveal }}/css/print/paper.css';
|
||||
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{{ block "main" . }}{{ end }}
|
||||
|
||||
<script src="{{ $cdn_url_reveal }}/js/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.revealPlugins = { dependencies: [
|
||||
// Interpret Markdown in <section> elements.
|
||||
{ src: '{{ $cdn_url_reveal }}/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: '{{ $cdn_url_reveal }}/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
// Enable code highlighting.
|
||||
{ src: '{{ $cdn_url_reveal }}/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
||||
// Enable zooming.
|
||||
{ src: '{{ $cdn_url_reveal }}/plugin/zoom-js/zoom.js', async: true },
|
||||
// Enable math.
|
||||
{ src: '{{ $cdn_url_reveal }}/plugin/math/math.js', async: true },
|
||||
// Enable exporting deck to PDF.
|
||||
{ src: '{{ $cdn_url_reveal }}/plugin/print-pdf/print-pdf.js', async: true },
|
||||
// Enable speaker notes. Notes plugin must be loaded locally as CDN is missing `notes.html`.
|
||||
{ src: '{{ "js/vendor/reveal.js/plugin/notes/notes.js" | relURL }}', async: true }
|
||||
]};
|
||||
|
||||
let revealDefaults = { center: true, controls: true, history: true, progress: true, transition: 'slide', mouseWheel: true };
|
||||
let revealOptions = Object.assign({}, revealDefaults, revealPlugins);
|
||||
Reveal.initialize(revealOptions);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,3 +0,0 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "slides" (union (slice .Page) .Pages) }}
|
||||
{{ end }}
|
@ -1,76 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
<div class="pub">
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="article-container">
|
||||
|
||||
{{ if .Params.abstract }}
|
||||
<h3>{{ i18n "abstract" }}</h3>
|
||||
<p class="pub-abstract">{{ .Params.abstract | markdownify | emojify }}</p>
|
||||
{{ else }}
|
||||
<br>
|
||||
{{ end }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-3 pub-row-heading">{{ i18n "date" }}</div>
|
||||
<div class="col-12 col-md-9">
|
||||
{{ partial "functions/get_event_dates" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
</div>
|
||||
<div class="d-md-none space-below"></div>
|
||||
|
||||
{{ if .Params.event }}
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-3 pub-row-heading">{{ i18n "event" }}</div>
|
||||
<div class="col-12 col-md-9">
|
||||
{{ with .Params.event_url }}<a href="{{ . }}" target="_blank" rel="noopener">{{ end }}
|
||||
{{ .Params.event | markdownify }}
|
||||
{{ if .Params.event_url }}</a>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
</div>
|
||||
<div class="d-md-none space-below"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.location }}
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-3 pub-row-heading">{{ i18n "location" }}</div>
|
||||
<div class="col-12 col-md-9">{{ .Params.location | markdownify }}</div>
|
||||
{{ if .Params.address }}
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-12 col-md-9">{{partial "functions/get_address" (dict "root" . "address" .Params.address) }}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
</div>
|
||||
<div class="d-md-none space-below"></div>
|
||||
{{ end }}
|
||||
|
||||
<div class="space-below"></div>
|
||||
|
||||
<div class="article-style">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{ partial "page_footer" . }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
@ -1,3 +0,0 @@
|
||||
{{- define "main" -}}
|
||||
{{ partial "widget_page.html" . }}
|
||||
{{- end -}}
|
Loading…
Reference in New Issue
Block a user