subtitulo para las secciones
This commit is contained in:
parent
e894af7c83
commit
5f357673fb
2 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,10 @@ class Post
|
||||||
contents.dig('title') if complex?
|
contents.dig('title') if complex?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def subtitle
|
||||||
|
contents.dig('subtitle') if complex?
|
||||||
|
end
|
||||||
|
|
||||||
# Obtiene el valor
|
# Obtiene el valor
|
||||||
def value
|
def value
|
||||||
complex? ? contents.dig('value') : contents
|
complex? ? contents.dig('value') : contents
|
||||||
|
|
|
@ -119,6 +119,8 @@
|
||||||
- next unless type = template.type
|
- next unless type = template.type
|
||||||
- if template.title.present?
|
- if template.title.present?
|
||||||
%h1{id: template.title.tr(' ', '_').titleize}= template.title
|
%h1{id: template.title.tr(' ', '_').titleize}= template.title
|
||||||
|
- if template.subtitle.present?
|
||||||
|
%p= template.subtitle
|
||||||
- value = @post.new? ? template.values : @post.get_front_matter(template.key)
|
- value = @post.new? ? template.values : @post.get_front_matter(template.key)
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag "post_#{template}", id: template do
|
= label_tag "post_#{template}", id: template do
|
||||||
|
|
Loading…
Reference in a new issue