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

feat(alert): simplify usage with Markdown content #111

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

razonyang
Copy link
Member

@razonyang razonyang commented Jan 14, 2024

Previously, we have to wrap the Markdown content with markdownify shortcode as follows.

{{< bs/alert primary >}}
{{% markdownify %}}
A simple *primary alert* with Markdown—**check it out**!
{{% /markdownify %}}
{{< /bs/alert >}}

Now, with this PR, we can simplify the syntax.

{{% bs/alert style=primary %}}
A simple *primary alert* with Markdown—**check it out**!
{{% /bs/alert %}}

Replace < symbol with %.

But this requires you import a minor style to remove the margin-bottom of last <p> element.

.alert-content {
  > p:last-child {
    margin-bottom: 0 !important;
  }
}

You can either import the mods/bootstrap/scss/index SCSS via Hugo Pipes.

As to HB Framework, you just need to upgrade github.com/hbstack/bootstrap.

@razonyang razonyang merged commit ce8ace1 into main Jan 14, 2024
1 check passed
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.

1 participant