mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
help-beta: Remove header from Zulip note.
We don't want to have a title of note and the ⓘ icon in the note aside. The only way to do this is to have our custom component called ZulipNote.
This commit is contained in:
committed by
Tim Abbott
parent
8f51b93223
commit
6d93465f3b
@@ -305,4 +305,10 @@ export default tseslint.config(
|
||||
},
|
||||
},
|
||||
...astroConfigs.recommended,
|
||||
{
|
||||
files: ["help-beta/src/components/ZulipNote.astro"],
|
||||
rules: {
|
||||
"import/unambiguous": "off",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
11
help-beta/src/components/ZulipNote.astro
Normal file
11
help-beta/src/components/ZulipNote.astro
Normal file
@@ -0,0 +1,11 @@
|
||||
<!--
|
||||
We wanted to have our note without a header that is the ⓘ followed by a title.
|
||||
We can make the title disappear by making the title a single space: " ".
|
||||
The default aside component provided by starlight will always have an icon however.
|
||||
That is why we needed this custom components.
|
||||
-->
|
||||
<aside aria-label="Note" class={`starlight-aside starlight-aside--note`}>
|
||||
<div class="starlight-aside__content">
|
||||
<slot />
|
||||
</div>
|
||||
</aside>
|
@@ -446,12 +446,10 @@ def convert_admonitions_to_asides(
|
||||
# implementation.
|
||||
# See https://chat.zulip.org/#narrow/channel/19-documentation/topic/Stage.202.3A.20New.20syntax.20for.20!!!tip.20in.20help-beta/near/2174415
|
||||
# for more details.
|
||||
type = "note"
|
||||
title = ""
|
||||
replacement = (
|
||||
f'\n<Aside type="{type}" title="{title}">\n{admonition_content}\n</Aside>\n'
|
||||
replacement = f"\n<ZulipNote>\n{admonition_content}\n</ZulipNote>\n"
|
||||
import_statement_set.add(
|
||||
f"import ZulipNote from '{components_dir_path}/ZulipNote.astro';"
|
||||
)
|
||||
import_statement_set.add("import { Aside } from '@astrojs/starlight/components'")
|
||||
elif klass == "tip":
|
||||
type = "tip"
|
||||
title = "Tip"
|
||||
|
Reference in New Issue
Block a user