Skip to content

Commit b484f77

Browse files
lazarusAasinghvi17
andauthored
up compats and fixes docs (#318)
* clean up and compat updates * failing cases and gallery css * remove `@ref` in healpix --------- Co-authored-by: Anshul Singhvi <[email protected]>
1 parent eead4ee commit b484f77

File tree

16 files changed

+197
-404
lines changed

16 files changed

+197
-404
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,6 @@ jobs:
6767
run: |
6868
xvfb-run -s '-screen 0 1024x768x24' julia --project=docs -e '
6969
using Pkg
70-
Pkg.add([
71-
PackageSpec(path = pwd()),
72-
PackageSpec(name = "DocumenterVitepress", rev = "master"),
73-
PackageSpec(name = "Makie", rev = "master"),
74-
PackageSpec(name = "MakieCore", rev = "master"),
75-
PackageSpec(name = "CairoMakie", rev = "master"),
76-
PackageSpec(name = "GLMakie", rev = "master"),
77-
PackageSpec(name = "Rasters", rev = "main"),
78-
PackageSpec(name = "ArchGDAL", rev = "master"),
79-
PackageSpec(url = "https://github.com/asinghvi17/OhMyCards.jl", rev = "main"),
80-
PackageSpec(url = "https://github.com/HolyLab/FlyThroughPaths.jl", rev = "main"),
81-
PackageSpec(url = "https://github.com/Moelf/FHist.jl", rev = "main"),
82-
])
8370
Pkg.instantiate()'
8471
env:
8572
DISPLAY: ':0'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ docs/package-lock.json
2424
test_images/
2525

2626
docs/GeoMakieDocumenterBlocks/Manifest.toml
27+
.qodo

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2424
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
2525

2626
[compat]
27-
Colors = "0.12"
27+
Colors = "0.12, 0.13"
2828
CoordinateTransformations = "0.6.3"
2929
Downloads = "1"
3030
GeoFormatTypes = "0.4"
@@ -41,7 +41,7 @@ NaturalEarth = "0.1"
4141
Proj = "1"
4242
Reexport = "1"
4343
Statistics = "1"
44-
StructArrays = "0.4, 0.5, 0.6"
44+
StructArrays = "0.4, 0.5, 0.6, 0.7"
4545
julia = "1.6"
4646

4747
[extras]

docs/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
3636
MakieCore = "20f20a25-4f0e-4fdf-b5d1-57303727442b"
3737
MakieThemes = "e296ed71-da82-5faf-88ab-0034a9761098"
3838
NaturalEarth = "436b0209-26ab-4e65-94a9-6526d86fea76"
39+
OhMyCards = "1d55750c-489b-49e7-adc5-a004f92ae42b"
3940
Polylabel = "49a44318-e865-4b63-9842-695152d634c1"
4041
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
4142
Proj = "c94c279d-25a6-4763-9509-64d165bea63e"
@@ -46,6 +47,10 @@ TopoPlots = "2bdbdf9c-dbd8-403f-947b-1a4e0dd41a7a"
4647
WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"
4748
ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"
4849

50+
[sources]
51+
OhMyCards = {url = "https://github.com/asinghvi17/OhMyCards.jl/"}
52+
GeoMakie = {path = ".."}
53+
4954
[compat]
5055
Documenter = "1"
5156
Makie = "0.22"

docs/make.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using Literate
2424

2525
examples = String[
2626
"basic.jl",
27-
"new.jl",
27+
# "new.jl",
2828
"axis_config.jl",
2929
"italy.jl",
3030
"histogram.jl",
@@ -35,7 +35,7 @@ examples = String[
3535
# "geostationary_image.jl",
3636
# "multiple_crs.jl",
3737
"rasters.jl",
38-
"raster_warping_masking.jl",
38+
# "raster_warping_masking.jl", # this one fails due to Rasters.boolmask error
3939
"healpix.jl",
4040
# "is_it_a_plane.jl",
4141
joinpath("cartopy", "annotation.jl"),

docs/package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
{
2+
"devDependencies": {
3+
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.15.0",
4+
"@types/d3-format": "^3.0.4",
5+
"@types/node": "^22.13.9",
6+
"markdown-it": "^14.1.0",
7+
"markdown-it-mathjax3": "^4.3.2",
8+
"vitepress": "^1.6.3",
9+
"vitepress-plugin-tabs": "^0.6.0"
10+
},
211
"scripts": {
312
"docs:dev": "vitepress dev build/.documenter",
413
"docs:build": "vitepress build build/.documenter",
514
"docs:preview": "vitepress preview build/.documenter"
615
},
716
"dependencies": {
8-
"markdown-it": "^14.0.0",
9-
"markdown-it-mathjax3": "^4.3.2",
10-
"vitepress": "^1.0.0-rc.43",
11-
"vitepress-plugin-tabs": "^0.5.0",
12-
"vitest": "^1.3.0",
13-
"@shikijs/transformers": "^1.1.7",
17+
"d3-format": "^3.1.0",
1418
"markdown-it-footnote": "^4.0.0"
1519
}
16-
}
20+
}

docs/src/.vitepress/config.mts

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

docs/src/.vitepress/logo.png

-478 KB
Binary file not shown.

docs/src/.vitepress/theme/cards.css

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/** ---------------------------------------------------------------------------
2+
* Gallery styling for example gallery
3+
*/
4+
5+
6+
.grid-container {
7+
display: grid;
8+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
9+
gap: 10px;
10+
}
11+
12+
.gallery-image .heading {
13+
text-align: center;
14+
font-size: 2em;
15+
letter-spacing: 1px;
16+
padding: 40px;
17+
color: black;
18+
}
19+
20+
.gallery-image {
21+
padding: 20px;
22+
display: flex;
23+
flex-wrap: wrap;
24+
justify-content: center;
25+
}
26+
27+
.gallery-image :deep(img) {
28+
height: 260px;
29+
width: 300px;
30+
transform: scale(1);
31+
transition: transform 0.4s ease;
32+
position: absolute;
33+
bottom:0px;
34+
}
35+
36+
37+
.img-box {
38+
box-sizing: content-box;
39+
border-radius: 14px;
40+
margin: 5px;
41+
height: 225px;
42+
width: 300px;
43+
overflow: hidden;
44+
display: inline-block;
45+
color: white;
46+
position: relative;
47+
background-color: white;
48+
border: 2px solid var(--vp-c-bg-alt);
49+
bottom:0px;
50+
}
51+
52+
.img-box h2 {
53+
border-top: 0;
54+
}
55+
56+
.img-box img {
57+
height: 200px;
58+
width: 300px;
59+
object-fit: scale-down;
60+
transition: transform 0.3s ease;
61+
bottom: 0px;
62+
}
63+
64+
.caption {
65+
position: relative;
66+
top: -60px;
67+
color: black;
68+
left: 10px;
69+
opacity: 1;
70+
transition: transform 0.3s ease;
71+
}
72+
73+
.subcaption {
74+
position: absolute;
75+
bottom: 5px;
76+
color: gray;
77+
left: 10px;
78+
opacity: 0;
79+
transition: transform 0.3s ease;
80+
}
81+
82+
.transparent-box1 {
83+
height: 225px;
84+
width: 300px;
85+
background-color: transparent;
86+
position: absolute;
87+
top: 0;
88+
left: 0;
89+
opacity: 0.9;
90+
transition: background-color 0.3s ease;
91+
}
92+
93+
.transparent-box2 {
94+
/* height: 100px; */
95+
/* width: 250px; */
96+
background-color: transparent;
97+
/* position: absolute; */
98+
/* top: 150px; */
99+
left: 0;
100+
opacity: 0.9;
101+
transition: background-color 0.3s ease;
102+
}
103+
104+
.img-box:hover img {
105+
transform: scale(1.1);
106+
}
107+
108+
.img-box:hover .transparent-box1 {
109+
background-color: var(--vp-c-bg-alt);
110+
}
111+
112+
.img-box:hover .transparent-box2 {
113+
background-color: var(--vp-c-bg-alt);
114+
}
115+
116+
.img-box:hover .caption {
117+
/* transform: translateY(-20px); */
118+
opacity: 1;
119+
}
120+
121+
.img-box:hover .subcaption {
122+
transform: translateY(-20px);
123+
opacity: 1;
124+
}
125+
126+
.img-box:hover {
127+
border: 2px solid var(--vp-c-brand-light);
128+
cursor: pointer;
129+
}
130+
131+
.caption>p:nth-child(2) {
132+
font-size: 0.8em;
133+
}
134+
.subcaption>p:nth-child(2) {
135+
font-size: 0.8em;
136+
}
137+
138+
.opacity-low {
139+
opacity: 0.85;
140+
}

docs/src/.vitepress/theme/index.ts

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,40 @@
11
// .vitepress/theme/index.ts
22
import { h } from 'vue'
3-
import type { Theme } from 'vitepress'
43
import DefaultTheme from 'vitepress/theme'
4+
import type { Theme as ThemeConfig } from 'vitepress'
5+
6+
import {
7+
NolebaseEnhancedReadabilitiesMenu,
8+
NolebaseEnhancedReadabilitiesScreenMenu,
9+
} from '@nolebase/vitepress-plugin-enhanced-readabilities/client'
10+
11+
import VersionPicker from "@/VersionPicker.vue"
12+
import AuthorBadge from '@/AuthorBadge.vue'
13+
import Authors from '@/Authors.vue'
514

615
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
7-
import './style.css'
816

9-
export default {
17+
import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css'
18+
import './style.css' // You could setup your own, or else a default will be copied.
19+
import './docstrings.css' // You could setup your own, or else a default will be copied.
20+
import './cards.css'
21+
22+
export const Theme: ThemeConfig = {
1023
extends: DefaultTheme,
1124
Layout() {
1225
return h(DefaultTheme.Layout, null, {
13-
// https://vitepress.dev/guide/extending-default-theme#layout-slots
26+
'nav-bar-content-after': () => [
27+
h(NolebaseEnhancedReadabilitiesMenu), // Enhanced Readabilities menu
28+
],
29+
// A enhanced readabilities menu for narrower screens (usually smaller than iPad Mini)
30+
'nav-screen-content-after': () => h(NolebaseEnhancedReadabilitiesScreenMenu),
1431
})
1532
},
1633
enhanceApp({ app, router, siteData }) {
17-
enhanceAppWithTabs(app)
34+
enhanceAppWithTabs(app);
35+
app.component('VersionPicker', VersionPicker);
36+
app.component('AuthorBadge', AuthorBadge)
37+
app.component('Authors', Authors)
1838
}
19-
} satisfies Theme
39+
}
40+
export default Theme

0 commit comments

Comments
 (0)