mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-05-31 22:14:10 +00:00
- new link effects: target download - effects can now be strings besides bools (to allow for custom download attribute on links) - remove "no*" classes form image as they don't make sense for string effects and are cluttering the image class list for newly introduced effects - refactor attribute parsing for later reusage in menu generation, button topbar, etc.
This commit is contained in:
parent
516e552ece
commit
aaf0c707a2
10 changed files with 230 additions and 93 deletions
docs/content/authoring
|
@ -681,6 +681,34 @@ That's some more text with a footnote.[^someid]
|
|||
Blue light glows blue.
|
||||
{{% /notice %}}
|
||||
|
||||
### Link Effects
|
||||
|
||||
{{% badge color="#7dc903" icon="fa-fw fas fa-puzzle-piece" %}}Relearn{{% /badge %}} This theme allows additional non-standard formatting by setting query parameter at the end of the URL. See the [link effects docs](authoring/linkeffects) for a detailed example and how to configure it.
|
||||
|
||||
#### Target
|
||||
|
||||
Add query parameter `target=_self` or `target=_blank` to override [site-wide settings](authoring/frontmatter/linking#opening-links) of [the target behavior](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target) individuallly for each link.
|
||||
|
||||
````md
|
||||
[Magic in new window](images/magic.gif?target=_blank)
|
||||
````
|
||||
|
||||
{{% notice style="code" icon="eye" title="Result" %}}
|
||||
[Magic in new window](images/magic.gif?target=_blank)
|
||||
{{% /notice %}}
|
||||
|
||||
#### Download
|
||||
|
||||
Add query parameter `download` or `download=myfile.gif` to force your browser [to download the link target](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download) instead of opening it.
|
||||
|
||||
````md
|
||||
[Magic as a download](images/magic.gif?download)
|
||||
````
|
||||
|
||||
{{% notice style="code" icon="eye" title="Result" %}}
|
||||
[Magic as a download](images/magic.gif?download)
|
||||
{{% /notice %}}
|
||||
|
||||
## Images
|
||||
|
||||
### Basic Images
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue