Skip to content

Commit d059889

Browse files
committed
Use markdown for the guide cards
1 parent 019dd6a commit d059889

File tree

4 files changed

+39
-61
lines changed

4 files changed

+39
-61
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.pyc
22
__pycache__/
33
site/
4+
.vscode/
45
.cache/

.vscode/settings.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/_templates/guide_cards.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
<div class="md-typeset">
2-
<div class="grid cards guide-cards-container">
3-
{% for title, guide in guides.items() %}
4-
<a href="{{ guide.folder|urlencode }}/" class="guide-card-link">
5-
<div class="card guide-card">
6-
<img src="{{ guide.folder|urlencode }}/image.png" alt="{{ title }}" class="guide-card-image">
7-
<div class="guide-card-content">
8-
<hr class="guide-card-divider">
9-
<h3 class="guide-card-title">{{ title }}</h3>
10-
<p class="guide-card-author">{{ guide.author }}</p>
11-
</div>
12-
</div>
13-
</a>
14-
{% endfor %}
15-
</div>
16-
</div>
1+
<div class="grid cards" style="text-align: center;" markdown>
2+
{% for title, guide in guides.items() %}
3+
- ## {{ title }} { .guide-toc-heading }
4+
[![{{ title }}]({{ guide.folder|urlencode }}/image.png){ .guide-card-image }]({{ guide.folder|urlencode }}/)
5+
6+
---
7+
8+
[**{{ title }}**]({{ guide.folder|urlencode }}/){ .guide-card-title }
9+
[*{{ guide.author }}*]({{ guide.folder|urlencode }}/){ .guide-card-author }
10+
{% endfor %}
11+
</div>
12+
13+

docs/stylesheets/extra.css

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,66 +12,53 @@
1212
}
1313

1414
/* Guide Cards Styles */
15-
.guide-cards-container {
16-
display: grid;
17-
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
18-
gap: 1rem;
19-
margin: 1rem 0;
20-
}
21-
22-
.guide-card-link {
23-
text-decoration: none;
24-
color: inherit;
25-
}
26-
27-
.guide-card {
28-
border-radius: 0.2rem;
29-
overflow: hidden;
30-
transition: box-shadow 0.25s, transform 0.25s;
31-
background: var(--md-default-bg-color);
32-
cursor: pointer;
33-
box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.05), 0 0 0.05rem rgba(0,0,0,0.1);
34-
}
35-
36-
.guide-card:hover {
37-
box-shadow: 0 0.4rem 1rem rgba(0,0,0,0.1), 0 0 0.1rem rgba(0,0,0,0.1) !important;
38-
transform: translateY(-2px);
39-
}
40-
4115
.guide-card-image {
4216
width: 100%;
4317
height: auto;
4418
display: block;
4519
object-fit: cover;
4620
}
4721

48-
.guide-card-content {
49-
padding: 1rem;
50-
text-align: center;
51-
}
52-
53-
.guide-card-divider {
54-
margin: 0 0 1rem 0;
55-
border: none;
56-
border-top: 1px solid var(--md-default-fg-color--lightest);
22+
/* Hide guide TOC headings but keep anchors functional */
23+
.guide-toc-heading {
24+
position: absolute;
25+
width: 1px;
26+
height: 1px;
27+
padding: 0;
28+
margin: -1px;
29+
overflow: hidden;
30+
clip: rect(0, 0, 0, 0);
31+
white-space: nowrap;
32+
border: 0;
5733
}
5834

5935
.guide-card-title {
60-
margin: 0 0 0.25rem 0;
36+
/* margin: 0 0 0.25rem 0; */
6137
font-size: 1.1rem;
6238
font-weight: 600;
39+
color: var(--md-default-fg-color) !important;
40+
text-decoration: none;
41+
}
42+
43+
.guide-card-title:hover {
44+
text-decoration: none;
6345
}
6446

6547
.guide-card-author {
6648
/* margin: 0; */
67-
margin-top: -1.0rem;
49+
margin-top: -0.25rem;
6850
margin-bottom: 0;
6951
font-size: 0.75rem;
70-
color: var(--md-default-fg-color--light);
52+
color: var(--md-default-fg-color--light) !important;
7153
font-style: italic;
7254
opacity: 0.8;
55+
text-decoration: none;
56+
display: block;
7357
}
7458

59+
.guide-card-author:hover {
60+
text-decoration: none;
61+
}
7562

7663
/* Contributors Grid */
7764
.contributors-grid {

0 commit comments

Comments
 (0)