Skip to content

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jagot committed Jul 24, 2024
1 parent 794da31 commit a928ec4
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ makedocs(;
"Home" => "index.md",
"GGThemr" => "themes/ggthemr.md",
"BBC" => "themes/bbc.md",
"Gruvbox" => "themes/gruvbox.md",
"API" => "api.md"
],
warnonly = true,
Expand All @@ -68,4 +69,4 @@ deploydocs(;
)

# clean up
# rm(joinpath(@__DIR__, "src", "themes", "ggthemr.jl"))
# rm(joinpath(@__DIR__, "src", "themes", "ggthemr.jl"))
45 changes: 45 additions & 0 deletions docs/src/themes/gruvbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
```@setup gruvbox
using MakieThemes, CairoMakie
```

# Gruvbox

The Gruvbox theme[^1] is accessible through `color_gruvbox_light()`
and `color_gruvbox_dark()`.

[^1]:
<https://github.com/morhetz/gruvbox>;
<https://github.com/gruvbox-community/gruvbox>

```julia
MakieThemes.demofigure(color_gruvbox_light())
```
```@raw html
<img src="../../assets/img/demofigure/gruvbox-light.png" alt="Gruvbox light color theme" width="900"/>
```

```julia
MakieThemes.demofigure(color_gruvbox_dark())
```
```@raw html
<img src="../../assets/img/demofigure/gruvbox-dark.png" alt="Gruvbox dark color theme" width="900"/>
```

```julia
MakieThemes.demoscatter(color_gruvbox_light())
```
```@raw html
<img src="../../assets/img/demoscatter/gruvbox-light.png" alt="Gruvbox light color theme" width="900"/>
```

```julia
MakieThemes.demoscatter(color_gruvbox_dark())
```
```@raw html
<img src="../../assets/img/demoscatter/gruvbox-dark.png" alt="Gruvbox dark color theme" width="900"/>
```

```@docs
color_gruvbox_light
color_gruvbox_dark
```
Binary file added img/demofigure/gruvbox-dark.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 img/demofigure/gruvbox-light.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 img/demoscatter/gruvbox-dark.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 img/demoscatter/gruvbox-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/Gruvbox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,23 @@ function color_gruvbox(palette; use_alt_bg=true)
)
end

"""
color_gruvbox_light(; use_alt_bg=true)
Set up the light version of the Gruvbox color theme. Optionally, use a
slightly different background color for axes backgrounds, etc
(default).
"""
color_gruvbox_light(;kwargs...) =
color_gruvbox(gruvbox_light_palette; kwargs...)

"""
color_gruvbox_dark(; use_alt_bg=true)
Set up the dark version of the Gruvbox color theme. Optionally, use a
slightly different background color for axes backgrounds, etc
(default).
"""
color_gruvbox_dark(;kwargs...) =
color_gruvbox(gruvbox_dark_palette; kwargs...)

Expand Down

0 comments on commit a928ec4

Please sign in to comment.