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
6 changes: 5 additions & 1 deletion content/tutorials/hpc-intro/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ weight: 10

This tutorial contains the full content of the introduction to the high-performance computing system in the standard security zone. We offer a live presentation of the material on Wednesday afternoons.

[Register to attend the Wednesday Zoom tutorial](https://www.rc.virginia.edu/userinfo/hpc/)
Register to attend the Wednesday Zoom tutorial:
<div>
<a href={{% intro-sszhpc-request %}}><button class="btn btn-primary btn-md">Sign up for an "Intro to HPC" session</button></a>
</div>


For those who prefer shorter sessions with videos, we have broken the introduction into a series. The videos alone can be viewed starting from the "Video" button above. If you would rather watch the videos along with accessing the relevant sections of the notes, direct links are below.

Expand Down
22 changes: 22 additions & 0 deletions layouts/shortcodes/intro-sszhpc-request.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- determine next available Wednesday -->
{{- $weekdays:=dict "Monday" 2 "Tuesday" 1 "Wednesday" 7 "Thursday" 6 "Friday" 5 "Saturday" 4 "Sunday" 3 -}}
{{- $dayoffset:=index $weekdays now.Weekday.String }}
{{- $.Scratch.Set "nextavailable" (now.AddDate 0 0 $dayoffset) -}}

<!-- blockout dates -->
{{- $blockout:=slice (time "2020-12-16") (time "2020-12-23") (time "2020-12-30") (time "2024-06-19") -}}
{{ range $blockout }}
{{- $next:=$.Scratch.Get "nextavailable" -}}
{{- if in $blockout (time ($next.Format "2006-01-02")) -}}
{{- $.Scratch.Set "nextavailable" ($next.AddDate 0 0 7) -}}
{{- end -}}
{{- end -}}

<!-- construct smart URL -->
{{- $category:="Rivanna" -}}
{{- $req_title:="Intro to HPC Orientation Session" -}}
{{- $description:=printf "I'd like to reserve a seat for the next \"Intro to HPC\" orientation session on %s, 3-4pm." (($.Scratch.Get "nextavailable").Format "Monday January 2") -}}
{{- $smart_url:=printf "https://forms.rc.virginia.edu/form/support-request/?category=%s&request_title=%s&description=%s" $category $req_title $description -}}

{{- $smart_url:=replace $smart_url " " "%20" -}}
{{- $smart_url -}}
Loading