Skip to content

Commit 6e62b1c

Browse files
authored
enh: final cleanup (#773)
1 parent 6eaba8d commit 6e62b1c

File tree

6 files changed

+313
-132
lines changed

6 files changed

+313
-132
lines changed

_includes/package-grid.html

Lines changed: 51 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,55 @@
1-
<div class="element-item cards bubble {% for aCategory in apackage.categories %}
1+
<div class="element-item package-card {% for aCategory in apackage.categories %}
22
{{ aCategory }}
33
{% endfor %}" data-category="data">
4-
<article itemscope itemtype="https://schema.org/SoftwareApplication">
5-
<h3 class="card__title no_toc" itemprop="name">
6-
{{ apackage.package_name }}
7-
</h3>
8-
<p class="page__meta contributors">
9-
<span><i class="fas fa-feather" aria-hidden="true"></i>
10-
{% if apackage.all_current_maintainers %}
11-
{% for maintainer in apackage.all_current_maintainers %}
12-
<a href="https://github.com/{{ maintainer.github_username }}" rel="maintainer" target="_blank">
13-
{% if maintainer.name %}
14-
{{ maintainer.name }}{% if forloop.last == false %},{% endif %}
15-
{% else %}
16-
{{ maintainer.github_username }}{% if forloop.last == false %},{% endif %}
17-
{% endif %}
18-
</a>
19-
{% endfor %}
20-
{% elsif apackage.submitting_author.name != 'Name' %}
21-
<a href="https://github.com/{{ apackage.submitting_author.github_username }}" rel="maintainer" target="_blank">
22-
{{ apackage.submitting_author.name }}
23-
</a>
24-
{% else %}
25-
<a href="https://github.com/{{ apackage.submitting_author.github_username }}" rel="maintainer" target="_blank">
26-
{{ apackage.submitting_author.github_username }}
27-
</a>
28-
{% endif %}
29-
</span>
30-
</p>
31-
<span class="package_description">
32-
<p itemprop="description">
33-
{{ apackage.package_description | markdownify }}
34-
</p>
35-
</span>
36-
<ul>
37-
<li><a href="{{ apackage.repository_link }}" rel="permalink"><i class="fab fa-github"></i> View Code</a></li>
38-
{% if apackage.gh_meta.documentation %}
39-
<li><a href="{{ apackage.gh_meta.documentation }}" rel="permalink"><i class="fas fa-book-open"></i> View Docs</a></li>
40-
{% endif %}
41-
{% if apackage.citation-link %}
42-
<li><a href="{{ apackage.archive }}" rel="permalink"><i class="fas fa-bookmark fa-fw"></i> Cite</a></li>
43-
{% endif %}
44-
<li><a href="{{ apackage.issue_link }}"><i class="fa-solid fa-user-pen"></i> View Review</a></li>
45-
{% if apackage.joss %}
46-
<li><a href="{{ apackage.archive }}" rel="permalink"><i class="fas fa-bookmark fa-fw"></i> JOSS Approved</a></li>
47-
{% endif %}
48-
{% if apackage.partners contains "astropy" %}
49-
<li><a href="communities/astropy.html"><i class="fa-solid fa-check-double"></i> <img src="https://img.shields.io/badge/Affiliated-Astropy-orange.svg?style=flat" alt="Astropy" /></a></li>
50-
{% endif %}
51-
{% if apackage.active == false %}
52-
<li><i class="fa-solid fa-box-archive"></i> Archived</li>
53-
{% endif %}
54-
</ul>
55-
<hr>
56-
{% if include.community %}
57-
<h4>Package stats</h4>
58-
<ul>
59-
<li><strong>All Time Contributors:</strong> {{ apackage.gh_meta.contrib_count }}</li>
60-
<li><strong>Last Commit date:</strong> {{ apackage.gh_meta.last_commit }}</li>
61-
<li><strong>Date Created:</strong> {{ apackage.gh_meta.created_at }}</li>
62-
</ul>
4+
<div class="package-card__content">
5+
<h3 class="package-card__title" itemprop="name">
6+
{{ apackage.package_name }}
7+
</h3>
8+
9+
<div class="package-card__meta">
10+
<i class="fas fa-feather" aria-hidden="true"></i>
11+
<span class="package-card__maintainers">
12+
{% if apackage.all_current_maintainers %}
13+
{% for maintainer in apackage.all_current_maintainers %}
14+
<a href="https://github.com/{{ maintainer.github_username }}" rel="maintainer" target="_blank">
15+
{% if maintainer.name %}
16+
{{ maintainer.name }}{% if forloop.last == false %},{% endif %}
17+
{% else %}
18+
{{ maintainer.github_username }}{% if forloop.last == false %},{% endif %}
19+
{% endif %}
20+
</a>
21+
{% endfor %}
22+
{% elsif apackage.submitting_author.name != 'Name' %}
23+
<a href="https://github.com/{{ apackage.submitting_author.github_username }}" rel="maintainer" target="_blank">
24+
{{ apackage.submitting_author.name }}
25+
</a>
26+
{% else %}
27+
<a href="https://github.com/{{ apackage.submitting_author.github_username }}" rel="maintainer" target="_blank">
28+
{{ apackage.submitting_author.github_username }}
29+
</a>
6330
{% endif %}
64-
</article>
31+
</span>
32+
</div>
33+
34+
<div class="package-card__description" itemprop="description">
35+
{{ apackage.package_description | markdownify }}
36+
</div>
37+
38+
<ul class="package-card__links">
39+
<li><a href="{{ apackage.repository_link }}" rel="permalink"><i class="fab fa-github" aria-hidden="true"></i> View Code</a></li>
40+
{% if apackage.gh_meta.documentation %}
41+
<li><a href="{{ apackage.gh_meta.documentation }}" rel="permalink"><i class="fas fa-book-open" aria-hidden="true"></i> View Docs</a></li>
42+
{% endif %}
43+
<li><a href="{{ apackage.issue_link }}"><i class="fa-solid fa-user-pen" aria-hidden="true"></i> View Review</a></li>
44+
{% if apackage.joss %}
45+
<li><a href="{{ apackage.archive }}" rel="permalink"><i class="fas fa-bookmark fa-fw" aria-hidden="true"></i> JOSS Approved</a></li>
46+
{% endif %}
47+
{% if apackage.partners contains "astropy" %}
48+
<li><a href="communities/astropy.html"><i class="fa-solid fa-check-double" aria-hidden="true"></i> <img src="https://img.shields.io/badge/Affiliated-Astropy-orange.svg?style=flat" alt="Astropy" /></a></li>
49+
{% endif %}
50+
{% if apackage.active == false %}
51+
<li class="package-card__archived"><i class="fa-solid fa-box-archive" aria-hidden="true"></i> Archived</li>
52+
{% endif %}
53+
</ul>
54+
</div>
6555
</div>

_includes/people-grid.html

Lines changed: 53 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,74 @@
11

2-
<div class="element-item cards {% for aType in aperson.contributor_type %}
2+
{% assign use_isotope = include.isotope | default: false %}
3+
4+
{% if use_isotope == true %}
5+
<div class="element-item cards people-card {% for aType in aperson.contributor_type %}
36
{{ aType }}
4-
{% endfor %}
5-
" data-category="data">
7+
{% endfor %}" data-category="data">
8+
{% else %}
9+
<div class="cards people-card">
10+
{% endif %}
11+
<div class="people-card__content">
12+
{% if aperson.github_image_id %}
13+
<div class="person_img">
14+
<img src="https://avatars1.githubusercontent.com/u/{{ aperson.github_image_id }}?s=400&v=4" alt="GitHub photo of {{ aperson.name }}">
15+
</div>
16+
{% endif %}
617

7-
<article class="archive__item" itemscope="" itemtype="https://schema.org/CreativeWork">
8-
{% if aperson.github_image_id %}
9-
<div class="person_img">
10-
<img src="https://avatars1.githubusercontent.com/u/{{ aperson.github_image_id }}?s=400&v=4" alt="GitHub photo of {{ aperson.name }}">
11-
</div>
18+
<h4 class="person_name">
19+
<a href="https://github.com/{{ aperson.github_username }}" rel="permalink">
20+
{% if aperson.name %}
21+
{{ aperson.name }}
22+
{% else %}
23+
@{{ aperson.github_username }}
1224
{% endif %}
13-
<h4 class="person_name" itemprop="headline">
14-
<a href="https://github.com/{{ aperson.github_username }}" rel="permalink">
15-
{% if aperson.name %}
16-
{{ aperson.name }}
17-
{% else %}
18-
@{{ aperson.github_username }}
19-
{% endif %}
20-
</a>
21-
</h4>
22-
<p class="page__meta">
23-
{% if aperson.partners %}
25+
</a>
26+
</h4>
27+
28+
<p class="page__meta">
29+
{% if aperson.partners %}
2430
<span>
2531
{{ aperson.partners | join: ', ' }}
2632
</span>
27-
{% endif %}
28-
</p>
29-
<p class="page__meta">
33+
{% endif %}
34+
</p>
35+
36+
<p class="page__meta">
3037
{% if aperson.title %}
31-
<span>
32-
{{ aperson.title | join: ', ' }}
33-
</span>
38+
<span>
39+
{{ aperson.title | join: ', ' }}
40+
</span>
3441
{% endif %}
35-
</p>
36-
<p class="contrib_org" itemprop="organization"> {{ aperson.organization }} </p>
37-
<div class="ppl_social">
42+
</p>
43+
44+
<p class="contrib_org">{{ aperson.organization }}</p>
45+
46+
<div class="ppl_social">
3847
{% if aperson.twitter %}
39-
<a href="https://www.twitter.com/{{ aperson.twitter }}">
40-
<span class="fa-brands fa-twitter" title="Click to view {{ aperson.title }}'s Twitter account"></span>
41-
</a>
48+
<a href="https://www.twitter.com/{{ aperson.twitter }}">
49+
<span class="fa-brands fa-twitter" title="Click to view {{ aperson.title }}'s Twitter account"></span>
50+
</a>
4251
{% endif %}
4352
{% if aperson.github_username %}
44-
<a href="https://github.com/{{ aperson.github_username }}"><span class="fa-brands fa-github" title="Click to view {{ aperson.title }}'s GitHub account"></span>
45-
</a>
53+
<a href="https://github.com/{{ aperson.github_username }}">
54+
<span class="fa-brands fa-github" title="Click to view {{ aperson.title }}'s GitHub account"></span>
55+
</a>
4656
{% endif %}
4757
{% if aperson.website %}
48-
<a href="{{ aperson.website }}" data-proofer-ignore><span class="fa-solid fa-blog" title="Click to view {{ aperson.title }}'s Website"></span>
49-
</a>
58+
<a href="{{ aperson.website }}" data-proofer-ignore>
59+
<span class="fa-solid fa-blog" title="Click to view {{ aperson.title }}'s Website"></span>
60+
</a>
5061
{% endif %}
5162
{% if aperson.orcidid %}
52-
<a href="https://orcid.org/{{ aperson.orcidid }}"><span class="fa-brands fa-orcid" title="Click to view {{ aperson.title }} on fa-orcid"></span>
53-
</a>
63+
<a href="https://orcid.org/{{ aperson.orcidid }}">
64+
<span class="fa-brands fa-orcid" title="Click to view {{ aperson.title }} on fa-orcid"></span>
65+
</a>
5466
{% endif %}
55-
5667
{% if aperson.mastodon %}
57-
<a href="{{ aperson.mastodon }}">
58-
<span class="fa-brands fa-mastodon" title="{{ aperson.name }} is on Mastadon"></span>
59-
</a>
68+
<a href="{{ aperson.mastodon }}">
69+
<span class="fa-brands fa-mastodon" title="{{ aperson.name }} is on Mastadon"></span>
70+
</a>
6071
{% endif %}
6172
</div>
62-
</article>
6373
</div>
74+
</div>

_pages/contributors.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ by an expert team of volunteer advisory members who help steer the direction of
2424

2525
<div class="grid executive-council-grid">
2626
{% for aperson in advisory_sorted %}
27-
{% include people-grid.html %}
27+
{% include people-grid.html %}
2828
{% endfor %}
2929
</div>
3030

@@ -46,7 +46,7 @@ the organization.
4646

4747
<div class="grid advisory-council-grid">
4848
{% for aperson in advisory_working %}
49-
{% include people-grid.html %}
49+
{% include people-grid.html %}
5050
{% endfor %}
5151
</div>
5252

@@ -64,7 +64,7 @@ leadership councils.
6464
<div class="grid emeritus-council-grid">
6565
{% for aperson in emeritus_advisory %}
6666
{{ aperson.person_name }}
67-
{% include people-grid.html %}
67+
{% include people-grid.html %}
6868
{% endfor %}
6969
</div>
7070

@@ -81,7 +81,7 @@ leadership councils.
8181

8282
<div class="grid advisory-council-grid">
8383
{% for aperson in editorial %}
84-
{% include people-grid.html %}
84+
{% include people-grid.html %}
8585
{% endfor %}
8686
</div>
8787

@@ -117,6 +117,6 @@ pyOpenSci has a diverse and vibrant community of pythonistas! To date,
117117
<div class="grid-isotope">
118118
<div class="grid-sizer"></div>
119119
{% for aperson in ppl_sorted %}
120-
{% include people-grid.html %}
120+
{% include people-grid.html isotope=true %}
121121
{% endfor %}
122122
</div>

_pages/python-packages.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ To view packages affiliated with our partner communities that are a part of ourp
4747
</div>
4848

4949
<!-- Active Packages -->
50-
<div class="grid-isotope">
50+
<div class="grid-isotope package-grid-isotope">
51+
<div class="grid-sizer"></div>
5152
{% for apackage in packages_sorted %}
5253
{% if apackage.active == true %}
5354
{% include package-grid.html %}
@@ -60,7 +61,8 @@ To view packages affiliated with our partner communities that are a part of ourp
6061
Archived packages are packages that have successfully completed [pyOpenSci's software peer review process](https://www.pyopensci.org/about-peer-review/index.html) but are no longer maintained. [Check out our software maintenance policy for how we determine when a package becomes archived.](https://www.pyopensci.org/software-peer-review/our-process/policies.html#package-maintenance-and-maintainer-responsiveness)
6162

6263
<!-- Archived Packages -->
63-
<div class="grid-isotope">
64+
<div class="grid-isotope package-grid-isotope">
65+
<div class="grid-sizer"></div>
6466
{% for apackage in packages_sorted %}
6567
{% if apackage.active == false %}
6668
{% include package-grid.html %}

_sass/minimal-mistakes/_pyos-grid.scss

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -163,30 +163,19 @@ $colors: (
163163
// do not adjust the display or structure of the cards element.
164164
/* Package cards splash */
165165

166-
.element-item.cards {
167-
padding: 0;
168-
margin: 2em;
169-
}
170-
166+
// Base card styles - shared by both people and package cards
171167
.cards {
172168
top: 0px;
173169
position: relative;
174170
background-color: #fff;//#fcfbf5;
175171
text-decoration: none;
176-
z-index: 0;
172+
z-index: 1;
177173
overflow: hidden;
178174
font-size: .8em;
179175
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
180176
margin-right: auto!important;
181177
margin-left: auto!important;
182178

183-
// Remove padding from top for person images
184-
.person_img {
185-
margin-top: 0;
186-
margin-left: 0;
187-
margin-right: 0;
188-
}
189-
190179
&__image {
191180
max-height: calc($small / 3);
192181
overflow: hidden;
@@ -549,3 +538,24 @@ $colors: (
549538

550539
}
551540
}
541+
542+
// Isotope grid cards - override base .cards auto margins that break isotope layout
543+
.grid-isotope .element-item.cards {
544+
margin-left: 0 !important;
545+
margin-right: 0 !important;
546+
}
547+
548+
// People cards in isotope grid - specific styling
549+
.grid-isotope .element-item.cards.people-card {
550+
padding: 0;
551+
margin: 8px;
552+
553+
// Remove padding from top for person images
554+
.person_img {
555+
margin-top: 0;
556+
margin-left: 0;
557+
margin-right: 0;
558+
}
559+
}
560+
561+
// Package cards in isotope grid - styles are now in _pyos-isotope.scss

0 commit comments

Comments
 (0)