Skip to content

Commit fdc1a47

Browse files
committed
Add News page
1 parent ba51084 commit fdc1a47

File tree

10 files changed

+360
-20
lines changed

10 files changed

+360
-20
lines changed

content/news/_index.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: 'News'
3+
---

content/news/save_the_date.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: "Save the date!"
3+
meta_title: "Save the date! PyLadiesCon is returning in 2024!"
4+
description: "Save the date! PyladiesCon is returning in 2024! "
5+
date: 2024-07-31T05:00:00Z
6+
categories: ["Blog Post",]
7+
author: "Mariatta"
8+
tags: ["python", "community", "conference", "public speaking", "pyladies"]
9+
draft: false
10+
---
11+
12+
13+
14+
Attention all PyLadies community members! We’re excited to share that we are in the early stages of planning a
15+
PyLadies Conference (PyLadiesCon), a transformative event designed to promote diversity, learning,
16+
and empowerment within the Python community. 🎉
17+
18+
Save the date! The conference will take place on December 6th-8th, where we’ll gather together
19+
for a weekend filled with insightful talks, engaging panels, and collaborative networking opportunities.
20+
21+
Stay updated by:
22+
- 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)
23+
- Subscribe to our [RSS Feed](https://conference.pyladies.com/index.xml)

hugo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ name = 'Sponsors'
2828
pageRef = '/sponsors'
2929
weight = 50
3030

31+
[[menus.main]]
32+
name = 'News'
33+
pageRef = '/news'
34+
weight = 50
35+
3136
[markup]
3237
[markup.goldmark]
3338
[markup.goldmark.renderer]
+18-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
{{ define "main" }}
22

3-
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
4-
{{ $dateHuman := .Date | time.Format ":date_long" }}
5-
<!--<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>-->
6-
<div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3">
7-
<div class="bg-light me-md-3 py-3 px-3 py-md-5 px-md-5 overflow-hidden">
8-
{{ .Content }}
9-
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
10-
<!--
11-
<b>Subpages:</b>
12-
<ul>
13-
{{ range .Pages }}
14-
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
15-
{{ end }}
16-
</ul>
17-
-->
3+
<section class="section">
4+
<div class="container">
5+
<div class="row gx-5">
6+
<!-- blog posts -->
7+
<div class="lg:col-8">
8+
<div class="row">
9+
{{ $paginator:= .Paginate .RegularPages }}
10+
{{ range $paginator.Pages }}
11+
<div class="md:col-6 mb-14">
12+
{{ partial "components/blog-card" . }}
13+
</div>
14+
{{ end }}
15+
</div>
16+
{{ partial "components/pagination.html" . }}
17+
</div>
18+
19+
</div>
1820
</div>
19-
</div>
21+
</section>
2022
{{ end }}

themes/pyladies/layouts/_default/single.html

+11-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
44
{{ $dateHuman := .Date | time.Format ":date_long" }}
5-
<!--<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>-->
5+
<div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3">
6+
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
7+
</div>
8+
<h1 class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3 ">
9+
{{ .Title }}
10+
11+
</h1>
12+
<p class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3 mb-3 desc">
13+
written by {{ .Params.author }}
14+
</p>
615
<div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3">
7-
<div class="bg-light me-md-3 py-3 px-3 py-md-5 px-md-5 overflow-hidden">
16+
817
{{ .Content }}
9-
</div>
1018
</div>
1119
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
1220
{{ end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<p class="bg-body dark:bg-darkmode-body p-8">
2+
{{ $image:= .Params.image }}
3+
{{ if $image }}
4+
{{ partial "image" (dict "Src" $image "Alt" .Title "Class" "mb-6 w-full rounded") }}
5+
{{ end }}
6+
<h1 class="mb-3 ">
7+
<a href="{{ .RelPermalink }}">
8+
{{ .Title }}
9+
</a>
10+
</h1>
11+
<p class="mb-3 desc">
12+
written by {{ .Params.author }}
13+
</p>
14+
<p class="mb-6">{{ .Summary }}</p>
15+
<a href="{{ .RelPermalink }}">
16+
Read more ...{{ i18n "read_more" }}
17+
</a>
18+
</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{{ $paginator := .Paginator }}
2+
<!-- Number of links either side of the current page. -->
3+
{{ $adjacent_links := 2 }}
4+
<!-- $max_links = ($adjacent_links * 2) + 1 -->
5+
{{ $max_links := (add (mul $adjacent_links 2) 1) }}
6+
<!-- $lower_limit = $adjacent_links + 1 -->
7+
{{ $lower_limit := (add $adjacent_links 1) }}
8+
<!-- $upper_limit = $paginator.TotalPages - $adjacent_links -->
9+
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }}
10+
<!-- If there's more than one page. -->
11+
{{ if gt $paginator.TotalPages 1 }}
12+
<nav
13+
class="flex items-center justify-center space-x-3"
14+
aria-label="Pagination">
15+
<!-- Previous page. -->
16+
{{ if $paginator.HasPrev }}
17+
<a
18+
class="text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light rounded px-2 py-1.5"
19+
href="{{ $paginator.Prev.URL }}"
20+
aria-label="Pagination Arrow">
21+
<span class="sr-only">Previous</span>
22+
<svg
23+
viewBox="0 0 20 20"
24+
fill="currentColor"
25+
aria-hidden="true"
26+
height="30"
27+
width="30">
28+
<path
29+
fill-rule="evenodd"
30+
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"
31+
clip-rule="evenodd" />
32+
</svg>
33+
</a>
34+
{{ else }}
35+
<span class="text-light rounded px-2 py-1.5">
36+
<span class="sr-only">Previous</span>
37+
<svg
38+
viewBox="0 0 20 20"
39+
fill="currentColor"
40+
aria-hidden="true"
41+
height="30"
42+
width="30">
43+
<path
44+
fill-rule="evenodd"
45+
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"
46+
clip-rule="evenodd" />
47+
</svg>
48+
</span>
49+
{{ end }}
50+
51+
52+
<!-- Page numbers -->
53+
{{ range $paginator.Pagers }}
54+
{{ $.Scratch.Set "page_number_flag" false }}
55+
<!-- Advanced page numbers. -->
56+
{{ if gt $paginator.TotalPages $max_links }}
57+
<!-- Lower limit pages. -->
58+
<!-- If the user is on a page which is in the lower limit. -->
59+
{{ if le $paginator.PageNumber $lower_limit }}
60+
<!-- If the current loop page is less than max_links. -->
61+
{{ if le .PageNumber $max_links }}
62+
{{ $.Scratch.Set "page_number_flag" true }}
63+
{{ end }}
64+
<!-- Upper limit pages. -->
65+
<!-- If the user is on a page which is in the upper limit. -->
66+
{{ else if ge $paginator.PageNumber $upper_limit }}
67+
<!-- If the current loop page is greater than total pages minus $max_links -->
68+
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
69+
{{ $.Scratch.Set "page_number_flag" true }}
70+
{{ end }}
71+
<!-- Middle pages. -->
72+
{{ else }}
73+
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
74+
{{ $.Scratch.Set "page_number_flag" true }}
75+
{{ end }}
76+
{{ end }}
77+
<!-- Simple page numbers. -->
78+
{{ else }}
79+
{{ $.Scratch.Set "page_number_flag" true }}
80+
{{ end }}
81+
<!-- Output page numbers. -->
82+
{{ if eq ($.Scratch.Get "page_number_flag") true }}
83+
84+
{{ if eq . $paginator }}
85+
<span
86+
aria-current="page"
87+
class="bg-primary dark:bg-darkmode-primary dark:text-dark rounded px-4 py-2 text-white">
88+
{{ .PageNumber }}
89+
</span>
90+
{{ else }}
91+
<a
92+
href="{{ .URL }}"
93+
aria-current="page"
94+
class="text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light rounded px-4 py-2">
95+
{{ .PageNumber }}
96+
</a>
97+
{{ end }}
98+
{{ end }}
99+
{{ end }}
100+
101+
102+
<!-- Next page. -->
103+
{{ if $paginator.HasNext }}
104+
<a
105+
class="text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light rounded px-2 py-1.5"
106+
href="{{ $paginator.Next.URL }}"
107+
aria-label="Pagination Arrow">
108+
<span class="sr-only">Next</span>
109+
<svg
110+
viewBox="0 0 20 20"
111+
fill="currentColor"
112+
aria-hidden="true"
113+
height="30"
114+
width="30">
115+
<path
116+
fill-rule="evenodd"
117+
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"
118+
clip-rule="evenodd" />
119+
</svg>
120+
</a>
121+
{{ else }}
122+
<span class="text-light rounded px-2 py-1.5">
123+
<span class="sr-only">Next</span>
124+
<svg
125+
viewBox="0 0 20 20"
126+
fill="currentColor"
127+
aria-hidden="true"
128+
height="30"
129+
width="30">
130+
<path
131+
fill-rule="evenodd"
132+
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"
133+
clip-rule="evenodd" />
134+
</svg>
135+
</span>
136+
{{ end }}
137+
</nav>
138+
{{ end }}

themes/pyladies/layouts/partials/footer.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
<a href="https://twitter.com/pyladiescon"><i class="fab fa-twitter fa-2x px-2"></i></a>
1818
<a href="https://instagram.com/pyladiescon"><i class="fab fa-instagram fa-2x px-2"></i></a>
1919
<a href="https://www.linkedin.com/company/pyladiescon"><i class="fab fa-linkedin fa-2x px-2"></i></a>
20-
</div>
20+
<a href="https://conference.pyladies.com/index.xml"><i class="fas fa-rss fa-2x px-2"></i></a>
21+
</div>
2122
</div>
2223
<div class="row justify-content-center">
2324
<div class="col-7 col-sm-6 col-lg-3">

0 commit comments

Comments
 (0)