Skip to content

Commit a21aa25

Browse files
committed
docs: update example page
1 parent a392b15 commit a21aa25

File tree

2 files changed

+29
-38
lines changed

2 files changed

+29
-38
lines changed

docs/examples/index.qmd

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,6 @@ jupyter:
55

66
:::::: {.column-page }
77

8-
::::: {.d-none}
9-
10-
11-
| style | source | layout |
12-
| ----- | ------ | ------ |
13-
| [pkgdown] | [github][pkgdown-code] | Index page with a title and short description for functions listed in each section. Each function gets its own documentation page. |
14-
| [single-page] | [github][sp-code] | Index page has function documentation embedded on it. |
15-
16-
17-
| package | source | about |
18-
| ----- | ------ | ------ |
19-
| [siuba] | [github][sb-code] | Data analysis library. |
20-
| [shiny][shiny] | | Dashboarding framework. |
21-
| [vetiver][vetiver] | [github][vt-code] | A tool to version, share, deploy and monitor ML models. |
22-
| pins | | |
23-
| shinyswatch | | |
24-
| tiledb | | |
25-
26-
27-
: {tbl-colwidths="[20, 20, 60]"}
28-
29-
https://tiledb-inc.github.io/TileDB-Vector-Search/documentation/reference/
30-
31-
[pkgdown]: /examples/pkgdown/reference
32-
[pkgdown-code]: https://github.com/machow/quartodoc/tree/main/examples/pkgdown
33-
[single-page]: /examples/single-page/reference
34-
[sp-code]: https://github.com/machow/quartodoc/tree/main/examples/single-page
35-
[shiny]: https://shiny.rstudio.com/py/api/
36-
[vetiver]: https://rstudio.github.io/vetiver-python/stable/reference/
37-
[vt-code]: https://github.com/rstudio/vetiver-python
38-
[siuba]: https://siuba.org/api/
39-
[sb-code]: https://github.com/machow/siuba.org
40-
41-
:::::
42-
438

449
```{python}
4510
#| output: asis
@@ -56,10 +21,10 @@ def gallery_entry(src_thumbnail: str, href: str, title: str, href_ref=None, href
5621
href_source = href if href_source is None else href_source
5722
5823
return f"""
59-
<div class="card border-2 rounded-3 g-col-12 g-col-sm-6 g-col-md-4 mb-2">
60-
<a href="{href}">
24+
<div class="card border-2 rounded-3 g-col-12 g-col-sm-12 g-col-md-6 g-col-lg-4 mb-2">
25+
<a class="gallery-href" href="{href}">
6126
<div class="card-header py-1 px-2 border-bottom border-1 bg-light">
62-
<p>{title}</p>
27+
<h6>{title}</h6>
6328
</div>
6429
<div class="gallery-card-body">
6530
<img src="{src_thumbnail}">
@@ -76,6 +41,18 @@ def gallery_entry(src_thumbnail: str, href: str, title: str, href_ref=None, href
7641
</div>
7742
"""
7843
44+
def gallery_entry_cta():
45+
href = "https://github.com/machow/quartodoc/discussions/new?category=general&title=New%20Doc%20Site:"
46+
return f"""
47+
<div class="card border-2 rounded-3 g-col-12 g-col-sm-12 g-col-md-6 g-col-lg-4 mb-2">
48+
<a class="gallery-href" href="{href}" target="_blank">
49+
<div class="gallery-card-body gallery-card-lets-gooo">
50+
Get help creating documentation ⚡️
51+
</div>
52+
</a>
53+
</div>
54+
"""
55+
7956
print(
8057
gallery([
8158
gallery_entry(
@@ -113,6 +90,7 @@ print(
11390
href_ref = "https://rstudio.github.io/py-shinyswatch/reference",
11491
href_source = "https://github.com/rstudio/py-shinyswatch",
11592
),
93+
gallery_entry_cta()
11694
])
11795
)
11896
```

docs/styles.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,21 @@ td:first-child a {
6868

6969
.gallery .gallery-card-body {
7070
height: 250px;
71+
padding-bottom: 20px;
7172
}
7273

74+
.gallery .gallery-card-lets-gooo {
75+
font-size: 32px;
76+
text-align: center;
77+
padding: 100px 45px 45px 45px;
78+
width: 100%;
79+
}
80+
81+
.gallery a {
82+
text-decoration: none;
83+
}
84+
85+
7386
.gallery .gallery-card-body img {
7487
width: 100%;
7588
height: 100%;

0 commit comments

Comments
 (0)