Skip to content

Commit

Permalink
Merge pull request #116 from pyladies/add-news
Browse files Browse the repository at this point in the history
Add news
  • Loading branch information
Mariatta authored Aug 1, 2024
2 parents d1cb24e + 568887e commit 38b12d2
Show file tree
Hide file tree
Showing 10 changed files with 396 additions and 1 deletion.
3 changes: 3 additions & 0 deletions content/news/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: 'News'
---
29 changes: 29 additions & 0 deletions content/news/save_the_date.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "Save the date!"
meta_title: "Save the date! PyLadiesCon is returning in 2024!"
description: "Save the date! PyladiesCon is returning in 2024! "
date: 2024-07-31T05:00:00Z
categories: ["Blog Post",]
author: "Mariatta"
tags: ["python", "community", "conference", "public speaking", "pyladies"]
draft: false
layout: news
---



Attention all PyLadies community members! We’re excited to share that we are in the early stages of planning a
PyLadies Conference (PyLadiesCon), a transformative event designed to promote diversity, learning,
and empowerment within the Python community. 🎉

Save the date! The conference will take place on December 6th-8th, where we’ll gather together
for a weekend filled with insightful talks, engaging panels, and collaborative networking opportunities.

Sign up to volunteer with us! Read more on our [Volunteer](/volunteer) page.

Call for proposals will open soon!

In the meantime, you can stay up to date by:
- Following us on various social media channels: [Mastodon](https://fosstodon.org/@pyladiescon), [Twitter/X](https://twitter.com/pyladiescon), [Instagram](https://instagram.com/pyladiescon), and [LinkedIn](https://www.linkedin.com/company/pyladiescon)
- Subscribe to our [RSS Feed](https://conference.pyladies.com/index.xml)

6 changes: 6 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ baseURL = 'https://conference.pyladies.com'
languageCode = 'en-us'
title = 'PyLadiesCon 2024'
theme = "pyladies"
summaryLength = 10

[[menus.main]]
name = 'Home'
Expand All @@ -28,6 +29,11 @@ name = 'Sponsors'
pageRef = '/sponsors'
weight = 50

[[menus.main]]
name = 'News'
pageRef = '/news'
weight = 50

[[menus.main]]
name = 'Volunteer'
pageRef = '/volunteer'
Expand Down
40 changes: 40 additions & 0 deletions themes/pyladies/layouts/news/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{ define "main" }}

<section class="section">
<div class="container">
<div class="row gx-5">
<!-- blog posts -->
<div class="lg:col-8">
<div class="row">
{{ $paginator:= .Paginate .RegularPages }}
{{ range $paginator.Pages }}
<div class="md:col-6 mb-14">
{{ partial "components/blog-card" . }}
</div>
{{ end }}
</div>
{{ partial "components/pagination.html" . }}
</div>

</div>
</div>
</section>

{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<!--<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>-->
<div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3">
<div class="bg-light me-md-3 py-3 px-3 py-md-5 px-md-5 overflow-hidden">
{{ .Content }}
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
<!--
<b>Subpages:</b>
<ul>
{{ range .Pages }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{ end }}
</ul>
-->
</div>
</div>
{{ end }}
18 changes: 18 additions & 0 deletions themes/pyladies/layouts/news/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ define "main" }}

{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<div class="d-md-flex flex-md-equal my-md-3 ps-md-3">
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
</div>
<h1 class="d-md-flex flex-md-equal my-md-3 ps-md-3 ">
{{ .Title }}
</h1>
<p class="d-md-flex flex-md-equal my-md-3 ps-md-3 mb-3 desc">
written by {{ .Params.author }}
</p>
<div class="my-md-3 ps-md-3">
{{ .Content }}
</div>
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }}
18 changes: 18 additions & 0 deletions themes/pyladies/layouts/partials/components/blog-card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<p class="bg-body dark:bg-darkmode-body p-8">
{{ $image:= .Params.image }}
{{ if $image }}
{{ partial "image" (dict "Src" $image "Alt" .Title "Class" "mb-6 w-full rounded") }}
{{ end }}
<h1 class="mb-3 ">
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
</h1>
<p class="mb-3 desc">
written by {{ .Params.author }}
</p>
<p class="mb-6">{{ .Summary }}</p>
<a href="{{ .RelPermalink }}">
Read more ...{{ i18n "read_more" }}
</a>
</p>
138 changes: 138 additions & 0 deletions themes/pyladies/layouts/partials/components/pagination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{{ $paginator := .Paginator }}
<!-- Number of links either side of the current page. -->
{{ $adjacent_links := 2 }}
<!-- $max_links = ($adjacent_links * 2) + 1 -->
{{ $max_links := (add (mul $adjacent_links 2) 1) }}
<!-- $lower_limit = $adjacent_links + 1 -->
{{ $lower_limit := (add $adjacent_links 1) }}
<!-- $upper_limit = $paginator.TotalPages - $adjacent_links -->
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }}
<!-- If there's more than one page. -->
{{ if gt $paginator.TotalPages 1 }}
<nav
class="flex items-center justify-center space-x-3"
aria-label="Pagination">
<!-- Previous page. -->
{{ if $paginator.HasPrev }}
<a
class="text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light rounded px-2 py-1.5"
href="{{ $paginator.Prev.URL }}"
aria-label="Pagination Arrow">
<span class="sr-only">Previous</span>
<svg
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
height="30"
width="30">
<path
fill-rule="evenodd"
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
clip-rule="evenodd" />
</svg>
</a>
{{ else }}
<span class="text-light rounded px-2 py-1.5">
<span class="sr-only">Previous</span>
<svg
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
height="30"
width="30">
<path
fill-rule="evenodd"
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
clip-rule="evenodd" />
</svg>
</span>
{{ end }}


<!-- Page numbers -->
{{ range $paginator.Pagers }}
{{ $.Scratch.Set "page_number_flag" false }}
<!-- Advanced page numbers. -->
{{ if gt $paginator.TotalPages $max_links }}
<!-- Lower limit pages. -->
<!-- If the user is on a page which is in the lower limit. -->
{{ if le $paginator.PageNumber $lower_limit }}
<!-- If the current loop page is less than max_links. -->
{{ if le .PageNumber $max_links }}
{{ $.Scratch.Set "page_number_flag" true }}
{{ end }}
<!-- Upper limit pages. -->
<!-- If the user is on a page which is in the upper limit. -->
{{ else if ge $paginator.PageNumber $upper_limit }}
<!-- If the current loop page is greater than total pages minus $max_links -->
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
{{ $.Scratch.Set "page_number_flag" true }}
{{ end }}
<!-- Middle pages. -->
{{ else }}
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
{{ $.Scratch.Set "page_number_flag" true }}
{{ end }}
{{ end }}
<!-- Simple page numbers. -->
{{ else }}
{{ $.Scratch.Set "page_number_flag" true }}
{{ end }}
<!-- Output page numbers. -->
{{ if eq ($.Scratch.Get "page_number_flag") true }}

{{ if eq . $paginator }}
<span
aria-current="page"
class="bg-primary dark:bg-darkmode-primary dark:text-dark rounded px-4 py-2 text-white">
{{ .PageNumber }}
</span>
{{ else }}
<a
href="{{ .URL }}"
aria-current="page"
class="text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light rounded px-4 py-2">
{{ .PageNumber }}
</a>
{{ end }}
{{ end }}
{{ end }}


<!-- Next page. -->
{{ if $paginator.HasNext }}
<a
class="text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light rounded px-2 py-1.5"
href="{{ $paginator.Next.URL }}"
aria-label="Pagination Arrow">
<span class="sr-only">Next</span>
<svg
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
height="30"
width="30">
<path
fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd" />
</svg>
</a>
{{ else }}
<span class="text-light rounded px-2 py-1.5">
<span class="sr-only">Next</span>
<svg
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
height="30"
width="30">
<path
fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd" />
</svg>
</span>
{{ end }}
</nav>
{{ end }}
3 changes: 2 additions & 1 deletion themes/pyladies/layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<a href="https://twitter.com/pyladiescon"><i class="fab fa-twitter fa-2x px-2"></i></a>
<a href="https://instagram.com/pyladiescon"><i class="fab fa-instagram fa-2x px-2"></i></a>
<a href="https://www.linkedin.com/company/pyladiescon"><i class="fab fa-linkedin fa-2x px-2"></i></a>
</div>
<a href="https://conference.pyladies.com/index.xml"><i class="fas fa-rss fa-2x px-2"></i></a>
</div>
</div>
<div class="row justify-content-center">
<div class="col-7 col-sm-6 col-lg-3">
Expand Down
Loading

0 comments on commit 38b12d2

Please sign in to comment.