5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 16:56:21 +00:00
panel/app/views/posts/show.haml
jazzari ad8e5bc811
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: corregido edit in es.yml
2024-01-17 17:37:02 -03:00

34 lines
1.2 KiB
Text

- dir = @site.data.dig(params[:locale], 'dir')
.row.justify-content-center
.col-md-8
%article.content.table-responsive-md
= link_to t('posts.edit_post'),
edit_site_post_path(@site, @post.id),
class: 'btn btn-secondary btn-block'
%table.table.table-condensed
%thead
%tr
%th.text-center{ colspan: 2 }= t('.front_matter')
%tbody
- @post.attributes.each do |attr|
- metadata = @post[attr]
- next unless metadata.front_matter?
- cache [metadata, I18n.locale] do
= render("posts/attribute_ro/#{metadata.type}",
post: @post, attribute: attr,
metadata: metadata,
site: @site,
tags: all_html_tags,
locale: @locale,
dir: dir)
-# Mostrar todo lo que no va en el front_matter (el contenido)
- @post.attributes.each do |attr|
- metadata = @post[attr]
- next if metadata.front_matter?
- cache [metadata, I18n.locale] do
%section.content.pb-3{ id: attr, dir: dir }
= @post.public_send(attr).to_s.html_safe