Skip to content

Latest commit

 

History

History
206 lines (146 loc) · 4.61 KB

README.md

File metadata and controls

206 lines (146 loc) · 4.61 KB

en ru

Typography


Title

The section title is the first and mandatory element of the page.

# Title

Navigation

If the section is large, it should be divided into subsections and a navigation menu should be created.

The navigation menu is a list with links to the subsection. The subsection headings should have an anchor specified.

- [Subtitle 1](#subtitle-1)
- [Subtitle 2](#subtitle-2)

Note

Kebab-case is used to separate words in links.

Divider

After navigation (content), a divider should be specified.

---

Subtitle

Subsection headings are specified with a link for easy copying of the link to a specific section of the documentation.

## Subtitle

If Navigation is used, an anchor should be added before the heading:

<a name="anchor"></a>
## Subtitle

For the name of the first item, it is often necessary to use the name Basics, instead of similar Start, Introduction, etc.

<a name="basics"></a>
## Basics

If a component is described that inherits from another class, and there is a Basics item in the navigation, then the description of inheritance is written strictly after this item.

<a name="basics"></a>
## Basics

Inherits from [Select](/docs/{{version}}/fields/select).

\* has the same capabilities.

If the basic methods are described in another section of the documentation, then write it like this

<a name="basics"></a>
## Basics

Contains all [Basic methods](/docs/{{version}}/fields/basic-methods).

Content

In addition to markdown tags, html-tags are allowed.

Warning

All sentences should end with a period.

It is desirable to synchronize the texts in the ru and en versions of the sections line by line.

Double asterisks ** are used to format proper name, for example, **MoonShine**.

Code Example

  • single apostrophe ` is used to format methods, classes, etc.,
  • method names should end with parentheses, for example: setLabel(),
  • triple apostrophes ``` with the programming language specified are used to format code blocks, and the block should start on a new line,
  • for all classes used in examples, you need to specify use in alphabetical order and wrap them in collapse.
// torchlight! {"summaryCollapsedIndicator": "namespaces"}
// [tl! collapse:1]
use MoonShine\UI\Fields\Text;

Text::make('Title')

or

// torchlight! {"summaryCollapsedIndicator": "namespaces"}
// [tl! collapse:start]
use MoonShine\UI\Fields\Text; // [tl! collapse:end]

Text::make('Title')

If you need to specify what changes in the code, then you can use a special design.

MenuItem::make('Settings', new SettingResource(), 'heroicons.outline.adjustments-vertical') // [tl! remove]
MenuItem::make('Settings', SettingResource::class, 'adjustments-vertical') // [tl! add]

или

MenuItem::make('Settings', new SettingResource(), 'heroicons.outline.adjustments-vertical') // [tl! --]
MenuItem::make('Settings', SettingResource::class, 'adjustments-vertical') // [tl! ++]

Lists

- list items end with a comma,
- a dot is placed after the last one.

Tabs

~~~tabs

tab: Tab 1
Content tab 1

tab: Tab 2
Content tab 2

~~~

Alerts

The documentation uses several types of alerts:

> [!NOTE]
> Simple notification.
> [!WARNING]
> Warning.
> [!TIP]
> Tips.

Images

Images are added to the /resources/screenshots directory.

The link is specified - https://raw.githubusercontent.com/moonshine-software/doc/3.x/resources/screenshots/filename.png

Example:

![belongs_to_many](https://raw.githubusercontent.com/moonshine-software/doc/3.x/resources/screenshots/belongs_to_many.png)

To show the image in a dark or light themes, you must add to the link hashtag #light or #dark.

![belongs_to_many](https://raw.githubusercontent.com/moonshine-software/doc/3.x/resources/screenshots/belongs_to_many.png#light)
![belongs_to_many](https://raw.githubusercontent.com/moonshine-software/doc/3.x/resources/screenshots/belongs_to_many_dark.png#dark)