Skip to content

Commit 1263745

Browse files
authored
enh: fix styles across all cards (#776)
* enh: refactor styles to organize ppl card styles * enh: final cleanup fixes
1 parent b969d04 commit 1263745

File tree

6 files changed

+279
-188
lines changed

6 files changed

+279
-188
lines changed

_data/navigation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ main:
1818
- title: "Peer review guide"
1919
url: "https://www.pyopensci.org/software-peer-review/"
2020
icon: "fas fa-external-link-alt"
21-
- title: "Python Packaging"
21+
- title: "Packaging"
2222
icon: "fas fa-fw fa-envelope-square"
2323
url:
2424
sub-nav:
@@ -52,7 +52,7 @@ main:
5252
- title: "Handbook"
5353
icon: "fas fa-external-link-alt"
5454
url: "https://www.pyopensci.org/handbook/"
55-
- title: "Get Involved"
55+
- title: "Support Us"
5656
sub-nav:
5757
- title: "Volunteer"
5858
url: "/volunteer.html"

_sass/minimal-mistakes/_footer.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
margin: 0;
6868
padding: 0;
6969
list-style-type: none;
70-
text-align: center;
7170
}
7271

7372
li {
@@ -85,7 +84,7 @@
8584

8685
a {
8786
padding-right: 10px;
88-
font-weight: normal;
87+
font-weight: bold;
8988
}
9089
}
9190

_sass/minimal-mistakes/_pyos-cards.scss

Lines changed: 186 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,94 @@
1+
/* ==========================================================================
2+
BASE CARD STYLES
3+
========================================================================== */
4+
5+
// Base card styles - shared by both people and package cards
6+
.cards {
7+
top: 0px;
8+
position: relative;
9+
background-color: #fff;//#fcfbf5;
10+
text-decoration: none;
11+
z-index: 1;
12+
overflow: hidden;
13+
font-size: .8em;
14+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
15+
margin: .5em;
16+
17+
&__image {
18+
max-height: calc($small / 3);
19+
overflow: hidden;
20+
border-radius: 10px;
21+
}
22+
23+
&:hover {
24+
transition: all 0.2s ease-out;
25+
transform: translateY(-3px);
26+
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
27+
top: -4px;
28+
border: 1px solid #cccccc;
29+
background-color: white;
30+
cursor: pointer;
31+
}
32+
33+
&:hover:before {
34+
transform: scale(2.15);
35+
}
36+
37+
p {
38+
font-size: 1em;
39+
line-height: 1.8;
40+
}
41+
42+
h2 {
43+
font-size: 1.5rem;
44+
margin-bottom: 1rem!important;
45+
46+
a {
47+
text-decoration: none;
48+
font-size: 1.2em;
49+
}
50+
51+
&.archive__item-title {
52+
font-size: 1.1em !important;
53+
}
54+
}
55+
56+
h3.card__title.no_toc,
57+
.card__title.no_toc {
58+
margin-top: 1.2em;
59+
font-size: 1.9em;
60+
color: $pyos-darkpurple;
61+
}
62+
63+
.page__meta.contributors {
64+
font-size: .95rem;
65+
line-height: 1.3rem;
66+
}
67+
68+
.contributors a {
69+
text-decoration: none;
70+
}
71+
72+
.package_description {
73+
font-size: .95rem;
74+
line-height: 1.5rem;
75+
}
76+
77+
ul {
78+
list-style-type: none;
79+
margin-left: 0;
80+
padding: .2em;
81+
82+
li {
83+
font-size: 1rem;
84+
a {
85+
text-decoration: none;
86+
//font-size: 1.2em
87+
}
88+
}
89+
}
90+
}
91+
192
.cards-image figure {
293
margin: 0;
394
}
@@ -17,8 +108,16 @@
17108

18109
.tutorial__container {
19110
display: grid;
20-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); // Adjust the minmax values as needed
21111
grid-gap: 20px;
112+
grid-template-columns: 1fr; // Mobile: 1 column
113+
114+
@media (min-width: $small) {
115+
grid-template-columns: repeat(2, 1fr); // Small: 2 columns
116+
}
117+
118+
@media (min-width: $medium) {
119+
grid-template-columns: repeat(3, 1fr); // Medium: 3 columns
120+
}
22121

23122
// Ensure all cards have the height of the tallest card
24123
align-items: stretch;
@@ -264,3 +363,89 @@
264363
width: 40%;
265364
}
266365
}
366+
367+
/* ==========================================================================
368+
PEOPLE CARDS
369+
========================================================================== */
370+
371+
// Base people card styles - semantic nesting approach
372+
.people-card {
373+
padding: 0;
374+
.people-card__content {
375+
// Ensure content wrapper has no padding (overrides div > div rule)
376+
padding: 0;
377+
overflow: hidden; // Ensures image doesn't overflow card boundaries
378+
379+
// Image: full width, no padding - breaks out to card edges
380+
.person_img {
381+
filter: drop-shadow(3px 3px 3px #999);
382+
margin: 0;
383+
padding: 0;
384+
width: 100%;
385+
display: block;
386+
overflow: hidden;
387+
388+
img {
389+
width: 100%;
390+
aspect-ratio: 1;
391+
object-fit: cover;
392+
display: block;
393+
margin: 0;
394+
padding: 0;
395+
}
396+
}
397+
398+
// Text elements: semantic selectors with padding
399+
h4.person_name {
400+
padding: 0 1em;
401+
margin-top: 0.6em;
402+
margin-bottom: 0;
403+
font-size: 1.4rem;
404+
405+
a {
406+
text-decoration: none;
407+
}
408+
}
409+
410+
p.page__meta {
411+
padding: 0 1em;
412+
// Inherits other styles from _page.scss
413+
}
414+
415+
p.contrib_org {
416+
padding: 0 1em;
417+
font-size: 0.875rem;
418+
font-weight: normal;
419+
margin-bottom: 0 !important;
420+
}
421+
422+
.ppl_social {
423+
padding: 0 1em 1em 1em; // includes bottom padding
424+
font-size: 0.875rem;
425+
font-weight: normal;
426+
margin-bottom: 0 !important;
427+
428+
a {
429+
margin-right: 10px;
430+
text-decoration: none !important;
431+
}
432+
433+
// Font Awesome icons inherit font-size from parent
434+
.fa-brands,
435+
.fa-solid {
436+
font-size: inherit;
437+
}
438+
}
439+
}
440+
}
441+
442+
// Responsive adjustments for people cards
443+
@media screen and (max-width: $mobile) {
444+
.people-card {
445+
.people-card__content {
446+
.ppl_social {
447+
font-size: 0.9em !important;
448+
}
449+
}
450+
}
451+
}

0 commit comments

Comments
 (0)