Add usps to about page / data
Tom Rutgers
committed Aug 15, 2018
commit e9aaf54683bb6889d9d5b64cc9a8d746569b9214
Showing 3
changed files with
15 additions
and 11 deletions
data/pages/about.yml
+3
-7
| @@ | @@ -1,8 +1,4 @@ |
| title: About | |
| - | values: |
| - | - value_description: >- |
| - | Coffee is a small tree or shrub that grows in the forest understory in its |
| - | wild form, and traditionally was grown commercially under other trees that |
| - | provided shade. The forest-like structure of shade coffee farms provides |
| - | habitat for a great number of migratory and resident species. |
| - | value_name: Shade-grown coffee |
| + | usps: |
| + | - name: Shade-grown coffee |
| + | description: Coffee is a small tree or shrub that grows in the forest understory in its wild form, and traditionally was grown commercially under other trees that provided shade. The forest-like structure of shade coffee farms provides habitat for a great number of migratory and resident species. |
source/about.html.erb
+8
-0
| @@ | @@ -2,6 +2,14 @@ |
| <div class="row"> | |
| <div class="col-xs-12"> | |
| <h1><%= data.pages.about.title%></h1> | |
| + | <ul class="about-values"> |
| + | <% data.pages.about.usps.each do | value | %> |
| + | <li class="value"> |
| + | <h2><%=value.name %></h2> |
| + | <p><%=value.description %></p> |
| + | </li> |
| + | <% end %> |
| + | </ul> |
| </div> | |
| </div> | |
| </div> | |
source/admin/config.yml
+4
-4
| @@ | @@ -27,9 +27,9 @@ collections: |
| name: "about" | |
| fields: | |
| - {label: "Title", name: "title", widget: string} | |
| - | - label: "Values" |
| - | name: "values" |
| + | - label: "Unique selling points" |
| + | name: "usps" |
| widget: "list" | |
| fields: | |
| - | - {label: Value name, name: value_name, widget: string} |
| - | - {label: Value description, name: value_description, widget: string} |
| \ No newline at end of file | |
| + | - {label: Name, name: name, widget: string} |
| + | - {label: Description, name: description, widget: string} |
| \ No newline at end of file | |