From 2224bcc8a6ff289856fd8720f8d6052d44612559 Mon Sep 17 00:00:00 2001 From: Jaybox325 Date: Sat, 19 Sep 2020 12:39:13 +0100 Subject: [PATCH 1/4] changes --- CHANGELOG.md | 8 ++ ...-4caee081-e90b-4ece-8d4a-8d67ab5b2928.yaml | 18 ++++ ...-1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml | 13 +++ ...-cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml | 54 +++++++++++ ...-86c871b7-5067-4489-9782-858bcb6e530a.yaml | 11 +-- ...-c3308227-9abe-4262-9b0a-ce782692ae77.yaml | 9 +- ...-509bddad-7391-49e8-8e95-734bb97c6f37.yaml | 53 +++++++++-- config/project/project.yaml | 89 ++++++++++++++----- ...-d9c51571-b4e8-40c9-abaf-dab181ce75bf.yaml | 38 ++++++++ ...-027869ee-8e4f-4d06-bda5-18576335be6c.yaml | 38 ++++++++ ...-81307dab-347a-4fb8-b528-45b18ed7d0e0.yaml | 38 ++++++++ ...85402e79-b5f4-49d2-b19b-4210804143c7.yaml} | 18 ++-- ...-696a96fe-981a-49b3-8947-b85b4ec0dc06.yaml | 38 ++++++++ public/uploads/.gitignore | 2 - templates/_layout/_base.twig | 4 +- templates/_layout/footer.twig | 7 ++ templates/_macros/macros.twig | 3 + uploads/.gitkeep | 0 18 files changed, 389 insertions(+), 52 deletions(-) create mode 100644 config/project/fields/tags--4caee081-e90b-4ece-8d4a-8d67ab5b2928.yaml create mode 100644 config/project/matrixBlockTypes/audio--cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml create mode 100644 config/project/volumes/audio--d9c51571-b4e8-40c9-abaf-dab181ce75bf.yaml create mode 100644 config/project/volumes/documents--027869ee-8e4f-4d06-bda5-18576335be6c.yaml create mode 100644 config/project/volumes/embed--81307dab-347a-4fb8-b528-45b18ed7d0e0.yaml rename config/project/volumes/{uploads--25e8c49e-de76-4f02-b0f2-4412c37bdad4.yaml => image--85402e79-b5f4-49d2-b19b-4210804143c7.yaml} (81%) create mode 100644 config/project/volumes/video--696a96fe-981a-49b3-8947-b85b4ec0dc06.yaml delete mode 100644 public/uploads/.gitignore create mode 100644 templates/_macros/macros.twig delete mode 100644 uploads/.gitkeep diff --git a/CHANGELOG.md b/CHANGELOG.md index 9708377..0cc6a5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.0.12 -- CURRENT TBR +### Added +- Basic footer markup +- Multiple asset directories +- Audio file component +- Core fields +- External URL macro + ## 1.0.11 ### Added - SVG Symbol markup example diff --git a/config/project/fields/tags--4caee081-e90b-4ece-8d4a-8d67ab5b2928.yaml b/config/project/fields/tags--4caee081-e90b-4ece-8d4a-8d67ab5b2928.yaml new file mode 100644 index 0000000..be02258 --- /dev/null +++ b/config/project/fields/tags--4caee081-e90b-4ece-8d4a-8d67ab5b2928.yaml @@ -0,0 +1,18 @@ +contentColumnType: text +fieldGroup: 9d0976d6-6ff8-4790-9e75-5bb37d331d19 +handle: tags +instructions: 'Hashtags included in any Twitter, Facebook or LinkedIn share features.' +name: Tags +searchable: false +settings: + byteLimit: null + charLimit: null + code: '' + columnType: null + initialRows: '4' + multiline: '' + placeholder: '' + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/config/project/globalSets/siteDetails--1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml b/config/project/globalSets/siteDetails--1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml index 35977f7..055c09d 100644 --- a/config/project/globalSets/siteDetails--1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml +++ b/config/project/globalSets/siteDetails--1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml @@ -14,5 +14,18 @@ fieldLayouts: width: 100 name: Social sortOrder: 1 + - + elements: + - + fieldUid: 4caee081-e90b-4ece-8d4a-8d67ab5b2928 + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: 'Share config' + sortOrder: 2 handle: siteDetails name: 'Site details' diff --git a/config/project/matrixBlockTypes/audio--cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml b/config/project/matrixBlockTypes/audio--cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml new file mode 100644 index 0000000..6faa45c --- /dev/null +++ b/config/project/matrixBlockTypes/audio--cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml @@ -0,0 +1,54 @@ +field: 989f6b5c-82cf-4a15-aa85-fe9b821cee4b +fieldLayouts: + 24d10f0a-7220-46c7-98d2-4c0818d07dbe: + tabs: + - + elements: + - + fieldUid: a8d65c69-c832-4301-902e-712b8221762f + instructions: null + label: null + required: true + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: Content + sortOrder: 1 +fields: + a8d65c69-c832-4301-902e-712b8221762f: + contentColumnType: string + fieldGroup: null + handle: audio + instructions: 'Upload an audio file.' + name: Audio + searchable: false + settings: + allowSelfRelations: false + allowedKinds: + - audio + defaultUploadLocationSource: 'volume:d9c51571-b4e8-40c9-abaf-dab181ce75bf' + defaultUploadLocationSubpath: '' + limit: '1' + localizeRelations: false + previewMode: full + restrictFiles: '1' + selectionLabel: 'Add an audio file' + showSiteMenu: true + showUnpermittedFiles: false + showUnpermittedVolumes: false + singleUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + singleUploadLocationSubpath: '' + source: null + sources: + - 'volume:d9c51571-b4e8-40c9-abaf-dab181ce75bf' + targetSiteId: null + useSingleFolder: false + validateRelatedElements: false + viewMode: list + translationKeyFormat: null + translationMethod: site + type: craft\fields\Assets +handle: audio +name: Audio +sortOrder: 7 diff --git a/config/project/matrixBlockTypes/externalVideo--86c871b7-5067-4489-9782-858bcb6e530a.yaml b/config/project/matrixBlockTypes/externalVideo--86c871b7-5067-4489-9782-858bcb6e530a.yaml index 7530a70..31bc052 100644 --- a/config/project/matrixBlockTypes/externalVideo--86c871b7-5067-4489-9782-858bcb6e530a.yaml +++ b/config/project/matrixBlockTypes/externalVideo--86c871b7-5067-4489-9782-858bcb6e530a.yaml @@ -28,7 +28,7 @@ fields: allowedKinds: - json - video - defaultUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + defaultUploadLocationSource: 'volume:81307dab-347a-4fb8-b528-45b18ed7d0e0' defaultUploadLocationSubpath: '' limit: '1' localizeRelations: false @@ -38,12 +38,13 @@ fields: showSiteMenu: true showUnpermittedFiles: false showUnpermittedVolumes: false - singleUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' - singleUploadLocationSubpath: /embedded + singleUploadLocationSource: 'volume:81307dab-347a-4fb8-b528-45b18ed7d0e0' + singleUploadLocationSubpath: '' source: null - sources: '*' + sources: + - 'volume:81307dab-347a-4fb8-b528-45b18ed7d0e0' targetSiteId: null - useSingleFolder: true + useSingleFolder: false validateRelatedElements: false viewMode: list translationKeyFormat: null diff --git a/config/project/matrixBlockTypes/images--c3308227-9abe-4262-9b0a-ce782692ae77.yaml b/config/project/matrixBlockTypes/images--c3308227-9abe-4262-9b0a-ce782692ae77.yaml index 28ab52b..d0b2d6c 100644 --- a/config/project/matrixBlockTypes/images--c3308227-9abe-4262-9b0a-ce782692ae77.yaml +++ b/config/project/matrixBlockTypes/images--c3308227-9abe-4262-9b0a-ce782692ae77.yaml @@ -27,7 +27,7 @@ fields: allowSelfRelations: false allowedKinds: - image - defaultUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + defaultUploadLocationSource: 'volume:85402e79-b5f4-49d2-b19b-4210804143c7' defaultUploadLocationSubpath: '' limit: '8' localizeRelations: false @@ -37,12 +37,13 @@ fields: showSiteMenu: true showUnpermittedFiles: false showUnpermittedVolumes: false - singleUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + singleUploadLocationSource: 'volume:85402e79-b5f4-49d2-b19b-4210804143c7' singleUploadLocationSubpath: '' source: null - sources: '*' + sources: + - 'volume:85402e79-b5f4-49d2-b19b-4210804143c7' targetSiteId: null - useSingleFolder: true + useSingleFolder: false validateRelatedElements: false viewMode: list translationKeyFormat: null diff --git a/config/project/matrixBlockTypes/video--509bddad-7391-49e8-8e95-734bb97c6f37.yaml b/config/project/matrixBlockTypes/video--509bddad-7391-49e8-8e95-734bb97c6f37.yaml index ce008aa..5c37234 100644 --- a/config/project/matrixBlockTypes/video--509bddad-7391-49e8-8e95-734bb97c6f37.yaml +++ b/config/project/matrixBlockTypes/video--509bddad-7391-49e8-8e95-734bb97c6f37.yaml @@ -22,9 +22,50 @@ fieldLayouts: type: craft\fieldlayoutelements\CustomField warning: null width: 50 + - + fieldUid: bbaa68dc-df36-42aa-a667-b5ee4f79fd6a + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 name: Content sortOrder: 1 fields: + bbaa68dc-df36-42aa-a667-b5ee4f79fd6a: + contentColumnType: string + fieldGroup: null + handle: posterImage + instructions: '' + name: 'Poster image' + searchable: false + settings: + allowSelfRelations: false + allowedKinds: null + defaultUploadLocationSource: 'volume:85402e79-b5f4-49d2-b19b-4210804143c7' + defaultUploadLocationSubpath: '' + limit: '1' + localizeRelations: false + previewMode: full + restrictFiles: '' + selectionLabel: 'Add an image' + showSiteMenu: true + showUnpermittedFiles: false + showUnpermittedVolumes: false + singleUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + singleUploadLocationSubpath: '' + source: null + sources: + - 'volume:85402e79-b5f4-49d2-b19b-4210804143c7' + targetSiteId: null + useSingleFolder: false + validateRelatedElements: false + viewMode: list + translationKeyFormat: null + translationMethod: site + type: craft\fields\Assets d5d7809c-23f4-4811-aac0-88ea44885cf1: contentColumnType: string fieldGroup: null @@ -36,7 +77,7 @@ fields: allowSelfRelations: false allowedKinds: - video - defaultUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + defaultUploadLocationSource: 'volume:696a96fe-981a-49b3-8947-b85b4ec0dc06' defaultUploadLocationSubpath: '' limit: '1' localizeRelations: false @@ -46,13 +87,13 @@ fields: showSiteMenu: true showUnpermittedFiles: false showUnpermittedVolumes: false - singleUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + singleUploadLocationSource: 'volume:696a96fe-981a-49b3-8947-b85b4ec0dc06' singleUploadLocationSubpath: '' source: null sources: - - 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + - 'volume:696a96fe-981a-49b3-8947-b85b4ec0dc06' targetSiteId: null - useSingleFolder: true + useSingleFolder: false validateRelatedElements: false viewMode: list translationKeyFormat: null @@ -69,7 +110,7 @@ fields: allowSelfRelations: false allowedKinds: - video - defaultUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + defaultUploadLocationSource: 'volume:696a96fe-981a-49b3-8947-b85b4ec0dc06' defaultUploadLocationSubpath: '' limit: '1' localizeRelations: false @@ -83,7 +124,7 @@ fields: singleUploadLocationSubpath: '' source: null sources: - - 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + - 'volume:696a96fe-981a-49b3-8947-b85b4ec0dc06' targetSiteId: null useSingleFolder: false validateRelatedElements: false diff --git a/config/project/project.yaml b/config/project/project.yaml index 6d6b6ec..7f82e67 100644 --- a/config/project/project.yaml +++ b/config/project/project.yaml @@ -1,4 +1,4 @@ -dateModified: 1600470327 +dateModified: 1600514996 email: fromEmail: hello@jaycollett.co fromName: JayCraft @@ -18,34 +18,34 @@ plugins: schemaVersion: 1.0.1 settings: allow: 'Allow cookies' - async_js: false - auto_inject: true + async_js: '' + auto_inject: '1' decline: Decline - defer_js: false - disable_in_live_preview: false - dismiss: 'Got it!' - dismiss_on_scroll: 0 - dismiss_on_timeout: 0 - excluded_categories: '' - excluded_entry_types: '' - expiry_days: 365 - honour_do_not_track_header: false - layout: block + defer_js: '' + disable_in_live_preview: '1' + dismiss: Accept + dismiss_on_scroll: '0' + dismiss_on_timeout: '0' + excluded_categories: null + excluded_entry_types: null + expiry_days: '365' + honour_do_not_track_header: '' + layout: classic learn: 'Learn More' learn_more_link: 'http://cookiesandyou.com/' message: 'This website uses cookies to ensure you get the best experience on our website.' - palette: default - palette_banner: '#000000' - palette_banner_text: '#ffffff' - palette_button: '#f1d600' - palette_button_text: '#000000' - palette_left_button_bg: '#f8e71c' - palette_left_button_text: '#000000' + palette: whitegreen + palette_banner: '#efefef' + palette_banner_text: '#404040' + palette_button: '#8ec760' + palette_button_text: '#ffffff' + palette_left_button_bg: '#8ec760' + palette_left_button_text: '#ffffff' palette_link: '#ffffff' - position: bottom - preload_css: false - revokable: false - secure_only: false + position: bottom-left + preload_css: '' + revokable: '' + secure_only: '' target: _blank type: info cp-field-inspect: @@ -78,6 +78,47 @@ plugins: edition: standard enabled: true schemaVersion: 3.1.1 + settings: + description: '{pageDescription|striptags}' + facebookAppId: '' + metaTemplate: '' + removeAlternateUrls: '' + robots: + - '' + - '' + - '' + - '' + - '' + - '' + robotsTxt: "{# Sitemap URL #}\r\nSitemap: {{ url(seo.sitemapName ~ '.xml') }}\r\n\r\n{# Disallows #}\r\n{% if craft.app.config.env != 'production' %}\r\n\r\n{# Disallow access to everything when NOT in production #}\r\nUser-agent: *\r\nDisallow: /\r\n\r\n{% else %}\r\n\r\n{# Disallow access to cpresources/ when live #}\r\nUser-agent: *\r\nDisallow: /cpresources/\r\n\r\n{% endif %}" + sitemapLimit: '1000' + sitemapName: sitemap + socialImage: '' + title: + - + __assoc__: + - + - key + - '1' + - + - locked + - '0' + - + - template + - '{title}' + - + __assoc__: + - + - key + - '2' + - + - locked + - '1' + - + - template + - ' - {{ siteName }}' + titleSuffix: null + twitterHandle: '' similar: edition: standard enabled: true diff --git a/config/project/volumes/audio--d9c51571-b4e8-40c9-abaf-dab181ce75bf.yaml b/config/project/volumes/audio--d9c51571-b4e8-40c9-abaf-dab181ce75bf.yaml new file mode 100644 index 0000000..cf9048b --- /dev/null +++ b/config/project/volumes/audio--d9c51571-b4e8-40c9-abaf-dab181ce75bf.yaml @@ -0,0 +1,38 @@ +fieldLayouts: + f0e978c1-1f16-45e0-b813-d205095fd302: + tabs: + - + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + id: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\TitleField + warning: null + width: 100 + name: Content + sortOrder: 1 +handle: audio +hasUrls: true +name: Audio +settings: + path: '@webroot/uploads/audio' +sortOrder: 5 +type: craft\volumes\Local +url: $ASSET_BASE_URL/audio diff --git a/config/project/volumes/documents--027869ee-8e4f-4d06-bda5-18576335be6c.yaml b/config/project/volumes/documents--027869ee-8e4f-4d06-bda5-18576335be6c.yaml new file mode 100644 index 0000000..0e8efc4 --- /dev/null +++ b/config/project/volumes/documents--027869ee-8e4f-4d06-bda5-18576335be6c.yaml @@ -0,0 +1,38 @@ +fieldLayouts: + 2f2bbf20-1bce-4885-bd97-2a58dd5d8e8b: + tabs: + - + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + id: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\TitleField + warning: null + width: 100 + name: Content + sortOrder: 1 +handle: documents +hasUrls: true +name: Documents +settings: + path: '@webroot/uploads/documents' +sortOrder: 6 +type: craft\volumes\Local +url: $ASSET_BASE_URL/documents diff --git a/config/project/volumes/embed--81307dab-347a-4fb8-b528-45b18ed7d0e0.yaml b/config/project/volumes/embed--81307dab-347a-4fb8-b528-45b18ed7d0e0.yaml new file mode 100644 index 0000000..42dedd1 --- /dev/null +++ b/config/project/volumes/embed--81307dab-347a-4fb8-b528-45b18ed7d0e0.yaml @@ -0,0 +1,38 @@ +fieldLayouts: + 8091885d-62d5-4e3e-b6a1-fbcd8133bebd: + tabs: + - + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + id: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\TitleField + warning: null + width: 100 + name: Content + sortOrder: 1 +handle: embed +hasUrls: true +name: Embed +settings: + path: '@webroot/uploads/embed' +sortOrder: 4 +type: craft\volumes\Local +url: $ASSET_BASE_URL/embed diff --git a/config/project/volumes/uploads--25e8c49e-de76-4f02-b0f2-4412c37bdad4.yaml b/config/project/volumes/image--85402e79-b5f4-49d2-b19b-4210804143c7.yaml similarity index 81% rename from config/project/volumes/uploads--25e8c49e-de76-4f02-b0f2-4412c37bdad4.yaml rename to config/project/volumes/image--85402e79-b5f4-49d2-b19b-4210804143c7.yaml index 29437e4..663fa30 100644 --- a/config/project/volumes/uploads--25e8c49e-de76-4f02-b0f2-4412c37bdad4.yaml +++ b/config/project/volumes/image--85402e79-b5f4-49d2-b19b-4210804143c7.yaml @@ -1,5 +1,5 @@ fieldLayouts: - 3f6879be-9c33-4de6-b8bb-ad22d1cb9abb: + 887e33da-703c-497e-b41b-9e0d5c698243: tabs: - elements: @@ -28,20 +28,20 @@ fieldLayouts: width: 100 - fieldUid: 0136bb82-6130-48c6-88cc-015d69da6199 - instructions: null - label: null - required: false + instructions: '' + label: '' + required: '1' tip: null type: craft\fieldlayoutelements\CustomField warning: null width: 100 name: Content sortOrder: 1 -handle: uploads +handle: image hasUrls: true -name: Uploads +name: Image settings: - path: '@webroot/uploads' -sortOrder: 1 + path: '@webroot/uploads/image' +sortOrder: 3 type: craft\volumes\Local -url: '@assetUrl' +url: $ASSET_BASE_URL/image diff --git a/config/project/volumes/video--696a96fe-981a-49b3-8947-b85b4ec0dc06.yaml b/config/project/volumes/video--696a96fe-981a-49b3-8947-b85b4ec0dc06.yaml new file mode 100644 index 0000000..3474f30 --- /dev/null +++ b/config/project/volumes/video--696a96fe-981a-49b3-8947-b85b4ec0dc06.yaml @@ -0,0 +1,38 @@ +fieldLayouts: + b2d91614-8e48-4d38-b024-d18f5c77ef09: + tabs: + - + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + id: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\TitleField + warning: null + width: 100 + name: Content + sortOrder: 1 +handle: video +hasUrls: true +name: Video +settings: + path: '@webroot/uploads/video' +sortOrder: 2 +type: craft\volumes\Local +url: $ASSET_BASE_URL/video diff --git a/public/uploads/.gitignore b/public/uploads/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/public/uploads/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/templates/_layout/_base.twig b/templates/_layout/_base.twig index 222e92f..44c1e18 100644 --- a/templates/_layout/_base.twig +++ b/templates/_layout/_base.twig @@ -15,7 +15,7 @@ {# Favicons #} - {% include 'layout/favicons' %} + {% include '_layout/favicons' %} @@ -35,7 +35,7 @@ {# SVG Symbols #} \ No newline at end of file diff --git a/templates/_layout/footer.twig b/templates/_layout/footer.twig index e69de29..50afdb8 100644 --- a/templates/_layout/footer.twig +++ b/templates/_layout/footer.twig @@ -0,0 +1,7 @@ +{% import '_macros/macros' as macro %} + + \ No newline at end of file diff --git a/templates/_macros/macros.twig b/templates/_macros/macros.twig new file mode 100644 index 0000000..7f8e6e9 --- /dev/null +++ b/templates/_macros/macros.twig @@ -0,0 +1,3 @@ +{% macro external(state) %} + {% if state == true or state == '_blank' %} target="_blank" rel="noopener noreferrer"{% endif %} +{% endmacro %} \ No newline at end of file diff --git a/uploads/.gitkeep b/uploads/.gitkeep deleted file mode 100644 index e69de29..0000000 From d1022526be1da21c8f95cd6818632208ddabe6ed Mon Sep 17 00:00:00 2001 From: Jaybox325 Date: Sun, 20 Sep 2020 10:12:26 +0100 Subject: [PATCH 2/4] details and menu --- config/matrixmate.php | 4 +- ...-7e581873-0901-4b52-bc16-187532c325c6.yaml | 68 +++++++++++++++++- ...-bcd353ce-367b-47be-853c-bf1f11d42dc0.yaml | 6 +- ...-4a8ef1e9-0d62-4ea2-b094-f78aa2d8b906.yaml | 11 +++ ...-fb3be2e2-4f29-4954-867d-c4ab5dc55a9c.yaml | 18 +++++ ...-37791995-fc9d-4977-9057-ad800dd1b735.yaml | 14 ++++ ...-65332953-fec0-4f58-b96d-8297c3994640.yaml | 2 +- ...-639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml | 14 ++++ ...-1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml | 50 +++++++++++-- ...-cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml | 2 +- ...-c3308227-9abe-4262-9b0a-ce782692ae77.yaml | 28 ++++++++ ...-4849af96-fd87-43af-95d9-d4879454573f.yaml | 71 +++++++++++++++++++ ...-c71aed7a-246a-4bc4-8dcd-515b5061c19b.yaml | 71 +++++++++++++++++++ ...-509bddad-7391-49e8-8e95-734bb97c6f37.yaml | 4 +- config/project/project.yaml | 2 +- templates/_errors/403.twig | 2 +- templates/_layout/footer.twig | 7 +- templates/_layout/header.twig | 15 ++++ templates/_layout/menu.twig | 21 ++++++ templates/_macros/macros.twig | 18 +++++ 20 files changed, 410 insertions(+), 18 deletions(-) create mode 100644 config/project/fields/contactEmail--4a8ef1e9-0d62-4ea2-b094-f78aa2d8b906.yaml create mode 100644 config/project/fields/contactPhone--fb3be2e2-4f29-4954-867d-c4ab5dc55a9c.yaml create mode 100644 config/project/fields/mainMenu--37791995-fc9d-4977-9057-ad800dd1b735.yaml create mode 100644 config/project/fields/utilityMenu--639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml create mode 100644 config/project/matrixBlockTypes/menuItem--4849af96-fd87-43af-95d9-d4879454573f.yaml create mode 100644 config/project/matrixBlockTypes/menuItem--c71aed7a-246a-4bc4-8dcd-515b5061c19b.yaml diff --git a/config/matrixmate.php b/config/matrixmate.php index 7b796c6..f6c1c16 100644 --- a/config/matrixmate.php +++ b/config/matrixmate.php @@ -6,11 +6,11 @@ 'groups' => [ [ 'label' => 'Content', - 'types' => ['accordions', 'body', 'testimonial'], + 'types' => ['body', 'accordions', 'testimonial'], ], [ 'label' => 'Media', - 'types' => ['images', 'video', 'externalVideo'], + 'types' => ['images', 'video', 'externalVideo', 'audio'], ] ] ] diff --git a/config/project/entryTypes/news--7e581873-0901-4b52-bc16-187532c325c6.yaml b/config/project/entryTypes/news--7e581873-0901-4b52-bc16-187532c325c6.yaml index 362f11c..4e7bc6c 100644 --- a/config/project/entryTypes/news--7e581873-0901-4b52-bc16-187532c325c6.yaml +++ b/config/project/entryTypes/news--7e581873-0901-4b52-bc16-187532c325c6.yaml @@ -1,7 +1,73 @@ +fieldLayouts: + d6c92853-2151-43f6-bde4-c6d430617786: + tabs: + - + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + id: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\EntryTitleField + warning: null + width: 100 + - + fieldUid: 989f6b5c-82cf-4a15-aa85-fe9b821cee4b + instructions: '' + label: '' + required: '1' + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: Content + sortOrder: 1 + - + elements: + - + fieldUid: 65332953-fec0-4f58-b96d-8297c3994640 + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: Options + sortOrder: 2 + - + elements: + - + fieldUid: 7fdd5aee-0781-486e-810f-9af57a6cd8ce + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: SEO + sortOrder: 3 handle: news hasTitleField: true name: News section: b6dcff48-9906-46af-add1-70d94f8fa406 sortOrder: 1 titleFormat: null -titleLabel: Title +titleTranslationKeyFormat: null +titleTranslationMethod: site diff --git a/config/project/entryTypes/standardContent--bcd353ce-367b-47be-853c-bf1f11d42dc0.yaml b/config/project/entryTypes/standardContent--bcd353ce-367b-47be-853c-bf1f11d42dc0.yaml index 45cfdd1..ef282b4 100644 --- a/config/project/entryTypes/standardContent--bcd353ce-367b-47be-853c-bf1f11d42dc0.yaml +++ b/config/project/entryTypes/standardContent--bcd353ce-367b-47be-853c-bf1f11d42dc0.yaml @@ -28,9 +28,9 @@ fieldLayouts: width: 100 - fieldUid: 989f6b5c-82cf-4a15-aa85-fe9b821cee4b - instructions: null - label: null - required: false + instructions: '' + label: '' + required: '1' tip: null type: craft\fieldlayoutelements\CustomField warning: null diff --git a/config/project/fields/contactEmail--4a8ef1e9-0d62-4ea2-b094-f78aa2d8b906.yaml b/config/project/fields/contactEmail--4a8ef1e9-0d62-4ea2-b094-f78aa2d8b906.yaml new file mode 100644 index 0000000..b032ce5 --- /dev/null +++ b/config/project/fields/contactEmail--4a8ef1e9-0d62-4ea2-b094-f78aa2d8b906.yaml @@ -0,0 +1,11 @@ +contentColumnType: string +fieldGroup: 9d0976d6-6ff8-4790-9e75-5bb37d331d19 +handle: contactEmail +instructions: '' +name: 'Contact email' +searchable: true +settings: + placeholder: '' +translationKeyFormat: null +translationMethod: none +type: craft\fields\Email diff --git a/config/project/fields/contactPhone--fb3be2e2-4f29-4954-867d-c4ab5dc55a9c.yaml b/config/project/fields/contactPhone--fb3be2e2-4f29-4954-867d-c4ab5dc55a9c.yaml new file mode 100644 index 0000000..6ca05ca --- /dev/null +++ b/config/project/fields/contactPhone--fb3be2e2-4f29-4954-867d-c4ab5dc55a9c.yaml @@ -0,0 +1,18 @@ +contentColumnType: text +fieldGroup: 9d0976d6-6ff8-4790-9e75-5bb37d331d19 +handle: contactPhone +instructions: '' +name: 'Contact phone' +searchable: true +settings: + byteLimit: null + charLimit: null + code: '' + columnType: null + initialRows: '4' + multiline: '' + placeholder: '' + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/config/project/fields/mainMenu--37791995-fc9d-4977-9057-ad800dd1b735.yaml b/config/project/fields/mainMenu--37791995-fc9d-4977-9057-ad800dd1b735.yaml new file mode 100644 index 0000000..94db27d --- /dev/null +++ b/config/project/fields/mainMenu--37791995-fc9d-4977-9057-ad800dd1b735.yaml @@ -0,0 +1,14 @@ +contentColumnType: string +fieldGroup: 9d0976d6-6ff8-4790-9e75-5bb37d331d19 +handle: mainMenu +instructions: 'List of pages to show in the main site navigation. Maximum of seven for user experience purposes.' +name: 'Main menu' +searchable: false +settings: + contentTable: '{{%matrixcontent_mainmenu}}' + maxBlocks: '' + minBlocks: '' + propagationMethod: all +translationKeyFormat: null +translationMethod: site +type: craft\fields\Matrix diff --git a/config/project/fields/pageDescription--65332953-fec0-4f58-b96d-8297c3994640.yaml b/config/project/fields/pageDescription--65332953-fec0-4f58-b96d-8297c3994640.yaml index e83c504..590b6ee 100644 --- a/config/project/fields/pageDescription--65332953-fec0-4f58-b96d-8297c3994640.yaml +++ b/config/project/fields/pageDescription--65332953-fec0-4f58-b96d-8297c3994640.yaml @@ -3,7 +3,7 @@ fieldGroup: be866704-e9e5-489a-94b0-c7763eec7317 handle: pageDescription instructions: '' name: 'Page description' -searchable: false +searchable: true settings: availableTransforms: '*' availableVolumes: '*' diff --git a/config/project/fields/utilityMenu--639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml b/config/project/fields/utilityMenu--639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml new file mode 100644 index 0000000..1369410 --- /dev/null +++ b/config/project/fields/utilityMenu--639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml @@ -0,0 +1,14 @@ +contentColumnType: string +fieldGroup: 9d0976d6-6ff8-4790-9e75-5bb37d331d19 +handle: utilityMenu +instructions: 'List of pages to show in the footer, such as legal pages.' +name: 'Utility menu' +searchable: false +settings: + contentTable: '{{%matrixcontent_utilitymenu}}' + maxBlocks: '4' + minBlocks: '' + propagationMethod: all +translationKeyFormat: null +translationMethod: site +type: craft\fields\Matrix diff --git a/config/project/globalSets/siteDetails--1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml b/config/project/globalSets/siteDetails--1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml index 055c09d..1b82694 100644 --- a/config/project/globalSets/siteDetails--1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml +++ b/config/project/globalSets/siteDetails--1e844348-5f0b-45bb-832f-4f9f9cf83e41.yaml @@ -4,20 +4,29 @@ fieldLayouts: - elements: - - fieldUid: c32ae7fc-8956-4f92-a0c3-9d6560441ccd + fieldUid: 37791995-fc9d-4977-9057-ad800dd1b735 instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField warning: null - width: 100 - name: Social + width: 50 + - + fieldUid: 639079df-d2e2-40b6-b2a2-2b528a89ec4e + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 50 + name: Menus sortOrder: 1 - elements: - - fieldUid: 4caee081-e90b-4ece-8d4a-8d67ab5b2928 + fieldUid: 4a8ef1e9-0d62-4ea2-b094-f78aa2d8b906 instructions: null label: null required: false @@ -25,7 +34,38 @@ fieldLayouts: type: craft\fieldlayoutelements\CustomField warning: null width: 100 - name: 'Share config' + - + fieldUid: fb3be2e2-4f29-4954-867d-c4ab5dc55a9c + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: 'Business details' sortOrder: 2 + - + elements: + - + fieldUid: c32ae7fc-8956-4f92-a0c3-9d6560441ccd + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + - + fieldUid: 4caee081-e90b-4ece-8d4a-8d67ab5b2928 + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: 'Social media' + sortOrder: 3 handle: siteDetails name: 'Site details' diff --git a/config/project/matrixBlockTypes/audio--cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml b/config/project/matrixBlockTypes/audio--cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml index 6faa45c..472792d 100644 --- a/config/project/matrixBlockTypes/audio--cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml +++ b/config/project/matrixBlockTypes/audio--cb6bce8b-a201-4cf8-a17a-7bf7729ba35d.yaml @@ -37,7 +37,7 @@ fields: showSiteMenu: true showUnpermittedFiles: false showUnpermittedVolumes: false - singleUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + singleUploadLocationSource: 'volume:696a96fe-981a-49b3-8947-b85b4ec0dc06' singleUploadLocationSubpath: '' source: null sources: diff --git a/config/project/matrixBlockTypes/images--c3308227-9abe-4262-9b0a-ce782692ae77.yaml b/config/project/matrixBlockTypes/images--c3308227-9abe-4262-9b0a-ce782692ae77.yaml index d0b2d6c..d730570 100644 --- a/config/project/matrixBlockTypes/images--c3308227-9abe-4262-9b0a-ce782692ae77.yaml +++ b/config/project/matrixBlockTypes/images--c3308227-9abe-4262-9b0a-ce782692ae77.yaml @@ -13,6 +13,15 @@ fieldLayouts: type: craft\fieldlayoutelements\CustomField warning: null width: 100 + - + fieldUid: 19d67a4c-90d7-4ae3-a367-e59f631af8d7 + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 name: Content sortOrder: 1 fields: @@ -49,6 +58,25 @@ fields: translationKeyFormat: null translationMethod: site type: craft\fields\Assets + 19d67a4c-90d7-4ae3-a367-e59f631af8d7: + contentColumnType: text + fieldGroup: null + handle: description + instructions: 'Describe this image/these images.' + name: Description + searchable: false + settings: + byteLimit: null + charLimit: null + code: '' + columnType: null + initialRows: '4' + multiline: '' + placeholder: '' + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText handle: images name: Images sortOrder: 4 diff --git a/config/project/matrixBlockTypes/menuItem--4849af96-fd87-43af-95d9-d4879454573f.yaml b/config/project/matrixBlockTypes/menuItem--4849af96-fd87-43af-95d9-d4879454573f.yaml new file mode 100644 index 0000000..95c2507 --- /dev/null +++ b/config/project/matrixBlockTypes/menuItem--4849af96-fd87-43af-95d9-d4879454573f.yaml @@ -0,0 +1,71 @@ +field: 37791995-fc9d-4977-9057-ad800dd1b735 +fieldLayouts: + 77357e29-d8f9-4383-b3b2-ead5fe80866d: + tabs: + - + elements: + - + fieldUid: 6d85fef4-37dc-4f7f-9262-4313c67f0860 + instructions: null + label: null + required: true + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + - + fieldUid: 7b2d3a28-340a-4a61-b2e5-f55aea8a2595 + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: Content + sortOrder: 1 +fields: + 6d85fef4-37dc-4f7f-9262-4313c67f0860: + contentColumnType: string + fieldGroup: null + handle: entry + instructions: 'Select the page to list in the menu.' + name: Entry + searchable: false + settings: + allowSelfRelations: false + limit: '1' + localizeRelations: false + selectionLabel: '' + showSiteMenu: true + source: null + sources: + - 'section:3a95c5ae-691b-45a9-af63-804ec4f32d8f' + targetSiteId: null + validateRelatedElements: false + viewMode: null + translationKeyFormat: null + translationMethod: site + type: craft\fields\Entries + 7b2d3a28-340a-4a61-b2e5-f55aea8a2595: + contentColumnType: text + fieldGroup: null + handle: rename + instructions: 'If the menu item requires a custom title.' + name: Rename + searchable: false + settings: + byteLimit: null + charLimit: null + code: '' + columnType: null + initialRows: '4' + multiline: '' + placeholder: '' + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText +handle: menuItem +name: 'Menu item' +sortOrder: 1 diff --git a/config/project/matrixBlockTypes/menuItem--c71aed7a-246a-4bc4-8dcd-515b5061c19b.yaml b/config/project/matrixBlockTypes/menuItem--c71aed7a-246a-4bc4-8dcd-515b5061c19b.yaml new file mode 100644 index 0000000..222504e --- /dev/null +++ b/config/project/matrixBlockTypes/menuItem--c71aed7a-246a-4bc4-8dcd-515b5061c19b.yaml @@ -0,0 +1,71 @@ +field: 639079df-d2e2-40b6-b2a2-2b528a89ec4e +fieldLayouts: + 80334c73-dfcf-4981-addc-d15f5cd7cba6: + tabs: + - + elements: + - + fieldUid: c1c97c2a-a7cd-4751-bbb2-4d66a1e72294 + instructions: null + label: null + required: true + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + - + fieldUid: 81072bba-d351-4fb8-904b-dbe43b2eb1e8 + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + warning: null + width: 100 + name: Content + sortOrder: 1 +fields: + 81072bba-d351-4fb8-904b-dbe43b2eb1e8: + contentColumnType: text + fieldGroup: null + handle: rename + instructions: 'If the menu requires a custom title.' + name: Rename + searchable: false + settings: + byteLimit: null + charLimit: null + code: '' + columnType: null + initialRows: '4' + multiline: '' + placeholder: '' + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText + c1c97c2a-a7cd-4751-bbb2-4d66a1e72294: + contentColumnType: string + fieldGroup: null + handle: entry + instructions: 'Select the page to list in the menu.' + name: Entry + searchable: false + settings: + allowSelfRelations: false + limit: '1' + localizeRelations: false + selectionLabel: '' + showSiteMenu: true + source: null + sources: + - 'section:3a95c5ae-691b-45a9-af63-804ec4f32d8f' + targetSiteId: null + validateRelatedElements: false + viewMode: null + translationKeyFormat: null + translationMethod: site + type: craft\fields\Entries +handle: menuItem +name: 'Menu item' +sortOrder: 1 diff --git a/config/project/matrixBlockTypes/video--509bddad-7391-49e8-8e95-734bb97c6f37.yaml b/config/project/matrixBlockTypes/video--509bddad-7391-49e8-8e95-734bb97c6f37.yaml index 5c37234..4698fb1 100644 --- a/config/project/matrixBlockTypes/video--509bddad-7391-49e8-8e95-734bb97c6f37.yaml +++ b/config/project/matrixBlockTypes/video--509bddad-7391-49e8-8e95-734bb97c6f37.yaml @@ -54,7 +54,7 @@ fields: showSiteMenu: true showUnpermittedFiles: false showUnpermittedVolumes: false - singleUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + singleUploadLocationSource: 'volume:696a96fe-981a-49b3-8947-b85b4ec0dc06' singleUploadLocationSubpath: '' source: null sources: @@ -120,7 +120,7 @@ fields: showSiteMenu: true showUnpermittedFiles: false showUnpermittedVolumes: false - singleUploadLocationSource: 'volume:25e8c49e-de76-4f02-b0f2-4412c37bdad4' + singleUploadLocationSource: 'volume:696a96fe-981a-49b3-8947-b85b4ec0dc06' singleUploadLocationSubpath: '' source: null sources: diff --git a/config/project/project.yaml b/config/project/project.yaml index 7f82e67..bf3e380 100644 --- a/config/project/project.yaml +++ b/config/project/project.yaml @@ -1,4 +1,4 @@ -dateModified: 1600514996 +dateModified: 1600549068 email: fromEmail: hello@jaycollett.co fromName: JayCraft diff --git a/templates/_errors/403.twig b/templates/_errors/403.twig index d8f18eb..d76418c 100644 --- a/templates/_errors/403.twig +++ b/templates/_errors/403.twig @@ -1,5 +1,5 @@ {% extends "_layout/_base.twig" %} {% block content %} -

404 Template

+

403 Template

{% endblock %} \ No newline at end of file diff --git a/templates/_layout/footer.twig b/templates/_layout/footer.twig index 50afdb8..a3f6bfc 100644 --- a/templates/_layout/footer.twig +++ b/templates/_layout/footer.twig @@ -2,6 +2,11 @@
-

{{ now|date("Y") }} © {{ siteName }}. {% if currentUser.admin %}Control Panel{% endif %} Site Credits +

+ {{ macro.social(siteDetails.socialAccounts.all()) }} +
+
+

{{ now|date("Y") }} © {{ siteName }}. {% if currentUser.admin %}Control Panel{% endif %} Site Credits

+
\ No newline at end of file diff --git a/templates/_layout/header.twig b/templates/_layout/header.twig index e69de29..f4c5bb3 100644 --- a/templates/_layout/header.twig +++ b/templates/_layout/header.twig @@ -0,0 +1,15 @@ +{% import '_macros/macros' as macro %} + +
+
+ +
+ {% include '_layout/menu' %} +
+
+
\ No newline at end of file diff --git a/templates/_layout/menu.twig b/templates/_layout/menu.twig index e69de29..153a4ba 100644 --- a/templates/_layout/menu.twig +++ b/templates/_layout/menu.twig @@ -0,0 +1,21 @@ +{# Get site structure top two levels #} +{% set pages = craft.entries.section('site').level('<= 2').all() %} + + + + + \ No newline at end of file diff --git a/templates/_macros/macros.twig b/templates/_macros/macros.twig index 7f8e6e9..3e0ee19 100644 --- a/templates/_macros/macros.twig +++ b/templates/_macros/macros.twig @@ -1,3 +1,21 @@ {% macro external(state) %} {% if state == true or state == '_blank' %} target="_blank" rel="noopener noreferrer"{% endif %} +{% endmacro %} + +{% macro icon(symbol, size = 'md') %} + +{% endmacro %} + +{% macro social(networks) %} + {% endmacro %} \ No newline at end of file From 122eeeda45998a8b168f81b13d9055e2552f4b8c Mon Sep 17 00:00:00 2001 From: Jaybox325 Date: Sun, 20 Sep 2020 10:25:55 +0100 Subject: [PATCH 3/4] menus --- CHANGELOG.md | 1 + ...-37791995-fc9d-4977-9057-ad800dd1b735.yaml | 19 +++++++++++++------ ...-639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml | 18 +++++++++++++----- config/project/project.yaml | 2 +- templates/_layout/footer.twig | 12 ++++++++++++ templates/_layout/menu.twig | 8 ++++++-- 6 files changed, 46 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cc6a5b..145427a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Audio file component - Core fields - External URL macro +- Menu list field ## 1.0.11 ### Added diff --git a/config/project/fields/mainMenu--37791995-fc9d-4977-9057-ad800dd1b735.yaml b/config/project/fields/mainMenu--37791995-fc9d-4977-9057-ad800dd1b735.yaml index 94db27d..f3e7172 100644 --- a/config/project/fields/mainMenu--37791995-fc9d-4977-9057-ad800dd1b735.yaml +++ b/config/project/fields/mainMenu--37791995-fc9d-4977-9057-ad800dd1b735.yaml @@ -1,14 +1,21 @@ contentColumnType: string fieldGroup: 9d0976d6-6ff8-4790-9e75-5bb37d331d19 handle: mainMenu -instructions: 'List of pages to show in the main site navigation. Maximum of seven for user experience purposes.' +instructions: 'List of pages to show in the main site navigation. Maximum of seven for user experience purposes. If a menu is not set, the pages from "Site" will display.' name: 'Main menu' searchable: false settings: - contentTable: '{{%matrixcontent_mainmenu}}' - maxBlocks: '' - minBlocks: '' - propagationMethod: all + allowSelfRelations: false + limit: '7' + localizeRelations: false + selectionLabel: '' + showSiteMenu: true + source: null + sources: + - 'section:3a95c5ae-691b-45a9-af63-804ec4f32d8f' + targetSiteId: null + validateRelatedElements: false + viewMode: null translationKeyFormat: null translationMethod: site -type: craft\fields\Matrix +type: craft\fields\Entries diff --git a/config/project/fields/utilityMenu--639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml b/config/project/fields/utilityMenu--639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml index 1369410..684801d 100644 --- a/config/project/fields/utilityMenu--639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml +++ b/config/project/fields/utilityMenu--639079df-d2e2-40b6-b2a2-2b528a89ec4e.yaml @@ -5,10 +5,18 @@ instructions: 'List of pages to show in the footer, such as legal pages.' name: 'Utility menu' searchable: false settings: - contentTable: '{{%matrixcontent_utilitymenu}}' - maxBlocks: '4' - minBlocks: '' - propagationMethod: all + allowSelfRelations: false + limit: '6' + localizeRelations: false + selectionLabel: '' + showSiteMenu: true + source: null + sources: + - 'section:b6dcff48-9906-46af-add1-70d94f8fa406' + - 'section:3a95c5ae-691b-45a9-af63-804ec4f32d8f' + targetSiteId: null + validateRelatedElements: false + viewMode: null translationKeyFormat: null translationMethod: site -type: craft\fields\Matrix +type: craft\fields\Entries diff --git a/config/project/project.yaml b/config/project/project.yaml index bf3e380..20edaab 100644 --- a/config/project/project.yaml +++ b/config/project/project.yaml @@ -1,4 +1,4 @@ -dateModified: 1600549068 +dateModified: 1600593374 email: fromEmail: hello@jaycollett.co fromName: JayCraft diff --git a/templates/_layout/footer.twig b/templates/_layout/footer.twig index a3f6bfc..c20c017 100644 --- a/templates/_layout/footer.twig +++ b/templates/_layout/footer.twig @@ -5,6 +5,18 @@
{{ macro.social(siteDetails.socialAccounts.all()) }}
+ {% if siteDetails.utilityMenu|length %} +
+ {% set utility = siteDetails.utilityMenu.all() %} + +
+ {% endif %}

{{ now|date("Y") }} © {{ siteName }}. {% if currentUser.admin %}Control Panel{% endif %} Site Credits

diff --git a/templates/_layout/menu.twig b/templates/_layout/menu.twig index 153a4ba..545df42 100644 --- a/templates/_layout/menu.twig +++ b/templates/_layout/menu.twig @@ -1,8 +1,12 @@ {# Get site structure top two levels #} -{% set pages = craft.entries.section('site').level('<= 2').all() %} +{% if siteDetails.mainMenu|length %} + {% set pages = siteDetails.mainMenu.all() %} +{% else %} + {% set pages = craft.entries.section('site').level('1').all() %} +{% endif %} - +