Skip to content

Commit 61bf042

Browse files
authored
feat(css): upgrade responsive styles throughout
2 parents 372e285 + 5edafbc commit 61bf042

15 files changed

+416
-263
lines changed

_includes/feature_row_pyos

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
{% assign feature_row = page.feature_row %}
55
{% endif %}
66

7-
<div class="grid col-3">
7+
<div class="feature-grid">
8+
89
{% for f in feature_row %}
10+
<div class="grid-item">
911
<div class="cards highlight">
1012
{% if f.image_path %}
11-
<div class="cards__image">
13+
<div class="cards-image">
1214
<img src="{{ f.image_path | relative_url }}"
1315
alt="{% if f.alt %}{{ f.alt }}{% endif %}">
1416
{% if f.image_caption %}
@@ -17,23 +19,22 @@
1719
</div>
1820
{% endif %}
1921
<div class="card-body">
20-
<div>
2122
{% if f.title %}
2223
<h2 class="card-title">{{ f.title }}</h2>
2324
{% endif %}
2425

2526
{% if f.excerpt %}
26-
<div class="archive__item-excerpt">
27+
<div class="card-content">
2728
{{ f.excerpt | markdownify }}
2829
</div>
2930
{% endif %}
30-
31-
{% if f.url %}
32-
<p><a href="{{ f.url | relative_url }}" class="btn {{ f.btn_class }}">{{ f.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a></p>
33-
{% endif %}
34-
</div>
31+
<div class="card-footer">
32+
{% if f.url %}
33+
<a href="{{ f.url | relative_url }}" class="btn {{ f.btn_class }}">{{ f.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a>
34+
{% endif %}
35+
</div>
3536
</div>
3637
</div>
38+
</div>
3739
{% endfor %}
38-
3940
</div>

_includes/pyos-blockquote.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
{% if include.author %}<strong>~{{ include.author }}{% endif %}</strong>{%
88
if include.event %}, <em>{{ include.event }}</em>{% endif %}
99
</footer>
10+
<div class="end"></div>
1011
{% endif %}
1112
</blockquote>

_pages/home.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ peer-review:
2929
title: "Community Partnerships"
3030
excerpt: "We partner with domain-specific scientific Python communities such as [Pangeo](https://www.pyopensci.org/software-peer-review/partners/pangeo.html) who want to review affiliated packages. Through this collaboration, we develop community-specific standards that are used in our reviews to evaluate whether a package meets affiliation requirements. This removes the need for communities to develop their own peer review process."
3131
url: https://www.pyopensci.org/partners.html
32-
btn_label: "> Learn More About Our Community Partners"
32+
btn_label: "> Learn About Community Partners"
3333
btn_class: btn--inverse
3434
- image_path: images/python-packaging-guide.png
3535
title: "Simplifying Packaging"
3636
alt: Light purple image that says python packaging guide and below it says simplifying python packaging. The background is a grey laptop with a hand looking down at the laptop the above.
3737
excerpt: "We are creating a beginner-friendly, **community-driven Python packaging guide**. Our guide is reviewed by members of the Python Packaging Authority, maintainers of core packaging tools and members of the scientific Python community. It recommends best practices for you to follow when creating a Python package."
3838
url: https://www.pyopensci.org/python-package-guide/
39-
btn_label: "> Check out our Python packaging guide"
39+
btn_label: "> Read our packaging guide"
4040
btn_class: btn--inverse
4141
---
4242

@@ -86,14 +86,14 @@ peer-review:
8686
<!-- pull blog posts not events -->
8787
{% assign blog_posts = site.posts | where_exp: "item", "item.categories contains 'blog-post'" %}
8888

89-
<div class="notice-highlight" markdown="1">
89+
<div class="notice notice-highlight" markdown="1">
9090
## Recent blog posts & updates
9191

92-
<div class="grid col-3">
92+
<div class="grid">
9393
{% for post in blog_posts limit:3 %}
9494

9595
<div class="cards">
96-
<h3 ><a href="{{ site.baseurl }}{{ post.url}}" rel="permalink">{{ post.title }}</a></h3>
96+
<h3 class="card-title"><a href="{{ site.baseurl }}{{ post.url}}" rel="permalink">{{ post.title }}</a></h3>
9797

9898
<div>
9999
<p>{{ post.excerpt | markdownify }}</p>

_posts/2019-10-26-pyos-min-mistakes-theme.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,16 @@ You can also adjust the width inline:
117117

118118
### Figure -- align right
119119

120-
And now we're going to shift things to the **right align**. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there --- Hey guy! Way to rock that right side. I don't care what the left aligned image says, you look great. Don't let anyone else tell you differently.
120+
Below is a right aligned image
121121

122122
<figure class="align-right">
123123
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024." style="width: 50%;">
124124
<figcaption>Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024</figcaption>
125125
</figure>
126126

127+
128+
And now we're going to shift things to the **right align**. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there --- Hey guy! Way to rock that right side. I don't care what the left aligned image says, you look great. Don't let anyone else tell you differently.
129+
127130
The html looks like this:
128131

129132

@@ -184,23 +187,53 @@ The image below should extend outside of the parent container on right.
184187
> meaningful progress.
185188
{: .highlight-quote }
186189

190+
191+
### Quotes using include files
192+
187193
You can also create blockquotes using include files.
188194
Below is a green and magenta version of the same quote
189195

190-
```
196+
````html
197+
{% raw %}
191198
{% include pyos-blockquote.html quote="[*I want to... *] Streamline the development of good quality, socially responsible, and easily shareable software." author="Anonymous" event="AGU 2019 Townhall" class="highlight magenta" %}
192-
```
199+
{% endraw %}
200+
````
193201

194202
{% include pyos-blockquote.html quote="[*I want to... *] Streamline the development of good quality, socially responsible, and easily shareable software." author="Anonymous" event="AGU 2019 Townhall" class="highlight magenta" %}
195203

204+
```markdown
205+
{% raw %}
206+
{% include pyos-blockquote.html quote="[*I want to... *] Streamline the development of good quality, socially responsible, and easily shareable software." author="Anonymous" event="AGU 2019 Townhall" class="highlight purple" %}
207+
{% endraw %}
208+
```
209+
210+
{% include pyos-blockquote.html quote="[*I want to... *] Streamline the development of good quality, socially responsible, and easily shareable software." author="Anonymous" event="AGU 2019 Townhall" class="highlight purple" %}
211+
196212
The default color for the quotes is the pyos teal green.
197213

198214
```
215+
{% raw %}
199216
{% include pyos-blockquote.html quote="[*I want to... *] Streamline the development of good quality, socially responsible, and easily shareable software." author="Anonymous" event="AGU 2019 Townhall" class="highlight" %}
217+
{% endraw %}
200218
```
201219

202220
{% include pyos-blockquote.html quote="[*I want to... *] Streamline the development of good quality, socially responsible, and easily shareable software." author="Anonymous" event="AGU 2019 Townhall" class="highlight" %}
203221

222+
### Quotes in notice blocks
223+
224+
```
225+
<div class="notice">
226+
{% raw %}
227+
{% include pyos-blockquote.html quote="[*I want to... *] Streamline the development of good quality, socially responsible, and easily shareable software." author="Anonymous" event="AGU 2019 Townhall" class="highlight" %}
228+
{% endraw %}
229+
</div>
230+
```
231+
232+
<div class="notice">
233+
{% include pyos-blockquote.html quote="[*I want to... *] Streamline the development of good quality, socially responsible, and easily shareable software." author="Anonymous" event="AGU 2019 Townhall" class="highlight" %}
234+
235+
</div>
236+
204237
## Buttons
205238

206239
Make any link standout more when applying the `.btn .btn--primary` classes.

_posts/2024-08-30-pyopensci-monumental-growth-2024.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ I will leave web and social media growth, which have also shown extraordinary gr
216216

217217
The success of our packaging guide has been remarkable, thanks to the tremendous input and feedback from the community. What began as a simple guide has evolved into a collaborative project, with enthusiastic participation from contributors worldwide.
218218

219-
> @leahawasser @pyOpenSci clicking through and eventually found myself looking at "what is a python package" [www.pyopensci.org] and involuntarily performed a standing ovation. bookmarked it as an example of great docs for an incredibly complex subject with many meanings in many different contexts
220-
{: .highlight-quote }
219+
{% include pyos-blockquote.html quote="@leahawasser @pyOpenSci clicking through and eventually found myself looking at 'what is a Python package' and involuntarily performed a standing ovation. bookmarked it as an example of great docs for an incredibly complex subject with many meanings in many different contexts" author="Mastodon Toot" class="highlight" %}
221220

222221
[View toot on mastodon](https://circumstances.run/@hipsterelectron/112557545629456885)
223222

_sass/minimal-mistakes/_base.scss

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ body {
1515
font-family: $global-font-family;
1616
line-height: 1.6;
1717
weight: $weight-3;
18+
font-size: 1em;
1819

1920
&.overflow--hidden {
2021
/* when primary navigation is visible, the content in the background won't scroll */
@@ -131,62 +132,81 @@ blockquote {
131132
}
132133
}
133134

135+
%quote-style {
136+
font-weight: bold;
137+
font-size: 100px;
138+
color: $pyos-teal;
139+
line-height: 0;
140+
}
141+
134142
/* Block quote with bigger quotes*/
135143
blockquote.highlight-quote {
136144
border: none;
137145
font-family: Georgia, "Times New Roman", Times, serif;
138-
margin-bottom: 130px;
139-
margin-top: 110px;
140-
padding: 0 80px 0 30px;
141-
max-width: 35rem;
146+
margin-top: 6rem;
147+
margin-bottom: 4rem;
148+
padding: 0 2rem;
149+
max-width: $medium;
142150

143151
footer {
144-
text-align: left;
145152
font-style: italic;
146153
font-weight: 500;
147154
text-align: right;
148155
}
149156

157+
&:after{
158+
@extend %quote-style;
159+
position: absolute;
160+
content: close-quote;
161+
right: 4rem;
162+
margin-top:2rem;
163+
}
164+
& > div.end {
165+
position: relative;
166+
}
167+
168+
& > div.end:after {
169+
@extend %quote-style;
170+
content: close-quote;
171+
position: absolute;
172+
right: 0;
173+
margin-top:2.8rem;
174+
}
175+
150176
p {
151-
font-size: 21px;
177+
font-size: 1.3rem;
152178
position: relative;
153-
margin-bottom: 10px;
154-
155-
&:before,
156-
&:after {
157-
font-weight: bold;
158-
font-size: 100px;
159-
color: $pyos-teal;
160-
line-height: 0;
161-
}
179+
margin-bottom: 0.63rem;
162180

163181
&:before {
182+
@extend %quote-style;
164183
position: absolute;
165184
content: open-quote;
166185
left: 0;
167186
top: -20px;
168187
}
169-
170-
&:after {
171-
content: close-quote;
172-
position: absolute;
173-
right: 0;
174-
bottom: -80px;
175-
}
176188
}
177-
// Success class (magenta)
178-
&.magenta p {
179-
&:before,
180-
&:after {
189+
190+
&.magenta {
191+
& > div.end:after,
192+
p:before,
193+
p:after {
181194
color: $pyos-magenta;
182195
}
183196
}
184-
&.purple p {
185-
&:before,
186-
&:after {
197+
198+
&.purple {
199+
& > div.end:after,
200+
p:before,
201+
p:after {
187202
color: $pyos-mediumpurple;
188203
}
189204
}
205+
206+
@include breakpoint('max-width: #$mobile') {
207+
padding: 0;
208+
//font-size: 2rem;
209+
}
190210
}
191211

192212
/* links */

_sass/minimal-mistakes/_mixins.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,11 @@
9090
background-color: $background-color;
9191
color: yiq-contrast-color($background-color, $dark, $light, $threshold);
9292
}
93+
94+
95+
// breakpoint max width mixin
96+
@mixin breakpoint-max-width($max-width) {
97+
@media screen and (max-width: #{$max-width}) {
98+
@content;
99+
}
100+
}

_sass/minimal-mistakes/_navigation.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@
514514
border-radius: $border-radius;
515515
-webkit-box-shadow: $box-shadow;
516516
box-shadow: $box-shadow;
517+
max-width: $medium;
517518

518519
.nav__title {
519520
color: #fff;
@@ -527,22 +528,24 @@
527528
.active a {
528529
@include yiq-contrasted($active-color);
529530
}
530-
}
531531

532-
ul.toc__menu li ul li a {
533-
font-size: 1.2em;
532+
@include breakpoint($large) {
533+
max-width: $medium;
534+
font-size: $type-size-4;
535+
}
534536
}
535537

538+
536539
// Force the sub menu in a toctree to be the same size as the main menu
537540
.toc__menu {
538541
margin: 0;
539542
padding: 0;
540543
width: 100%;
541544
list-style: none;
542-
font-size: $type-size-6;
545+
font-size: $type-size-5;
543546

544547
@include breakpoint($large) {
545-
font-size: $type-size-7;
548+
font-size: $type-size-6;
546549
}
547550

548551
a {
@@ -565,7 +568,6 @@ ul.toc__menu li ul li a {
565568

566569
li ul li ul > li a {
567570
padding-left: 1.75rem;
568-
font-size: 1.2em;
569571
}
570572

571573
li ul li ul li ul > li a {

0 commit comments

Comments
 (0)