From 1e5123fad5e45a151f9ad5f04130078aa30c8055 Mon Sep 17 00:00:00 2001 From: Beyza Nur Deniz Date: Sat, 7 Dec 2024 12:19:23 +0300 Subject: [PATCH] design 3 improved with bootstrap --- layouts/shortcodes/people.html | 85 +++++++++----------- layouts/shortcodes/people_with_research.html | 66 +++++++++++++++ static/icons/linkedin.svg | 3 + 3 files changed, 109 insertions(+), 45 deletions(-) create mode 100644 layouts/shortcodes/people_with_research.html create mode 100644 static/icons/linkedin.svg diff --git a/layouts/shortcodes/people.html b/layouts/shortcodes/people.html index 49bc7c3..921f3d4 100644 --- a/layouts/shortcodes/people.html +++ b/layouts/shortcodes/people.html @@ -12,52 +12,47 @@ {{ end }} {{ $members := $ctx.Get "members" }} -
-{{ range $members }} -
- {{ $thumbnail := .thumbnail | default "images/person.png" }} - {{ $image_settings := site.Params.people.image_settings | default "500x500 webp q90 smart" }} - - {{ $image_resource := resources.Get $thumbnail }} - - {{ if $image_resource }} - {{ $retouched := $image_resource.Fill $image_settings }} - {{ $thumbnail = $retouched.RelPermalink }} - {{ end }} -
-
-
- {{ .name | anchorize }}-thumbnail -
-
-
-
{{ .name | title }}
- {{ with .position }} -

- {{ . | i18n | title }} -

- {{ end }} -

- {{ with .email }} - - - - {{ end }} - {{ with .homepage }} - - - - {{ end }} - {{ with .github }} - - - - {{ end }} -

-
+
+
+ {{ range $members }} +
+
+
+ {{ $thumbnail := .thumbnail | default "images/person.png" }} + {{ $image_settings := site.Params.people.image_settings | default "500x500 webp q90 smart" }} + {{ $image_resource := resources.Get $thumbnail }} + {{ if $image_resource }} + {{ $retouched := $image_resource.Fill $image_settings }} + {{ $thumbnail = $retouched.RelPermalink }} + {{ end }} + {{ .name | anchorize }}-thumbnail +
+
+
{{ .name | title }}
+

{{ .position | i18n | title }}

+
+ {{ with .email }} + + Email + + {{ end }} + {{ with .linkedin }} + + LinkedIn + + {{ end }} + {{ with .github }} + + GitHub + + {{ end }}
-
-{{ end }} +
+ {{ end }} +
diff --git a/layouts/shortcodes/people_with_research.html b/layouts/shortcodes/people_with_research.html new file mode 100644 index 0000000..7bb4b12 --- /dev/null +++ b/layouts/shortcodes/people_with_research.html @@ -0,0 +1,66 @@ +{{ $ctx := newScratch }} + +{{ $tag := .Get "tag" }} +{{ $columns := .Get "cols" | default "2" }} + +{{ $ctx.Set "tag" $tag }} +{{ $ctx.Set "members" slice }} +{{ range $key, $value := site.Data.bouncmpe.people }} +{{if intersect $value.tags (slice $tag) }} +{{ $ctx.Set "members" ($ctx.Get "members" | append $value) }} +{{ end }} +{{ end }} +{{ $members := $ctx.Get "members" }} + +
+
+ {{ range $members }} +
+
+
+ {{ $thumbnail := .thumbnail | default "images/person.png" }} + {{ $image_settings := site.Params.people.image_settings | default "500x500 webp q90 smart" }} + {{ $image_resource := resources.Get $thumbnail }} + {{ if $image_resource }} + {{ $retouched := $image_resource.Fill $image_settings }} + {{ $thumbnail = $retouched.RelPermalink }} + {{ end }} + {{ .name | anchorize }}-thumbnail +
+
+
{{ .name | title }}
+

{{ .position | i18n | title }}

+ {{ with .research_areas }} +
+ {{ $lastIndex := sub (len .) 1 }} + {{ range $index, $area := . }} + {{ $area | title }}{{ if ne $index $lastIndex }}, {{ end }} + {{ end }} +
+ {{ end }} +
+ {{ with .email }} + + Email + + {{ end }} + {{ with .linkedin }} + + LinkedIn + + {{ end }} + {{ with .github }} + + GitHub + + {{ end }} +
+
+
+
+ {{ end }} +
+
diff --git a/static/icons/linkedin.svg b/static/icons/linkedin.svg new file mode 100644 index 0000000..30fc0e3 --- /dev/null +++ b/static/icons/linkedin.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file