mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 16:06:23 +00:00
34 lines
939 B
Text
34 lines
939 B
Text
-#
|
|
Muestra una tabla con todos los atributos de un post
|
|
|
|
@param site [Site]
|
|
@param locale [Symbol]
|
|
@param dir [String]
|
|
@param post [Post]
|
|
@param title [String]
|
|
|
|
%table.table.table-condensed
|
|
%thead
|
|
%tr
|
|
%th.text-center{ colspan: 2 }= title
|
|
%tbody
|
|
- post.attributes.each do |attr|
|
|
- metadata = post[attr]
|
|
- next unless metadata.front_matter?
|
|
|
|
- cache [post, metadata, I18n.locale] do
|
|
= render("posts/attribute_ro/#{metadata.type}",
|
|
post: post, attribute: attr,
|
|
metadata: metadata,
|
|
site: site,
|
|
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 [post, metadata, I18n.locale] do
|
|
%section.content.pb-3{ id: attr, dir: dir }
|
|
= metadata.to_s.html_safe
|