Skip to content
Draft
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
1 change: 1 addition & 0 deletions content/blog/2017-06-02-unconf2017.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags:
- meetings
- unconf
- unconf17
photogallery: true
params:
doi: "10.59350/rqjt5-xva30"
---
Expand Down
1 change: 1 addition & 0 deletions content/blog/2017-08-22-visdat.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- community
- visdat
- data visualisation
photogallery: true
params:
doi: "10.59350/pd2p2-qwv41"
---
Expand Down
3 changes: 2 additions & 1 deletion content/blog/2023-06-21-coworking/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- coworking
- events
description: "Discover how rOpenSci coworking sessions have evolved to include themes and community hosts, while still providing a place of community to work and chat!"
photogallery: true
params:
doi: "10.59350/ktyc2-er732"
---
Expand Down Expand Up @@ -114,7 +115,7 @@ introduce yourself (see example slides from this year, below),
and to add any relevant links you can think of to the community document.
We will promote the event on social media and in various R community spaces and you should feel free to promote the event to your friends and colleagues and through your own channels, but otherwise that's it!

{{< gallery caption = "Slides">}}
{{< gallery >}}
{{< figureforgallery src="slide_alex_sm.png" caption="January Community Host, Alex 🎉" alt="Example slide introducing the January community host, Alex" >}}
{{< figureforgallery src="slide_hugo_sm.png" caption="February Community Host, Hugo 🎉" alt="Example slide introducing the February community host, Hugo" >}}
{{< figureforgallery src="slide_nick_sm.png" caption="March Community Host, Nick 🎉" alt="Example slide introducing the March community host, Nick" >}}
Expand Down
7 changes: 4 additions & 3 deletions content/blog/2025-01-24-coworking-hackatons/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ featured: true
description: "Announcing mini-hackathons to support first time contributors"
social: "@[email protected] is hosting mini-hackathons to support first time contributors!"
editor: Maëlle Salmon
photogallery: true
params:
doi: "10.59350/h666e-50h82"
---
Expand All @@ -39,9 +40,9 @@ Sunny focused on her journey making her first R package, [bbsTaiwan](https://sun
Then Yaoxiang rounded out our call with advice for first-time contributors on the importance of including tests and how to deal with different testing situations, referring to his experience with [medrxivr](https://docs.ropensci.org/medrxivr).

{{< gallery >}}
{{< figureforgallery src="sunny.png" alt="Screenshot of Sunny's title slide featuring her package bbsTawain" >}}
{{< figureforgallery src="pascal.png" alt="Slide from Pascal's presentation 'Collaboration with git' featuring his main take-aways: use branches a lot, commit often, write meaningful commit messages, learn how to undo stuff, learn how to rebase, and get familiar with GitHub's Pull Requests" >}}
{{< figureforgallery src="yaoxiang.png" alt="Slide from Yaoxiang's presentation featuring testthat Basics and core features, such as the test_that function, basic expectations like expect_equal, and error and warning testing like expect_error and expect_warning." >}}
{{< figureforgallery src="sunny.png" alt="Screenshot of Sunny's title slide featuring her package bbsTawain" >}}
{{< figureforgallery src="pascal.png" alt="Slide from Pascal's presentation 'Collaboration with git' featuring his main take-aways: use branches a lot, commit often, write meaningful commit messages, learn how to undo stuff, learn how to rebase, and get familiar with GitHub's Pull Requests" >}}
{{< figureforgallery src="yaoxiang.png" alt="Slide from Yaoxiang's presentation featuring testthat Basics and core features, such as the test_that function, basic expectations like expect_equal, and error and warning testing like expect_error and expect_warning." >}}
{{< /gallery >}}

Sunny recommended that you have a plan for your contributions, but remain flexible as things change or don't proceed as you may have expected.
Expand Down
6 changes: 4 additions & 2 deletions layouts/shortcodes/figureforgallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
{{ if ne $resource.Value nil }}
{{- $thumb = $resource.Value.RelPermalink }}
{{ end }}
<div class="box{{ with .Get "caption-position" }} fancy-figure caption-position-{{.}}{{end}}{{ with .Get "caption-effect" }} caption-effect-{{.}}{{end}}" {{ with .Get "width" }}style="max-width:{{.}}"{{end}}>
<p class="sr-only">A picture: {{ .Get "alt" }}{{ with .Get "caption" }}({{ . }}){{ end }}</pp>
<div aria-hidden="true" class="box{{ with .Get "caption-position" }} fancy-figure caption-position-{{.}}{{end}}{{ with .Get "caption-effect" }} caption-effect-{{.}}{{end}}" {{ with .Get "width" }}style="max-width:{{.}}"{{end}}>
<figure {{ with .Get "class" }}class="{{.}}"{{ end }} itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<div class="img"{{ if .Parent }} style="background-image: url('{{ $thumb }}');"{{ end }}{{ with .Get "size" }} data-size="{{.}}"{{ end }}>
<img itemprop="thumbnail" src="{{ $thumb }}" {{ with .Get "alt" | default (.Get "caption") }}alt="{{.}}"{{ end }}/><!-- <img> hidden if in .gallery -->
</div>
{{ with .Get "link" | default $thumb }}<a href="{{ . }}" itemprop="contentUrl" aria-disabled="true"></a>{{ end }}
{{ with .Get "link" | default $thumb }}<a href="{{ . }}" itemprop="contentUrl"></a>{{ end }}
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
<figcaption>
{{- with .Get "title" }}<h4>{{.}}</h4>{{ end }}
Expand All @@ -33,3 +34,4 @@
{{- end }}
</figure>
</div>

33 changes: 1 addition & 32 deletions layouts/shortcodes/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,5 @@
{{- $.Page.Scratch.Add "figurecount" 1 }}
{{ $baseURL := .Site.BaseURL }}
<div class="gallery caption-position-{{ with .Get "caption-position" | default "bottom" }}{{.}}{{end}} caption-effect-{{ with .Get "caption-effect" | default "slide" }}{{.}}{{end}} hover-effect-{{ with .Get "hover-effect" | default "zoom" }}{{.}}{{end}} {{ if ne (.Get "hover-transition") "none" }}hover-transition{{end}}" itemscope itemtype="http://schema.org/ImageGallery">
{{- with (.Get "dir") -}}
<!-- If a directory was specified, generate figures for all of the images in the directory -->
{{- $files := readDir (print "/static/" .) }}
{{- range $files -}}
<!-- skip files that aren't images, or that include the thumb suffix in their name -->
{{- $thumbext := $.Get "thumb" | default "-thumb" }}
{{- $isthumb := .Name | findRE ($thumbext | printf "%s\\.") }}<!-- is the current file a thumbnail image? -->
{{- $isimg := lower .Name | findRE "\\.(gif|jpg|jpeg|tiff|png|bmp|webp|avif|jxl)" }}<!-- is the current file an image? -->
{{- if and $isimg (not $isthumb) }}
{{- $caption := .Name | replaceRE "\\..*" "" | humanize }}<!-- humanized filename without extension -->
{{- $resource := resources.Get .Name -}}
{{- $linkURL := $resource.RelPermalink }}<!-- absolute URL to hi-res image -->
{{- $thumb := .Name | replaceRE "(\\.)" ($thumbext | printf "%s.") }}<!-- filename of thumbnail image -->
{{- $thumbexists := where $files "Name" $thumb }}<!-- does a thumbnail image exist? -->
{{- $thumbURL := print $baseURL ($.Get "dir") "/" $thumb | absURL }}<!-- absolute URL to thumbnail image -->
<div class="box">
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<div class="img" style="background-image: url('{{ if $thumbexists }}{{ $thumbURL }}{{ else }}{{ $linkURL }}{{ end }}');" >
<img itemprop="thumbnail" src="{{ if $thumbexists }}{{ $thumbURL }}{{ else }}{{ $linkURL }}{{ end }}" alt="{{ $caption }}" /><!-- <img> hidden if in .gallery -->
</div>
<figcaption>
<p>{{ $caption }}</p>
</figcaption>
<a href="{{ $linkURL }}" itemprop="contentUrl"></a><!-- put <a> last so it is stacked on top -->
</figure>
</div>
{{- end }}
{{- end }}
{{- else -}}
<!-- If no directory was specified, include any figure shortcodes called within the gallery -->
{{ .Inner }}
{{- end }}
{{ .Inner }}
</div>