Files
FixIt/apps/test/content/posts/tabs-comprehensive-test.md
T
Cell 5f1e79f49c feat(i18n): add RTL support for Arabic, Persian and Urdu (#831)
* feat(i18n): add RTL support and Arabic/Persian translations

- Add `dir` attribute to `<html>` via `.Site.Language.Direction`
- Convert physical CSS properties to logical properties across ~30 SCSS files
- Add `[dir="rtl"]` overrides for elements that need physical direction (code blocks, translate, icons)
- Add `logical-direction.html` template function for config value normalization
- Add RTL-aware deprecation warnings for old "left"/"right" config values
- Rename github corner, TOC position, reading progress config values from "left"/"right" to "start"/"end"
- Add Arabic (ar.toml) and Persian (fa.toml) i18n translation files
- Update multilingual documentation with RTL language configuration guide

* feat(shortcodes): add RTL support for tabs and refactor border-radius mixin

- Rename tabs placement values from "left"/"right" to "start"/"end" with deprecation warnings
- Convert all physical directional properties in tabs SCSS to logical properties
- Add RTL overrides for translate and box-shadow in tabs
- Add "start"/"end" support to border-radius mixin using CSS logical properties
- Refactor fixit-decryptor to use border-radius(start/end) mixin

* feat(assets): add RTL support for toc-dialog slide animation

The mobile toc-dialog always slid in from the right (100vw). In RTL
mode it should slide from the left (-100vw), matching the
border-inline-start/margin-inline-end anchoring.

* feat(assets): add RTL support for post-tag comma separator

* refactor(assets): extract RTL styles into dedicated _rtl.scss

* feat(assets): add RTL support for theme-switch and directional icons

* feat(i18n): add RTL support and improve i18n

- Add RTL typography corrections for Arabic-script languages (:lang(ar/fa/ur))
- Remove fa-list-ol from RTL flip list (numbers get mirrored)
- Add Urdu translation file (i18n/ur.toml)
- Rename noMoretTranslations to noTranslations and simplify all translations
- Update json-viewer-element from 1.0.4 to 1.0.6
- Add RTL test posts (index.en.md, index.ar.md)
- Fix layout partials for RTL support

See https://fixit.lruihao.cn/docs/content-management/introduction/#rtl-language-support
2026-08-24 00:22:34 +08:00

4.7 KiB

title, date, collections, categories, tags
title date collections categories tags
Tabs Comprehensive Test Cases 2025-09-09T10:00:00+08:00
Tests
Shortcodes
Tabs
UI Components

Testing various configurations and nested scenarios for the Tabs shortcode.

{{< tabs >}} {{% tab title="Test Cases" %}} See Types section for various test cases.

{{</* tabs */>}}
{{%/* tab title="Test Cases" */%}}
{{%/* tab title="Test Cases" */%}}See Types section for various test cases.{{%/* /tab */%}}
{{%/* tab title="Nested Tabs" */%}}See Nested Tabs section for examples.{{%/* /tab */%}}
{{</* /tabs */>}}

{{% /tab %}} {{% tab title="Nested Tabs" %}}See Nested Tabs section for examples.{{% /tab %}} {{< /tabs >}}

Types

Underline (Default)

{{< tabs placement="top" >}} {{% tab title="Tab 1" %}}Content for underline style tab 1{{% /tab %}} {{% tab title="Tab 2" %}}Content for underline style tab 2{{% /tab %}} {{% tab title="Tab 3" %}}Content for underline style tab 3{{% /tab %}} {{< /tabs >}}

Pill

{{< tabs type="pill" placement="top" >}} {{% tab title="Tab 1" %}}Content for pill style tab 1{{% /tab %}} {{% tab title="Tab 2" %}}Content for pill style tab 2{{% /tab %}} {{% tab title="Tab 3" %}}Content for pill style tab 3{{% /tab %}} {{< /tabs >}}

Card

{{< tabs type="card" placement="top" >}} {{% tab title="Tab 1" %}}Content for card style tab 1{{% /tab %}} {{% tab title="Tab 2" %}}Content for card style tab 2{{% /tab %}} {{% tab title="Tab 3" %}}Content for card style tab 3{{% /tab %}} {{< /tabs >}}

Segment

{{< tabs type="segment" >}} {{% tab title="Tab 1" %}}Content for segment style tab 1{{% /tab %}} {{% tab title="Tab 2" %}}Content for segment style tab 2{{% /tab %}} {{% tab title="Tab 3" %}}Content for segment style tab 3{{% /tab %}} {{< /tabs >}}

Nested Tabs

{{< tabs defaultTab=0 >}}

{{% tab title="Outer Tab 1" %}} This is the first outer tab with simple content.

Features:

  • Basic text content
  • No nested components
  • Simple layout {{% /tab %}}

{{% tab title="Outer Tab 2" %}} This outer tab contains nested tabs inside:

{{< tabs type="pill" defaultTab=1 >}}

{{% tab title="Inner A" %}} Nested tab A content with bold text and italic text.

console.log('Hello from nested tab A!')

{{% /tab %}}

{{% tab title="Inner B" %}} Nested tab B content with a list:

  1. First item
  2. Second item
  3. Third item

This is a blockquote inside a nested tab. {{% /tab %}}

{{% tab title="Inner C" %}} Nested tab C with a table:

Feature Status Notes
Responsive Works on all devices
Accessible Screen reader friendly
Fast Optimized performance

{{% /tab %}}

{{< /tabs >}}

{{% /tab %}}

{{% tab title="Outer Tab 3" %}} This tab contains vertical nested tabs:

{{< tabs type="card" placement="end" >}}

{{% tab title="Vertical A" %}} Content for vertical nested tab A.

  • Feature 1
  • Feature 2
  • Feature 3 {{% /tab %}}

{{% tab title="Vertical B" %}} Content for vertical nested tab B.

.example {
  color: #333;
  background: #f5f5f5;
  padding: 1rem;
}

{{% /tab %}}

{{< /tabs >}}

{{% /tab %}}

{{< /tabs >}}

Others

Mermaid Diagram inside Tabs

{{< tabs >}} {{% tab title="Flowchart" %}}

flowchart TD
    A[Start] --> B{Is it?}
    B -->|Yes| C[OK]
    C --> D[Rethink]
    D --> B
    B ---->|No| E[End]

{{% /tab %}} {{% tab title="Gantt Chart" %}}

gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d

{{% /tab %}} {{< /tabs >}}

File Tree inside Tabs

{{< tabs >}} {{% tab title="File Tree Shortcode" %}}

{{< file-tree >}} filetree name = "src" type = "dir"

filetree.children name = "index.ts" type = "file"

filetree name = "README.md" type = "file" {{< /file-tree >}}

{{% /tab %}} {{% tab title="File Tree Code Block" %}}

[[filetree]]
name = "src"
type = "dir"

[[filetree.children]]
name = "index.ts"
type = "file"

[[filetree]]
name = "README.md"
type = "file"

{{% /tab %}} {{< /tabs >}}

MathJax inside tabs

{{< tabs >}} {{% tab title="Inline" %}} c = \pm\sqrt{a^2 + b^2} and (f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi) {{% /tab %}} {{% tab title="Block" %}}

x = {-b \pm \sqrt{b^2-4ac} \over 2a}

[ f(a) = \frac{1}{2\pi i} \oint\frac{f(z)}{z-a}dz ] {{% /tab %}} {{< /tabs >}}