Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.agents/
/scripts/
__pycache__/
4,185 changes: 4,185 additions & 0 deletions docs/4 поколение/Виджеты/fallback_registry.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/4 поколение/Виджеты/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Этот файл нужно заполнять, если вы в <a href="/4%20поколение/Виджеты/info/">info.json</a> указали <a href="/4%20поколение/Виджеты/info/#BlockListWidgetType">BlockListWidgetType</a> и задан `block_template_handle`.
Готовые шаблоны блоков и их поля смотрите в админке: `Настройки -> Настройки сайта -> Шаблоны блоков`. Как привязать шаблон, описано <a href="/4%20поколение/Виджеты/info/#block_templates">здесь</a>.

Если поле блока принимает ID файла, выберите подходящее изображение в [реестре файлов для виджетов](fallback_registry.md) и укажите его `fallback_id` в значении поля.


```JSON
"block_template_handle": "system-benefit-2"
Expand Down
159 changes: 157 additions & 2 deletions docs/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -2051,9 +2051,164 @@ table.api-params th {
font-weight: 650;
}

.md-nav--primary .md-nav__item--nested > .md-nav > .md-nav__list {
.md-nav--primary .md-nav__item--nested > .md-nav > .md-nav__list {
margin: 0.25rem 0 0.4rem 0.2rem;
padding-left: 0.55rem;
border-left: 2px solid var(--md-default-fg-color--lightest);
}
}
}

/* Реестр файлов для виджетов. */
.fallback-filters {
display: flex;
flex-wrap: wrap;
gap: 0.8rem;
}

.fallback-filter {
min-width: 0;
flex: 1 1 240px;
}

.fallback-filter--orientation {
flex: 0 1 200px;
}

.fallback-search-label {
display: block;
margin: 1rem 0 0.35rem;
font-weight: 600;
}

.fallback-search {
width: 100%;
padding: 0.65rem 0.8rem;
border: 1px solid var(--md-default-fg-color--lightest);
border-radius: 0.4rem;
background: var(--md-default-bg-color);
color: var(--md-default-fg-color);
font: inherit;
}

.fallback-search:focus-visible,
.fallback-copy:focus-visible,
.fallback-toc a:focus-visible {
outline: 2px solid var(--md-accent-fg-color);
outline-offset: 2px;
}

.fallback-count {
min-height: 1.3em;
margin: 0.45rem 0 0.8rem;
color: var(--md-default-fg-color--light);
}

.fallback-toc {
display: flex;
flex-wrap: wrap;
gap: 0.45rem;
margin: 0 0 1.5rem;
}

.fallback-toc a {
padding: 0.35rem 0.55rem;
border: 1px solid var(--md-default-fg-color--lightest);
border-radius: 0.35rem;
text-decoration: none;
}

.fallback-toc span,
.fallback-section h2 small {
color: var(--md-default-fg-color--light);
font-size: 0.8em;
}

.fallback-section {
margin: 1.8rem 0;
scroll-margin-top: 4rem;
}

.fallback-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 0.8rem;
}

.fallback-card {
display: flex;
min-width: 0;
flex-direction: column;
overflow: hidden;
border: 1px solid var(--md-default-fg-color--lightest);
border-radius: 0.45rem;
background: var(--md-default-bg-color);
}

.fallback-card[hidden],
.fallback-section[hidden] {
display: none;
}

.fallback-card__preview {
display: flex;
height: 155px;
align-items: center;
justify-content: center;
overflow: hidden;
background-color: #78818d;
background-image: conic-gradient(#89929e 25%, #78818d 0 50%, #89929e 0 75%, #78818d 0);
background-size: 24px 24px;
}

.fallback-card__preview img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
}

.fallback-card__details {
display: flex;
min-width: 0;
flex: 1;
flex-direction: column;
gap: 0.25rem;
padding: 0.65rem 0.65rem 0.4rem;
overflow-wrap: anywhere;
}

.fallback-card__name {
font-size: 0.78rem;
line-height: 1.3;
}

.fallback-card__series {
color: var(--md-default-fg-color--light);
font-size: 0.7rem;
}

.fallback-card__geometry {
color: var(--md-default-fg-color--light);
font-size: 0.7rem;
line-height: 1.4;
}

.fallback-card__actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.3rem;
padding: 0 0.65rem 0.65rem;
font-size: 0.72rem;
}

.fallback-copy {
border: 0;
background: none;
color: var(--md-typeset-a-color);
cursor: pointer;
font: inherit;
padding: 0;
}
Loading
Loading