gazebosim / docs

High-level Gazebo documentation that gets published to https://gazebosim.org/docs/
https://gazebosim.org/docs
44 stars 83 forks source link

Add warning banner for Windows tutorial #322

Closed mabelzhang closed 1 year ago

mabelzhang commented 1 year ago

🎉 New feature

Depends on https://github.com/gazebo-web/gazebosim-web-frontend/pull/12

I've only added the banner to a single tutorial right now, to see if the banner works first. Once we get something that works, I'll add it to install_windows_src.md and for the other releases.

Summary

The goal is for a yellow warning banner to show up at the top of Windows tutorial saying it's experimental or something to that effect.

Test it

Option 1

I tested in Ngx-markdown (the library used to generate Markdown for the Gazebo website) editor, as described in https://github.com/gazebo-web/gazebosim-web-frontend/pull/12

Option 2

Alternatively, since it's just CSS + HTML, you can test using the W3Schools editor preview, and it works as well, though the margins are a bit different here: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_blockquote_default_css

Paste:

<!DOCTYPE html>
<html>
<head>
<style>
blockquote.warning {
  border-left: 3px solid rgb(228, 167, 2);
  padding-left: 12px;
  color: rgb(138, 108, 64);
  background: rgb(252, 248, 228);
  margin-top: 1em;
  margin-bottom: 1em;
  margin-left: 0px;
  margin-right: 0px;
}
</style>
</head>
<body>

<p>A blockquote element is displayed like this:</p>

<blockquote class="warning">
Warning blockquote
</blockquote>

<p>Change the default CSS settings to see the effect.</p>

</body>
</html>

You should get a yellow banner in the preview.

Option 3

The more solid way to test it is to run the actual web frontend repo https://github.com/gazebo-web/gazebosim-web-frontend locally with nvm/npm. I haven't done that yet.

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

azeey commented 1 year ago

Could you add this to the source build as well?

mabelzhang commented 1 year ago

Added in 84a27f9 Do we want to add it to previous distros as well?

azeey commented 1 year ago

Added in https://github.com/gazebosim/docs/commit/84a27f98125b33114c5e3f2012b291f2706415f5 Do we want to add it to previous distros as well?

Yes, I believe all of them have the same caveat.

mabelzhang commented 1 year ago

Added in ed9a7be