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

How to make Alert or Callout? #87

Open
mangbaam opened this issue May 16, 2022 · 2 comments
Open

How to make Alert or Callout? #87

mangbaam opened this issue May 16, 2022 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@mangbaam
Copy link

I looked at various ways to use Alert or Callout, but couldn't find a way.

In many examples use {% include warning.html title="some title" content="some contents" %} for Alert,
and {% include callout_v2.html type="danger" content="some contents" %} for Callout.

Even the sample post provided by the YAT theme uses the following method, but it still does not work.
image

plz give me some advice

@leabs
Copy link

leabs commented Feb 3, 2023

Hi @mangbaam I'm currently using this theme and noticed that .box-note .box-error and .box-warning aren't declared in any of the .SCSS files and the post from the screenshot above did not render correctly. I added those CSS classes to the file _sass/yat/_layout.scss under the .post-content selector on line 404 with the values below:

    .box-warning,
    .box-error,
    .box-note{
      padding:20px 10px;
    }
    .box-warning{
      background: rgba(255, 165, 0, .25);
    }
    .box-error{
      background: rgba(255, 0, 0, .25);
    }
    .box-note{
      background: rgba(0, 0, 0, .25);
    }

I didn't see any color variables to use for these so I grabbed some generic colors and used rgba to make them slightly transparent. Hope this is helpful. I can submit a PR if the repo owner finds this helpful!

Screenshot 2023-02-03 at 2 42 41 PM

@jeffreytse jeffreytse self-assigned this Feb 3, 2023
@jeffreytse jeffreytse added the good first issue Good for newcomers label Feb 3, 2023
@jeffreytse
Copy link
Owner

Hi @leabs

Thanks for your quick help, your help make a great difference! : )

Thanks & Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants