From 5364ae67e573bfe5ba455099a91c738b7241148a Mon Sep 17 00:00:00 2001 From: Cat Tom Date: Wed, 24 Jul 2024 18:42:59 +0800 Subject: [PATCH] Content tabs --- docs/index.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++- mkdocs.yml | 1 + 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 6da200b..a9166bd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -65,4 +65,57 @@ def bubble_sort(items): items[j], items[j + 1] = items[j + 1], items[j] ``` When InlineHilite is enabled, syntax highlighting can be applied to inline code blocks by prefixing them with a shebang, i.e. `#!`, directly followed by the corresponding language shortcode. -The `#!python range()` function is used to generate a sequence of numbers. \ No newline at end of file + +The `#!python range()` function is used to generate a sequence of numbers. + +=== "C" + + ``` c + #include + + int main(void) { + printf("Hello world!\n"); + return 0; + } + ``` + +=== "C++" + + ``` c++ + #include + + int main(void) { + std::cout << "Hello world!" << std::endl; + return 0; + } + ``` + +=== "Unordered list" + + * Sed sagittis eleifend rutrum + * Donec vitae suscipit est + * Nulla tempor lobortis orci + +=== "Ordered list" + + 1. Sed sagittis eleifend rutrum + 2. Donec vitae suscipit est + 3. Nulla tempor lobortis orci + +!!! example + + === "Unordered List" + + ``` markdown + * Sed sagittis eleifend rutrum + * Donec vitae suscipit est + * Nulla tempor lobortis orci + ``` + + === "Ordered List" + + ``` markdown + 1. Sed sagittis eleifend rutrum + 2. Donec vitae suscipit est + 3. Nulla tempor lobortis orci + ``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 55f918f..5616621 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -22,6 +22,7 @@ theme: - search.highlight - content.code.copy - content.code.annotate + - content.tabs.link palette: primary: blue grey accent: light blue