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

✨ Uses inline shortcode in alerts for large texts #235

Merged
merged 2 commits into from
Apr 20, 2021
Merged

✨ Uses inline shortcode in alerts for large texts #235

merged 2 commits into from
Apr 20, 2021

Conversation

OCram85
Copy link
Contributor

@OCram85 OCram85 commented Apr 15, 2021

πŸ“¦ Content

  • Adds .Inner block for large text content

You can use this shortcode in several ways:

  1. with named parameter
{{< alert icon="πŸ‘‰" text="foobar" />}}
  1. with inline form
{{< alert icon="πŸ‘‰" >}}
fghfghfghghfg
{{< /alert >}}

πŸ”₯ Important

@h-enk h-enk added this to the v0.3.0 milestone Apr 19, 2021
@h-enk
Copy link
Member

h-enk commented Apr 19, 2021

πŸ‘ Nice!

One little thing though, please keep the safeHTML function for the text parameter. Doks /getdoks.org would otherwise need extensive rework.

..
{{ with .Get "text"}}
  <div class="w-100">{{ . | safeHTML }} </div>
{{ else }}
..

@h-enk
Copy link
Member

h-enk commented Apr 19, 2021

  • Always use the terminating / in shortcodes. Otherwise hugo will populate empty .Inner params which truncates the page in this case

Didn't know that β€” thanks for pointing out

@OCram85
Copy link
Contributor Author

OCram85 commented Apr 20, 2021

πŸ‘ Nice!

One little thing though, please keep the safeHTML function for the text parameter. Doks /getdoks.org would otherwise need extensive rework.

..
{{ with .Get "text"}}
  <div class="w-100">{{ . | safeHTML }} </div>
{{ else }}
..

Sure, the safeHTLM part got lost somehow πŸ˜„

@h-enk h-enk merged commit 60741d0 into thuliteio:master Apr 20, 2021
@OCram85 OCram85 deleted the featureAlert branch April 20, 2021 07:57
adhadse pushed a commit to adhadse/doks that referenced this pull request Sep 17, 2022
✨ Uses inline shortcode in alerts for large texts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants