Skip to content

Commit

Permalink
Merge pull request #4 from foss4g-europe/sponsors-pages-fix
Browse files Browse the repository at this point in the history
Sponsors pages fix
  • Loading branch information
sidorelauku authored Nov 20, 2024
2 parents 07555a2 + 0539504 commit bb5129a
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 28 deletions.
22 changes: 22 additions & 0 deletions content/sponsors/.template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title : "Company name as in data/homepage.yml"
page_header_bg : "images/background/page-title-bg.jpg"
date: 2024-01-14T20:22:24+02:00
designation: "Silver"
image: "logo/file.png"
draft : false
type: "sponsor"
layout: "single"
social:
- name: "Homepage"
icon: "fa-solid fa-house"
link: "https://"
- name: "mastodon"
icon: "fa-brands fa-mastodon"
link: "https://"
#- name: "smth"
# icon: "fontawesome icon name"
# link: "http://"
---

Text about the sponsor
13 changes: 13 additions & 0 deletions content/sponsors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## adding sponsors


- we list sponsors by sponsor_group.name (think of this as "sponsorship level")
from data/homepage.yml
- sponsor groups are in the order they appear in data/homepage.yml
- sponsor_item values are rendered in the order they appear in data/homepage.yml
- create sponsor md page file in content/sponsors. filename can be anything, but
as it will be an URL, please consider ascii chars only, no whitespaces please :)
- please pay attention that the specific `name` value in data.homepage for the
sponsor is the same as md metadata section `title` value. If a match is not found
the sponsor will not be listed in the generated page.
- sponsor page type should be set to `sponsor` and layout `single` (see .template.md)
17 changes: 10 additions & 7 deletions data/homepage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,13 @@ orga:
############### Sponsors ##################
sponsors:
enable : false
# title : "Last years partners, supporters, and sponsors"
# content : "FOSS4G Europe 2024 was made possible thanks to the invaluable help
# from the following organizations"
# button:
# enable : true
# label : "Become a sponsor"
# link : "./call-for-sponsors/"
title : "Our partners, supporters, and sponsors"
content : "FOSS4G Europe 2025 is made possible thanks to the invaluable help
from the following organizations"
# button:
# enable : false
# label : "Become a sponsor"
# link : "./call-for-sponsors/"
sponsor_group:

- name : "Gold"
Expand All @@ -313,3 +313,6 @@ sponsors:
# - name : ""
# logo : ""
# link : ""

- name : "Some level name"
sponsor_item:
18 changes: 8 additions & 10 deletions themes/eventre-hugo/assets/scss/pages/_speaker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
padding: 6px;
img{
width: 100%;
border-radius: 50%;
border: 10px solid transparent;
}
@include tablet {
margin-bottom: 30px;
Expand Down Expand Up @@ -129,14 +127,6 @@
}
}

.speaker-item{
.image{
img{
border-radius: 50%;
border: 10px solid transparent;
}
}
}

.speakers-full-width{
overflow: hidden;
Expand Down Expand Up @@ -226,3 +216,11 @@
}
}
}


.speaker-image-round{
img{
border-radius: 50%;
border: 10px solid transparent;
}
}
33 changes: 24 additions & 9 deletions themes/eventre-hugo/layouts/sponsor/list.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,59 @@
{{ define "main" }}

{{ partial "orga.html" }}

<section class="section speakers white">
<div class="container">
<div class="row">
<div class="col-12 section-title">
{{.Content}}
</div>
</div>
{{ range $lvl := slice "" "Gold" "Silver" "Bronze" "Supporter" }}
{{ if ne $lvl "" }}

{{ with site.Data.homepage.sponsors }}
{{range .sponsor_group }}
{{ if .sponsor_item }}
<div class="row">
<div class="col-12 section-title">
<h3>{{ $lvl }}</h3>
<h3>{{ .name }}</h3>
</div>
</div>
{{ end }}
<div class="row">
{{ range $page := sort (where (where site.RegularPages "Type" "sponsor") "Params.designation" $lvl) "Params.date" }}
{{ range .sponsor_item }}
{{ range $page := where (where site.RegularPages "Type" "sponsor") "Params.Title" .name }}
<div class="col-lg-3 col-md-4 col-sm-6">
<div class="speaker-item">
<div class="image">
<img src="{{ .Params.image | absURL }}" alt="{{ .Title }}" class="img-fluid">
<img src="{{ $page.Params.image | absURL }}" alt="{{ $page.Title }}" class="img-fluid">
{{ if $page.Params.social }}
<div class="primary-overlay"></div>
<div class="socials">
<ul class="list-inline">
{{ range first 4 .Params.social }}
{{ range first 4 $page.Params.social }}
<li class="list-inline-item"><a href="{{.link | safeURL }}"><i class="fa {{.icon}}"></i></a></li>
{{ end }}
</ul>
</div>
{{ end }}
</div>
<div class="content text-center">
<h5><a href="{{ .Permalink }}"><b>{{.Title }}</b></a></h5>
</div>
</div>
</div>
{{ end }}


{{ end }}
</div>
</div>
{{ end }}
{{ end }}
{{ if .button.enable }}
{{ with .button }}
<div class="sponsor-btn text-center">
<a href="{{ .link | absURL }}" class="btn btn-main-md">{{.label}}</a>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion themes/eventre-hugo/layouts/team/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="col-lg-3 col-md-4 col-sm-6">
<!-- Speaker 1 -->
<div class="speaker-item">
<div class="image">
<div class="image speaker-image-round">
<img src="{{ .Params.image | absURL }}" alt="{{ .Title }}" class="img-fluid">
<div class="primary-overlay"></div>
<div class="socials">
Expand Down
2 changes: 1 addition & 1 deletion themes/eventre-hugo/layouts/team/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="block">
<div class="row">
<div class="col-lg-5 col-md-6 align-self-md-center">
<div class="image-block">
<div class="image-block speaker-image-round">
<img src="{{ .Params.image | absURL }}" class="img-fluid" alt="{{ .Title }}">
</div>
</div>
Expand Down

0 comments on commit bb5129a

Please sign in to comment.