mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 21:26:22 +00:00
feat: agregar contenido sin desplegable #13586
This commit is contained in:
parent
0dc6e5e665
commit
fbe2d9b1a9
4 changed files with 53 additions and 20 deletions
|
@ -561,11 +561,19 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
|
||||||
// details styles
|
// details styles
|
||||||
|
|
||||||
.details {
|
.details {
|
||||||
summary {
|
& > summary {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
cursor: default;
|
cursor: pointer;
|
||||||
position: relative;
|
|
||||||
|
.hide-when-open {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-when-open {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
summary::after {
|
summary::after {
|
||||||
content: '▶';
|
content: '▶';
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
|
@ -575,16 +583,26 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> 61101723 (feat: poder cambiar el nivel de summary)
|
||||||
&[open] {
|
&[open] {
|
||||||
& > summary {
|
& > summary {
|
||||||
&::after {
|
.hide-when-open {
|
||||||
transform: rotate(90deg);
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.show-when-open {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
border-bottom: 1px solid #dee2e6;
|
border-bottom: 1px solid #dee2e6;
|
||||||
|
=======
|
||||||
|
>>>>>>> 61101723 (feat: poder cambiar el nivel de summary)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,21 @@
|
||||||
-# Detail Cola de Moderación
|
-# Detail Cola de Moderación
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
%details.details.py-2
|
%details.details.py-2
|
||||||
%summary
|
%summary
|
||||||
%h3.py-2= summary
|
%h3.py-2= summary
|
||||||
|
=======
|
||||||
|
@param :id [String] El ID opcional sirve para mantener el historial de
|
||||||
|
cuál estaba abierto y recuperarlo al cargar la página
|
||||||
|
@param :summary [String] El resumen
|
||||||
|
@param :summary_class [String] Clases para el summary
|
||||||
|
|
||||||
|
- local_assigns[:summary_class] ||= 'h3'
|
||||||
|
|
||||||
|
%details.details.py-2{ id: local_assigns[:id], data: { controller: 'details', action: 'toggle->details#store' } }
|
||||||
|
%summary.d-flex.flex-row.align-items-center.justify-content-between{ class: local_assigns[:summary_class] }
|
||||||
|
%span= summary
|
||||||
|
%span.hide-when-open ▶
|
||||||
|
%span.show-when-open ▼
|
||||||
|
>>>>>>> 61101723 (feat: poder cambiar el nivel de summary)
|
||||||
= yield
|
= yield
|
||||||
|
|
|
@ -17,14 +17,17 @@
|
||||||
%input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layouts", class: "" }
|
%input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layouts", class: "" }
|
||||||
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
|
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
|
||||||
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('.filters.submit')
|
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('.filters.submit')
|
||||||
|
.caja
|
||||||
|
.d-flex.border.border-magenta.p-2.justify-content-between.align-items-center.w-100
|
||||||
|
%h3.magenta.font-weight-bold.m-0= t('posts.new')
|
||||||
|
%p.h1.magenta.font-weight-bold.m-0= '+'
|
||||||
|
%table.table-sm.mb-3.w-100
|
||||||
|
%tbody
|
||||||
|
- @site.schema_organization.each do |schema, _|
|
||||||
|
- schema = @site.layouts[schema]
|
||||||
|
- next if schema.hidden?
|
||||||
|
= render 'schemas/row', site: @site, schema: schema, filter: @filter_params
|
||||||
|
|
||||||
%h3= t('posts.new')
|
|
||||||
%table.table.table-sm.mb-3
|
|
||||||
%tbody
|
|
||||||
- @site.schema_organization.each do |schema, _|
|
|
||||||
- schema = @site.layouts[schema]
|
|
||||||
- next if schema.hidden?
|
|
||||||
= render 'schemas/row', site: @site, schema: schema, filter: @filter_params
|
|
||||||
|
|
||||||
- if policy(@site_stat).index?
|
- if policy(@site_stat).index?
|
||||||
= link_to t('stats.index.title'), site_stats_path(@site), class: 'btn btn-secondary'
|
= link_to t('stats.index.title'), site_stats_path(@site), class: 'btn btn-secondary'
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
%tr
|
%tr.border-left.border-right.border-bottom.border-magenta
|
||||||
%th.w-100{ scope: 'row' }
|
%th.font-weight-normal.w-100{ scope: 'row' }
|
||||||
- if local_assigns[:parent_schema]
|
- if local_assigns[:parent_schema]
|
||||||
%span.text-muted —
|
%span.text-muted —
|
||||||
= schema.humanized_name
|
= schema.humanized_name
|
||||||
%td.px-0.text-nowrap
|
|
||||||
= render 'schemas/add', **local_assigns
|
|
||||||
= render 'schemas/filter', **local_assigns
|
|
||||||
|
|
||||||
-# XXX: Solo un nivel de recursividad
|
-# XXX: Solo un nivel de recursividad
|
||||||
- unless local_assigns[:parent_schema]
|
- unless local_assigns[:parent_schema]
|
||||||
|
|
Loading…
Reference in a new issue