From 3dc23ec6642f8238a9bb3e618544108cddcf2791 Mon Sep 17 00:00:00 2001 From: Benaiah Mischenko Date: Wed, 6 Dec 2017 16:58:42 -0800 Subject: Move Contact page into the CMS --- site/content/contact.md | 26 +++++++++++++++++++++----- site/layouts/contact/single.html | 24 ++++++++---------------- site/static/admin/config.yml | 11 +++++++++++ 3 files changed, 40 insertions(+), 21 deletions(-) (limited to 'site') diff --git a/site/content/contact.md b/site/content/contact.md index fd0b607..2e3c24e 100644 --- a/site/content/contact.md +++ b/site/content/contact.md @@ -1,5 +1,21 @@ -+++ -title = "Contact" -type = "contact" -page="/contact.html" -+++ +--- +title: "Contact" +type: "contact" +page: "/contact.html" +logo: "/img/logo.svg" +contact_entries: + - heading: Location + text: "3153 Lynn Avenue, South San Francisco, California 94080" + - heading: Working hours + text: "Monday – Saturday: 9AM – 7PM We’re closed on Sundays" +--- + +We’d love to get in touch with you and hear your ideas and +questions. We strive to grow and improve constantly and your feedback +is valuable for us. + +

How can I get…?

+ +You can also use the form below for any inquiries about coffee +availability, monthly subscriptions and scheduling a 1-on-1 session +with our baristas. Don’t be shy, drop us a line! diff --git a/site/layouts/contact/single.html b/site/layouts/contact/single.html index 07e5ce4..205d92e 100644 --- a/site/layouts/contact/single.html +++ b/site/layouts/contact/single.html @@ -5,25 +5,17 @@
- + -

We’d love to get in touch with you and hear your ideas and questions. We strive to grow and improve constantly and your feedback is valuable for us.

- -

How can I get…?

-

You can also use the form below for any inquiries about coffee availability, monthly subscriptions and scheduling a 1-on-1 session with our baristas. Don’t be shy, drop us a line!

+ {{ .Content }}
- -
-

Location

-

3153 Lynn Avenue, South San Francisco, California 94080

-
- -
-

Working hours

-

Monday – Saturday: 9AM – 7PM We’re closed on Sundays

-
- + {{ range .Params.contact_entries }} +
+

{{ .heading }}

+

{{ .text }}

+
+ {{ end }}
{{ partial "contact-form" . }} diff --git a/site/static/admin/config.yml b/site/static/admin/config.yml index 3c8fed4..cdb089e 100644 --- a/site/static/admin/config.yml +++ b/site/static/admin/config.yml @@ -25,7 +25,18 @@ collections: # A list of collections the CMS should be able to edit - {label: Title, name: title, widget: string} - {label: Type, name: type, widget: hidden, default: contact} - {label: Page, name: page, widget: hidden, default: "/contact.html"} + - {label: Logo, name: logo, widget: image} - {label: Body, name: body, widget: markdown} + - label: Contact Entries + name: contact_entries + widget: list + fields: + - label: Heading + name: heading + widget: string + - label: Text + name: text + widget: text - file: "site/content/products.md" label: "Products Page" name: "products" -- cgit v1.3