5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 16:46:22 +00:00

feat: agregar contenido sin desplegable #13586

This commit is contained in:
f 2024-03-04 13:12:22 -03:00 committed by maki
parent 0dc6e5e665
commit fbe2d9b1a9
4 changed files with 53 additions and 20 deletions

View file

@ -561,11 +561,19 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
// details styles
.details {
summary {
& > summary {
list-style: none;
cursor: default;
position: relative;
cursor: pointer;
.hide-when-open {
display: inline;
}
.show-when-open {
display: none;
}
}
<<<<<<< HEAD
summary::after {
content: '';
font-size: 1.8rem;
@ -575,16 +583,26 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
transform: rotate(180deg);
}
=======
>>>>>>> 61101723 (feat: poder cambiar el nivel de summary)
&[open] {
& > summary {
&::after {
transform: rotate(90deg);
}
.hide-when-open {
display: none;
}
.show-when-open {
display: inline;
}
}
}
<<<<<<< HEAD
}
hr {
border-bottom: 1px solid #dee2e6;
=======
>>>>>>> 61101723 (feat: poder cambiar el nivel de summary)
}

View file

@ -1,6 +1,21 @@
-# Detail Cola de Moderación
<<<<<<< HEAD
%details.details.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 &#x25B6;
%span.show-when-open &#x25BC;
>>>>>>> 61101723 (feat: poder cambiar el nivel de summary)
= yield

View file

@ -17,14 +17,17 @@
%input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layouts", class: "" }
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('.filters.submit')
%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
.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
- if policy(@site_stat).index?
= link_to t('stats.index.title'), site_stats_path(@site), class: 'btn btn-secondary'

View file

@ -1,12 +1,9 @@
%tr
%th.w-100{ scope: 'row' }
%tr.border-left.border-right.border-bottom.border-magenta
%th.font-weight-normal.w-100{ scope: 'row' }
- if local_assigns[:parent_schema]
%span.text-muted &mdash;
= schema.humanized_name
%td.px-0.text-nowrap
= render 'schemas/add', **local_assigns
= render 'schemas/filter', **local_assigns
-# XXX: Solo un nivel de recursividad
- unless local_assigns[:parent_schema]
- schema.schemas.each do |s|