Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simpler logo #842

Merged
merged 3 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
GBIF2 = "dedd4f52-e074-43bf-924d-d6bce14ad628"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Expand All @@ -24,4 +25,4 @@ Shapefile = "8e980c4a-a4fe-5da2-b3a7-4b4b0353a2f4"
SpeciesDistributionModels = "3ef73bbf-0321-4d3b-9a2e-5fbebc8e35da"

[sources]
SpeciesDistributionModels = {url = "https://github.com/tiemvanderdeure/SpeciesDistributionModels.jl/"}
SpeciesDistributionModels = {url = "https://github.com/tiemvanderdeure/SpeciesDistributionModels.jl/"}
53 changes: 53 additions & 0 deletions docs/logo.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ENV["RASTERDATASOURCES_PATH"] = "~/Data"
using Rasters, RasterDataSources
import ArchGDAL
using CairoMakie

layers = (:evenness, :range, :contrast, :correlation)
st = RasterStack(EarthEnv{HabitatHeterogeneity}, layers)
ausbounds = X(110 .. 190), Y(-55 .. 5) # Roughly cut out Australia and New Zealand!
aus = st[ausbounds...] |> Rasters.trim

# colorbar attributes
colormap = :batlow
flipaxis = false
tickalign=1
width = 13
ticksize = 13
# figure
fig = with_theme(theme_dark()) do
fig = Figure(; size=(600, 600),
backgroundcolor=:transparent
)
ax = Axis(fig[1,1],
backgroundcolor=:transparent
)
plt = Makie.heatmap!(ax, aus[:correlation]; colormap)
ylims!(ax, -50, 15)
xlims!(ax, 110, 180)
hidedecorations!(ax)
fig
end

mkpath(joinpath(@__DIR__, "src", "assets"))
save(joinpath(@__DIR__, "src", "assets", "logo.png"), fig; px_per_unit=2)
save(joinpath(@__DIR__, "src", "assets", "favicon.png"), fig; px_per_unit=0.25)

# do tiling for background image
function tile_background()
grid_color = RGBAf(0.55, 0.55, 0.55, 0.16)
fig = Figure(; figure_padding= 0, size=(600, 600),
backgroundcolor=:transparent
)
ax = Axis(fig[1,1], backgroundcolor=:transparent,
xgridcolor = grid_color, ygridcolor = grid_color,)
hidespines!(ax, :r, :b)
hidedecorations!(ax, grid=false)
ax.topspinecolor = grid_color
ax.leftspinecolor = grid_color
ax.xticks = 1:9
ax.yticks = 1:10
fig
end
fig = tile_background()
save(joinpath(@__DIR__, "src", "assets", "rect_pattern.png"), fig; px_per_unit=2)
56 changes: 37 additions & 19 deletions docs/src/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import url(https://fonts.googleapis.com/css?family=Space+Mono:regular,italic,700,700italic);
@import url(https://fonts.googleapis.com/css?family=Space+Grotesk:regular,italic,700,700italic);

/* Customize default theme styling by overriding CSS variables:
https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/
Expand All @@ -11,6 +8,10 @@ https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/var
:root {
--vp-layout-max-width: 1440px;
} */
.VPContent.is-home {
background-image: url("../../assets/rect_pattern.png");
background-size: 20%;
}

.VPHero .clip {
white-space: pre;
Expand All @@ -19,24 +20,41 @@ https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/var

/* Fonts */

:root {
/* Typography */
--vp-font-family-base: "Barlow", "Inter var experimental", "Inter var",
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

/* Code Snippet font */
--vp-font-family-mono: "Space Mono", Menlo, Monaco, Consolas, "Courier New",
monospace;
@font-face {
font-family: JuliaMono-Regular;
src: url("https://cdn.jsdelivr.net/gh/cormullion/juliamono/webfonts/JuliaMono-Regular.woff2");
}

:root {
/* Typography */
--vp-font-family-base: "Barlow", "Inter var experimental", "Inter var",
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

/* Code Snippet font */
--vp-font-family-mono: JuliaMono-Regular, monospace;
}
/*
Disable contextual alternates (kind of like ligatures but different) in monospace,
which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well.
This is pretty bad for Julia folks reading even though copy+paste retains the same text.
*/
/* Target elements with class 'mono' */
.mono-no-substitutions {
font-family: "JuliaMono-Light", monospace;
font-feature-settings: "calt" off;
}

/* Alternatively, you can use the following if you prefer: */
.mono-no-substitutions-alt {
font-family: "JuliaMono-Light", monospace;
font-variant-ligatures: none;
}

.mono {
/*
Disable contextual alternates (kind of like ligatures but different) in monospace,
which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well.
This is pretty bad for Julia folks reading even though copy+paste retains the same text.
*/
font-feature-settings: 'calt' 0;
/* If you want to apply this globally to all monospace text: */
pre, code {
font-family: "JuliaMono-Light", monospace;
font-feature-settings: "calt" off;
}

/* Colors */
Expand Down
Binary file added docs/src/assets/favicon.ico
Binary file not shown.
Binary file modified docs/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/rect_pattern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading