diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87520b1198298fa2050040777fe3386947e5a878..af81763d03618239259a0b19736cf6868876b71c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,6 +46,8 @@ default: URL: 'git@git.drupal.org:project/drupal_cms_authentication.git' - DIR: recipes/drupal_cms_blog URL: 'git@git.drupal.org:project/drupal_cms_blog.git' + - DIR: recipes/drupal_cms_case_study + URL: 'git@git.drupal.org:project/drupal_cms_case_study.git' - DIR: recipes/drupal_cms_content_type_base URL: 'git@git.drupal.org:project/drupal_cms_content_type_base.git' - DIR: recipes/drupal_cms_events @@ -62,6 +64,8 @@ default: URL: 'git@git.drupal.org:project/drupal_cms_page.git' - DIR: recipes/drupal_cms_privacy_basic URL: 'git@git.drupal.org:project/drupal_cms_privacy_basic.git' + - DIR: recipes/drupal_cms_project + URL: 'git@git.drupal.org:project/drupal_cms_project.git' - DIR: recipes/drupal_cms_remote_video URL: 'git@git.drupal.org:project/drupal_cms_remote_video.git' - DIR: recipes/drupal_cms_search diff --git a/CODEOWNERS b/CODEOWNERS index a0511b65c27b08f43668b763001fcc062a727bc5..d6ca28e9ed67dfd8de9f3979684756bea3adc66f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -8,7 +8,9 @@ [blog track] @L_VanDamme /recipes/drupal_cms_blog/ +/recipes/drupal_cms_case_study/ /recipes/drupal_cms_news/ +/recipes/drupal_cms_project/ [media track] @tonypaulbarker /recipes/drupal_cms_image/ diff --git a/components.composer.json b/components.composer.json index 021811083a072148e580aca306bc87c0ce24fedb..3a795a49c9100ddbaea52a3101e69d994e2080b7 100644 --- a/components.composer.json +++ b/components.composer.json @@ -28,6 +28,10 @@ "type": "path", "url": "recipes/drupal_cms_blog" }, + "case_study": { + "type": "path", + "url": "recipes/drupal_cms_case_study" + }, "content_type_base": { "type": "path", "url": "recipes/drupal_cms_content_type_base" @@ -64,6 +68,10 @@ "type": "path", "url": "recipes/drupal_cms_privacy_basic" }, + "project": { + "type": "path", + "url": "recipes/drupal_cms_project" + }, "remote_video": { "type": "path", "url": "recipes/drupal_cms_remote_video" diff --git a/project_template/composer.json b/project_template/composer.json index db74eb7075f7899f86bc86f901e0b1c5ab88ca2d..e4aa30670d97240efa757842b3da32b9c479d4b3 100644 --- a/project_template/composer.json +++ b/project_template/composer.json @@ -25,10 +25,12 @@ "drupal/drupal_cms_accessibility_tools": "*", "drupal/drupal_cms_ai": "*", "drupal/drupal_cms_blog": "*", + "drupal/drupal_cms_case_study": "*", "drupal/drupal_cms_events": "*", "drupal/drupal_cms_forms": "*", "drupal/drupal_cms_multilingual": "*", "drupal/drupal_cms_news": "*", + "drupal/drupal_cms_project": "*", "drupal/drupal_cms_seo_tools": "*", "drush/drush": "^13" }, diff --git a/recipes/drupal_cms_case_study/LICENSE.txt b/recipes/drupal_cms_case_study/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..94fb84639c4b6ff359e47a124d8fb4a3aba7a386 --- /dev/null +++ b/recipes/drupal_cms_case_study/LICENSE.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/recipes/drupal_cms_case_study/composer.json b/recipes/drupal_cms_case_study/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..cbabd164618961e7b280a133c0f30e7b05440065 --- /dev/null +++ b/recipes/drupal_cms_case_study/composer.json @@ -0,0 +1,12 @@ +{ + "name": "drupal/drupal_cms_case_study", + "description": "Adds a Case study content type that provides detailed information about a subject to the intended audience.", + "version": "dev-main", + "type": "drupal-recipe", + "license": ["GPL-2.0-or-later"], + "require": { + "drupal/core": ">=10.3", + "drupal/drupal_cms_content_type_base": "*", + "drupal/pathauto": "^1.13" + } +} diff --git a/recipes/drupal_cms_case_study/config/core.entity_form_display.node.case_study.default.yml b/recipes/drupal_cms_case_study/config/core.entity_form_display.node.case_study.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..109056af5dbb2ab3d9bc7db5500fd96b56d0412c --- /dev/null +++ b/recipes/drupal_cms_case_study/config/core.entity_form_display.node.case_study.default.yml @@ -0,0 +1,139 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.case_study.body + - field.field.node.case_study.field_case_study__client_link + - field.field.node.case_study.field_case_study__client_logo + - field.field.node.case_study.field_case_study__client_name + - field.field.node.case_study.field_description + - field.field.node.case_study.field_featured_image + - field.field.node.case_study.field_tags + - node.type.case_study + module: + - link + - media_library + - path + - text +id: node.case_study.default +targetEntityType: node +bundle: case_study +mode: default +content: + body: + type: text_textarea_with_summary + weight: 3 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_case_study__client_link: + type: link_default + weight: 7 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_case_study__client_logo: + type: media_library_widget + weight: 6 + region: content + settings: + media_types: { } + third_party_settings: { } + field_case_study__client_name: + type: string_textfield + weight: 5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_description: + type: string_textarea + weight: 1 + region: content + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + field_featured_image: + type: media_library_widget + weight: 2 + region: content + settings: + media_types: { } + third_party_settings: { } + field_tags: + type: entity_reference_autocomplete_tags + weight: 4 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + langcode: + type: language_select + weight: 8 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 13 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + weight: 11 + region: content + settings: + display_label: true + third_party_settings: { } + status: + type: boolean_checkbox + weight: 15 + region: content + settings: + display_label: true + third_party_settings: { } + sticky: + type: boolean_checkbox + weight: 12 + region: content + settings: + display_label: true + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 9 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } +hidden: { } diff --git a/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.default.yml b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..f840463ac18a2c3897ed188c8cde0351d2b14670 --- /dev/null +++ b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.default.yml @@ -0,0 +1,219 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.case_study.body + - field.field.node.case_study.field_case_study__client_link + - field.field.node.case_study.field_case_study__client_logo + - field.field.node.case_study.field_case_study__client_name + - field.field.node.case_study.field_description + - field.field.node.case_study.field_featured_image + - field.field.node.case_study.field_tags + - node.type.case_study + module: + - layout_builder + - layout_discovery + - link + - media + - text + - user +third_party_settings: + layout_builder: + enabled: true + allow_custom: false + sections: + - + layout_id: layout_onecol + layout_settings: + label: Header + context_mapping: { } + components: + 4cb33af1-7c90-4eed-8890-5c27d526ba68: + uuid: 4cb33af1-7c90-4eed-8890-5c27d526ba68 + region: content + configuration: + id: 'field_block:node:case_study:field_featured_image' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: '' + image_loading: + attribute: eager + third_party_settings: { } + weight: 0 + additional: { } + df925eef-8afb-4f9a-8431-415d5b28e3c1: + uuid: df925eef-8afb-4f9a-8431-415d5b28e3c1 + region: content + configuration: + id: 'field_block:node:case_study:field_tags' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: entity_reference_label + label: hidden + settings: + link: true + third_party_settings: { } + weight: 1 + additional: { } + third_party_settings: { } + - + layout_id: layout_twocol_section + layout_settings: + label: Content + context_mapping: { } + column_widths: 67-33 + components: + 739968bb-5952-482a-a215-9a642ef92064: + uuid: 739968bb-5952-482a-a215-9a642ef92064 + region: first + configuration: + id: 'field_block:node:case_study:body' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 0 + additional: { } + 996432cc-5668-42b7-a2f3-2b3977b390c4: + uuid: 996432cc-5668-42b7-a2f3-2b3977b390c4 + region: second + configuration: + id: 'field_block:node:case_study:field_case_study__client_name' + label: 'Client name' + label_display: '0' + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 1 + additional: { } + ac86ac5e-6b08-49e4-8ea7-b32f8be8084e: + uuid: ac86ac5e-6b08-49e4-8ea7-b32f8be8084e + region: second + configuration: + id: 'field_block:node:case_study:field_case_study__client_logo' + label: 'Client logo' + label_display: '0' + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: uncropped_500w_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + additional: { } + 60cbfb7f-7ffb-4456-9488-6adc0c101abb: + uuid: 60cbfb7f-7ffb-4456-9488-6adc0c101abb + region: second + configuration: + id: 'field_block:node:case_study:field_case_study__client_link' + label: 'Client link' + label_display: '0' + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: link + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '0' + target: _blank + third_party_settings: { } + weight: 2 + additional: { } + third_party_settings: { } +id: node.case_study.default +targetEntityType: node +bundle: case_study +mode: default +content: + body: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 2 + region: content + field_case_study__client_link: + type: link + label: inline + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + weight: 5 + region: content + field_case_study__client_logo: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: uncropped_500w_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 4 + region: content + field_case_study__client_name: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 3 + region: content + field_featured_image: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: '' + image_loading: + attribute: eager + third_party_settings: { } + weight: 0 + region: content + field_tags: + type: entity_reference_label + label: hidden + settings: + link: true + third_party_settings: { } + weight: 1 + region: content +hidden: + field_description: true + langcode: true + links: true diff --git a/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.teaser.yml b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.teaser.yml new file mode 100644 index 0000000000000000000000000000000000000000..b3b31eea8e3b4e788544bcc47cfa82fd3efb21b3 --- /dev/null +++ b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.teaser.yml @@ -0,0 +1,132 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.case_study.body + - field.field.node.case_study.field_case_study__client_link + - field.field.node.case_study.field_case_study__client_logo + - field.field.node.case_study.field_case_study__client_name + - field.field.node.case_study.field_description + - field.field.node.case_study.field_featured_image + - field.field.node.case_study.field_tags + - image.style.4_3_300x225_focal_point_webp + - node.type.case_study + module: + - layout_builder + - layout_discovery + - media + - user +third_party_settings: + layout_builder: + enabled: true + allow_custom: false + sections: + - + layout_id: layout_onecol + layout_settings: + label: '' + components: + 14657eb7-cfc3-4591-b628-7b12914db4a4: + uuid: 14657eb7-cfc3-4591-b628-7b12914db4a4 + region: content + configuration: + id: 'field_block:node:case_study:field_featured_image' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: 4_3_300x225_focal_point_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + additional: { } + 3923c985-1c3c-4d77-a0ff-a9f9de71e485: + uuid: 3923c985-1c3c-4d77-a0ff-a9f9de71e485 + region: content + configuration: + id: 'field_block:node:case_study:field_description' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: basic_string + label: hidden + settings: { } + third_party_settings: { } + weight: 1 + additional: { } + 65ac54dc-8847-477f-adbe-99bad4556f87: + uuid: 65ac54dc-8847-477f-adbe-99bad4556f87 + region: content + configuration: + id: 'field_block:node:case_study:field_tags' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: entity_reference_label + label: inline + settings: + link: true + third_party_settings: { } + weight: 2 + additional: { } + 4e28b303-f0ff-483b-a32b-be600f61230c: + uuid: 4e28b303-f0ff-483b-a32b-be600f61230c + region: content + configuration: + id: 'extra_field_block:node:case_study:links' + label_display: '0' + context_mapping: + entity: layout_builder.entity + weight: 3 + additional: { } + third_party_settings: { } +id: node.case_study.teaser +targetEntityType: node +bundle: case_study +mode: teaser +content: + field_description: + type: basic_string + label: hidden + settings: { } + third_party_settings: { } + weight: 1 + region: content + field_featured_image: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: 4_3_300x225_focal_point_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + region: content + field_tags: + type: entity_reference_label + label: inline + settings: + link: true + third_party_settings: { } + weight: 2 + region: content + links: + settings: { } + third_party_settings: { } + weight: 3 + region: content +hidden: + body: true + field_case_study__client_link: true + field_case_study__client_logo: true + field_case_study__client_name: true + langcode: true diff --git a/recipes/drupal_cms_case_study/config/field.field.node.case_study.body.yml b/recipes/drupal_cms_case_study/config/field.field.node.case_study.body.yml new file mode 100644 index 0000000000000000000000000000000000000000..b54e50bb062e46ecdcd8c7240483c428dd47492e --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.field.node.case_study.body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - filter.format.content_format + - node.type.case_study + module: + - text +id: node.case_study.body +field_name: body +entity_type: node +bundle: case_study +label: Content +description: 'The content of this page.' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false + required_summary: false + allowed_formats: + - content_format +field_type: text_with_summary diff --git a/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_link.yml b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_link.yml new file mode 100644 index 0000000000000000000000000000000000000000..ac7aac9abfb44c946ad4984c21b1fe29ee64af2e --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_link.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_case_study__client_link + - node.type.case_study + module: + - link +id: node.case_study.field_case_study__client_link +field_name: field_case_study__client_link +entity_type: node +bundle: case_study +label: 'Client link' +description: 'Include a link to the client or organization website.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + title: 0 + link_type: 17 +field_type: link diff --git a/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_logo.yml b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_logo.yml new file mode 100644 index 0000000000000000000000000000000000000000..b5e2b20b8fdff1a2f2d149c4d28865971288687b --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_logo.yml @@ -0,0 +1,28 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_case_study__client_logo + - media.type.image + - node.type.case_study +id: node.case_study.field_case_study__client_logo +field_name: field_case_study__client_logo +entity_type: node +bundle: case_study +label: 'Client logo' +description: 'Include the logo of the client or organization.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:media' + handler_settings: + target_bundles: + image: image + sort: + field: _none + direction: ASC + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_name.yml b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_name.yml new file mode 100644 index 0000000000000000000000000000000000000000..16436d4dc2fa9389c6c4b4f0e4a76a92fee7fd6d --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_case_study__client_name.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_case_study__client_name + - node.type.case_study +id: node.case_study.field_case_study__client_name +field_name: field_case_study__client_name +entity_type: node +bundle: case_study +label: 'Client name' +description: 'Include the name of the client or organization.' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_description.yml b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_description.yml new file mode 100644 index 0000000000000000000000000000000000000000..2535bc49529603834215f390940859b1af0321dc --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_description.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_description + - node.type.case_study +id: node.case_study.field_description +field_name: field_description +entity_type: node +bundle: case_study +label: Description +description: 'Describe the page content. This appears as the description in search engine results.' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string_long diff --git a/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_featured_image.yml b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_featured_image.yml new file mode 100644 index 0000000000000000000000000000000000000000..43a5827c3cf65d3c83400cd1eff77aa77910c704 --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_featured_image.yml @@ -0,0 +1,28 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_featured_image + - media.type.image + - node.type.case_study +id: node.case_study.field_featured_image +field_name: field_featured_image +entity_type: node +bundle: case_study +label: 'Featured image' +description: 'Include an image. This appears as the image in search engine results.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:media' + handler_settings: + target_bundles: + image: image + sort: + field: _none + direction: ASC + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_tags.yml b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_tags.yml new file mode 100644 index 0000000000000000000000000000000000000000..5f20ccdc59709cfab5338fee5dfffb96bbc0a468 --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.field.node.case_study.field_tags.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_tags + - node.type.case_study + - taxonomy.vocabulary.tags +id: node.case_study.field_tags +field_name: field_tags +entity_type: node +bundle: case_study +label: Tags +description: 'Include tags for relevant topics.' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + tags: tags + sort: + field: _none + auto_create: true +field_type: entity_reference diff --git a/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_link.yml b/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_link.yml new file mode 100644 index 0000000000000000000000000000000000000000..c38a837acdcb314e9406765839a749acb1cd389c --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_link.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_case_study__client_link +field_name: field_case_study__client_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_logo.yml b/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_logo.yml new file mode 100644 index 0000000000000000000000000000000000000000..2be3c4746921c5fe2becbf2ae46084a05f9f8f6e --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_logo.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - media + - node +id: node.field_case_study__client_logo +field_name: field_case_study__client_logo +entity_type: node +type: entity_reference +settings: + target_type: media +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_name.yml b/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_name.yml new file mode 100644 index 0000000000000000000000000000000000000000..56f2769c0246cc0cbdb64e3e762c291e57b23390 --- /dev/null +++ b/recipes/drupal_cms_case_study/config/field.storage.node.field_case_study__client_name.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - node +id: node.field_case_study__client_name +field_name: field_case_study__client_name +entity_type: node +type: string +settings: + max_length: 255 + case_sensitive: false + is_ascii: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/recipes/drupal_cms_case_study/config/node.type.case_study.yml b/recipes/drupal_cms_case_study/config/node.type.case_study.yml new file mode 100644 index 0000000000000000000000000000000000000000..67ab24c8b6bd100d24383dba3bb0730a9bc2ecf3 --- /dev/null +++ b/recipes/drupal_cms_case_study/config/node.type.case_study.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: { } +third_party_settings: { } +name: 'Case study' +type: case_study +description: 'Case study content provides detailed information about a subject to the intended audience.' +help: null +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/recipes/drupal_cms_case_study/config/pathauto.pattern.case_study_content.yml b/recipes/drupal_cms_case_study/config/pathauto.pattern.case_study_content.yml new file mode 100644 index 0000000000000000000000000000000000000000..158be6bb554bf83a5d116dcc0a72693b8aee796e --- /dev/null +++ b/recipes/drupal_cms_case_study/config/pathauto.pattern.case_study_content.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + enforced: + config: + - node.type.case_study + module: + - node +id: case_study_content +label: 'Case study content' +type: 'canonical_entities:node' +pattern: '/case-studies/[node:title]' +selection_criteria: + 04baf08e-4b81-48d4-97b5-a915f5cba973: + id: 'entity_bundle:node' + negate: false + uuid: 04baf08e-4b81-48d4-97b5-a915f5cba973 + context_mapping: + node: node + bundles: + case_study: case_study +selection_logic: and +weight: -5 +relationships: { } diff --git a/recipes/drupal_cms_case_study/content/shortcut/create-case-study.yml b/recipes/drupal_cms_case_study/content/shortcut/create-case-study.yml new file mode 100644 index 0000000000000000000000000000000000000000..771efa8d8b3c14ed6f544f2af11da1ef2658e940 --- /dev/null +++ b/recipes/drupal_cms_case_study/content/shortcut/create-case-study.yml @@ -0,0 +1,18 @@ +_meta: + version: '1.0' + entity_type: shortcut + uuid: 8df7f07f-38c8-4658-9922-701a3ab02d1f + bundle: default + default_langcode: en +default: + title: + - + value: 'Create a case study' + weight: + - + value: 0 + link: + - + uri: 'internal:/node/add/case_study' + title: '' + options: { } diff --git a/recipes/drupal_cms_case_study/recipe.yml b/recipes/drupal_cms_case_study/recipe.yml new file mode 100644 index 0000000000000000000000000000000000000000..470c97f00198df719ac4daa40747a9e6858e0f36 --- /dev/null +++ b/recipes/drupal_cms_case_study/recipe.yml @@ -0,0 +1,26 @@ +name: Case study +type: Drupal CMS +description: 'Adds a Case study content type that provides detailed information about a subject to the intended audience.' +recipes: + - drupal_cms_content_type_base + - core/recipes/tags_taxonomy +install: + - link + - pathauto + - shortcut +config: + # Treat all field storages strictly, since they influence the database layout. + strict: + - field.storage.node.field_case_study__client_link + - field.storage.node.field_case_study__client_logo + - field.storage.node.field_case_study__client_name + import: + shortcut: + - shortcut.set.default + actions: + user.role.content_editor: + grantPermissions: + - 'create case_study content' + - 'delete case_study revisions' + - 'delete any case_study content' + - 'edit any case_study content' diff --git a/recipes/drupal_cms_case_study/tests/src/Functional/ComponentValidationTest.php b/recipes/drupal_cms_case_study/tests/src/Functional/ComponentValidationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a17e98c66620695717ee3a170b7454b0091d9f0b --- /dev/null +++ b/recipes/drupal_cms_case_study/tests/src/Functional/ComponentValidationTest.php @@ -0,0 +1,47 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\drupal_cms_case_study\Functional; + +use Drupal\FunctionalTests\Core\Recipe\RecipeTestTrait; +use Drupal\Tests\BrowserTestBase; + +/** + * @group drupal_cms_case_study + */ +class ComponentValidationTest extends BrowserTestBase { + + use RecipeTestTrait; + + /** + * {@inheritdoc} + */ + protected $defaultTheme = 'stark'; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + $dir = realpath(__DIR__ . '/../../..'); + // The recipe should apply cleanly. + $this->applyRecipe($dir); + // Apply it again to prove that it is idempotent. + $this->applyRecipe($dir); + } + + public function testPathAliasPatternPrecedence(): void { + $dir = realpath(__DIR__ . '/../../../../drupal_cms_seo_basic'); + $this->applyRecipe($dir); + + // Confirm that case studies have the expected path aliases. + $node = $this->drupalCreateNode([ + 'type' => 'case_study', + 'title' => 'Test Case study', + ]); + $this->assertStringEndsWith("/case-studies/test-case-study", $node->toUrl()->toString()); + } + +} diff --git a/recipes/drupal_cms_project/LICENSE.txt b/recipes/drupal_cms_project/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..94fb84639c4b6ff359e47a124d8fb4a3aba7a386 --- /dev/null +++ b/recipes/drupal_cms_project/LICENSE.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/recipes/drupal_cms_project/composer.json b/recipes/drupal_cms_project/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..7a36464cd1decacaa48c72166afb4cd9b587bbd6 --- /dev/null +++ b/recipes/drupal_cms_project/composer.json @@ -0,0 +1,12 @@ +{ + "name": "drupal/drupal_cms_project", + "description": "Adds a Project content type that provides information about an example of work to the intended audience.", + "version": "dev-main", + "type": "drupal-recipe", + "license": ["GPL-2.0-or-later"], + "require": { + "drupal/core": ">=10.3", + "drupal/drupal_cms_content_type_base": "*", + "drupal/pathauto": "^1.13" + } +} diff --git a/recipes/drupal_cms_project/config/core.entity_form_display.node.project.default.yml b/recipes/drupal_cms_project/config/core.entity_form_display.node.project.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..51d6b41e8fcfba00155a2912e65466c7e5306ada --- /dev/null +++ b/recipes/drupal_cms_project/config/core.entity_form_display.node.project.default.yml @@ -0,0 +1,139 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.project.body + - field.field.node.project.field_project__client_link + - field.field.node.project.field_project__client_logo + - field.field.node.project.field_project__client_name + - field.field.node.project.field_description + - field.field.node.project.field_featured_image + - field.field.node.project.field_tags + - node.type.project + module: + - link + - media_library + - path + - text +id: node.project.default +targetEntityType: node +bundle: project +mode: default +content: + body: + type: text_textarea_with_summary + weight: 7 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_project__client_link: + type: link_default + weight: 6 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_project__client_logo: + type: media_library_widget + weight: 5 + region: content + settings: + media_types: { } + third_party_settings: { } + field_project__client_name: + type: string_textfield + weight: 4 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_description: + type: string_textarea + weight: 1 + region: content + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + field_featured_image: + type: media_library_widget + weight: 2 + region: content + settings: + media_types: { } + third_party_settings: { } + field_tags: + type: entity_reference_autocomplete_tags + weight: 3 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + langcode: + type: language_select + weight: 8 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 13 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + weight: 11 + region: content + settings: + display_label: true + third_party_settings: { } + status: + type: boolean_checkbox + weight: 15 + region: content + settings: + display_label: true + third_party_settings: { } + sticky: + type: boolean_checkbox + weight: 12 + region: content + settings: + display_label: true + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 9 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } +hidden: { } diff --git a/recipes/drupal_cms_project/config/core.entity_view_display.node.project.default.yml b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..e76a6a25d1207b67c2b06855c0efc7e8478a0396 --- /dev/null +++ b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.default.yml @@ -0,0 +1,219 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.project.body + - field.field.node.project.field_project__client_link + - field.field.node.project.field_project__client_logo + - field.field.node.project.field_project__client_name + - field.field.node.project.field_description + - field.field.node.project.field_featured_image + - field.field.node.project.field_tags + - node.type.project + module: + - layout_builder + - layout_discovery + - link + - media + - text + - user +third_party_settings: + layout_builder: + enabled: true + allow_custom: false + sections: + - + layout_id: layout_onecol + layout_settings: + label: Header + context_mapping: { } + components: + 6edf9238-f343-4093-9c9c-ed5301d6658b: + uuid: 6edf9238-f343-4093-9c9c-ed5301d6658b + region: content + configuration: + id: 'field_block:node:project:field_featured_image' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: '' + image_loading: + attribute: eager + third_party_settings: { } + weight: 0 + additional: { } + 43e820d8-dd02-49c6-8239-34b146f1b568: + uuid: 43e820d8-dd02-49c6-8239-34b146f1b568 + region: content + configuration: + id: 'field_block:node:project:field_tags' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: entity_reference_label + label: inline + settings: + link: true + third_party_settings: { } + weight: 1 + additional: { } + third_party_settings: { } + - + layout_id: layout_twocol_section + layout_settings: + label: Content + context_mapping: { } + column_widths: 67-33 + components: + 811ba61b-54fa-4d59-9c75-245d66da3d99: + uuid: 811ba61b-54fa-4d59-9c75-245d66da3d99 + region: first + configuration: + id: 'field_block:node:project:body' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 0 + additional: { } + 004263b2-05d9-4c2a-b7d2-4ef9394bb5c3: + uuid: 004263b2-05d9-4c2a-b7d2-4ef9394bb5c3 + region: second + configuration: + id: 'field_block:node:project:field_project__client_name' + label: 'Client name' + label_display: '0' + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 1 + additional: { } + ae32e8a9-44e7-433f-8c1f-931fe9497565: + uuid: ae32e8a9-44e7-433f-8c1f-931fe9497565 + region: second + configuration: + id: 'field_block:node:project:field_project__client_link' + label: 'Client link' + label_display: '0' + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: link + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '0' + target: _blank + third_party_settings: { } + weight: 2 + additional: { } + 635918ab-08d4-46e3-8312-b5c64d8e4752: + uuid: 635918ab-08d4-46e3-8312-b5c64d8e4752 + region: second + configuration: + id: 'field_block:node:project:field_project__client_logo' + label: 'Client logo' + label_display: '0' + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: uncropped_500w_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + additional: { } + third_party_settings: { } +id: node.project.default +targetEntityType: node +bundle: project +mode: default +content: + body: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 2 + region: content + field_project__client_link: + type: link + label: inline + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '0' + target: _blank + third_party_settings: { } + weight: 4 + region: content + field_project__client_logo: + type: media_thumbnail + label: inline + settings: + image_link: '' + image_style: uncropped_500w_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 5 + region: content + field_project__client_name: + type: string + label: inline + settings: + link_to_entity: false + third_party_settings: { } + weight: 3 + region: content + field_featured_image: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: '' + image_loading: + attribute: eager + third_party_settings: { } + weight: 0 + region: content + field_tags: + type: entity_reference_label + label: inline + settings: + link: true + third_party_settings: { } + weight: 1 + region: content +hidden: + field_description: true + langcode: true + links: true diff --git a/recipes/drupal_cms_project/config/core.entity_view_display.node.project.teaser.yml b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.teaser.yml new file mode 100644 index 0000000000000000000000000000000000000000..a91c88159b6dab2fbd16f6067944eefcb8bc29ea --- /dev/null +++ b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.teaser.yml @@ -0,0 +1,132 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.project.body + - field.field.node.project.field_project__client_link + - field.field.node.project.field_project__client_logo + - field.field.node.project.field_project__client_name + - field.field.node.project.field_description + - field.field.node.project.field_featured_image + - field.field.node.project.field_tags + - image.style.4_3_300x225_focal_point_webp + - node.type.project + module: + - layout_builder + - layout_discovery + - media + - user +third_party_settings: + layout_builder: + enabled: true + allow_custom: false + sections: + - + layout_id: layout_onecol + layout_settings: + label: '' + components: + d470152d-60ea-41d8-b241-ac44045f61b0: + uuid: d470152d-60ea-41d8-b241-ac44045f61b0 + region: content + configuration: + id: 'field_block:node:project:field_featured_image' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: 4_3_300x225_focal_point_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + additional: { } + f48c6293-a94d-41da-8d42-1cf0a10892cd: + uuid: f48c6293-a94d-41da-8d42-1cf0a10892cd + region: content + configuration: + id: 'field_block:node:project:field_description' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: basic_string + label: hidden + settings: { } + third_party_settings: { } + weight: 1 + additional: { } + c030e5f1-c1dc-4559-b061-bacf0552a0be: + uuid: c030e5f1-c1dc-4559-b061-bacf0552a0be + region: content + configuration: + id: 'field_block:node:project:field_tags' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: entity_reference_label + label: inline + settings: + link: true + third_party_settings: { } + weight: 2 + additional: { } + 3a5045ab-d286-41d1-bf0d-2b543df0bab9: + uuid: 3a5045ab-d286-41d1-bf0d-2b543df0bab9 + region: content + configuration: + id: 'extra_field_block:node:project:links' + label_display: '0' + context_mapping: + entity: layout_builder.entity + weight: 3 + additional: { } + third_party_settings: { } +id: node.project.teaser +targetEntityType: node +bundle: project +mode: teaser +content: + field_description: + type: basic_string + label: hidden + settings: { } + third_party_settings: { } + weight: 1 + region: content + field_featured_image: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: 4_3_300x225_focal_point_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + region: content + field_tags: + type: entity_reference_label + label: inline + settings: + link: true + third_party_settings: { } + weight: 2 + region: content + links: + settings: { } + third_party_settings: { } + weight: 3 + region: content +hidden: + body: true + field_project__client_link: true + field_project__client_logo: true + field_project__client_name: true + langcode: true diff --git a/recipes/drupal_cms_project/config/field.field.node.project.body.yml b/recipes/drupal_cms_project/config/field.field.node.project.body.yml new file mode 100644 index 0000000000000000000000000000000000000000..e1f397ce267f691de0606890b2f3d81bdb18a84e --- /dev/null +++ b/recipes/drupal_cms_project/config/field.field.node.project.body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - filter.format.content_format + - node.type.project + module: + - text +id: node.project.body +field_name: body +entity_type: node +bundle: project +label: Content +description: 'The content of this page.' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false + required_summary: false + allowed_formats: + - content_format +field_type: text_with_summary diff --git a/recipes/drupal_cms_project/config/field.field.node.project.field_description.yml b/recipes/drupal_cms_project/config/field.field.node.project.field_description.yml new file mode 100644 index 0000000000000000000000000000000000000000..4e7bee2eb53dd998bd1488271e1ba95b2c48bb41 --- /dev/null +++ b/recipes/drupal_cms_project/config/field.field.node.project.field_description.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_description + - node.type.project +id: node.project.field_description +field_name: field_description +entity_type: node +bundle: project +label: Description +description: 'Describe the page content. This appears as the description in search engine results.' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string_long diff --git a/recipes/drupal_cms_project/config/field.field.node.project.field_featured_image.yml b/recipes/drupal_cms_project/config/field.field.node.project.field_featured_image.yml new file mode 100644 index 0000000000000000000000000000000000000000..ff7656aa15ee8cf916525ed9505fa082d8a69826 --- /dev/null +++ b/recipes/drupal_cms_project/config/field.field.node.project.field_featured_image.yml @@ -0,0 +1,28 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_featured_image + - media.type.image + - node.type.project +id: node.project.field_featured_image +field_name: field_featured_image +entity_type: node +bundle: project +label: 'Featured image' +description: 'Include an image. This appears as the image in search engine results.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:media' + handler_settings: + target_bundles: + image: image + sort: + field: _none + direction: ASC + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_link.yml b/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_link.yml new file mode 100644 index 0000000000000000000000000000000000000000..7b948d0902c15bb557083ecab0f08e67590c0366 --- /dev/null +++ b/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_link.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_project__client_link + - node.type.project + module: + - link +id: node.project.field_project__client_link +field_name: field_project__client_link +entity_type: node +bundle: project +label: 'Client link' +description: 'Include a link to the client or organization website.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + title: 0 + link_type: 17 +field_type: link diff --git a/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_logo.yml b/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_logo.yml new file mode 100644 index 0000000000000000000000000000000000000000..b9f599e61be96660c77c0f76e3d03d8831e78f7a --- /dev/null +++ b/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_logo.yml @@ -0,0 +1,28 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_project__client_logo + - media.type.image + - node.type.project +id: node.project.field_project__client_logo +field_name: field_project__client_logo +entity_type: node +bundle: project +label: 'Client logo' +description: 'Include the logo of the client or organization.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:media' + handler_settings: + target_bundles: + image: image + sort: + field: _none + direction: ASC + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_name.yml b/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_name.yml new file mode 100644 index 0000000000000000000000000000000000000000..062532c3a37ed9467137f730baad191bc7cfda1e --- /dev/null +++ b/recipes/drupal_cms_project/config/field.field.node.project.field_project__client_name.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_project__client_name + - node.type.project +id: node.project.field_project__client_name +field_name: field_project__client_name +entity_type: node +bundle: project +label: 'Client name' +description: 'Include the name of the client or organization.' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/recipes/drupal_cms_project/config/field.field.node.project.field_tags.yml b/recipes/drupal_cms_project/config/field.field.node.project.field_tags.yml new file mode 100644 index 0000000000000000000000000000000000000000..6849310fccf044ee0a81a83942723791b66e89ec --- /dev/null +++ b/recipes/drupal_cms_project/config/field.field.node.project.field_tags.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_tags + - node.type.project + - taxonomy.vocabulary.tags +id: node.project.field_tags +field_name: field_tags +entity_type: node +bundle: project +label: Tags +description: 'Include tags for relevant topics.' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + tags: tags + sort: + field: _none + auto_create: true +field_type: entity_reference diff --git a/recipes/drupal_cms_project/config/field.storage.node.field_project__client_link.yml b/recipes/drupal_cms_project/config/field.storage.node.field_project__client_link.yml new file mode 100644 index 0000000000000000000000000000000000000000..f64896cb276246669d5dcefc1f43f7fad1bcbb68 --- /dev/null +++ b/recipes/drupal_cms_project/config/field.storage.node.field_project__client_link.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_project__client_link +field_name: field_project__client_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/recipes/drupal_cms_project/config/field.storage.node.field_project__client_logo.yml b/recipes/drupal_cms_project/config/field.storage.node.field_project__client_logo.yml new file mode 100644 index 0000000000000000000000000000000000000000..0f2ae4d9fa9accd996d0793006f804b5dd9e556e --- /dev/null +++ b/recipes/drupal_cms_project/config/field.storage.node.field_project__client_logo.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - media + - node +id: node.field_project__client_logo +field_name: field_project__client_logo +entity_type: node +type: entity_reference +settings: + target_type: media +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/recipes/drupal_cms_project/config/field.storage.node.field_project__client_name.yml b/recipes/drupal_cms_project/config/field.storage.node.field_project__client_name.yml new file mode 100644 index 0000000000000000000000000000000000000000..6b6984260ab20a729f80c4e6661497efc0fa9e48 --- /dev/null +++ b/recipes/drupal_cms_project/config/field.storage.node.field_project__client_name.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - node +id: node.field_project__client_name +field_name: field_project__client_name +entity_type: node +type: string +settings: + max_length: 255 + case_sensitive: false + is_ascii: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/recipes/drupal_cms_project/config/node.type.project.yml b/recipes/drupal_cms_project/config/node.type.project.yml new file mode 100644 index 0000000000000000000000000000000000000000..d2738f7215ba92bec9247dce8e6b902b952e9a81 --- /dev/null +++ b/recipes/drupal_cms_project/config/node.type.project.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: { } +third_party_settings: { } +name: Project +type: project +description: 'Project content provides information about an example of work to the intended audience.' +help: null +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/recipes/drupal_cms_project/config/pathauto.pattern.project_content.yml b/recipes/drupal_cms_project/config/pathauto.pattern.project_content.yml new file mode 100644 index 0000000000000000000000000000000000000000..b733e6dbd4ff418884fd9e11736a535ce2de2226 --- /dev/null +++ b/recipes/drupal_cms_project/config/pathauto.pattern.project_content.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + enforced: + config: + - node.type.project + module: + - node +id: project_content +label: 'Project content' +type: 'canonical_entities:node' +pattern: '/projects/[node:title]' +selection_criteria: + 0655a022-fa1f-4809-9843-756babf82da4: + id: 'entity_bundle:node' + negate: false + uuid: 0655a022-fa1f-4809-9843-756babf82da4 + context_mapping: + node: node + bundles: + project: project +selection_logic: and +weight: -5 +relationships: { } diff --git a/recipes/drupal_cms_project/content/shortcut/create-project.yml b/recipes/drupal_cms_project/content/shortcut/create-project.yml new file mode 100644 index 0000000000000000000000000000000000000000..e13ce941b917ce4f4d877d09e392516210a16bc2 --- /dev/null +++ b/recipes/drupal_cms_project/content/shortcut/create-project.yml @@ -0,0 +1,18 @@ +_meta: + version: '1.0' + entity_type: shortcut + uuid: 7240c3e6-caa0-4f70-8dfd-7ddb7d49a2d4 + bundle: default + default_langcode: en +default: + title: + - + value: 'Create a project' + weight: + - + value: 0 + link: + - + uri: 'internal:/node/add/project' + title: '' + options: { } diff --git a/recipes/drupal_cms_project/recipe.yml b/recipes/drupal_cms_project/recipe.yml new file mode 100644 index 0000000000000000000000000000000000000000..48cd00356a4700c7e06341ef339ffc5d8f428655 --- /dev/null +++ b/recipes/drupal_cms_project/recipe.yml @@ -0,0 +1,26 @@ +name: Project +type: Drupal CMS +description: 'Adds a Project content type that provides information about an example of work to the intended audience.' +recipes: + - drupal_cms_content_type_base + - core/recipes/tags_taxonomy +install: + - link + - pathauto + - shortcut +config: + # Treat all field storages strictly, since they influence the database layout. + strict: + - field.storage.node.field_project__client_link + - field.storage.node.field_project__client_logo + - field.storage.node.field_project__client_name + import: + shortcut: + - shortcut.set.default + actions: + user.role.content_editor: + grantPermissions: + - 'create project content' + - 'delete project revisions' + - 'delete any project content' + - 'edit any project content' diff --git a/recipes/drupal_cms_project/tests/src/Functional/ComponentValidationTest.php b/recipes/drupal_cms_project/tests/src/Functional/ComponentValidationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1846116de0a0990d0f157c908f73ca9ce5aceb81 --- /dev/null +++ b/recipes/drupal_cms_project/tests/src/Functional/ComponentValidationTest.php @@ -0,0 +1,47 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\drupal_cms_project\Functional; + +use Drupal\FunctionalTests\Core\Recipe\RecipeTestTrait; +use Drupal\Tests\BrowserTestBase; + +/** + * @group drupal_cms_project + */ +class ComponentValidationTest extends BrowserTestBase { + + use RecipeTestTrait; + + /** + * {@inheritdoc} + */ + protected $defaultTheme = 'stark'; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + $dir = realpath(__DIR__ . '/../../..'); + // The recipe should apply cleanly. + $this->applyRecipe($dir); + // Apply it again to prove that it is idempotent. + $this->applyRecipe($dir); + } + + public function testPathAliasPatternPrecedence(): void { + $dir = realpath(__DIR__ . '/../../../../drupal_cms_seo_basic'); + $this->applyRecipe($dir); + + // Confirm that projects have the expected path aliases. + $node = $this->drupalCreateNode([ + 'type' => 'project', + 'title' => 'Test Project', + ]); + $this->assertStringEndsWith("/projects/test-project", $node->toUrl()->toString()); + } + +} diff --git a/recipes/drupal_cms_starter/composer.json b/recipes/drupal_cms_starter/composer.json index 6b9fa6d40f57d3076bf305b989d8cb0232fd43e3..d42a2434c57f2e97e02a6417fe4f2f029b51cacc 100644 --- a/recipes/drupal_cms_starter/composer.json +++ b/recipes/drupal_cms_starter/composer.json @@ -24,10 +24,12 @@ "suggest": { "drupal/drupal_cms_accessibility_tools": "Installs and configures tools to help authors make their content accessible.", "drupal/drupal_cms_blog": "Sets up a basic blog, with tagging.", + "drupal/drupal_cms_case_study": "Adds a Case study content type that provides detailed information about a subject to the intended audience.", "drupal/drupal_cms_events": "A content type and view to help you manage events.", "drupal/drupal_cms_forms": "Provides a simple contact form, and tools for building more complex forms.", "drupal/drupal_cms_multilingual": "Adds support for translations to all content types.", "drupal/drupal_cms_news": "Adds a news content type with an overview page and related news items.", + "drupal/drupal_cms_project": "Adds a Project content type that provides information about an example of work to the intended audience.", "drupal/drupal_cms_seo_tools": "Configures Drupal CMS for search engine optimization best practices." } } diff --git a/recipes/drupal_cms_starter/recipe.yml b/recipes/drupal_cms_starter/recipe.yml index f0b05ee27c15514aa9a5b12763b8a7effaaacc0b..ae1062de307ab8f5226b377d1f88b8ebb5b4cdcb 100644 --- a/recipes/drupal_cms_starter/recipe.yml +++ b/recipes/drupal_cms_starter/recipe.yml @@ -62,8 +62,10 @@ config: recipes: - drupal_cms_events - drupal_cms_blog + - drupal_cms_case_study - drupal_cms_forms - drupal_cms_news + - drupal_cms_project - drupal_cms_seo_tools - drupal_cms_accessibility_tools enabled_sources: