Skip to content

Commit

Permalink
Prefix InterLinks links with the logos of the corresponding packages (#…
Browse files Browse the repository at this point in the history
…428)

* initial sketch of symbols upfront interlinks.
* Fix two typos.
* add changelog.
  • Loading branch information
kellertuer authored Dec 6, 2024
1 parent a2a4f5a commit f67ef6b
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable Changes to the Julia package `Manopt.jl` will be documented in this
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.5] - unreleased

### Added

* icons upfront external links when they link to another package or wikipedia.

## [0.5.4] - November 27, 2024

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ links = InterLinks(
makedocs(;
format=Documenter.HTML(;
prettyurls=run_on_CI || ("--prettyurls" ARGS),
assets=["assets/favicon.ico", "assets/citations.css"],
assets=["assets/favicon.ico", "assets/citations.css", "assets/link-icons.css"],
size_threshold_warn=200 * 2^10, # raise slightly from 100 to 200 KiB
size_threshold=300 * 2^10, # raise slightly 200 to to 300 KiB
),
Expand Down
42 changes: 42 additions & 0 deletions docs/src/assets/link-icons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
a[href^="https://juliamanifolds.github.io/ManifoldsBase.jl/"]::before {
content: "";
background-image: url('logo-manifoldsbase.png');
background-size: contain;
background-repeat: no-repeat;
display: inline-block;
height: 1em;
width: 1em;
margin-right: 4px;
vertical-align: middle;
}
a[href^="https://juliamanifolds.github.io/Manifolds.jl/"]::before {
content: "";
background-image: url('logo-manifolds.png');
background-size: contain;
background-repeat: no-repeat;
display: inline-block;
height: 1em;
width: 1em;
margin-right: 4px;
vertical-align: middle;
}
a[href^="https://en.wikipedia.org/"]::before {
content: "";
background-image: url('wikipedia.png');
background-size: contain;
background-repeat: no-repeat;
display: inline-block;
height: 1em;
width: 1em;
margin-right: 4px;
vertical-align: middle;
}

@media (prefers-color-scheme: dark) {
a[href^="https://juliamanifolds.github.io/ManifoldsBase.jl/"]::before {
background-image: url('logo-manifoldsbase-dark.png');
}
a[href^="https://juliamanifolds.github.io/Manifolds.jl/"]::before {
background-image: url('logo-manifolds-dark.png');
}
}
Binary file added docs/src/assets/logo-manifolds-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 docs/src/assets/logo-manifolds.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/logo-manifoldsbase-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 docs/src/assets/logo-manifoldsbase.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/wikipedia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/documentation_glossary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,15 @@ define!(
:grad_f,
:description,
(; M="M", p="p") ->
"the (Riemannian) gradient ``$(_tex(:grad))f``: $(_math(:M, M=M))$(_math(:TpM; M=M, p=p)) of f as a function `(M, p) -> X` or a function `(M, X, p) -> X` computing `X` in-place",
"the (Riemannian) gradient ``$(_tex(:grad))f: $(_math(:M, M=M))$(_math(:TpM; M=M, p=p))`` of f as a function `(M, p) -> X` or a function `(M, X, p) -> X` computing `X` in-place",
)

define!(
:Variable,
:Hess_f,
:description,
(; M="M", p="p") ->
"the (Riemannian) Hessian ``$(_tex(:Hess))f``: $(_math(:TpM, M=M, p=p))$(_math(:TpM; M=M, p=p)) of f as a function `(M, p, X) -> Y` or a function `(M, Y, p, X) -> Y` computing `Y` in-place",
"the (Riemannian) Hessian ``$(_tex(:Hess))f: $(_math(:TpM, M=M, p=p))$(_math(:TpM; M=M, p=p))`` of f as a function `(M, p, X) -> Y` or a function `(M, Y, p, X) -> Y` computing `Y` in-place",
)

define!(
Expand Down

0 comments on commit f67ef6b

Please sign in to comment.