diff --git a/project/drupal.py b/project/drupal.py index 192869370..9c8c3fd45 100644 --- a/project/drupal.py +++ b/project/drupal.py @@ -228,3 +228,59 @@ def platformify(self): self.builddir) + self.composer_defaults(), ] + +class Drupal10_govcms10(RemoteProject): + major_version = "3" + remote = 'https://github.com/govCMS/GovCMS.git' + + def package_update_actions(self): + actions = super(Drupal10_govcms10, self).package_update_actions() + return [ + 'cd {0} && composer config -g allow-plugins.composer/installers true --no-plugins'.format( + self.builddir), + 'cd {0} && composer config allow-plugins.composer/installers true --no-plugins'.format( + self.builddir), + 'cd {0} && composer config allow-plugins.drupal/core-composer-scaffold true --no-plugins'.format( + self.builddir), + 'cd {0} && composer config allow-plugins.drupal/core-project-message true --no-plugins'.format( + self.builddir), + 'cd {0} && composer config allow-plugins.cweagans/composer-patches true --no-plugins '.format( + self.builddir), + ] + actions + + @property + def update(self): + projectName = "govcms10" + + def drupal10_govcms10_modify_composer(composer): + """ + This change makes the template loadable via Composer (see https://github.com/platformsh-templates/drupal9/pull/33). + """ + + composer['name'] = "platformsh/{0}".format(projectName) + composer[ + 'description'] = "This template builds the Australian government's GovCMS Drupal 10 distribution using the \"Drupal Recommended\" Composer project." + + return composer + + return super(Drupal10_govcms10, self).update + [ + (self.modify_composer, [drupal10_govcms10_modify_composer]) + ] + + @property + def update(self): + return super(Drupal10_govcms10, self).update + [ + 'cd {0} && rm -rf .circleci'.format(self.builddir), + 'cd {0} && rm -rf .tugboat'.format(self.builddir), + 'cd {0} && composer remove php {1}'.format(self.builddir, + self.composer_defaults().replace('--prefer-dist', '')), + ] + + @property + def platformify(self): + return super(Drupal10_govcms10, self).platformify + [ + 'cd {0} && composer require platformsh/config-reader drush/drush drupal/redis'.format( + self.builddir) + self.composer_defaults(), + # 'cd {0} && composer update -W'.format(self.builddir) + self.composer_defaults(), + # 'cd {0} && rm -rf web/profiles/govcms'.format(self.builddir), + ] diff --git a/templates/drupal10-govcms10/.platform.template.yaml b/templates/drupal10-govcms10/.platform.template.yaml new file mode 100644 index 000000000..e0b377ff8 --- /dev/null +++ b/templates/drupal10-govcms10/.platform.template.yaml @@ -0,0 +1,30 @@ +version: 1 + +info: + id: platformsh/drupal10-govcms10 + name: GovCMS 10 + description: | +

This template builds the Australian government's GovCMS Drupal 10 distribution using the Drupal Composer project for better flexibility. It is pre-configured to use MariaDB and Redis for caching. The Drupal installer will skip asking for database credentials as they are already provided.

+

GovCMS is a Drupal distribution built for the Australian government, and includes configuration optimized for managing government websites.

+ class: starter + tags: + - PHP + - Drupal + - CMS + - Symfony + image: data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='199.37' height='225'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%232ba9e0%7D%3C/style%3E%3C/defs%3E%3Cg %3E%3Cg %3E%3Cpath class='cls-1' d='M93.78 139.31a35.5 35.5 0 1 0 35.5 35.5 35.51 35.51 0 0 0-35.5-35.5zM138 132.51a61.17 61.17 0 0 1-9.26 92.49c29.31-9 53.56-31.06 64.4-57.73 15-36.92 1-64.67-22.43-89.87a45.68 45.68 0 0 1 1.15 10.11 46.88 46.88 0 0 1-33.86 45zM97.82 87.57A27.19 27.19 0 1 0 125 60.43a27.16 27.16 0 0 0-27.18 27.14z'/%3E%3Cpath class='cls-1' d='M47 214.22a61.17 61.17 0 0 1 39.55-100.1 46.82 46.82 0 0 1 44.75-72.89C116 28 100.72 14.62 88.66 0c6.13 64.13-58.4 40.82-82.32 100C-9.62 139.58 4.79 188.56 47 214.22z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E + notes: + - heading: "Features" + content: | + PHP 8.3
+ MariaDB 10.11
+ Redis 7.2
+ Drush included
+ Automatic TLS certificates
+ Composer-based build
+ +initialize: + repository: https://github.com/platformsh-templates/drupal10-govcms10.git@master + config: null + files: [] + profile: GovCMS 10 diff --git a/templates/drupal10-govcms10/files/.ahoy.yml b/templates/drupal10-govcms10/files/.ahoy.yml new file mode 100644 index 000000000..afab32f28 --- /dev/null +++ b/templates/drupal10-govcms10/files/.ahoy.yml @@ -0,0 +1,49 @@ +--- +ahoyapi: v2 + +commands: + up: + usage: Build project. + cmd: | + docker compose up -d "$@" + + down: + usage: Delete project. + cmd: docker compose down + + build: + usage: Build project. + cmd: | + docker compose build "$@" + + restart: + usage: Restart Docker containers. + cmd: docker compose restart + + stop: + usage: Stop Docker containers. + cmd: docker compose stop "$@" + + watch: + usage: Use Compose Watch for live development. + cmd: docker compose watch + + cli: + usage: Start a shell. + cmd: docker compose exec govcms bash + + composer: + usage: Start a composer command. + cmd: docker compose exec govcms composer "$@" + + rector: + usage: Analyze your code with Rector and review suggested changes. + cmd: docker compose exec govcms rector "$@" + + phpunit: + usage: Run PHPUnit tests. + cmd: docker compose exec govcms sudo -u root -E sudo -u www-data -E /app/bin/phpunit "$@" + + drupal-check: + usage: Static analysis tool to check for correctness and deprecation errors. + cmd: docker compose exec govcms drupal-check "$@" diff --git a/templates/drupal10-govcms10/files/.blackfire.yml b/templates/drupal10-govcms10/files/.blackfire.yml new file mode 100644 index 000000000..2d3acb471 --- /dev/null +++ b/templates/drupal10-govcms10/files/.blackfire.yml @@ -0,0 +1,81 @@ +tests: + 'The homepage should be fast': + path: + - '/' + assertions: + - 'main.wall_time <= 250ms' + 'Some Composer dependencies have known security issues and should be upgraded': + path: + - '/.*' + assertions: + - { expression: 'not has_vulnerable_dependencies()' } + '"assert.active" is a dev_only feature and should be disabled in production': + path: + - '/.*' + assertions: + - { expression: 'runtime.configuration.assert_active === false' } + '"display_errors" should be disabled': + path: + - '/.*' + assertions: + - { expression: 'not is_configuration_enabled("display_errors")' } + '"display_startup_errors" should not be enabled': + path: + - '/.*' + assertions: + - { expression: 'not is_configuration_enabled("display_startup_errors")' } + '"max_execution_time" should be less than 30 seconds for Web requests': + path: + - '/.*' + assertions: + - { expression: 'runtime.configuration.max_execution_time <= 30' } + '"session.use_strict_mode" should be enabled': + path: + - '/.*' + assertions: + - { expression: 'runtime.configuration.session_use_strict_mode === true' } + '"zend.detect_unicode" should be disabled as BOMs are not portable': + path: + - '/.*' + assertions: + - { expression: 'runtime.configuration.zend_detect_unicode === false' } + 'The realpath cache ttl should be more than one hour in production': + path: + - '/.*' + assertions: + - { expression: 'runtime.configuration.realpath_cache_ttl >= 3600' } + 'The session garbage collector should be disabled in production': + path: + - '/.*' + assertions: + - { expression: 'runtime.configuration.session_gc_probability === 0' } + +scenarios: | + #!blackfire-player + + name "Drupal Scenarios" + + group homepages + visit url("/") + name "Homepage (English)" + expect status_code() == 200 + visit url("/es") + name "Homepage (Español)" + expect status_code() == 200 + + group articles + visit url("/en/articles") + name "Articles" + expect status_code() == 200 + + group admin_anonymous + visit url("/en/admin/content") + expect status_code() == 403 + visit url("/en/admin/structure") + expect status_code() == 403 + + scenario + name "Anonymous Visit" + include homepages + include articles + include admin_anonymous diff --git a/templates/drupal10-govcms10/files/.docker/Dockerfile.govcms b/templates/drupal10-govcms10/files/.docker/Dockerfile.govcms new file mode 100644 index 000000000..ffcf4866a --- /dev/null +++ b/templates/drupal10-govcms10/files/.docker/Dockerfile.govcms @@ -0,0 +1,63 @@ +# Stage 1: Build the application +FROM drupal:10-php8.1 as builder + +# Set timezone to Australia/Sydney by default +RUN ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime + +# Install required packages and PHP extensions +RUN \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update && \ + apt-get install -y --no-install-recommends libicu-dev sqlite3 mariadb-client git unzip rsync sudo && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + docker-php-ext-configure intl && \ + docker-php-ext-install intl + +# Configure PHP settings +RUN echo "memory_limit = 512M" >> /usr/local/etc/php/conf.d/docker-php-ram-limit.ini && \ + echo "upload_max_filesize = 100M" >> /usr/local/etc/php/conf.d/docker-php-upload-limit.ini && \ + echo "post_max_size = 100M" >> /usr/local/etc/php/conf.d/docker-php-upload-limit.ini + +# Set Composer environment variables +ENV COMPOSER_ALLOW_SUPERUSER=1 +ENV COMPOSER_MEMORY_LIMIT=-1 +ENV SIMPLETEST_BASE_URL="http://govcms" +ENV SIMPLETEST_DB='mysql://drupal:drupal@mariadb/drupal' + +# Set working directory +WORKDIR /app + +# Copy only the necessary files for dependency installation +COPY composer.json ./ + +# Install Composer dependencies +RUN \ + --mount=type=cache,mode=0777,target=/root/.composer/cache \ + composer require palantirnet/drupal-rector mglaman/drupal-check --dev --no-update && \ + composer update --no-scripts --no-autoloader && \ + cp vendor/palantirnet/drupal-rector/rector.php . + +# Create a symbolic link +RUN rm -rf /opt/drupal && \ + ln -sf /app/web /var/www/html + +# Stage 2: Final application image +FROM builder as site + +# Set the working directory +WORKDIR /app + +# Copy the rest of the application files +COPY . /app/ + +# Configure Composer +RUN \ + --mount=type=cache,mode=0777,target=/root/.composer/cache \ + composer install + +# Adjust ownership +RUN chown -R www-data:www-data web/sites web/modules web/themes + +# Set the PATH environment variable +ENV PATH=${PATH}:/app/bin diff --git a/templates/drupal10-govcms10/files/.dockerignore b/templates/drupal10-govcms10/files/.dockerignore new file mode 100644 index 000000000..3be8af9de --- /dev/null +++ b/templates/drupal10-govcms10/files/.dockerignore @@ -0,0 +1,29 @@ +.ahoy.yml +.circleci +.docker +.dockerignore +.DS_Store +.editorconfig +.env +.git +.gitattributes +.github +.gitignore +.idea +.tugboat +DEVELOPMENT.md +CHANGELOG.txt +CONTRIBUTING.md +LICENSE.txt +README.md +SECURITY.md +VERSIONS.md +app +bin +build +composer.lock +docker-compose.yml +sites +tests +vendor +web diff --git a/templates/drupal10-govcms10/files/.environment b/templates/drupal10-govcms10/files/.environment new file mode 100644 index 000000000..945924fd7 --- /dev/null +++ b/templates/drupal10-govcms10/files/.environment @@ -0,0 +1,11 @@ +# Statements in this file will be executed (sourced) by the shell in SSH +# sessions, in deploy hooks, in cron jobs, and in the application's runtime +# environment. This file must be placed in the root of the application, not +# necessarily the git repository's root. In case of multiple applications, +# each application can have its own .environment file. + +# Allow executable app dependencies from Composer to be run from the path. +if [ -n "$PLATFORM_APP_DIR" -a -f "$PLATFORM_APP_DIR"/composer.json ] ; then + bin=$(composer config bin-dir --working-dir="$PLATFORM_APP_DIR" --no-interaction 2>/dev/null) + export PATH="${PLATFORM_APP_DIR}/${bin:-vendor/bin}:${PATH}" +fi \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/bug_report.yaml b/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 000000000..604f31cd2 --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,72 @@ +name: Bug report +description: If you've found a problem with the template, let us know so that we can update it for everyone. +labels: + - 'bug' +body: + - type: markdown + attributes: + value: | + Thanks for your interest in helping improve the Platform.sh templates! + Please fill in the fields below so we can understand what's going wrong. + + - type: textarea + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. + placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend. + validations: + required: true + + - type: textarea + attributes: + label: Include some logs + description: Any logs you can include will help us investigate the issue. + placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend. + validations: + required: true + + - type: textarea + attributes: + label: Reproducing + description: Help us reproduce what you're seeing. + placeholder: | + Steps to reproduce the behavior: + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + + - type: textarea + attributes: + label: Expected behavior + description: A clear and concise description of what you expected to happen. + placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend. + validations: + required: true + + - type: textarea + attributes: + label: Your environment + description: Give us as many details as you can about your environment, whether that's on Platform.sh (your configuration YAMLs), or locally (your OS, services, and local development tool). + placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend. + validations: + required: true + + - type: textarea + attributes: + label: Screenshots + description: If applicable, add screenshots to help explain your problem. + placeholder: A picture's worth a thousand words... + validations: + required: false + + - type: textarea + attributes: + label: Additional context + description: Optionally add any other information or screenshots that could help us understand and implement the change. + placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend. + validations: + required: false + \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/config.yaml b/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 000000000..6391f6f4d --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Community Support + url: https://community.platform.sh/ + about: Please ask and answer questions here. + - name: Join us on Slack + url: https://chat.platform.sh/ + about: Ping the `@devrel_team`! diff --git a/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/improvements.yaml b/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/improvements.yaml new file mode 100644 index 000000000..0ba3aa5cd --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/ISSUE_TEMPLATE/improvements.yaml @@ -0,0 +1,41 @@ +name: Feature request +description: For changes to improve this template. +labels: + - 'feature request' +body: + - type: markdown + attributes: + value: | + Thanks for your interest in helping improve the Platform.sh templates! + Please fill in the fields below so we can understand what changes you'd like to see. + + - type: textarea + attributes: + label: What in this template can be improved or added as a feature? + description: Is your feature request related to a problem? Please describe. + placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + validations: + required: true + + - type: textarea + attributes: + label: What exactly should be updated? + description: | + - Share as much detail as you can to help us understand the suggestion. + - What do you expect as an outcome? + validations: + required: true + + - type: textarea + attributes: + label: How important is this feature to you? + description: Does this template lacking this feature block your work? + validations: + required: true + + - type: textarea + attributes: + label: Additional context + description: Optionally add any other information or screenshots that could help us understand and implement the change. + validations: + required: false diff --git a/templates/drupal10-govcms10/files/.github/PULL_REQUEST_TEMPLATE.md b/templates/drupal10-govcms10/files/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..b41bea1c8 --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,34 @@ +## Description +Please describe your changes in detail according to the information below + +## Related Issue +This project only accepts pull requests related to open issues. +- If suggesting a new feature or change, please discuss it in an issue first +- If fixing a bug, there should be an issue describing it with steps to reproduce it following the bug report guide +- If you're suggesting a feature, please follow the feature request guide by clicking on issues + +### Please drop a link to the issue here: + +## Motivation and Context +Why is this change required? What problem does it solve? + +## How Has This Been Tested? +Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. + +## Screenshots (if appropriate): + +## Types of changes +What types of changes does your code introduce? Put an `x` in all the boxes that apply: + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) + +## Checklist: + Go over all the following list, and put an `x` in all the boxes that apply. If you're unsure about what any of these mean, don't hesitate to ask. We're here to help! + +- [ ] I have read the contribution guide +- [ ] I have created an issue following the issue guide +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly. diff --git a/templates/drupal10-govcms10/files/.github/tests/vrt/template-paths.js b/templates/drupal10-govcms10/files/.github/tests/vrt/template-paths.js new file mode 100644 index 000000000..18c2ac70a --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/tests/vrt/template-paths.js @@ -0,0 +1,42 @@ +/** + * This is the default scenarios collection that will be used if there is not a theme-specific scenarios file in place + * for a given theme. You can copy this file and then name it `theme-paths.js`. + * + */ + +/** + * Stores the scenarios for each page/endpoint that should be tested + * @type {{}} + */ +var scenarioPaths = {}; + +/** + * For each page/endpoint you want to test, create a new array entry that contains at least the keys/properties `label` + * and `path`. + * + * additional properties you can set for each scenario are documented here: https://github.com/garris/BackstopJS#advanced-scenarios + * + * However, do NOT set `referenceUrl` or `url` as those will be overridden + * + * `path` should assume the URL ends in a trailing slash. For example, if the page you want to test against is + * https://master-7rqtwti-fqfjrmtjbjta4.eu-3.platformsh.site/a/path/to/foo/bar/ + * Then for `path` it should be "a/path/to/foo/bar/" + * + * @type {{path: string, label: string}[]} + */ +scenarioPaths.paths = [ + { + "label":"Events", + "path": "events/" + }, + { + "label": "Blog", + "path": "blog/" + }, + { + "label": "FOI Requests", + "path": "freedom-of-information/" + } +]; + +module.exports = scenarioPaths; diff --git a/templates/drupal10-govcms10/files/.github/workflows/autopr.yaml b/templates/drupal10-govcms10/files/.github/workflows/autopr.yaml new file mode 100644 index 000000000..2dcd1f057 --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/workflows/autopr.yaml @@ -0,0 +1,29 @@ +name: Trigger Auto PR on push to update branch +on: + push: + branches: + - update + workflow_dispatch: + +env: + PLATFORMSH_CLI_TOKEN: ${{ secrets.TEMPLATES_CLI_TOKEN }} + +jobs: + create-auto-pr: + name: "Creates an auto merging PR when the branch is updated" + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'platformsh-templates' }} + steps: + - name: 'Prep the repo for autoPR' + id: prepautopr + uses: platformsh/gha-prep-for-autopr@main + with: + github-token: ${{ secrets.TEMPLATES_GITHUB_TOKEN }} + + - name: 'Create & merge PR' + id: create-merge-pr + uses: platformsh/gha-create-autopr@main + with: + github-token: ${{ secrets.TEMPLATES_GITHUB_TOKEN }} + trigger-source: 'auto push' + default-branch: ${{ steps.prepautopr.outputs.default-branch }} diff --git a/templates/drupal10-govcms10/files/.github/workflows/last-updated.yaml b/templates/drupal10-govcms10/files/.github/workflows/last-updated.yaml new file mode 100644 index 000000000..dfcba84c4 --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/workflows/last-updated.yaml @@ -0,0 +1,66 @@ +name: Update last.updated +on: + push: + branches: + - main + - master + +env: + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + GH_TOKEN: ${{ secrets.TEMPLATES_GITHUB_TOKEN }} + +jobs: + update-last-updated-file: + name: "Updates the last.updated file with the current date" + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'platformsh-templates' && github.event.commits[0].author.name != 'GitHub Action' }} + steps: + - name: 'get repo' + id: get-repo + uses: actions/checkout@v3 + with: + token: ${{secrets.TEMPLATES_GITHUB_TOKEN }} + + - name: 'set git config' + shell: bash + run: | + git config --global user.email "action@github.com" + git config --global user.name "GitHub Action" + + - name: 'check for enforce admins' + id: 'check-for-enforce' + shell: bash + run: | + enforceAdmins=$(gh api "/repos/${GITHUB_REPOSITORY}/branches/${DEFAULT_BRANCH}/protection/enforce_admins" --jq '.enabled') + echo "::notice is enforce admins enabled? ${enforceAdmins}" + echo "enforce_admin=${enforceAdmins}" >> $GITHUB_OUTPUT + + - name: 'disable enforce admins' + id: 'disable-force-admins' + if: ${{ 'true' == steps.check-for-enforce.outputs.enforce_admin }} + shell: bash + run: | + echo "::notice::Enforce Admins is enabled. Temporarily disabling..." + gh api --method DELETE "/repos/${GITHUB_REPOSITORY}/branches/${DEFAULT_BRANCH}/protection/enforce_admins" --silent \ + && echo "::notice::Enforce admins disabled" \ + || echo "::error::Disabling enforce admin failed" + + - name: 'update last.updated' + id: last-updated + shell: bash + run: | + date > ./.platform/last.updated + git add ./.platform/last.updated + git commit -m "auto-updates version, post merge" + git push origin "${DEFAULT_BRANCH}" + + - name: "Re-enable enforce admins" + id: re-enable-enforce-admin + if: ${{ 'true' == steps.check-for-enforce.outputs.enforce_admin }} + shell: bash + run: | + gh api --method POST \ + -H "Accept: application/vnd.github+json" \ + "/repos/${GITHUB_REPOSITORY}/branches/${DEFAULT_BRANCH}/protection/enforce_admins" --silent \ + && echo "::notice::Successfully re-enabled enforce admin" \ + || echo "::error::Re-enabling enforce admins failed." diff --git a/templates/drupal10-govcms10/files/.github/workflows/sourceops.yaml b/templates/drupal10-govcms10/files/.github/workflows/sourceops.yaml new file mode 100644 index 000000000..8cac0b30b --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/workflows/sourceops.yaml @@ -0,0 +1,23 @@ +name: Trigger Source Operations on a Schedule +on: + schedule: + # Run at 00:15 every day + - cron: '15 */19 * * *' + workflow_dispatch: + +env: + PLATFORMSH_CLI_TOKEN: ${{ secrets.TEMPLATES_CLI_TOKEN }} + GITHUB_TOKEN: ${{ secrets.TEMPLATES_GITHUB_TOKEN }} + +jobs: + run_dm_update: + name: Trigger Source Op + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'platformsh-templates' }} + steps: + - name: 'Run source ops' + id: run-source-op + uses: platformsh/gha-run-sourceops-update@main + with: + github_token: ${{ secrets.TEMPLATES_GITHUB_TOKEN }} + platformsh_token: ${{ secrets.TEMPLATES_CLI_TOKEN }} diff --git a/templates/drupal10-govcms10/files/.github/workflows/testprenvironment.yaml b/templates/drupal10-govcms10/files/.github/workflows/testprenvironment.yaml new file mode 100644 index 000000000..b50e2449c --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/workflows/testprenvironment.yaml @@ -0,0 +1,26 @@ +name: "TestPrEnvironment" +on: + workflow_run: + workflows: [ "platformsh" ] + types: + - completed + pull_request: + branches: + - master + - main +env: + BASELINE_URL: ${{ vars.BASELINE_URL }} + GITHUB_TOKEN: ${{ secrets.TEMPLATES_GITHUB_TOKEN }} +jobs: + test-pr-env: + name: TestPrEnvironment + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'platformsh-templates' }} + steps: + - name: 'Run Pull Request Tests' + id: get-target-url + uses: platformsh/gha-template-pr-tests@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + baseline-url: ${{ vars.BASELINE_URL }} + delay-start: 5 diff --git a/templates/drupal10-govcms10/files/.github/workflows/workflow-fail-log.yaml b/templates/drupal10-govcms10/files/.github/workflows/workflow-fail-log.yaml new file mode 100644 index 000000000..0c295f59b --- /dev/null +++ b/templates/drupal10-govcms10/files/.github/workflows/workflow-fail-log.yaml @@ -0,0 +1,42 @@ +######################################################################################################################## +## ## +## This github workflow file is part of the Platform.sh process of updating and maintaining our collection of ## +## templates. For more information see https://github.com/platformsh-templates/ghrw-templates ## +## and https://github.com/search?q=topic%3Agithub-action+org%3Aplatformsh ## +## ## +## YOU CAN SAFELY DELETE THIS FILE ## +## ## +######################################################################################################################## +on: + workflow_run: + workflows: [Trigger Source Operations on a Schedule, Trigger Auto PR on push to update branch, Run Post PR Acceptance jobs] + types: [completed] + +jobs: + on-failure: + runs-on: ubuntu-latest + if: | + github.event.workflow_run.conclusion == 'failure' + && github.event.workflow.name != 'TestPrEnv-CW / TestPrEnvironment' + && github.repository_owner == 'platformsh-templates' + && github.event.commits[0].author.name != 'GitHub Action' + steps: + - name: Record failed workflow + shell: bash + run: | + echo 'The triggering workflow failed' + echo "::notice::The workflow ${{ github.event.workflow.name }} failed." + - name: 'Add env vars' + shell: bash + run: | + echo "GH_TOKEN=${{ secrets.TEMPLATES_GITHUB_TOKEN }}" >> $GITHUB_ENV + - name: 'Check and record API limits' + shell: bash + run: | + userName=$(gh api user | jq -r '.login') + currentRateLimit=$(gh api /users/platformsh/orgs -i | grep X-Ratelimit) + echo "::notice::The API user ${userName} has the following X-Ratelimit values:" + echo "::group::X-RateLimits for ${userName}" + echo "${currentRateLimit}" + echo "::endgroup::" + diff --git a/templates/drupal10-govcms10/files/.gitignore b/templates/drupal10-govcms10/files/.gitignore new file mode 100644 index 000000000..e01fe27e4 --- /dev/null +++ b/templates/drupal10-govcms10/files/.gitignore @@ -0,0 +1,47 @@ +# Ignore GovCMS build files. +.docker/auth.json +build.properties +tests/screenshots/* + +# Fixtures added +tests/cy/cypress/fixtures/currentComposer.json + +# Ignore build artifacts +/deploy +bin/* +reports + +# Ignore directories generated by Composer +/drush/contrib/ +/vendor/ +/web/core/ +/web/modules/contrib/ +/web/themes/contrib/ +/web/profiles/contrib/ +/web/libraries/ +console/ + +# Ignore sensitive information +/web/sites/*/settings.local.php + +# Ignore Drupal's file directory +/web/sites/*/files/ + +# Ignore SimpleTest multi-site environment. +/web/sites/simpletest + +# Ignore files generated by PhpStorm +/.idea/ + +# Ignore .env files as they are personal +/.env + +# Ignore mounts +web/sites/default/files +tmp +private +.drush +drush-backups +.console +/.editorconfig +/.gitattributes diff --git a/templates/drupal10-govcms10/files/.platform.app.yaml b/templates/drupal10-govcms10/files/.platform.app.yaml new file mode 100644 index 000000000..4d40306c7 --- /dev/null +++ b/templates/drupal10-govcms10/files/.platform.app.yaml @@ -0,0 +1,147 @@ +# This file describes an application. You can have multiple applications +# in the same project. +# +# See https://docs.platform.sh/configuration/app.html + +# The name of this app. Must be unique within a project. +name: 'drupal' + +# The runtime the application uses. +type: 'php:8.3' + +dependencies: + php: + composer/composer: '^2.1' + +runtime: + # Enable the redis extension so Drupal can communicate with the Redis cache. + extensions: + - redis + - sodium + - apcu + - blackfire + +# The relationships of the application with services or other applications. +# +# The left-hand side is the name of the relationship as it will be exposed +# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand +# side is in the form `:`. +relationships: + database: 'db:mysql' + redis: 'cache:redis' + +# The size of the persistent disk of the application (in MB). +disk: 2048 + +# The 'mounts' describe writable, persistent filesystem mounts in the application. +mounts: + # The default Drupal files directory. + '/web/sites/default/files': + source: local + source_path: 'files' + # Drupal gets its own dedicated tmp directory. The settings.platformsh.php + # file will automatically configure Drupal to use this directory. + '/tmp': + source: local + source_path: 'tmp' + # Private file uploads are stored outside the web root. The settings.platformsh.php + # file will automatically configure Drupal to use this directory. + '/private': + source: local + source_path: 'private' + # Drush needs a scratch space for its own caches. + '/.drush': + source: local + source_path: 'drush' + # Drush will try to save backups to this directory, so it must be + # writeable even though you will almost never need to use it. + '/drush-backups': + source: local + source_path: 'drush-backups' + +# Configuration of the build of this application. +build: + flavor: composer + +# The hooks executed at various points in the lifecycle of the application. +hooks: + # The build hook runs after Composer to finish preparing up your code. + # No services are available but the disk is writeable. + build: | + set -e + # The deploy hook runs after your application has been deployed and started. + # Code cannot be modified at this point but the database is available. + # The site is not accepting requests while this script runs so keep it + # fast. + deploy: | + set -e + php ./drush/platformsh_generate_drush_yml.php + # if drupal is installed, will call the following drush commands: + # - `cache-rebuild` + # - `updatedb` + # - and if config files are present, `config-import` + cd web + bash $PLATFORM_APP_DIR/drush/platformsh_deploy_drupal.sh + +# The configuration of app when it is exposed to the web. +web: + locations: + # All requests not otherwise specified follow these rules. + '/': + # The folder from which to serve static assets, for this location. + # + # This is a filesystem path, relative to the application root. + root: 'web' + + # How long to allow static assets from this location to be cached. + # + # Can be a time in seconds, or -1 for no caching. Times can be + # suffixed with "s" (seconds), "m" (minutes), "h" (hours), "d" + # (days), "w" (weeks), "M" (months, as 30 days) or "y" (years, as + # 365 days). + expires: 5m + + # Redirect any incoming request to Drupal's front controller. + passthru: '/index.php' + + # Deny access to all static files, except those specifically allowed below. + allow: false + + # Rules for specific URI patterns. + rules: + # Allow access to common static files. + '\.(jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf)$': + allow: true + '^/robots\.txt$': + allow: true + '^/sitemap\.xml$': + allow: true + + # Deny direct access to configuration files. + '^/sites/sites\.php$': + scripts: false + '^/sites/[^/]+/settings.*?\.php$': + scripts: false + + # The files directory has its own special configuration rules. + '/sites/default/files': + # Allow access to all files in the public files directory. + allow: true + expires: 5m + passthru: '/index.php' + root: 'web/sites/default/files' + + # Do not execute PHP scripts from the writeable mount. + scripts: false + + rules: + # Provide a longer TTL (2 weeks) for aggregated CSS and JS files. + '^/sites/default/files/(css|js)': + expires: 2w + +crons: + # Run Drupal's cron tasks every 19 minutes. + drupal: + spec: '*/19 * * * *' + commands: + start: 'cd web ; drush core-cron' diff --git a/templates/drupal10-govcms10/files/.platform/local/.gitignore b/templates/drupal10-govcms10/files/.platform/local/.gitignore new file mode 100644 index 000000000..b498fd495 --- /dev/null +++ b/templates/drupal10-govcms10/files/.platform/local/.gitignore @@ -0,0 +1 @@ +/ diff --git a/templates/drupal10-govcms10/files/.platform/local/README.txt b/templates/drupal10-govcms10/files/.platform/local/README.txt new file mode 100644 index 000000000..f360b8495 --- /dev/null +++ b/templates/drupal10-govcms10/files/.platform/local/README.txt @@ -0,0 +1,8 @@ +.platform/local +=============== + +This directory is where the Platform.sh CLI stores configuration files, builds, and +other data to help work with your project locally. + +It is not used on remote environments at all - the directory is excluded from +your Git repository (via .git/info/exclude). diff --git a/templates/drupal10-govcms10/files/.platform/local/project.yaml b/templates/drupal10-govcms10/files/.platform/local/project.yaml new file mode 100644 index 000000000..22c326cbc --- /dev/null +++ b/templates/drupal10-govcms10/files/.platform/local/project.yaml @@ -0,0 +1,2 @@ +id: uum66omflk5rc +host: api.platform.sh diff --git a/templates/drupal10-govcms10/files/.platform/routes.yaml b/templates/drupal10-govcms10/files/.platform/routes.yaml new file mode 100644 index 000000000..69ba2fcd0 --- /dev/null +++ b/templates/drupal10-govcms10/files/.platform/routes.yaml @@ -0,0 +1,17 @@ +# The routes of the project. +# +# Each route describes how an incoming URL is going +# to be processed by Platform.sh. + +"https://{default}/": + type: upstream + upstream: "drupal:http" + cache: + enabled: true + + # Base the cache on the session cookie and custom Drupal cookies. Ignore all other cookies. + cookies: ['/^SS?ESS/', '/^Drupal.visitor/'] + +"https://www.{default}/": + type: redirect + to: "https://{default}/" diff --git a/templates/drupal10-govcms10/files/.platform/services.yaml b/templates/drupal10-govcms10/files/.platform/services.yaml new file mode 100644 index 000000000..fa5d65c40 --- /dev/null +++ b/templates/drupal10-govcms10/files/.platform/services.yaml @@ -0,0 +1,11 @@ +# The services of the project. +# +# Each service listed will be deployed +# to power your Platform.sh project. + +db: + type: mariadb:10.11 + disk: 2048 + +cache: + type: redis:7.2 diff --git a/templates/drupal10-govcms10/files/DEVELOPMENT.md b/templates/drupal10-govcms10/files/DEVELOPMENT.md new file mode 100644 index 000000000..b9e8992e0 --- /dev/null +++ b/templates/drupal10-govcms10/files/DEVELOPMENT.md @@ -0,0 +1,88 @@ +# GovCMS Development Guide + +This guide is intended for developers who want to set up a local development environment for the GovCMS project on +GitHub. The following instructions will guide you through the process of setting up a local environment, including +installing and configuring necessary software and dependencies. + +## Prerequisites + +Before you can start setting up your local development environment for GovCMS, you must have the following software +installed on your machine: + +- Git +- Composer +- Docker (Optional) +- Docker Compose (Optional) + +If you do not have any of these software installed, please follow the instructions provided by the software provider to +install them. + +## Setup + +- Via Composer +- Via Docker Compose + +Follow the below steps to set up your local development environment for GovCMS: + +### Via Composer + +1. Clone the GovCMS project from GitHub by running the following command: + + ```console + git clone -b 3.x-develop git@github.com:GovCMS/GovCMS.git + ``` + +2. Navigate to the cloned project directory: + + ```console + cd govcms + ``` + +3. Install project dependencies using Composer: + + ```console + composer update + ``` + +### Via Docker Compose + +1. Clone the GovCMS project from GitHub by running the following command: + + ```console + git clone -b 3.x-develop git@github.com:GovCMS/GovCMS.git + ``` + +2. Navigate to the cloned project directory: + + ```console + cd govcms + ``` + +3. Start the Docker containers by running the following command: + + ```console + cd govcms + docker compose up -d + ``` + +4. The website should now be running at http://localhost:8888. You can access the website by opening this URL in your + browser. + +## Running Tests + +TBD + +## Contributing + +We welcome contributions from the community. To contribute, please follow the below steps: + +1. Fork the GovCMS project repository from GitHub. +2. Clone your forked repository to your local machine. +3. Create a new branch for your feature or bug fix. +4. Make your changes and commit them to your local branch. +5. Push your changes to your forked repository on GitHub. +6. Submit a pull request to the main GovCMS repository. + +## Conclusion + +That's it! You now have a fully-functional local development environment for the GovCMS project. Happy coding! diff --git a/templates/drupal10-govcms10/files/LICENSE.txt b/templates/drupal10-govcms10/files/LICENSE.txt new file mode 100644 index 000000000..d159169d1 --- /dev/null +++ b/templates/drupal10-govcms10/files/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. + + + Copyright (C) + + 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. + + , 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/templates/drupal10-govcms10/files/README-govcms.md b/templates/drupal10-govcms10/files/README-govcms.md new file mode 100644 index 000000000..a7c6f84b5 --- /dev/null +++ b/templates/drupal10-govcms10/files/README-govcms.md @@ -0,0 +1,70 @@ +# GovCMS + +GovCMS is an open-source Drupal distribution developed specifically for Australian government agencies. It is built on +top of the Drupal content management system, providing a range of features and functionalities that are tailored to the +unique needs of government websites. + +## Features + +Key features of GovCMS include: + +- Accessibility compliance: GovCMS is designed to comply with the Web Content Accessibility Guidelines (WCAG) 2.1 Level + AA, making it easier for government agencies to ensure that their websites are accessible to all users. +- Content moderation: GovCMS includes a range of content moderation workflows, making it easy for government agencies to + manage content and ensure that only approved content is published on their websites. +- Security: GovCMS is built with security in mind, with regular security updates and patches provided by the Drupal and + GovCMS Ops team. + +## Community + +GovCMS Slack channel: + +https://govcmschat.slack.com/archives/C01BD9B3V5W + +## Getting started + +To get started with GovCMS, you need to have the following prerequisites: + +- A web server like Apache or Nginx +- PHP version 8.1 or above +- MySQL or PostgresSQL database + +More documents can be found in: + +- [DEVELOPMENT.md](DEVELOPMENT.md) +- [SECURITY.md](SECURITY.md) +- [VERSIONS.md](VERSIONS.md) + +## Troubleshooting and Contributing + +If you're encountering some +oddities, [here's a list of resolutions](https://github.com/GovCMS/GovCMS/wiki/Troubleshooting) to some of the problems +you may be experiencing. + +### Contributing to GovCMS + +All contributions to GovCMS are welcome. Issues and pull requests may be submitted against the relevant GovCMS project +on github where they will be addressed by the GovCMS team. + +### Patching GovCMS + +Because GovCMS is a [Drupal distribution](https://www.drupal.org/documentation/build/distributions), modules and +configurations are not added directly to the codebase. Rather, they are referenced within the composer.json file. + +Any alterations to Drupal core or contributed modules must have an associated [drupal.org](https://www.drupal.org) issue +filed against the project in question. Modifications should be made directly to the project in question and patched into +GovCMS rather than made directly against GovCMS. + +It is a requirement for any patches to GovCMS to pass all automated testing prior to manual review. The automated +testing checks for PHP syntax, coding standards, build completion and runs behavioural tests. It is also desirable that +additions to the codebase add behat tests to ensure no regressions occur once committed. + +To submit a patch, the GovCMS project should be forked and changes applied to a branch on the forked repository. Once +all changes are applied, a pull request between GovCMS and the branch of the fork may be created. + +## License + +GovCMS is released under the GNU General Public License v2.0. See the LICENSE file in the root of the repository for +more information. + +**[Back to top](#govcms)** diff --git a/templates/drupal10-govcms10/files/README-platformsh.md b/templates/drupal10-govcms10/files/README-platformsh.md new file mode 100644 index 000000000..a2b061bc6 --- /dev/null +++ b/templates/drupal10-govcms10/files/README-platformsh.md @@ -0,0 +1,129 @@ + +

+ + + + +

+ +

+ + + +

+ +

Deploy GovCMS 10 on Platform.sh

+ +

+Find out about Drupal 10 on Platform.sh       +Find out about GovCMS       +

+

+ +

+ +Open issues +   + +Open PRs +   + +License +   +

+ +

+

+ +
+ +## About Drupal 10 on Platform.sh + +This template builds Drupal using the "GovCMS" distribution install profile. +It is pre-configured to use MariaDB and Redis for caching. +The Drupal installer will skip asking for database credentials as they are already provided. + +> You should choose the "GovCMS" install profile when prompted to by the install wizard during initial setup. + +### Features + +- PHP 8.3 +- MariaDB 10.11 +- Redis 7.2 +- Drush included +- Automatic TLS certificates +- Composer-based build + +Please see [`platformsh-templates/drupal10:README.md`](https://github.com/platformsh-templates/drupal10/blob/master/README.md) for a full introduction to getting started and using the Platform.sh system, including: + +* Deployment +* Local Development +* Migration +* Troubleshooting + +## About GovCMS + +[GovCMS](https://www.govcms.gov.au) is an open source web content management and hosting service, based on Drupal and developed to help agencies create modern, affordable and responsive websites, whilst making it easier to collaborate and innovate. GovCMS also helps reduce the technology and compliance burden on government agencies. GovCMS is managed by the Australian Government Department of Finance. + +GovCMS Slack channel: https://govcmschat.slack.com/archives/C01BD9B3V5W + +Please see [`govCMS/GovCMS:README.md`](https://github.com/govCMS/GovCMS/blob/3.x-develop/README.md/) for a full introduction to the GovCMS project, including: + +* Installation +* Troubleshooting and Contributing + +> The GovCMS distribution is a deliberately restricted and curated set of modules, and you are advised to read [the guidelines for usage and development published by the maintainers](https://www.govcms.gov.au/support/tech-talk) before modifying things too much. + +## Quickstart + +The quickest way to deploy this template on Platform.sh is by clicking the button below. +This will automatically create a new project and initialize the repository for you. + +

+ + Deploy on Platform.sh + +

+
+ + + +You can also quickly recreate this project locally with the following command: + +```bash +composer create-project platformsh/drupal10-govcms10 -s dev +``` + +## About this template + +This project template is based on [the public Platform.sh Drupal10 template](https://github.com/platformsh-templates/drupal10/tree/0a0257ddc427d7b7f7d87fb85fdb64604d5556b9) from [the Platform.sh template library](https://docs.platform.sh/development/templates.html). +See the [Platform.sh documentation for deploying Drupal](https://docs.platform.sh/guides/drupal/deploy.html) for more. + +This template has been modified slightly, with reference to [the `govCMS/GovCMS` installer](https://github.com/govCMS/GovCMS) to add a few requirements to the `composer` configurations to suit the GovCMS installation. + +### Upgrading + +#### Upgrading GovCMS and Drupal + +The template requires the Drupal distribution `govcms/govcms: ^3` which at the time of release (v 3.15) means Drupal 10 (v 10.2.7). + +Running `composer upgrade` should be sufficient to keep your project up to date with newer releases to both GovCMS and Drupal core, as well as security releases. +It is not advised to require or define the Drupal core version yourself, the GovCMS template will pin the latest compatible Drupal version itself. + +#### Upgrading Platform.sh configurations + +You are expected to review and modify this template code (`.platformsh.app.yaml` etc) to your specific application requirements [as described in the documentation](https://docs.platform.sh/create-apps/app-reference.html), so it's normal to use the template only as a reference once you've started building your app. + +Over time, there may be minor updates added to the base Platform.sh Drupal template. +Although it's seldom necessary, you can follow the updates from the repository starting from the first commit. +Patches like this should be applied manually as your own configuration is expected to diverge from the template as you develop. + +
+ +

+Need help? +

+Ask the Platform.sh Community       +Join us on Slack       +
+

diff --git a/templates/drupal10-govcms10/files/README.md b/templates/drupal10-govcms10/files/README.md new file mode 100644 index 000000000..a2b061bc6 --- /dev/null +++ b/templates/drupal10-govcms10/files/README.md @@ -0,0 +1,129 @@ + +

+ + + + +

+ +

+ + + +

+ +

Deploy GovCMS 10 on Platform.sh

+ +

+Find out about Drupal 10 on Platform.sh       +Find out about GovCMS       +

+

+ +

+ +Open issues +   + +Open PRs +   + +License +   +

+ +

+

+ +
+ +## About Drupal 10 on Platform.sh + +This template builds Drupal using the "GovCMS" distribution install profile. +It is pre-configured to use MariaDB and Redis for caching. +The Drupal installer will skip asking for database credentials as they are already provided. + +> You should choose the "GovCMS" install profile when prompted to by the install wizard during initial setup. + +### Features + +- PHP 8.3 +- MariaDB 10.11 +- Redis 7.2 +- Drush included +- Automatic TLS certificates +- Composer-based build + +Please see [`platformsh-templates/drupal10:README.md`](https://github.com/platformsh-templates/drupal10/blob/master/README.md) for a full introduction to getting started and using the Platform.sh system, including: + +* Deployment +* Local Development +* Migration +* Troubleshooting + +## About GovCMS + +[GovCMS](https://www.govcms.gov.au) is an open source web content management and hosting service, based on Drupal and developed to help agencies create modern, affordable and responsive websites, whilst making it easier to collaborate and innovate. GovCMS also helps reduce the technology and compliance burden on government agencies. GovCMS is managed by the Australian Government Department of Finance. + +GovCMS Slack channel: https://govcmschat.slack.com/archives/C01BD9B3V5W + +Please see [`govCMS/GovCMS:README.md`](https://github.com/govCMS/GovCMS/blob/3.x-develop/README.md/) for a full introduction to the GovCMS project, including: + +* Installation +* Troubleshooting and Contributing + +> The GovCMS distribution is a deliberately restricted and curated set of modules, and you are advised to read [the guidelines for usage and development published by the maintainers](https://www.govcms.gov.au/support/tech-talk) before modifying things too much. + +## Quickstart + +The quickest way to deploy this template on Platform.sh is by clicking the button below. +This will automatically create a new project and initialize the repository for you. + +

+ + Deploy on Platform.sh + +

+
+ + + +You can also quickly recreate this project locally with the following command: + +```bash +composer create-project platformsh/drupal10-govcms10 -s dev +``` + +## About this template + +This project template is based on [the public Platform.sh Drupal10 template](https://github.com/platformsh-templates/drupal10/tree/0a0257ddc427d7b7f7d87fb85fdb64604d5556b9) from [the Platform.sh template library](https://docs.platform.sh/development/templates.html). +See the [Platform.sh documentation for deploying Drupal](https://docs.platform.sh/guides/drupal/deploy.html) for more. + +This template has been modified slightly, with reference to [the `govCMS/GovCMS` installer](https://github.com/govCMS/GovCMS) to add a few requirements to the `composer` configurations to suit the GovCMS installation. + +### Upgrading + +#### Upgrading GovCMS and Drupal + +The template requires the Drupal distribution `govcms/govcms: ^3` which at the time of release (v 3.15) means Drupal 10 (v 10.2.7). + +Running `composer upgrade` should be sufficient to keep your project up to date with newer releases to both GovCMS and Drupal core, as well as security releases. +It is not advised to require or define the Drupal core version yourself, the GovCMS template will pin the latest compatible Drupal version itself. + +#### Upgrading Platform.sh configurations + +You are expected to review and modify this template code (`.platformsh.app.yaml` etc) to your specific application requirements [as described in the documentation](https://docs.platform.sh/create-apps/app-reference.html), so it's normal to use the template only as a reference once you've started building your app. + +Over time, there may be minor updates added to the base Platform.sh Drupal template. +Although it's seldom necessary, you can follow the updates from the repository starting from the first commit. +Patches like this should be applied manually as your own configuration is expected to diverge from the template as you develop. + +
+ +

+Need help? +

+Ask the Platform.sh Community       +Join us on Slack       +
+

diff --git a/templates/drupal10-govcms10/files/SECURITY.md b/templates/drupal10-govcms10/files/SECURITY.md new file mode 100644 index 000000000..b0f850f6d --- /dev/null +++ b/templates/drupal10-govcms10/files/SECURITY.md @@ -0,0 +1,41 @@ +# Security Policies and Procedures + +This document outlines security procedures and general policies for the GovCMS +project. + + * [Supported Versions](#supported-versions) + * [Reporting a Bug](#reporting-a-bug) + * [Disclosure Policy](#disclosure-policy) + +## Supported Versions + +GovCMS most recent release + +## Reporting a Bug + +The GovCMS team and community take all security bugs in GovCMS seriously. +Thank you for improving the security of GovCMS. We appreciate your efforts and +responsible disclosure and will make every effort to acknowledge your +contributions. + +If you’ve found a vulnerability, we would like to know so we can fix it. +Report security bugs by emailing GovCMS Security at [osbsecurity@finance.gov.au], including: +- the website, page or repository where the vulnerability can be observed +- a brief description of the vulnerability +- optionally the type of vulnerability and any related [OWASP category] +- non-destructive exploitation details + +The security team will may ask for additional information or guidance. +Report security bugs in third-party modules to the person or team maintaining +the module. + +## Disclosure Policy + +When the security team receives a security bug report, they will assign it to a +primary handler. This person will coordinate the fix and release process, +involving the following steps: + + * Confirm the problem and determine the affected versions. + * Audit code to find any potential similar problems. + * Prepare fixes for all releases still under maintenance. These fixes will be + released as fast as possible to Github.com. diff --git a/templates/drupal10-govcms10/files/VERSIONS.md b/templates/drupal10-govcms10/files/VERSIONS.md new file mode 100644 index 000000000..d1c04943f --- /dev/null +++ b/templates/drupal10-govcms10/files/VERSIONS.md @@ -0,0 +1,7 @@ +# GovCMS Release Tags + +GovCMS uses a three-part semantic versioning nomenclature within the +constraints of drupal.org's current capabilities. See +[this drupal.org issue](https://www.drupal.org/node/1612910) for the latest. + +The three parts of our versioning system are MAJOR.FEATURE.SPRINT. diff --git a/templates/drupal10-govcms10/files/composer.json b/templates/drupal10-govcms10/files/composer.json new file mode 100644 index 000000000..bac74f442 --- /dev/null +++ b/templates/drupal10-govcms10/files/composer.json @@ -0,0 +1,93 @@ +{ + "name": "govcms/drupal10", + "description": "This template builds the GovCMS Drupal Distribution for Drupal 10 for Platform.sh based on the govCMS/govcms-project Composer project.", + "keywords": ["GovCMS"], + "type": "drupal-profile", + "license": "GPL-2.0-or-later", + "homepage": "https://www.govcms.gov.au", + "support": { + "docs": "https://docs.platform.sh/" + }, + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + }, + { + "type": "package", + "package": { + "name": "dropzone/dropzone", + "version": "v5.7.2", + "type": "drupal-library", + "dist": { + "type": "zip", + "url": "https://github.com/dropzone/dropzone/archive/refs/tags/v5.7.2.zip" + } + } + } + ], + "require": { + "govcms/govcms": "^3.14", + "drupal/redis": "^1.5", + "drush/drush": "^12", + "platformsh/config-reader": "^2.4" + }, + "require-dev": { + "drupal/core-dev": "^10.2" + }, + "conflict": { + "drupal/drupal": "*" + }, + "config": { + "allow-plugins": { + "composer/installers": true, + "cweagans/composer-patches": true, + "drupal/core-composer-scaffold": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "oomphinc/composer-installers-extender": true, + "drupal/core-vendor-hardening": true, + "phpstan/extension-installer": true, + "php-http/discovery": true, + "simplesamlphp/composer-module-installer": true + }, + "bin-dir": "bin/", + "sort-packages": true, + "optimize-autoloader": true + }, + "extra": { + "drupal-scaffold": { + "locations": { + "web-root": "web/" + }, + "initial": { + "sites/default/default.services.yml": "sites/default/services.yml", + "sites/default/default.settings.php": "sites/default/settings.php" + }, + "excludes": [ + "sites/development.services.yml" + ] + }, + "installer-paths": { + "web/core": ["type:drupal-core"], + "web/modules/contrib/{$name}": ["type:drupal-module"], + "web/modules/custom/{$name}": ["type:drupal-custom-module"], + "web/profiles/{$name}": ["type:drupal-profile"], + "web/themes/contrib/{$name}": ["type:drupal-theme"], + "web/themes/custom/{$name}": ["type:drupal-custom-theme"], + "web/libraries/{$name}": ["type:drupal-library"], + "drush/contrib/{$name}": ["type:drupal-drush"] + }, + "enable-patching": true, + "composer-exit-on-patch-failure": true, + "patches": { + "govcms/govcms": { + "Prevent immediate installation without confirmation": "patches/govcms-prevent-autoinstall.patch" + } + } + }, + "scripts": { + "nuke": "rm -r -f bin vendor composer.lock web" + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/templates/drupal10-govcms10/files/config/install/config_ignore.settings.yml b/templates/drupal10-govcms10/files/config/install/config_ignore.settings.yml new file mode 100644 index 000000000..66b6e71b9 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/config_ignore.settings.yml @@ -0,0 +1,9 @@ +mode: simple +ignored_config_entities: + - 'clamav.settings' + - 'login_security.settings' + - 'password_policy.*' + - 'seckit.settings' + - 'system.menu.*' + - 'webform.webform.*' + - 'webform.webform_options.*' diff --git a/templates/drupal10-govcms10/files/config/install/core.date_format.fallback.yml b/templates/drupal10-govcms10/files/config/install/core.date_format.fallback.yml new file mode 100644 index 000000000..d7c259eb5 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.date_format.fallback.yml @@ -0,0 +1,7 @@ +langcode: en +status: true +dependencies: { } +id: fallback +label: 'Fallback date format' +locked: true +pattern: 'd/m/Y - g:ia' diff --git a/templates/drupal10-govcms10/files/config/install/core.date_format.long.yml b/templates/drupal10-govcms10/files/config/install/core.date_format.long.yml new file mode 100644 index 000000000..9e385f1c1 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.date_format.long.yml @@ -0,0 +1,7 @@ +langcode: en +status: true +dependencies: { } +id: long +label: 'Default long date' +locked: false +pattern: 'l, F j, Y - H:i' diff --git a/templates/drupal10-govcms10/files/config/install/core.date_format.medium.yml b/templates/drupal10-govcms10/files/config/install/core.date_format.medium.yml new file mode 100644 index 000000000..d67977027 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.date_format.medium.yml @@ -0,0 +1,7 @@ +langcode: en +status: true +dependencies: { } +id: medium +label: 'Default medium date' +locked: false +pattern: 'D, Y-m-d H:i' diff --git a/templates/drupal10-govcms10/files/config/install/core.date_format.short.yml b/templates/drupal10-govcms10/files/config/install/core.date_format.short.yml new file mode 100644 index 000000000..6ef9b8025 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.date_format.short.yml @@ -0,0 +1,7 @@ +langcode: en +status: true +dependencies: { } +id: short +label: 'Default short date' +locked: false +pattern: 'd/m/Y - g:ia' diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.audio.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.audio.default.yml new file mode 100644 index 000000000..eea864da7 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.audio.default.yml @@ -0,0 +1,60 @@ +langcode: en +status: true +dependencies: + config: + - field.field.media.audio.field_media_audio_file + - media.type.audio + module: + - file + - layout_discovery + - path +id: media.audio.default +targetEntityType: media +bundle: audio +mode: default +content: + created: + type: datetime_timestamp + weight: 2 + region: content + settings: { } + third_party_settings: { } + field_media_audio_file: + type: file_generic + weight: 5 + region: content + settings: + progress_indicator: throbber + third_party_settings: { } + name: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 3 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 1 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.document.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.document.default.yml new file mode 100644 index 000000000..67d276db8 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.document.default.yml @@ -0,0 +1,60 @@ +langcode: en +status: true +dependencies: + config: + - field.field.media.document.field_media_document + - media.type.document + module: + - file + - layout_discovery + - path +id: media.document.default +targetEntityType: media +bundle: document +mode: default +content: + created: + type: datetime_timestamp + weight: 2 + region: content + settings: { } + third_party_settings: { } + field_media_document: + type: file_generic + weight: 5 + region: content + settings: + progress_indicator: throbber + third_party_settings: { } + name: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 3 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 1 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.image.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.image.default.yml new file mode 100644 index 000000000..98e0733e3 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.image.default.yml @@ -0,0 +1,62 @@ +langcode: en +status: true +dependencies: + config: + - field.field.media.image.field_media_image + - image.style.thumbnail + - media.type.image + module: + - image + - layout_discovery + - path +id: media.image.default +targetEntityType: media +bundle: image +mode: default +content: + created: + type: datetime_timestamp + weight: 2 + region: content + settings: { } + third_party_settings: { } + field_media_image: + type: image_image + weight: 5 + region: content + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + name: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 3 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 1 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.remote_video.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.remote_video.default.yml new file mode 100644 index 000000000..e21b6a784 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.remote_video.default.yml @@ -0,0 +1,60 @@ +langcode: en +status: true +dependencies: + config: + - field.field.media.remote_video.field_media_oembed_video + - media.type.remote_video + module: + - layout_discovery + - path +id: media.remote_video.default +targetEntityType: media +bundle: remote_video +mode: default +content: + created: + type: datetime_timestamp + weight: 2 + region: content + settings: { } + third_party_settings: { } + field_media_oembed_video: + type: string_textfield + weight: 5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + name: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 3 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 1 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.video.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.video.default.yml new file mode 100644 index 000000000..03f1657f5 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.media.video.default.yml @@ -0,0 +1,60 @@ +langcode: en +status: true +dependencies: + config: + - field.field.media.video.field_media_video_file + - media.type.video + module: + - file + - layout_discovery + - path +id: media.video.default +targetEntityType: media +bundle: video +mode: default +content: + created: + type: datetime_timestamp + weight: 2 + region: content + settings: { } + third_party_settings: { } + field_media_video_file: + type: file_generic + weight: 5 + region: content + settings: + progress_indicator: throbber + third_party_settings: { } + name: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 3 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 1 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_blog_article.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_blog_article.default.yml new file mode 100644 index 000000000..7f118c4e8 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_blog_article.default.yml @@ -0,0 +1,113 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_blog_article.body + - field.field.node.govcms_blog_article.field_attachments + - field.field.node.govcms_blog_article.field_blog_article_categories + - field.field.node.govcms_blog_article.field_featured_image + - field.field.node.govcms_blog_article.field_thumbnail + - node.type.govcms_blog_article + module: + - layout_discovery + - media_library + - path + - text +id: node.govcms_blog_article.default +targetEntityType: node +bundle: govcms_blog_article +mode: default +content: + body: + type: text_textarea_with_summary + weight: 8 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_attachments: + type: media_library_widget + weight: 9 + region: content + settings: + media_types: { } + third_party_settings: { } + field_blog_article_categories: + type: entity_reference_autocomplete + weight: 11 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + field_featured_image: + type: media_library_widget + weight: 10 + region: content + settings: + media_types: { } + third_party_settings: { } + field_thumbnail: + type: media_library_widget + weight: 1 + region: content + settings: + media_types: { } + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_event.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_event.default.yml new file mode 100644 index 000000000..f1103b668 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_event.default.yml @@ -0,0 +1,140 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_event.body + - field.field.node.govcms_event.field_attachments + - field.field.node.govcms_event.field_event_categories + - field.field.node.govcms_event.field_event_date + - field.field.node.govcms_event.field_event_location + - field.field.node.govcms_event.field_featured_image + - field.field.node.govcms_event.field_more_information + - field.field.node.govcms_event.field_thumbnail + - node.type.govcms_event + module: + - datetime_range + - layout_discovery + - link + - media_library + - path + - text +id: node.govcms_event.default +targetEntityType: node +bundle: govcms_event +mode: default +content: + body: + type: text_textarea_with_summary + weight: 8 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_attachments: + type: media_library_widget + weight: 9 + region: content + settings: + media_types: { } + third_party_settings: { } + field_event_categories: + type: entity_reference_autocomplete + weight: 13 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + field_event_date: + type: daterange_default + weight: 12 + region: content + settings: { } + third_party_settings: { } + field_event_location: + type: string_textfield + weight: 11 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_featured_image: + type: media_library_widget + weight: 10 + region: content + settings: + media_types: { } + third_party_settings: { } + field_more_information: + type: link_default + weight: 14 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_thumbnail: + type: media_library_widget + weight: 1 + region: content + settings: + media_types: { } + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_foi.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_foi.default.yml new file mode 100644 index 000000000..829da10b0 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_foi.default.yml @@ -0,0 +1,132 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_foi.body + - field.field.node.govcms_foi.field_attachments + - field.field.node.govcms_foi.field_foi_date_listed + - field.field.node.govcms_foi.field_foi_log_reference_id + - field.field.node.govcms_foi.field_foi_proposed_deletion_date + - field.field.node.govcms_foi.field_foi_release_type + - field.field.node.govcms_foi.field_thumbnail + - node.type.govcms_foi + module: + - datetime + - layout_discovery + - media_library + - path + - text +id: node.govcms_foi.default +targetEntityType: node +bundle: govcms_foi +mode: default +content: + body: + type: text_textarea_with_summary + weight: 8 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_attachments: + type: media_library_widget + weight: 9 + region: content + settings: + media_types: + - document + - audio + - image + - remote_video + - video + third_party_settings: { } + field_foi_date_listed: + type: datetime_default + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_foi_log_reference_id: + type: string_textfield + weight: 12 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_foi_proposed_deletion_date: + type: datetime_default + weight: 13 + region: content + settings: { } + third_party_settings: { } + field_foi_release_type: + type: string_textfield + weight: 11 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_thumbnail: + type: media_library_widget + weight: 1 + region: content + settings: + media_types: { } + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_news_and_media.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_news_and_media.default.yml new file mode 100644 index 000000000..3eb8418aa --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_news_and_media.default.yml @@ -0,0 +1,132 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_news_and_media.body + - field.field.node.govcms_news_and_media.field_attachments + - field.field.node.govcms_news_and_media.field_featured_image + - field.field.node.govcms_news_and_media.field_media_release_type + - field.field.node.govcms_news_and_media.field_news_categories + - field.field.node.govcms_news_and_media.field_published_date_time + - field.field.node.govcms_news_and_media.field_thumbnail + - node.type.govcms_news_and_media + module: + - layout_discovery + - media_library + - path + - text +id: node.govcms_news_and_media.default +targetEntityType: node +bundle: govcms_news_and_media +mode: default +content: + body: + type: text_textarea_with_summary + weight: 8 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_attachments: + type: media_library_widget + weight: 9 + region: content + settings: + media_types: + - document + - image + - video + - audio + - remote_video + third_party_settings: { } + field_featured_image: + type: media_library_widget + weight: 10 + region: content + settings: + media_types: { } + third_party_settings: { } + field_media_release_type: + type: options_select + weight: 12 + region: content + settings: { } + third_party_settings: { } + field_news_categories: + type: entity_reference_autocomplete + weight: 11 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + field_published_date_time: + type: datetime_timestamp + weight: 13 + region: content + settings: { } + third_party_settings: { } + field_thumbnail: + type: media_library_widget + weight: 1 + region: content + settings: + media_types: { } + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_standard_page.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_standard_page.default.yml new file mode 100644 index 000000000..408b14ea4 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_form_display.node.govcms_standard_page.default.yml @@ -0,0 +1,107 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_standard_page.body + - field.field.node.govcms_standard_page.field_attachments + - field.field.node.govcms_standard_page.field_featured_image + - field.field.node.govcms_standard_page.field_thumbnail + - node.type.govcms_standard_page + module: + - layout_discovery + - media_library + - path + - text +id: node.govcms_standard_page.default +targetEntityType: node +bundle: govcms_standard_page +mode: default +content: + body: + type: text_textarea_with_summary + weight: 8 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_attachments: + type: media_library_widget + weight: 9 + region: content + settings: + media_types: + - document + - image + - video + - audio + - remote_video + third_party_settings: { } + field_featured_image: + type: media_library_widget + weight: 10 + region: content + settings: + media_types: { } + third_party_settings: { } + field_thumbnail: + type: media_library_widget + weight: 1 + region: content + settings: + media_types: { } + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_blog_article.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_blog_article.default.yml new file mode 100644 index 000000000..c6be8d2d4 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_blog_article.default.yml @@ -0,0 +1,49 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_blog_article.body + - field.field.node.govcms_blog_article.field_attachments + - field.field.node.govcms_blog_article.field_blog_article_categories + - field.field.node.govcms_blog_article.field_featured_image + - field.field.node.govcms_blog_article.field_thumbnail + - node.type.govcms_blog_article + module: + - text + - user +id: node.govcms_blog_article.default +targetEntityType: node +bundle: govcms_blog_article +mode: default +content: + body: + type: text_default + weight: 1 + region: content + label: hidden + settings: { } + third_party_settings: { } + field_attachments: + type: entity_reference_label + weight: 3 + region: content + label: above + settings: + link: true + third_party_settings: { } + field_blog_article_categories: + type: entity_reference_label + weight: 2 + region: content + label: above + settings: + link: true + third_party_settings: { } + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_featured_image: true + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_blog_article.teaser.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_blog_article.teaser.yml new file mode 100644 index 000000000..08947f5b1 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_blog_article.teaser.yml @@ -0,0 +1,42 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.govcms_blog_article.body + - field.field.node.govcms_blog_article.field_attachments + - field.field.node.govcms_blog_article.field_blog_article_categories + - field.field.node.govcms_blog_article.field_featured_image + - field.field.node.govcms_blog_article.field_thumbnail + - node.type.govcms_blog_article + module: + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.govcms_blog_article.teaser +targetEntityType: node +bundle: govcms_blog_article +mode: teaser +content: + body: + type: text_trimmed + weight: 0 + region: content + label: hidden + settings: + trim_length: 300 + third_party_settings: { } + links: + weight: 1 + region: content + settings: { } + third_party_settings: { } +hidden: + field_attachments: true + field_blog_article_categories: true + field_featured_image: true + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_event.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_event.default.yml new file mode 100644 index 000000000..1d411efe6 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_event.default.yml @@ -0,0 +1,84 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_event.body + - field.field.node.govcms_event.field_attachments + - field.field.node.govcms_event.field_event_categories + - field.field.node.govcms_event.field_event_date + - field.field.node.govcms_event.field_event_location + - field.field.node.govcms_event.field_featured_image + - field.field.node.govcms_event.field_more_information + - field.field.node.govcms_event.field_thumbnail + - node.type.govcms_event + module: + - datetime_range + - link + - text + - user +id: node.govcms_event.default +targetEntityType: node +bundle: govcms_event +mode: default +content: + body: + type: text_default + weight: 1 + region: content + label: hidden + settings: { } + third_party_settings: { } + field_attachments: + type: entity_reference_label + weight: 2 + region: content + label: above + settings: + link: true + third_party_settings: { } + field_event_categories: + type: entity_reference_label + weight: 5 + region: content + label: above + settings: + link: true + third_party_settings: { } + field_event_date: + type: daterange_default + weight: 4 + region: content + label: above + settings: + separator: '-' + format_type: medium + timezone_override: '' + third_party_settings: { } + field_event_location: + type: string + weight: 3 + region: content + label: above + settings: + link_to_entity: false + third_party_settings: { } + field_more_information: + type: link + weight: 6 + region: content + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_featured_image: true + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_event.teaser.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_event.teaser.yml new file mode 100644 index 000000000..0c537c11f --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_event.teaser.yml @@ -0,0 +1,48 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.govcms_event.body + - field.field.node.govcms_event.field_attachments + - field.field.node.govcms_event.field_event_categories + - field.field.node.govcms_event.field_event_date + - field.field.node.govcms_event.field_event_location + - field.field.node.govcms_event.field_featured_image + - field.field.node.govcms_event.field_more_information + - field.field.node.govcms_event.field_thumbnail + - node.type.govcms_event + module: + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.govcms_event.teaser +targetEntityType: node +bundle: govcms_event +mode: teaser +content: + body: + type: text_trimmed + weight: 0 + region: content + label: hidden + settings: + trim_length: 300 + third_party_settings: { } + links: + weight: 1 + region: content + settings: { } + third_party_settings: { } +hidden: + field_attachments: true + field_event_categories: true + field_event_date: true + field_event_location: true + field_featured_image: true + field_more_information: true + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_foi.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_foi.default.yml new file mode 100644 index 000000000..12a9cd91f --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_foi.default.yml @@ -0,0 +1,77 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_foi.body + - field.field.node.govcms_foi.field_attachments + - field.field.node.govcms_foi.field_foi_date_listed + - field.field.node.govcms_foi.field_foi_log_reference_id + - field.field.node.govcms_foi.field_foi_proposed_deletion_date + - field.field.node.govcms_foi.field_foi_release_type + - field.field.node.govcms_foi.field_thumbnail + - node.type.govcms_foi + module: + - datetime + - text + - user +id: node.govcms_foi.default +targetEntityType: node +bundle: govcms_foi +mode: default +content: + body: + type: text_default + weight: 1 + region: content + label: hidden + settings: { } + third_party_settings: { } + field_attachments: + type: entity_reference_label + weight: 2 + region: content + label: above + settings: + link: true + third_party_settings: { } + field_foi_date_listed: + type: datetime_default + weight: 3 + region: content + label: above + settings: + format_type: medium + timezone_override: '' + third_party_settings: { } + field_foi_log_reference_id: + type: string + weight: 5 + region: content + label: above + settings: + link_to_entity: false + third_party_settings: { } + field_foi_proposed_deletion_date: + type: datetime_default + weight: 6 + region: content + label: above + settings: + format_type: medium + timezone_override: '' + third_party_settings: { } + field_foi_release_type: + type: string + weight: 4 + region: content + label: above + settings: + link_to_entity: false + third_party_settings: { } + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_foi.teaser.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_foi.teaser.yml new file mode 100644 index 000000000..deeca09d4 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_foi.teaser.yml @@ -0,0 +1,46 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.govcms_foi.body + - field.field.node.govcms_foi.field_attachments + - field.field.node.govcms_foi.field_foi_date_listed + - field.field.node.govcms_foi.field_foi_log_reference_id + - field.field.node.govcms_foi.field_foi_proposed_deletion_date + - field.field.node.govcms_foi.field_foi_release_type + - field.field.node.govcms_foi.field_thumbnail + - node.type.govcms_foi + module: + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.govcms_foi.teaser +targetEntityType: node +bundle: govcms_foi +mode: teaser +content: + body: + type: text_trimmed + weight: 0 + region: content + label: hidden + settings: + trim_length: 300 + third_party_settings: { } + links: + weight: 1 + region: content + settings: { } + third_party_settings: { } +hidden: + field_attachments: true + field_foi_date_listed: true + field_foi_log_reference_id: true + field_foi_proposed_deletion_date: true + field_foi_release_type: true + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_news_and_media.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_news_and_media.default.yml new file mode 100644 index 000000000..c6d0e52d5 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_news_and_media.default.yml @@ -0,0 +1,69 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_news_and_media.body + - field.field.node.govcms_news_and_media.field_attachments + - field.field.node.govcms_news_and_media.field_featured_image + - field.field.node.govcms_news_and_media.field_media_release_type + - field.field.node.govcms_news_and_media.field_news_categories + - field.field.node.govcms_news_and_media.field_published_date_time + - field.field.node.govcms_news_and_media.field_thumbnail + - node.type.govcms_news_and_media + module: + - options + - text + - user +id: node.govcms_news_and_media.default +targetEntityType: node +bundle: govcms_news_and_media +mode: default +content: + body: + type: text_default + weight: 1 + region: content + label: hidden + settings: { } + third_party_settings: { } + field_attachments: + type: entity_reference_label + weight: 2 + region: content + label: above + settings: + link: true + third_party_settings: { } + field_media_release_type: + type: list_default + weight: 4 + region: content + label: above + settings: { } + third_party_settings: { } + field_news_categories: + type: entity_reference_label + weight: 3 + region: content + label: above + settings: + link: true + third_party_settings: { } + field_published_date_time: + type: timestamp_ago + weight: 5 + region: content + label: above + settings: + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + third_party_settings: { } + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_featured_image: true + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_news_and_media.teaser.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_news_and_media.teaser.yml new file mode 100644 index 000000000..4c63cd95a --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_news_and_media.teaser.yml @@ -0,0 +1,46 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.govcms_news_and_media.body + - field.field.node.govcms_news_and_media.field_attachments + - field.field.node.govcms_news_and_media.field_featured_image + - field.field.node.govcms_news_and_media.field_media_release_type + - field.field.node.govcms_news_and_media.field_news_categories + - field.field.node.govcms_news_and_media.field_published_date_time + - field.field.node.govcms_news_and_media.field_thumbnail + - node.type.govcms_news_and_media + module: + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.govcms_news_and_media.teaser +targetEntityType: node +bundle: govcms_news_and_media +mode: teaser +content: + body: + type: text_trimmed + weight: 0 + region: content + label: hidden + settings: + trim_length: 300 + third_party_settings: { } + links: + weight: 1 + region: content + settings: { } + third_party_settings: { } +hidden: + field_attachments: true + field_featured_image: true + field_media_release_type: true + field_news_categories: true + field_published_date_time: true + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_standard_page.default.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_standard_page.default.yml new file mode 100644 index 000000000..325356dc8 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_standard_page.default.yml @@ -0,0 +1,27 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.govcms_standard_page.body + - node.type.govcms_standard_page + module: + - text + - user +id: node.govcms_standard_page.default +targetEntityType: node +bundle: govcms_standard_page +mode: default +content: + body: + weight: 101 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: { } diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_standard_page.teaser.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_standard_page.teaser.yml new file mode 100644 index 000000000..2779e5698 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_display.node.govcms_standard_page.teaser.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.govcms_standard_page.body + - field.field.node.govcms_standard_page.field_attachments + - field.field.node.govcms_standard_page.field_featured_image + - field.field.node.govcms_standard_page.field_thumbnail + - node.type.govcms_standard_page + module: + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.govcms_standard_page.teaser +targetEntityType: node +bundle: govcms_standard_page +mode: teaser +content: + body: + weight: 0 + label: hidden + settings: + trim_length: 300 + third_party_settings: { } + type: text_summary_or_trimmed + region: content + links: + weight: 1 + region: content + settings: { } + third_party_settings: { } +hidden: + field_attachments: true + field_featured_image: true + field_thumbnail: true \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/config/install/core.entity_view_mode.media.full.yml b/templates/drupal10-govcms10/files/config/install/core.entity_view_mode.media.full.yml new file mode 100644 index 000000000..dfdbb3a7d --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/core.entity_view_mode.media.full.yml @@ -0,0 +1,9 @@ +langcode: en +status: false +dependencies: + module: + - media +id: media.full +label: 'Full content' +targetEntityType: media +cache: true diff --git a/templates/drupal10-govcms10/files/config/install/editor.editor.rich_text.yml b/templates/drupal10-govcms10/files/config/install/editor.editor.rich_text.yml new file mode 100644 index 000000000..67e5eda46 --- /dev/null +++ b/templates/drupal10-govcms10/files/config/install/editor.editor.rich_text.yml @@ -0,0 +1,79 @@ +langcode: en +status: true +dependencies: + config: + - filter.format.rich_text + module: + - ckeditor5 +format: rich_text +editor: ckeditor5 +settings: + toolbar: + items: + - bold + - italic + - underline + - strikethrough + - superscript + - subscript + - alignment + - '|' + - link + - '|' + - insertTable + - bulletedList + - numberedList + - '|' + - blockQuote + - drupalInsertImage + - '|' + - sourceEditing + - '|' + - code + - heading + plugins: + ckeditor5_heading: + enabled_headings: + - heading2 + - heading3 + - heading4 + - heading5 + - heading6 + ckeditor5_sourceEditing: + allowed_tags: + - '' + - '
' + - '
' + - '
' + - '

' + - '

' + - '

' + - '

' + - '
' + - '' + - '' + - '
' + - '
+ {{ title_suffix }} + {% endif %} + + {{ comments }} + + {% if comment_form %} +

{{ 'Add new comment'|t }}

+ {{ comment_form }} + {% endif %} + + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--created.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--created.html.twig new file mode 100644 index 000000000..f4d1acd43 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--created.html.twig @@ -0,0 +1,44 @@ +{# +/** + * @file + * Theme override for the node created field. + * + * This is an override of field.html.twig for the node created field. See that + * template for documentation about its details and overrides. + * + * Available variables: + * - attributes: HTML attributes for the containing span element. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * - is_inline: If false, display an ordinary field. + * If true, display an inline format, suitable for inside elements such as + * ,

and so on. + * + * @see field.html.twig + * @see node_preprocess_field__node() + * + * @todo Delete as part of https://www.drupal.org/node/3015623 + */ +#} +{% if not is_inline %} + {% include "field.html.twig" %} +{% else %} +{% + set classes = [ + 'field', + 'field--name-' ~ field_name|clean_class, + 'field--type-' ~ field_type|clean_class, + 'field--label-' ~ label_display, + ] +%} + + {%- for item in items -%} + {{ item.content }} + {%- endfor -%} + +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--title.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--title.html.twig new file mode 100644 index 000000000..e79c39eb5 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--title.html.twig @@ -0,0 +1,44 @@ +{# +/** + * @file + * Theme override for the node title field. + * + * This is an override of field.html.twig for the node title field. See that + * template for documentation about its details and overrides. + * + * Available variables: + * - attributes: HTML attributes for the containing span element. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * - is_inline: If false, display an ordinary field. + * If true, display an inline format, suitable for inside elements such as + * ,

and so on. + * + * @see field.html.twig + * @see node_preprocess_field__node() + * + * @todo Delete as part of https://www.drupal.org/node/3015623 + */ +#} +{% if not is_inline %} + {% include "field.html.twig" %} +{% else %} +{% + set classes = [ + 'field', + 'field--name-' ~ field_name|clean_class, + 'field--type-' ~ field_type|clean_class, + 'field--label-' ~ label_display, + ] +%} + + {%- for item in items -%} + {{ item.content }} + {%- endfor -%} + +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--uid.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--uid.html.twig new file mode 100644 index 000000000..0a3810832 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--node--uid.html.twig @@ -0,0 +1,44 @@ +{# +/** + * @file + * Theme override for the node user field. + * + * This is an override of field.html.twig for the node user field. See that + * template for documentation about its details and overrides. + * + * Available variables: + * - attributes: HTML attributes for the containing span element. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * - is_inline: If false, display an ordinary field. + * If true, display an inline format, suitable for inside elements such as + * ,

and so on. + * + * @see field.html.twig + * @see node_preprocess_field__node() + * + * @todo Delete as part of https://www.drupal.org/node/3015623 + */ +#} +{% if not is_inline %} + {% include "field.html.twig" %} +{% else %} +{% + set classes = [ + 'field', + 'field--name-' ~ field_name|clean_class, + 'field--type-' ~ field_type|clean_class, + 'field--label-' ~ label_display, + ] +%} + + {%- for item in items -%} + {{ item.content }} + {%- endfor -%} + +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text-long.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text-long.html.twig new file mode 100644 index 000000000..07ce721d2 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text-long.html.twig @@ -0,0 +1 @@ +{% extends "field--text.html.twig" %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text-with-summary.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text-with-summary.html.twig new file mode 100644 index 000000000..07ce721d2 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text-with-summary.html.twig @@ -0,0 +1 @@ +{% extends "field--text.html.twig" %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text.html.twig new file mode 100644 index 000000000..5d1690c3e --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field--text.html.twig @@ -0,0 +1,28 @@ +{% extends "field.html.twig" %} +{# +/** + * @file + * Default theme implementation for a text field. + * + * A 'clearfix' class is added, because 'text' fields have a 'format' property + * that allows a Text Format to be associated with the entered text, which then + * applies filtering on output. A common use case is to align images to the left + * or right, and without this 'clearfix' class, such aligned images may be + * rendered outside of the 'text' field formatter's boundaries, and hence + * overlap with other fields. By setting the 'clearfix' class on all 'text' + * fields, we prevent that. + * + * @see https://www.drupal.org/node/2358529 + * + * A 'text-formatted' class is added to assist with default styling of base + * elements such as paragraphs and lists that may not have classes assigned to + * them. This allows user entered content to have default styling without + * interfering with the styles of other UI components such as system generated + * lists or other dynamic content. + * + * @see https://www.drupal.org/node/2539860 + * + * @ingroup themeable + */ +#} +{% set attributes = attributes.addClass('clearfix', 'text-formatted') %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field.html.twig new file mode 100644 index 000000000..1cfbd651c --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/field.html.twig @@ -0,0 +1,81 @@ +{# +/** + * @file + * Theme override for a field. + * + * To override output, copy the "field.html.twig" from the templates directory + * to your theme's directory and customize it, just like customizing other + * Drupal templates such as page.html.twig or node.html.twig. + * + * Instead of overriding the theming for all fields, you can also just override + * theming for a subset of fields using + * @link themeable Theme hook suggestions. @endlink For example, + * here are some theme hook suggestions that can be used for a field_foo field + * on an article node type: + * - field--node--field-foo--article.html.twig + * - field--node--field-foo.html.twig + * - field--node--article.html.twig + * - field--field-foo.html.twig + * - field--text-with-summary.html.twig + * - field.html.twig + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - multiple: TRUE if a field can contain multiple items. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * + * @see template_preprocess_field() + */ +#} +{% + set classes = [ + 'field', + 'field--name-' ~ field_name|clean_class, + 'field--type-' ~ field_type|clean_class, + 'field--label-' ~ label_display, + label_display == 'inline' ? 'clearfix', + ] +%} +{% + set title_classes = [ + 'field__label', + label_display == 'visually_hidden' ? 'visually-hidden', + ] +%} + +{% if label_hidden %} + {% if multiple %} + + {% for item in items %} + {{ item.content }} + {% endfor %} + + {% else %} + {% for item in items %} + {{ item.content }} + {% endfor %} + {% endif %} +{% else %} + + {{ label }} + {% if multiple %} +
+ {% endif %} + {% for item in items %} + {{ item.content }}
+ {% endfor %} + {% if multiple %} + + {% endif %} + +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/file-audio.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/file-audio.html.twig new file mode 100644 index 000000000..f25317b90 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/file-audio.html.twig @@ -0,0 +1,23 @@ +{# +/** +* @file +* Default theme implementation to display the file entity as an audio tag. +* +* Available variables: +* - attributes: An array of HTML attributes, intended to be added to the +* audio tag. +* - files: And array of files to be added as sources for the audio tag. Each +* element is an array with the following elements: +* - file: The full file object. +* - source_attributes: An array of HTML attributes for to be added to the +* source tag. +* +* @ingroup themeable +*/ +#} +{{ attach_library('bartik/classy.file') }} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/file-video.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/file-video.html.twig new file mode 100644 index 000000000..14498696d --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/file-video.html.twig @@ -0,0 +1,23 @@ +{# +/** +* @file +* Default theme implementation to display the file entity as a video tag. +* +* Available variables: +* - attributes: An array of HTML attributes, intended to be added to the +* video tag. +* - files: And array of files to be added as sources for the video tag. Each +* element is an array with the following elements: +* - file: The full file object. +* - source_attributes: An array of HTML attributes for to be added to the +* source tag. +* +* @ingroup themeable +*/ +#} +{{ attach_library('bartik/classy.file') }} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/image.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/image.html.twig new file mode 100644 index 000000000..31f782bb6 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/image.html.twig @@ -0,0 +1,18 @@ +{# +/** + * @file + * Theme override of an image. + * + * Available variables: + * - attributes: HTML attributes for the img tag. + * - style_name: (optional) The name of the image style applied. + * + * @see template_preprocess_image() + */ +#} +{% +set classes = [ + style_name ? 'image-style-' ~ style_name|clean_class, +] +%} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/link-formatter-link-separate.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/link-formatter-link-separate.html.twig new file mode 100644 index 000000000..52c8d29a7 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/link-formatter-link-separate.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme override of a link with separate title and URL elements. + * + * Available variables: + * - link: The link that has already been formatted by l(). + * - title: (optional) A descriptive or alternate title for the link, which may + * be different than the actual link text. + * + * @see template_preprocess() + * @see template_preprocess_link_formatter_link_separate() + */ +#} +{% apply spaceless %} + +{% endapply %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/time.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/time.html.twig new file mode 100644 index 000000000..f2912b7f9 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/field/time.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme override for a date / time element. + * + * Available variables + * - timestamp: (optional) A UNIX timestamp for the datetime attribute. If the + * datetime cannot be represented as a UNIX timestamp, use a valid datetime + * attribute value in attributes.datetime. + * - text: (optional) The content to display within the

+{% endif %} +{{ content }} +{% if errors %} +
+ {{ errors }} +
+{% endif %} +{% if description %} + + {{ description }} + +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/details.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/details.html.twig new file mode 100644 index 000000000..c554096da --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/details.html.twig @@ -0,0 +1,44 @@ +{# +/** + * @file + * Theme override for a details element. + * + * Available variables + * - attributes: A list of HTML attributes for the details element. + * - errors: (optional) Any errors for this details element, may not be set. + * - title: (optional) The title of the element, may not be set. + * - summary_attributes: A list of HTML attributes for the summary element. + * - description: (optional) The description of the element, may not be set. + * - children: (optional) The children of the element, may not be set. + * - value: (optional) The value of the element, may not be set. + * + * @see template_preprocess_details() + */ +#} + + {%- if title -%} + {% + set summary_classes = [ + required ? 'js-form-required', + required ? 'form-required', + ] + %} + {{ title }} + {%- endif -%} +
+ {% if errors %} +
+ {{ errors }} +
+ {% endif %} + {%- if description -%} +
{{ description }}
+ {%- endif -%} + {%- if children -%} + {{ children }} + {%- endif -%} + {%- if value -%} + {{ value }} + {%- endif -%} +
+ diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/fieldset.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/fieldset.html.twig new file mode 100644 index 000000000..93b5f54d8 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/fieldset.html.twig @@ -0,0 +1,68 @@ +{# +/** + * @file + * Theme override for a fieldset element and its children. + * + * Available variables: + * - attributes: HTML attributes for the fieldset element. + * - errors: (optional) Any errors for this fieldset element, may not be set. + * - required: Boolean indicating whether the fieldset element is required. + * - legend: The legend element containing the following properties: + * - title: Title of the fieldset, intended for use as the text of the legend. + * - attributes: HTML attributes to apply to the legend. + * - description: The description element containing the following properties: + * - content: The description content of the fieldset. + * - attributes: HTML attributes to apply to the description container. + * - description_display: Description display setting. It can have these values: + * - before: The description is output before the element. + * - after: The description is output after the element (default). + * - invisible: The description is output after the element, hidden visually + * but available to screen readers. + * - children: The rendered child elements of the fieldset. + * - prefix: The content to add before the fieldset children. + * - suffix: The content to add after the fieldset children. + * + * @see template_preprocess_fieldset() + */ +#} +{% + set classes = [ + 'js-form-item', + 'form-item', + 'js-form-wrapper', + 'form-wrapper', + ] +%} + + {% + set legend_span_classes = [ + 'fieldset-legend', + required ? 'js-form-required', + required ? 'form-required', + ] + %} + {# Always wrap fieldset legends in a for CSS positioning. #} + + {{ legend.title }} + +
+ {% if description_display == 'before' and description.content %} + {{ description.content }}
+ {% endif %} + {% if errors %} +
+ {{ errors }} +
+ {% endif %} + {% if prefix %} + {{ prefix }} + {% endif %} + {{ children }} + {% if suffix %} + {{ suffix }} + {% endif %} + {% if description_display in ['after', 'invisible'] and description.content %} + {{ description.content }} + {% endif %} + + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/form-element-label.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/form-element-label.html.twig new file mode 100644 index 000000000..7c2f8f222 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/form-element-label.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Theme override for a form element label. + * + * Available variables: + * - title: The label's text. + * - title_display: Elements title_display setting. + * - required: An indicator for whether the associated form element is required. + * - attributes: A list of HTML attributes for the label. + * + * @see template_preprocess_form_element_label() + */ +#} +{% + set classes = [ + title_display == 'after' ? 'option', + title_display == 'invisible' ? 'visually-hidden', + required ? 'js-form-required', + required ? 'form-required', + ] +%} +{% if title is not empty or required -%} + {{ title }} +{%- endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/form-element.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/form-element.html.twig new file mode 100644 index 000000000..3bde4f711 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/form-element.html.twig @@ -0,0 +1,95 @@ +{# +/** + * @file + * Theme override for a form element. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - errors: (optional) Any errors for this form element, may not be set. + * - prefix: (optional) The form element prefix, may not be set. + * - suffix: (optional) The form element suffix, may not be set. + * - required: The required marker, or empty if the associated form element is + * not required. + * - type: The type of the element. + * - name: The name of the element. + * - label: A rendered label element. + * - label_display: Label display setting. It can have these values: + * - before: The label is output before the element. This is the default. + * The label includes the #title and the required marker, if #required. + * - after: The label is output after the element. For example, this is used + * for radio and checkbox #type elements. If the #title is empty but the + * field is #required, the label will contain only the required marker. + * - invisible: Labels are critical for screen readers to enable them to + * properly navigate through forms but can be visually distracting. This + * property hides the label for everyone except screen readers. + * - attribute: Set the title attribute on the element to create a tooltip but + * output no label element. This is supported only for checkboxes and radios + * in \Drupal\Core\Render\Element\CompositeFormElementTrait::preRenderCompositeFormElement(). + * It is used where a visual label is not needed, such as a table of + * checkboxes where the row and column provide the context. The tooltip will + * include the title and required marker. + * - description: (optional) A list of description properties containing: + * - content: A description of the form element, may not be set. + * - attributes: (optional) A list of HTML attributes to apply to the + * description content wrapper. Will only be set when description is set. + * - description_display: Description display setting. It can have these values: + * - before: The description is output before the element. + * - after: The description is output after the element. This is the default + * value. + * - invisible: The description is output after the element, hidden visually + * but available to screen readers. + * - disabled: True if the element is disabled. + * - title_display: Title display setting. + * + * @see template_preprocess_form_element() + */ +#} +{% + set classes = [ + 'js-form-item', + 'form-item', + 'js-form-type-' ~ type|clean_class, + 'form-type-' ~ type|clean_class, + 'js-form-item-' ~ name|clean_class, + 'form-item-' ~ name|clean_class, + title_display not in ['after', 'before'] ? 'form-no-label', + disabled == 'disabled' ? 'form-disabled', + errors ? 'form-item--error', + ] +%} +{% + set description_classes = [ + 'description', + description_display == 'invisible' ? 'visually-hidden', + ] +%} + + {% if label_display in ['before', 'invisible'] %} + {{ label }} + {% endif %} + {% if prefix is not empty %} + {{ prefix }} + {% endif %} + {% if description_display == 'before' and description.content %} + + {{ description.content }} + + {% endif %} + {{ children }} + {% if suffix is not empty %} + {{ suffix }} + {% endif %} + {% if label_display == 'after' %} + {{ label }} + {% endif %} + {% if errors %} +
+ {{ errors }} +
+ {% endif %} + {% if description_display in ['after', 'invisible'] and description.content %} + + {{ description.content }} + + {% endif %} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/radios.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/radios.html.twig new file mode 100644 index 000000000..2e4bafd41 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/radios.html.twig @@ -0,0 +1,13 @@ +{# +/** + * @file + * Theme override for a 'radios' #type form element. + * + * Available variables + * - attributes: A list of HTML attributes for the wrapper element. + * - children: The rendered radios. + * + * @see template_preprocess_radios() + */ +#} +{{ children }} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/textarea.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/textarea.html.twig new file mode 100644 index 000000000..99e1bde09 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/form/textarea.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Theme override for a 'textarea' #type form element. + * + * Available variables + * - wrapper_attributes: A list of HTML attributes for the wrapper element. + * - attributes: A list of HTML attributes for the + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/book-export-html.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/book-export-html.html.twig new file mode 100644 index 000000000..b7525f7ef --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/book-export-html.html.twig @@ -0,0 +1,45 @@ +{# +/** + * @file + * Theme override for printed version of book outline. + * + * Available variables: + * - title: Top level node title. + * - head: Header tags. + * - language: Language object. + * - language_rtl: A flag indicating whether the current display language is a + * right to left language. + * - base_url: URL to the home page. + * - contents: Nodes within the current outline rendered through + * book-node-export-html.html.twig. + * + * @see template_preprocess_book_export_html() + */ +#} + + + + {{ title }} + {{ page.head }} + + + + + {# + The given node is embedded to its absolute depth in a top level section. + For example, a child node with depth 2 in the hierarchy is contained in + (otherwise empty) div elements corresponding to depth 0 and depth 1. This + is intended to support WYSIWYG output - e.g., level 3 sections always look + like level 3 sections, no matter their depth relative to the node selected + to be exported as printer-friendly HTML. + #} + + {% if depth > 1 %}{% for i in 1..depth-1 %} +
+ {% endfor %}{% endif %} + {{ contents }} + {% if depth > 1 %}{% for i in 1..depth-1 %} +
+ {% endfor %}{% endif %} + + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/html.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/html.html.twig new file mode 100644 index 000000000..4fe57a01c --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/html.html.twig @@ -0,0 +1,55 @@ +{# +/** + * @file + * Theme override for the basic structure of a single Drupal page. + * + * Variables: + * - logged_in: A flag indicating if user is logged in. + * - root_path: The root path of the current page (e.g., node, admin, user). + * - node_type: The content type for the current node, if the page is a node. + * - head_title: List of text elements that make up the head_title variable. + * May contain one or more of the following: + * - title: The title of the page. + * - name: The name of the site. + * - slogan: The slogan of the site. + * - page_top: Initial rendered markup. This should be printed before 'page'. + * - page: The rendered page markup. + * - page_bottom: Closing rendered markup. This variable should be printed after + * 'page'. + * - db_offline: A flag indicating if the database is offline. + * - placeholder_token: The token for generating head, css, js and js-bottom + * placeholders. + * + * @see template_preprocess_html() + */ +#} +{% + set body_classes = [ + logged_in ? 'user-logged-in', + not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class, + node_type ? 'page-node-type-' ~ node_type|clean_class, + db_offline ? 'db-offline', + ] +%} + + + + + {{ head_title|safe_join(' | ') }} + + + + + {# + Keyboard navigation/accessibility link to main content section in + page.html.twig. + #} + + {{ page_top }} + {{ page }} + {{ page_bottom }} + + + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/region.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/region.html.twig new file mode 100644 index 000000000..95e71cec3 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/layout/region.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Theme override to display a region. + * + * Available variables: + * - content: The content for this region, typically blocks. + * - attributes: HTML attributes for the region
. + * - region: The name of the region variable as defined in the theme's + * .info.yml file. + * + * @see template_preprocess_region() + */ +#} +{% + set classes = [ + 'region', + 'region-' ~ region|clean_class, + ] +%} +{% if content %} + + {{ content }} +
+{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/container--media-library-content.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/container--media-library-content.html.twig new file mode 100644 index 000000000..7c930e2c7 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/container--media-library-content.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Theme implementation the content area of the modal media library dialog. + * + * The content area is everything that is not the menu of available media + * types. This includes the form to add new media items, if available, and + * the view of available media to select. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - children: The rendered child elements of the container. + * - has_parent: A flag to indicate that the container has one or more parent + containers. + * + * @see template_preprocess_container() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + has_parent ? 'js-form-wrapper', + has_parent ? 'form-wrapper', + 'media-library-content', + ] +%} +{{ children }} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/container--media-library-widget-selection.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/container--media-library-widget-selection.html.twig new file mode 100644 index 000000000..7c0af4430 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/container--media-library-widget-selection.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Theme implementation of a wrapper for selected media items. + * + * This is used to wrap around the set of media items that are currently + * selected in the media library widget (not the modal dialog), which may + * be used for entity reference fields that target media. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - children: The rendered child elements of the container. + * - has_parent: A flag to indicate that the container has one or more parent + containers. + * + * @see template_preprocess_container() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + has_parent ? 'js-form-wrapper', + has_parent ? 'form-wrapper', + 'media-library-selection', + ] +%} +{{ children }} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/links--media-library-menu.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/links--media-library-menu.html.twig new file mode 100644 index 000000000..b2361574a --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/links--media-library-menu.html.twig @@ -0,0 +1,36 @@ +{% extends "links.html.twig" %} +{# +/** + * @file + * Theme implementation of the media type menu in the media library dialog. + * + * Available variables: + * - attributes: Attributes for the UL containing the list of links. + * - links: Links to be output. + * Each link will have the following elements: + * - link: (optional) A render array that returns a link. See + * template_preprocess_links() for details how it is generated. + * - text: The link text. + * - attributes: HTML attributes for the list item element. + * - text_attributes: (optional) HTML attributes for the span element if no + * 'url' was supplied. + * - heading: (optional) A heading to precede the links. + * - text: The heading text. + * - level: The heading level (e.g. 'h2', 'h3'). + * - attributes: (optional) A keyed list of attributes for the heading. + * If the heading is a string, it will be used as the text of the heading and + * the level will default to 'h2'. + * + * Headings should be used on navigation menus and any list of links that + * consistently appears on multiple pages. To make the heading invisible use + * the 'visually-hidden' CSS class. Do not use 'display:none', which + * removes it from screen readers and assistive technology. Headings allow + * screen reader and keyboard only users to navigate to or skip the links. + * See http://juicystudio.com/article/screen-readers-display-none.php and + * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information. + * + * @see classy_preprocess_links__media_library_menu() + * @see template_preprocess_links() + */ +#} +{% set attributes = attributes.addClass('media-library-menu') %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media--media-library.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media--media-library.html.twig new file mode 100644 index 000000000..e88635424 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media--media-library.html.twig @@ -0,0 +1,55 @@ +{# +/** + * @file + * Theme override of a media item in the media library. + * + * This is used for media that the user can select from the grid of media + * items. It is not used for items that have already been selected in the + * corresponding field widget, or for items that have been previously selected + * before adding new media to the library. + * + * Available variables: + * - media: The entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - entity.getEntityTypeId() will return the entity type ID. + * - entity.hasField('field_example') returns TRUE if the entity includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * Calling other methods, such as entity.delete(), will result in an exception. + * See \Drupal\Core\Entity\EntityInterface for a full list of methods. + * - name: Name of the media. + * - content: Media content. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - attributes: HTML attributes for the containing element. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - url: Direct URL of the media. + * - preview_attributes: HTML attributes for the preview wrapper. + * - metadata_attributes: HTML attributes for the expandable metadata area. + * - status: Whether or not the Media is published. + * + * @see template_preprocess_media() + * + * @ingroup themeable + */ +#} + + {% if content %} + + {{ content|without('name') }} + + {% if not status %} +
{{ "unpublished" | t }}
+ {% endif %} + +
+ {{ name }} +
+ + {% endif %} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-item--small.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-item--small.html.twig new file mode 100644 index 000000000..ba03858b7 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-item--small.html.twig @@ -0,0 +1,31 @@ +{# +/** + * @file + * Default theme implementation of a media library item. + * + * This is used when displaying selected media items, either in the field + * widget or in the "Additional selected media" area when adding new + * media items in the media library modal dialog. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - content: The content of the media library item, plus any additional + * fields or elements surrounding it. + * + * @see seven_preprocess_media_library_item__small() + * @see seven_preprocess_media_library_item__widget() + * @see template_preprocess_media_library_item() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'media-library-item', + 'media-library-item--grid', + 'media-library-item--small', + ] +%} + + {{ content }} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-item.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-item.html.twig new file mode 100644 index 000000000..297780e0f --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-item.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Default theme implementation of a media library item. + * + * This is used when displaying selected media items, either in the field + * widget or in the "Additional selected media" area when adding new + * media items in the media library modal dialog. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - content: The content of the media library item, plus any additional + * fields or elements surrounding it. + * + * @see template_preprocess_media_library_item() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'media-library-item', + 'media-library-item--grid', + ] +%} + + {{ content }} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-wrapper.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-wrapper.html.twig new file mode 100644 index 000000000..4d5458ac7 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/media-library-wrapper.html.twig @@ -0,0 +1,21 @@ +{# +/** + * @file + * Theme override of a container used to wrap the media library's modal dialog + * interface. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - menu: The menu of available media types to choose from. + * - content: The form to add new media items, followed by the grid or table of + * existing media items to choose from. + * + * @see template_preprocess_media_library_wrapper() + * + * @ingroup themeable + */ +#} + + {{ menu }} + {{ content }} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/views-view-unformatted--media-library.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/views-view-unformatted--media-library.html.twig new file mode 100644 index 000000000..a94d4e2b6 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/media-library/views-view-unformatted--media-library.html.twig @@ -0,0 +1,35 @@ +{# +/** + * @file + * Theme override of the media library view. + * + * This is used to display a grid of media items, in both the administrative + * interface and in the modal media library dialog's grid layout. + * + * Available variables: + * - title: The title of this group of rows. May be empty. + * - rows: A list of the view's row items. + * - attributes: The row's HTML attributes. + * - content: The row's content. + * - view: The view object. + * - default_row_class: A flag indicating whether default classes should be + * used on rows. + * + * @see template_preprocess_views_view_unformatted() + */ +#} +{% if title %} +

{{ title }}

+{% endif %} +{% for row in rows %} + {% + set row_classes = [ + default_row_class ? 'views-row', + 'media-library-item', + 'media-library-item--grid', + ] + %} + + {{- row.content -}} + +{% endfor %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/help-section.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/help-section.html.twig new file mode 100644 index 000000000..6cfaa38da --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/help-section.html.twig @@ -0,0 +1,48 @@ +{# +/** + * @file + * Theme override for a section of the help page. + * + * This implementation divides the links into 4 columns. + * + * Available variables: + * - title: The section title. + * - description: The description text for the section. + * - links: Links to display in the section. + * - empty: Text to display if there are no links. + */ +#} +
+

{{ title }}

+

{{ description }}

+ {% if links %} + {# Calculate the column length, to divide links into 4 columns. #} + {% set size = links|length // 4 %} + {% if size * 4 < links|length %} + {% set size = size + 1 %} + {% endif %} + + {# Output the links in 4 columns. #} + {% set count = 0 %} + {% for link in links %} + {% if count == 0 %} + {# Start a new column. #} +
    + {% endif %} +
  • {{ link }}
  • + {% set count = count + 1 %} + {% if count >= size %} + {# End the current column. #} + {% set count = 0 %} +
+ {% endif %} + {% endfor %} + + {# End the last column, if one is open. #} + {% if count > 0 %} +
+ {% endif %} + {% else %} +

{{ empty }}

+ {% endif %} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/progress-bar.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/progress-bar.html.twig new file mode 100644 index 000000000..b632a7953 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/progress-bar.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme override for a progress bar. + * + * Note that the core Batch API uses this only for non-JavaScript batch jobs. + * + * Available variables: + * - label: The label of the working task. + * - percent: The percentage of the progress. + * - message: A string containing information to be displayed. + */ +#} +{{ attach_library('bartik/classy.progress') }} +
+ {% if label %} +
{{ label }}
+ {% endif %} +
+
{{ percent }}%
+
{{ message }}
+
diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/rdf-metadata.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/rdf-metadata.html.twig new file mode 100644 index 000000000..acc62df16 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/misc/rdf-metadata.html.twig @@ -0,0 +1,20 @@ +{# +/** + * @file + * Theme override for empty spans with RDF attributes. + * + * The XHTML+RDFa doctype allows either or syntax to + * be used, but for maximum browser compatibility, W3C recommends the + * former when serving pages using the text/html media type, see + * http://www.w3.org/TR/xhtml1/#C_3. + * + * Available variables: + * - metadata: Each item within corresponds to its own set of attributes, + * and therefore, needs its own 'attributes' element. + * + * @see template_preprocess_rdf_metadata() + */ +#} +{% for attributes in metadata %} + +{% endfor %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-all-books-block.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-all-books-block.html.twig new file mode 100644 index 000000000..b4cb64de3 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-all-books-block.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme override for rendering book outlines within a block. + * + * This template is used only when the block is configured to "show block on all + * pages", which presents multiple independent books on all pages. + * + * Available variables: + * - book_menus: Book outlines. + * - id: The parent book ID. + * - title: The parent book title. + * - menu: The top-level book links. + * + * @see template_preprocess_book_all_books_block() + */ +#} +{% for book in book_menus %} + +{% endfor %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-navigation.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-navigation.html.twig new file mode 100644 index 000000000..854e81949 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-navigation.html.twig @@ -0,0 +1,56 @@ +{# +/** + * @file + * Theme override to navigate books. + * + * Presented under nodes that are a part of book outlines. + * + * Available variables: + * - tree: The immediate children of the current node rendered as an unordered + * list. + * - current_depth: Depth of the current node within the book outline. Provided + * for context. + * - prev_url: URL to the previous node. + * - prev_title: Title of the previous node. + * - parent_url: URL to the parent node. + * - parent_title: Title of the parent node. Not printed by default. Provided + * as an option. + * - next_url: URL to the next node. + * - next_title: Title of the next node. + * - has_links: Flags TRUE whenever the previous, parent or next data has a + * value. + * - book_id: The book ID of the current outline being viewed. Same as the node + * ID containing the entire outline. Provided for context. + * - book_url: The book/node URL of the current outline being viewed. Provided + * as an option. Not used by default. + * - book_title: The book/node title of the current outline being viewed. + * + * @see template_preprocess_book_navigation() + */ +#} +{{ attach_library('bartik/classy.book-navigation') }} +{% if tree or has_links %} + +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-tree.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-tree.html.twig new file mode 100644 index 000000000..fba921921 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/book-tree.html.twig @@ -0,0 +1,55 @@ +{# +/** + * @file + * Theme override to display a book tree. + * + * Returns HTML for a wrapper for a book sub-tree. + * + * Available variables: + * - items: A nested list of book items. Each book item contains: + * - attributes: HTML attributes for the book item. + * - below: The book item child items. + * - title: The book link title. + * - url: The book link URL, instance of \Drupal\Core\Url. + * - is_expanded: TRUE if the link has visible children within the current + * book tree. + * - is_collapsed: TRUE if the link has children within the current book tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{% import _self as book_tree %} + +{# + We call a macro which calls itself to render the full tree. + @see https://twig.symfony.com/doc/3.x/tags/macro.html +#} +{{ book_tree.book_links(items, attributes, 0) }} + +{% macro book_links(items, attributes, menu_level) %} + {% import _self as book_tree %} + {% if items %} + {% if menu_level == 0 %} + + {% else %} + + {% endif %} +{% endmacro %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/breadcrumb.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/breadcrumb.html.twig new file mode 100644 index 000000000..7dc08c520 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/breadcrumb.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Theme override for a breadcrumb trail. + * + * Available variables: + * - breadcrumb: Breadcrumb trail items. + */ +#} +{% if breadcrumb %} + +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu-local-task.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu-local-task.html.twig new file mode 100644 index 000000000..b8559815b --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu-local-task.html.twig @@ -0,0 +1,17 @@ +{# +/** + * @file + * Theme override for a local task link. + * + * Available variables: + * - attributes: HTML attributes for the wrapper element. + * - is_active: Whether the task item is an active tab. + * - link: A rendered link element. + * + * Note: This template renders the content for each task item in + * menu-local-tasks.html.twig. + * + * @see template_preprocess_menu_local_task() + */ +#} +{{ link }} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu-local-tasks.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu-local-tasks.html.twig new file mode 100644 index 000000000..8eb20ab44 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu-local-tasks.html.twig @@ -0,0 +1,21 @@ +{# +/** + * @file + * Theme override to display primary and secondary local tasks. + * + * Available variables: + * - primary: HTML list items representing primary tasks. + * - secondary: HTML list items representing secondary tasks. + * + * Each item in these variables (primary and secondary) can be individually + * themed in menu-local-task.html.twig. + */ +#} +{% if primary %} +

{{ 'Primary tabs'|t }}

+
    {{ primary }}
+{% endif %} +{% if secondary %} +

{{ 'Secondary tabs'|t }}

+
    {{ secondary }}
+{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu.html.twig new file mode 100644 index 000000000..ef04cedd1 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/menu.html.twig @@ -0,0 +1,55 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link url, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{% import _self as menus %} + +{# + We call a macro which calls itself to render the full tree. + @see https://twig.symfony.com/doc/3.x/tags/macro.html +#} +{{ menus.menu_links(items, attributes, 0) }} + +{% macro menu_links(items, attributes, menu_level) %} + {% import _self as menus %} + {% if items %} + {% if menu_level == 0 %} + + {% else %} + + {% endif %} +{% endmacro %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/toolbar.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/toolbar.html.twig new file mode 100644 index 000000000..5ef3ffad3 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/navigation/toolbar.html.twig @@ -0,0 +1,46 @@ +{# +/** + * @file + * Theme override for the administrative toolbar. + * + * Available variables: + * - attributes: HTML attributes for the wrapper. + * - toolbar_attributes: HTML attributes to apply to the toolbar. + * - toolbar_heading: The heading or label for the toolbar. + * - tabs: List of tabs for the toolbar. + * - attributes: HTML attributes for the tab container. + * - link: Link or button for the menu tab. + * - trays: Toolbar tray list, each associated with a tab. Each tray in trays + * contains: + * - attributes: HTML attributes to apply to the tray. + * - label: The tray's label. + * - links: The tray menu links. + * - remainder: Any non-tray, non-tab elements left to be rendered. + * + * @see template_preprocess_toolbar() + */ +#} + + +

{{ toolbar_heading }}

+ {% for key, tab in tabs %} + {% set tray = trays[key] %} + + {{ tab.link }} + {% apply spaceless %} + + {% if tray.label %} + + {{ remainder }} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/forum-submitted.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/forum-submitted.html.twig new file mode 100644 index 000000000..57311e96b --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/forum-submitted.html.twig @@ -0,0 +1,21 @@ +{# +/** + * @file + * Theme override for a forum post submission string. + * + * The submission string indicates when and by whom a topic was submitted. + * + * Available variables: + * - author: The author of the post. + * - time: How long ago the post was created. + * - topic: An object with the raw data of the post. Potentially unsafe. Be + * sure to clean this data before printing. + * + * @see template_preprocess_forum_submitted() + */ +#} +{% if time %} + +{% else %} + {{ 'n/a'|t }} +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/user.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/user.html.twig new file mode 100644 index 000000000..9a824effd --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/user.html.twig @@ -0,0 +1,23 @@ +{# +/** + * @file + * Theme override to present all user data. + * + * This template is used when viewing a registered user's page, + * e.g., example.com/user/123. 123 being the user's ID. + * + * Available variables: + * - content: A list of content items. Use 'content' to print all content, or + * print a subset such as 'content.field_example'. Fields attached to a user + * such as 'user_picture' are available as 'content.user_picture'. + * - attributes: HTML attributes for the container element. + * - user: A Drupal User entity. + * + * @see template_preprocess_user() + */ +#} + + {% if content %} + {{- content -}} + {% endif %} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/username.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/username.html.twig new file mode 100644 index 000000000..df694dff6 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/user/username.html.twig @@ -0,0 +1,29 @@ +{# +/** + * @file + * Theme override for displaying a username. + * + * Available variables: + * - account: The full account information for the user. + * - uid: The user ID, or zero if not a user. As used in anonymous comments. + * - name: The user's name, sanitized, and optionally truncated. + * - name_raw: The user's name, un-truncated. + * - truncated: Whether the user's name was truncated. + * - extra: Additional text to append to the user's name, sanitized. + * - profile_access: Whether the current user has permission to access this + users profile page. + * - link_path: The path or URL of the user's profile page, home page, + * or other desired page to link to for more information about the user. + * - homepage: (optional) The home page of the account, only set for non users. + * - link_options: Options to set on the \Drupal\Core\Url object if linking the + * user's name to the user's page. + * - attributes: HTML attributes for the containing element. + * + * @see template_preprocess_username() + */ +#} +{% if link_path -%} + {{ name }}{{ extra }} +{%- else -%} + {{ name }}{{ extra }}
+{%- endif -%} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-exposed-form.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-exposed-form.html.twig new file mode 100644 index 000000000..3c679ae58 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-exposed-form.html.twig @@ -0,0 +1,21 @@ +{# +/** + * @file + * Theme override for a views exposed form. + * + * Available variables: + * - form: A render element representing the form. + * + * @see template_preprocess_views_exposed_form() + */ +#} +{% if q is not empty %} + {# + This ensures that, if clean URLs are off, the 'q' is added first, + as a hidden form element, so that it shows up first in the POST URL. + #} +{{ q }} +{% endif %} +
+ {{ form }} +
diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-mini-pager.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-mini-pager.html.twig new file mode 100644 index 000000000..4b46f2bb1 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-mini-pager.html.twig @@ -0,0 +1,42 @@ +{# +/** + * @file + * Theme override for a views mini-pager. + * + * Available variables: + * - heading_id: Pagination heading ID. + * - items: List of pager items. + * + * @see template_preprocess_views_mini_pager() + */ +#} +{% if items.previous or items.next %} + +{% endif %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-grouping.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-grouping.html.twig new file mode 100644 index 000000000..44905e56b --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-grouping.html.twig @@ -0,0 +1,20 @@ +{# +/** + * @file + * Theme override to display a single views grouping. + * + * Available variables: + * - view: The view object. + * - grouping: The grouping instruction. + * - grouping_level: A number indicating the hierarchical level of the grouping. + * - title: The group heading. + * - content: The content to be grouped. + * - rows: The rows returned from the view. + * + * @see template_preprocess_views_view_grouping() + */ +#} +
+
{{ title }}
+
{{ content }}
+
diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-row-rss.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-row-rss.html.twig new file mode 100644 index 000000000..aee08aee6 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-row-rss.html.twig @@ -0,0 +1,30 @@ +{# +/** + * @file + * Theme override to display an item in a views RSS feed. + * + * Available variables: + * - title: RSS item title. + * - link: RSS item link. + * - description: RSS body text. + * - item_elements: RSS item elements to be rendered as XML (pubDate, creator, + * guid). + * + * @see template_preprocess_views_view_row_rss() + * + * @ingroup themeable + */ +#} + + {{ title }} + {{ link }} + {{ description }} + {% for item in item_elements -%} + <{{ item.key }}{{ item.attributes -}} + {% if item.value -%} + >{{ item.value }} + {% else -%} + {{ ' />' }} + {% endif %} + {%- endfor %} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-summary-unformatted.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-summary-unformatted.html.twig new file mode 100644 index 000000000..151734e94 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-summary-unformatted.html.twig @@ -0,0 +1,31 @@ +{# +/** + * @file + * Theme override for unformatted summary links. + * + * Available variables: + * - rows: The rows contained in this view. + * - url: The URL to this row's content. + * - count: The number of items this summary item represents. + * - separator: A separator between each row. + * - attributes: HTML attributes for a row. + * - active: A flag indicating whether the row is active. + * - options: Flags indicating how each row should be displayed. This contains: + * - count: A flag indicating whether the row's 'count' should be displayed. + * - inline: A flag indicating whether the item should be wrapped in an inline + * or block level HTML element. + * + * @see template_preprocess_views_view_summary_unformatted() + */ +#} +{% for row in rows %} + {{ options.inline ? ' + {% if row.separator -%} + {{ row.separator }} + {%- endif %} + {{ row.link }} + {% if options.count %} + ({{ row.count }}) + {% endif %} + {{ options.inline ? '' : '' }} +{% endfor %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-summary.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-summary.html.twig new file mode 100644 index 000000000..3190a45ad --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-summary.html.twig @@ -0,0 +1,31 @@ +{# +/** + * @file + * Theme override to display a list of summary lines. + * + * Available variables: + * - rows: The rows contained in this view. + * Each row contains: + * - url: The summary link URL. + * - link: The summary link text. + * - count: The number of items under this grouping. + * - attributes: HTML attributes to apply to each row. + * - active: A flag indicating whether the row is active. + * - options: Flags indicating how the summary should be displayed. + * This contains: + * - count: A flag indicating whether the count should be displayed. + * + * @see template_preprocess_views_view_summary() + */ +#} +
+
    + {% for row in rows %} +
  • {{ row.link }} + {% if options.count %} + ({{ row.count }}) + {% endif %} +
  • + {% endfor %} +
+
diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-table.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-table.html.twig new file mode 100644 index 000000000..edc14983d --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view-table.html.twig @@ -0,0 +1,120 @@ +{# +/** + * @file + * Theme override for displaying a view as a table. + * + * Available variables: + * - attributes: Remaining HTML attributes for the element. + * - class: HTML classes that can be used to style contextually through CSS. + * - title : The title of this group of rows. + * - header: The table header columns. + * - attributes: Remaining HTML attributes for the element. + * - content: HTML classes to apply to each header cell, indexed by + * the header's key. + * - default_classes: A flag indicating whether default classes should be + * used. + * - caption_needed: Is the caption tag needed. + * - caption: The caption for this table. + * - accessibility_description: Extended description for the table details. + * - accessibility_summary: Summary for the table details. + * - rows: Table row items. Rows are keyed by row number. + * - attributes: HTML classes to apply to each row. + * - columns: Row column items. Columns are keyed by column number. + * - attributes: HTML classes to apply to each column. + * - content: The column content. + * - default_classes: A flag indicating whether default classes should be + * used. + * - responsive: A flag indicating whether table is responsive. + * - sticky: A flag indicating whether table header is sticky. + * - summary_element: A render array with table summary information (if any). + * + * @see template_preprocess_views_view_table() + */ +#} +{% + set classes = [ + 'views-table', + 'views-view-table', + 'cols-' ~ header|length, + responsive ? 'responsive-enabled', + sticky ? 'sticky-enabled', + ] +%} + + {% if caption_needed %} + + {% if caption %} + {{ caption }} + {% else %} + {{ title }} + {% endif %} + {% if (summary_element is not empty) %} + {{ summary_element }} + {% endif %} + + {% endif %} + {% if header %} + + + {% for key, column in header %} + {% if column.default_classes %} + {% + set column_classes = [ + 'views-field', + 'views-field-' ~ fields[key], + ] + %} + {% endif %} + + {%- if column.wrapper_element -%} + <{{ column.wrapper_element }}> + {%- if column.url -%} + {{ column.content }}{{ column.sort_indicator }} + {%- else -%} + {{ column.content }}{{ column.sort_indicator }} + {%- endif -%} + + {%- else -%} + {%- if column.url -%} + {{ column.content }}{{ column.sort_indicator }} + {%- else -%} + {{- column.content }}{{ column.sort_indicator }} + {%- endif -%} + {%- endif -%} + + {% endfor %} + + + {% endif %} + + {% for row in rows %} + + {% for key, column in row.columns %} + {% if column.default_classes %} + {% + set column_classes = [ + 'views-field' + ] + %} + {% for field in column.fields %} + {% set column_classes = column_classes|merge(['views-field-' ~ field]) %} + {% endfor %} + {% endif %} + + {%- if column.wrapper_element -%} + <{{ column.wrapper_element }}> + {% for content in column.content %} + {{ content.separator }}{{ content.field_output }} + {% endfor %} + + {%- else -%} + {% for content in column.content %} + {{- content.separator }}{{ content.field_output -}} + {% endfor %} + {%- endif %} + + {% endfor %} + + {% endfor %} + + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view.html.twig new file mode 100644 index 000000000..251b0611d --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/classy/views/views-view.html.twig @@ -0,0 +1,95 @@ +{# +/** + * @file + * Theme override for a main view template. + * + * Available variables: + * - attributes: Remaining HTML attributes for the element. + * - css_name: A CSS-safe version of the view name. + * - css_class: The user-specified classes names, if any. + * - header: The optional header. + * - footer: The optional footer. + * - rows: The results of the view query, if any. + * - empty: The content to display if there are no rows. + * - pager: The optional pager next/prev links to display. + * - exposed: Exposed widget form/info to display. + * - feed_icons: Optional feed icons to display. + * - more: An optional link to the next page of results. + * - title: Title of the view, only used when displaying in the admin preview. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the view title. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the view title. + * - attachment_before: An optional attachment view to be displayed before the + * view content. + * - attachment_after: An optional attachment view to be displayed after the + * view content. + * - dom_id: Unique id for every view being printed to give unique class for + * JavaScript. + * + * @see template_preprocess_views_view() + */ +#} +{% + set classes = [ + 'view', + 'view-' ~ id|clean_class, + 'view-id-' ~ id, + 'view-display-id-' ~ display_id, + dom_id ? 'js-view-dom-id-' ~ dom_id, + ] +%} + + {{ title_prefix }} + {% if title %} + {{ title }} + {% endif %} + {{ title_suffix }} + {% if header %} +
+ {{ header }} +
+ {% endif %} + {% if exposed %} +
+ {{ exposed }} +
+ {% endif %} + {% if attachment_before %} +
+ {{ attachment_before }} +
+ {% endif %} + + {% if rows %} +
+ {{ rows }} +
+ {% elseif empty %} +
+ {{ empty }} +
+ {% endif %} + + {% if pager %} + {{ pager }} + {% endif %} + {% if attachment_after %} +
+ {{ attachment_after }} +
+ {% endif %} + {% if more %} + {{ more }} + {% endif %} + {% if footer %} + + {% endif %} + {% if feed_icons %} +
+ {{ feed_icons }} +
+ {% endif %} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/comment.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/comment.html.twig new file mode 100644 index 000000000..7ed29a97b --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/comment.html.twig @@ -0,0 +1,112 @@ +{# +/** + * @file + * Bartik's theme implementation for comments. + * + * Available variables: + * - author: (optional) Comment author. Can be a link or plain text. + * - content: The content-related items for the comment display. Use + * {{ content }} to print them all, or print a subset such as + * {{ content.field_example }}. Use the following code to temporarily suppress + * the printing of a given child element: + * @code + * {{ content|without('field_example') }} + * @endcode + * - created: (optional) Formatted date and time for when the comment was + * created. Preprocess functions can reformat it by calling + * DateFormatter::format() with the desired parameters on the + * 'comment.created' variable. + * - changed: (optional) Formatted date and time for when the comment was last + * changed. Preprocess functions can reformat it by calling + * DateFormatter::format() with the desired parameters on the + * 'comment.changed' variable. + * - permalink: Comment permalink. + * - submitted: (optional) Submission information created from author and + * created during template_preprocess_comment(). + * - user_picture: (optional) The comment author's profile picture. + * - status: Comment status. Possible values are: + * unpublished, published, or preview. + * - title: (optional) Comment title, linked to the comment. + * - attributes: HTML attributes for the containing element. + * The attributes.class may contain one or more of the following classes: + * - comment: The current template type; e.g., 'theming hook'. + * - by-anonymous: Comment by an unregistered user. + * - by-{entity-type}-author: Comment by the author of the parent entity, + * eg. by-node-author. + * - preview: When previewing a new or edited comment. + * The following applies only to viewers who are registered users: + * - unpublished: An unpublished comment visible only to administrators. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: List of classes for the styling of the comment content. + * - threaded: A flag indicating whether the comments are threaded or not. + * + * These variables are provided to give context about the parent comment (if + * any, optional): + * - parent_comment: Full parent comment entity (if any). + * - parent_author: Equivalent to author for the parent comment. + * - parent_created: Equivalent to created for the parent comment. + * - parent_changed: Equivalent to changed for the parent comment. + * - parent_title: Equivalent to title for the parent comment. + * - parent_permalink: Equivalent to permalink for the parent comment. + * - parent: A text string of parent comment submission information created from + * 'parent_author' and 'parent_created' during template_preprocess_comment(). + * This information is presented to help screen readers follow lengthy + * discussion threads. You can hide this from sighted users using the class + * visually-hidden. + * + * These two variables are provided for context: + * - comment: Full comment object. + * - commented_entity: Entity the comments are attached to. + * + * @see template_preprocess_comment() + */ +#} +{% + set classes = [ + 'comment', + 'js-comment', + status != 'published' ? 'comment--' ~ status, + comment.owner.anonymous ? 'by-anonymous', + author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author', + 'clearfix', + ] +%} +
+ {# + Hide the "new" indicator by default, let a piece of JavaScript ask the + server which comments are new for the user. Rendering the final "new" + indicator here would break the render cache. + #} + + + {% if submitted %} +
+ {{ user_picture }} +

{{ author }}

+

{{ created }}

+ + {# + Indicate the semantic relationship between parent and child comments + for accessibility. The list is difficult to navigate in a screen + reader without this information. + #} + {% if parent %} +

{{ parent }}

+ {% endif %} +
+ {% endif %} + + + {% if title %} + {{ title_prefix }} + {{ title }}

+ {{ title_suffix }} + {% endif %} + {{ content }} + + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/field--node--field-tags.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/field--node--field-tags.html.twig new file mode 100644 index 000000000..af7ac9cd4 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/field--node--field-tags.html.twig @@ -0,0 +1,47 @@ +{# +/** + * @file + * Bartik theme override for taxonomy term fields. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the label. + * - label: The label for the field. + * - content_attributes: HTML attributes for the content. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * @see template_preprocess_field() + */ +#} +{% + set classes = [ + 'field', + 'field--name-' ~ field_name|clean_class, + 'field--type-' ~ field_type|clean_class, + 'field--label-' ~ label_display, + 'clearfix', + ] +%} +{% + set title_classes = [ + 'field__label', + label_display == 'inline' ? 'inline', + ] +%} + + {% if not label_hidden %} + {{ label }}

+ {% endif %} + + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/field/file-link.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/field/file-link.html.twig new file mode 100644 index 000000000..53f49c4dd --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/field/file-link.html.twig @@ -0,0 +1,16 @@ +{# +/** + * @file + * Theme override for a link to a file. + * + * Available variables: + * - attributes: The HTML attributes for the containing element. + * - link: A link to the file. + * - icon: The icon image representing the file type. + * - file_size: The size of the file. + * + * @see template_preprocess_file_link() + */ +#} +{{ attach_library('bartik/classy.file') }} +{{ icon }} {{ link }}
diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/form--search-block-form.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/form--search-block-form.html.twig new file mode 100644 index 000000000..68847fc0c --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/form--search-block-form.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for a 'form' element. + * + * Available variables: + * - attributes: A list of HTML attributes for the wrapper element. + * - children: The child elements of the form. + * + * @see template_preprocess_form() + */ +#} + + {{ children }} + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/maintenance-page.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/maintenance-page.html.twig new file mode 100644 index 000000000..3cd787b33 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/maintenance-page.html.twig @@ -0,0 +1,48 @@ +{# +/** + * @file + * Bartik's theme implementation to display a single Drupal page while offline. + * + * All available variables are mirrored in page.html.twig. + * + * @see template_preprocess_maintenance_page() + */ + #} +
+
+ +
+
+
+
+ + {% if title %} +

{{ title }}

+ {% endif %} + {{ page.content }} + {{ page.highlighted }} +
+
+
+
+
+
diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/node.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/node.html.twig new file mode 100644 index 000000000..22bba0c86 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/node.html.twig @@ -0,0 +1,103 @@ +{# +/** + * @file + * Bartik's theme implementation to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - node.getCreatedTime() will return the node creation timestamp. + * - node.hasField('field_example') returns TRUE if the node bundle includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * - node.isPublished() will return whether the node is published or not. + * Calling other methods, such as node.delete(), will result in an exception. + * See \Drupal\node\Entity\Node for a full list of public properties and + * methods for the node object. + * - label: (optional) The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: (optional) Themed creation date field. + * - author_name: (optional) Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * - readmore: Flag for more state. Will be true if the teaser content of the + * node cannot hold the main body content. + * - logged_in: Flag for authenticated user status. Will be true when the + * current user is a logged-in member. + * - is_admin: Flag for admin user status. Will be true when the current user + * is an administrator. + * + * @see template_preprocess_node() + */ +#} +{% + set classes = [ + 'node', + 'node--type-' ~ node.bundle|clean_class, + node.isPromoted() ? 'node--promoted', + node.isSticky() ? 'node--sticky', + not node.isPublished() ? 'node--unpublished', + view_mode ? 'node--view-mode-' ~ view_mode|clean_class, + 'clearfix', + ] +%} +{{ attach_library('bartik/classy.node') }} + +
+ {{ title_prefix }} + {% if label and not page %} + + {{ label }} + + {% endif %} + {{ title_suffix }} + {% if display_submitted %} +
+ {{ author_picture }} + + {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %} + + {{ metadata }} +
+ {% endif %} +
+ + {{ content }} + + diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/page-title.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/page-title.html.twig new file mode 100644 index 000000000..4d12311f8 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/page-title.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Bartik's theme implementation for a page title. + * + * Available variables: + * - title_attributes: HTML attributes for the page title element. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title: The page title, for use in the actual content. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + */ +#} +{% + set classes = [ + 'title', + 'page-title', + ] +%} + +{{ title_prefix }} +{% if title %} + {{ title }} +{% endif %} +{{ title_suffix }} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/page.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/page.html.twig new file mode 100644 index 000000000..86d7b775c --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/page.html.twig @@ -0,0 +1,128 @@ +{# +/** + * @file + * Bartik's theme implementation to display a single page. + * + * The doctype, html, head and body tags are not in this template. Instead they + * can be found in the html.html.twig template normally located in the + * core/modules/system directory. + * + * Available variables: + * + * General utility variables: + * - base_path: The base URL path of the Drupal installation. Will usually be + * "/" unless you have installed Drupal in a sub-directory. + * - is_front: A flag indicating if the current page is the front page. + * - logged_in: A flag indicating if the user is registered and signed in. + * - is_admin: A flag indicating if the user has permission to access + * administration pages. + * + * Site identity: + * - front_page: The URL of the front page. Use this instead of base_path when + * linking to the front page. This includes the language domain or prefix. + * + * Page content (in order of occurrence in the default page.html.twig): + * - node: Fully loaded node, if there is an automatically-loaded node + * associated with the page and the node ID is the second argument in the + * page's path (e.g. node/12345 and node/12345/revisions, but not + * comment/reply/12345). + * + * Regions: + * - page.header: Items for the header region. + * - page.highlighted: Items for the highlighted region. + * - page.primary_menu: Items for the primary menu region. + * - page.secondary_menu: Items for the secondary menu region. + * - page.featured_top: Items for the featured top region. + * - page.content: The main content of the current page. + * - page.sidebar_first: Items for the first sidebar. + * - page.sidebar_second: Items for the second sidebar. + * - page.featured_bottom_first: Items for the first featured bottom region. + * - page.featured_bottom_second: Items for the second featured bottom region. + * - page.featured_bottom_third: Items for the third featured bottom region. + * - page.footer_first: Items for the first footer column. + * - page.footer_second: Items for the second footer column. + * - page.footer_third: Items for the third footer column. + * - page.footer_fourth: Items for the fourth footer column. + * - page.footer_fifth: Items for the fifth footer column. + * - page.breadcrumb: Items for the breadcrumb region. + * + * @see template_preprocess_page() + * @see html.html.twig + */ +#} +
+
+ + {% if page.highlighted %} +
+ +
+ {% endif %} + {% if page.featured_top %} + + {% endif %} +
+
+ {{ page.breadcrumb }} +
+
+ + {{ page.content }} +
+
+ {% if page.sidebar_first %} + + {% endif %} + {% if page.sidebar_second %} + + {% endif %} +
+
+ {% if page.featured_bottom_first or page.featured_bottom_second or page.featured_bottom_third %} + + {% endif %} +
+
+ {% if page.footer_first or page.footer_second or page.footer_third or page.footer_fourth %} + + {% endif %} + {% if page.footer_fifth %} + + {% endif %} +
+
+
+
diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/region--header.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/region--header.html.twig new file mode 100644 index 000000000..e8c6e13b5 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/region--header.html.twig @@ -0,0 +1,16 @@ +{% extends "region.html.twig" %} +{# +/** + * @file + * Bartik's theme implementation to display a header region. + * + * Available variables: + * - content: The content for this region, typically blocks. + * - attributes: HTML attributes for the region div. + * - region: The name of the region variable as defined in the theme's + * .info.yml file. + * + * @see template_preprocess_region() + */ +#} +{% set attributes = attributes.addClass('clearfix') %} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/status-messages.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/status-messages.html.twig new file mode 100644 index 000000000..700593206 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/status-messages.html.twig @@ -0,0 +1,60 @@ +{# +/** + * @file + * Default theme implementation for status messages. + * + * Displays status, error, and warning messages, grouped by type. + * + * An invisible heading identifies the messages for assistive technology. + * Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html + * for info. + * + * Add an ARIA label to the contentinfo area so that assistive technology + * user agents will better describe this landmark. + * + * Available variables: + * - message_list: List of messages to be displayed, grouped by type. + * - status_headings: List of all status types. + * - attributes: HTML attributes for the element, including: + * - class: HTML classes. + */ +#} +
+ {% block messages %} + {% if message_list is not empty %} + {{ attach_library('bartik/messages') }} +
+ {% for type, messages in message_list %} + {% + set classes = [ + 'messages', + 'messages--' ~ type, + ] + %} +
+ {% if type == 'error' %} +
+ {% endif %} + {% if status_headings[type] %} +

{{ status_headings[type] }}

+ {% endif %} + {% if messages|length > 1 %} +
    + {% for message in messages %} +
  • {{ message }}
  • + {% endfor %} +
+ {% else %} + {{ messages|first }} + {% endif %} + {% if type == 'error' %} +
+ {% endif %} +
+ {# Remove type specific classes. #} + {% set attributes = attributes.removeClass(classes) %} + {% endfor %} +
+ {% endif %} + {% endblock messages %} +
diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-guidelines.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-guidelines.html.twig new file mode 100644 index 000000000..e10d0951a --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-guidelines.html.twig @@ -0,0 +1,24 @@ +{# +/** + * @file + * Theme implementation for text filter guidelines. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - children: The rendered child elements of the container. + * - has_parent: A flag to indicate that the container has one or more parent + * containers. + * + * @see template_preprocess_container() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + has_parent ? 'js-form-wrapper', + has_parent ? 'form-wrapper', + 'filter-guidelines', + ] +%} +{{ children }} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-help.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-help.html.twig new file mode 100644 index 000000000..5935ee33d --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-help.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme implementation for text filter help. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - children: The rendered child elements of the container. + * + * @see template_preprocess_container() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + has_parent ? 'js-form-wrapper', + has_parent ? 'form-wrapper', + 'filter-help', + ] +%} +{{ children }} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-wrapper.html.twig b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-wrapper.html.twig new file mode 100644 index 000000000..211ab2be0 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/templates/text_format/container--text-format-filter-wrapper.html.twig @@ -0,0 +1,24 @@ +{# +/** + * @file + * Theme implementation for the text filter wrapper. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - children: The rendered child elements of the container. + * - has_parent: A flag to indicate that the container has one or more parent + * containers. + * + * @see template_preprocess_container() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + has_parent ? 'js-form-wrapper', + has_parent ? 'form-wrapper', + 'filter-wrapper', + ] +%} +{{ children }} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/bartik/tests/src/Functional/BartikTest.php b/templates/drupal10-govcms10/files/themes/obsolete/bartik/tests/src/Functional/BartikTest.php new file mode 100644 index 000000000..7c70c2fcd --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/bartik/tests/src/Functional/BartikTest.php @@ -0,0 +1,32 @@ +drupalGet(''); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->responseContains('bartik/css/components/messages.css'); + $this->assertSession()->responseContains('bartik/css/classy/components/messages.css'); + } + +} diff --git a/templates/drupal10-govcms10/files/themes/obsolete/classy/classy.info.yml b/templates/drupal10-govcms10/files/themes/obsolete/classy/classy.info.yml new file mode 100644 index 000000000..543340486 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/classy/classy.info.yml @@ -0,0 +1,8 @@ +name: Classy +type: theme +base theme: false +description: 'Drupal administration theme with modern minimalist design. [obsolete]' +package: GovCMS [obsolete] +core_version_requirement: ^9 || ^10 +lifecycle: obsolete +lifecycle_link: 'https://github.com/GovCMS/GovCMS' diff --git a/templates/drupal10-govcms10/files/themes/obsolete/seven/seven.info.yml b/templates/drupal10-govcms10/files/themes/obsolete/seven/seven.info.yml new file mode 100644 index 000000000..cb0173c12 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/seven/seven.info.yml @@ -0,0 +1,8 @@ +name: Seven +type: theme +base theme: false +description: 'Drupal administration theme with modern minimalist design. [obsolete]' +package: GovCMS [obsolete] +core_version_requirement: ^9 || ^10 +lifecycle: obsolete +lifecycle_link: 'https://github.com/GovCMS/GovCMS' diff --git a/templates/drupal10-govcms10/files/themes/obsolete/stable/stable.info.yml b/templates/drupal10-govcms10/files/themes/obsolete/stable/stable.info.yml new file mode 100644 index 000000000..80e30cb00 --- /dev/null +++ b/templates/drupal10-govcms10/files/themes/obsolete/stable/stable.info.yml @@ -0,0 +1,8 @@ +name: Stable +type: theme +base theme: false +description: 'A base theme using Drupal 8.0.0 core markup and CSS. [obsolete]' +package: GovCMS [obsolete] +core_version_requirement: ^9 || ^10 +lifecycle: obsolete +lifecycle_link: 'https://github.com/GovCMS/GovCMS' diff --git a/templates/drupal10-govcms10/files/web/.csslintrc b/templates/drupal10-govcms10/files/web/.csslintrc new file mode 100644 index 000000000..177e4fcc7 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/.csslintrc @@ -0,0 +1,40 @@ +--errors=box-model, + display-property-grouping, + duplicate-background-images, + duplicate-properties, + empty-rules, + ids, + import, + important, + known-properties, + outline-none, + overqualified-elements, + qualified-headings, + shorthand, + star-property-hack, + text-indent, + underscore-property-hack, + unique-headings, + unqualified-attributes, + vendor-prefix, + zero-units +--ignore=adjoining-classes, + box-sizing, + bulletproof-font-face, + compatible-vendor-prefixes, + errors, + fallback-colors, + floats, + font-faces, + font-sizes, + gradients, + import-ie-limit, + order-alphabetical, + regex-selectors, + rules-count, + selector-max, + selector-max-approaching, + selector-newline, + universal-selector +--exclude-list=core/assets, + vendor diff --git a/templates/drupal10-govcms10/files/web/.eslintignore b/templates/drupal10-govcms10/files/web/.eslintignore new file mode 100644 index 000000000..9c134873d --- /dev/null +++ b/templates/drupal10-govcms10/files/web/.eslintignore @@ -0,0 +1,8 @@ +core/**/* +vendor/**/* +sites/**/files/**/* +libraries/**/* +sites/**/libraries/**/* +profiles/**/libraries/**/* +**/js_test_files/**/* +**/node_modules/**/* diff --git a/templates/drupal10-govcms10/files/web/.eslintrc.json b/templates/drupal10-govcms10/files/web/.eslintrc.json new file mode 100644 index 000000000..d4bbc9205 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./core/.eslintrc.json" +} diff --git a/templates/drupal10-govcms10/files/web/.ht.router.php b/templates/drupal10-govcms10/files/web/.ht.router.php new file mode 100644 index 000000000..b5884ef4a --- /dev/null +++ b/templates/drupal10-govcms10/files/web/.ht.router.php @@ -0,0 +1,71 @@ + + + Require all denied + + + Order allow,deny + + + +# Don't show directory listings for URLs which map to a directory. +Options -Indexes + +# Set the default handler. +DirectoryIndex index.php index.html index.htm + +# Add correct encoding for SVGZ. +AddType image/svg+xml svg svgz +AddEncoding gzip svgz + +# Most of the following PHP settings cannot be changed at runtime. See +# sites/default/default.settings.php and +# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be +# changed at runtime. + + php_value assert.active 0 + + +# Requires mod_expires to be enabled. + + # Enable expirations. + ExpiresActive On + + # Cache all files for 1 year after access. + ExpiresDefault "access plus 1 year" + + + # Do not allow PHP scripts to be cached unless they explicitly send cache + # headers themselves. Otherwise all scripts would have to overwrite the + # headers set by mod_expires if they want another caching behavior. This may + # fail if an error occurs early in the bootstrap process, and it may cause + # problems if a non-Drupal PHP file is installed in a subdirectory. + ExpiresActive Off + + + +# Set a fallback resource if mod_rewrite is not enabled. This allows Drupal to +# work without clean URLs. This requires Apache version >= 2.2.16. If Drupal is +# not accessed by the top level URL (i.e.: http://example.com/drupal/ instead of +# http://example.com/), the path to index.php will need to be adjusted. + + FallbackResource /index.php + + +# Various rewrite rules. + + RewriteEngine on + + # Set "protossl" to "s" if we were accessed via https://. This is used later + # if you enable "www." stripping or enforcement, in order to ensure that + # you don't bounce between http and https. + RewriteRule ^ - [E=protossl] + RewriteCond %{HTTPS} on + RewriteRule ^ - [E=protossl:s] + + # Make sure Authorization HTTP header is available to PHP + # even when running as CGI or FastCGI. + RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + # Block access to "hidden" directories whose names begin with a period. This + # includes directories used by version control systems such as Subversion or + # Git to store control files. Files whose names begin with a period, as well + # as the control files used by CVS, are protected by the FilesMatch directive + # above. + # + # NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is + # not possible to block access to entire directories from .htaccess because + # is not allowed here. + # + # If you do not have mod_rewrite installed, you should remove these + # directories from your webroot or otherwise protect them from being + # downloaded. + RewriteRule "/\.|^\.(?!well-known/)" - [F] + + # If your site can be accessed both with and without the 'www.' prefix, you + # can use one of the following settings to redirect users to your preferred + # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: + # + # To redirect all users to access the site WITH the 'www.' prefix, + # (http://example.com/foo will be redirected to http://www.example.com/foo) + # uncomment the following: + # RewriteCond %{HTTP_HOST} . + # RewriteCond %{HTTP_HOST} !^www\. [NC] + # RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + # + # To redirect all users to access the site WITHOUT the 'www.' prefix, + # (http://www.example.com/foo will be redirected to http://example.com/foo) + # uncomment the following: + # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] + # RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301] + + # Modify the RewriteBase if you are using Drupal in a subdirectory or in a + # VirtualDocumentRoot and the rewrite rules are not working properly. + # For example if your site is at http://example.com/drupal uncomment and + # modify the following line: + # RewriteBase /drupal + # + # If your site is running in a VirtualDocumentRoot at http://example.com/, + # uncomment the following line: + # RewriteBase / + + # Redirect common PHP files to their new locations. + RewriteCond %{REQUEST_URI} ^(.*)?/(install\.php) [OR] + RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild\.php) + RewriteCond %{REQUEST_URI} !core + RewriteRule ^ %1/core/%2 [L,QSA,R=301] + + # Rewrite install.php during installation to see if mod_rewrite is working + RewriteRule ^core/install\.php core/install.php?rewrite=ok [QSA,L] + + # Pass all requests not referring directly to files in the filesystem to + # index.php. + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} !=/favicon.ico + RewriteRule ^ index.php [L] + + # For security reasons, deny access to other PHP files on public sites. + # Note: The following URI conditions are not anchored at the start (^), + # because Drupal may be located in a subdirectory. To further improve + # security, you can replace '!/' with '!^/'. + # Allow access to PHP files in /core (like authorize.php or install.php): + RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$ + # Allow access to test-specific PHP files: + RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?\.php + # Allow access to Statistics module's custom front controller. + # Copy and adapt this rule to directly execute PHP files in contributed or + # custom modules or to run another PHP application in the same directory. + RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics\.php$ + # Deny access to any other PHP files that do not match the rules above. + # Specifically, disallow autoload.php from being served directly. + RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F] + + # Rules to correctly serve gzip compressed CSS and JS files. + # Requires both mod_rewrite and mod_headers to be enabled. + + # Serve gzip compressed CSS files if they exist and the client accepts gzip. + RewriteCond %{HTTP:Accept-encoding} gzip + RewriteCond %{REQUEST_FILENAME}\.gz -s + RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.gz [QSA] + + # Serve gzip compressed JS files if they exist and the client accepts gzip. + RewriteCond %{HTTP:Accept-encoding} gzip + RewriteCond %{REQUEST_FILENAME}\.gz -s + RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA] + + # Serve correct content types, and prevent double compression. + RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1] + RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1,E=no-brotli:1] + + + # Serve correct encoding type. + Header set Content-Encoding gzip + # Force proxies to cache gzipped & non-gzipped css/js files separately. + Header append Vary Accept-Encoding + + + + +# Various header fixes. + + # Disable content sniffing for all responses, since it's an attack vector. + # This header is also set in FinishResponseSubscriber, which depending on + # Apache configuration might get placed in the 'onsuccess' table. To prevent + # header duplication, unset that one prior to setting in the 'always' table. + # See "To circumvent this limitation..." in + # https://httpd.apache.org/docs/current/mod/mod_headers.html. + Header onsuccess unset X-Content-Type-Options + Header always set X-Content-Type-Options nosniff + # Disable Proxy header, since it's an attack vector. + RequestHeader unset Proxy + diff --git a/templates/drupal10-govcms10/files/web/INSTALL.txt b/templates/drupal10-govcms10/files/web/INSTALL.txt new file mode 100644 index 000000000..be9e29d88 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/INSTALL.txt @@ -0,0 +1,3 @@ + +Read core/INSTALL.txt for detailed installation instructions for your Drupal +website. diff --git a/templates/drupal10-govcms10/files/web/README.md b/templates/drupal10-govcms10/files/web/README.md new file mode 100644 index 000000000..c3e537134 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/README.md @@ -0,0 +1,75 @@ +Drupal Logo + +Drupal is an open source content management platform supporting a variety of +websites ranging from personal weblogs to large community-driven websites. For +more information, visit the Drupal website, [Drupal.org][Drupal.org], and join +the [Drupal community][Drupal community]. + +## Contributing + +Drupal is developed on [Drupal.org][Drupal.org], the home of the international +Drupal community since 2001! + +[Drupal.org][Drupal.org] hosts Drupal's [GitLab repository][GitLab repository], +its [issue queue][issue queue], and its [documentation][documentation]. Before +you start working on code, be sure to search the [issue queue][issue queue] and +create an issue if your aren't able to find an existing issue. + +Every issue on Drupal.org automatically creates a new community-accessible fork +that you can contribute to. Learn more about the code contribution process on +the [Issue forks & merge requests page][issue forks]. + +## Usage + +For a brief introduction, see [USAGE.txt](/core/USAGE.txt). You can also find +guides, API references, and more by visiting Drupal's [documentation +page][documentation]. + +You can quickly extend Drupal's core feature set by installing any of its +[thousands of free and open source modules][modules]. With Drupal and its +module ecosystem, you can often build most or all of what your project needs +before writing a single line of code. + +## Changelog + +Drupal keeps detailed [change records][changelog]. You can search Drupal's +changes for a record of every notable breaking change and new feature since +2011. + +## Security + +For a list of security announcements, see the [Security advisories +page][Security advisories] (available as [an RSS feed][security RSS]). This +page also describes how to subscribe to these announcements via email. + +For information about the Drupal security process, or to find out how to report +a potential security issue to the Drupal security team, see the [Security team +page][security team]. + +## Need a helping hand? + +Visit the [Support page][support] or browse [over a thousand Drupal +providers][service providers] offering design, strategy, development, and +hosting services. + +## Legal matters + +Know your rights when using Drupal by reading Drupal core's +[license](/core/LICENSE.txt). + +Learn about the [Drupal trademark and logo policy here][trademark]. + +[Drupal.org]: https://www.drupal.org +[Drupal community]: https://www.drupal.org/community +[GitLab repository]: https://git.drupalcode.org/project/drupal +[issue queue]: https://www.drupal.org/project/issues/drupal +[issue forks]: https://www.drupal.org/drupalorg/docs/gitlab-integration/issue-forks-merge-requests +[documentation]: https://www.drupal.org/documentation +[changelog]: https://www.drupal.org/list-changes/drupal +[modules]: https://www.drupal.org/project/project_module +[security advisories]: https://www.drupal.org/security +[security RSS]: https://www.drupal.org/security/rss.xml +[security team]: https://www.drupal.org/drupal-security-team +[service providers]: https://www.drupal.org/drupal-services +[support]: https://www.drupal.org/support +[trademark]: https://www.drupal.com/trademark diff --git a/templates/drupal10-govcms10/files/web/autoload.php b/templates/drupal10-govcms10/files/web/autoload.php new file mode 100644 index 000000000..2c470f339 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/autoload.php @@ -0,0 +1,16 @@ +handle($request); +$response->send(); + +$kernel->terminate($request, $response); diff --git a/templates/drupal10-govcms10/files/web/modules/README.txt b/templates/drupal10-govcms10/files/web/modules/README.txt new file mode 100644 index 000000000..249e8177a --- /dev/null +++ b/templates/drupal10-govcms10/files/web/modules/README.txt @@ -0,0 +1,42 @@ +Modules extend your site functionality beyond Drupal core. + +WHAT TO PLACE IN THIS DIRECTORY? +-------------------------------- + +Placing downloaded and custom modules in this directory separates downloaded and +custom modules from Drupal core's modules. This allows Drupal core to be updated +without overwriting these files. + +DOWNLOAD ADDITIONAL MODULES +--------------------------- + +Contributed modules from the Drupal community may be downloaded at +https://www.drupal.org/project/project_module. + +ORGANIZING MODULES IN THIS DIRECTORY +------------------------------------ + +You may create subdirectories in this directory, to organize your added modules, +without breaking the site. Some common subdirectories include "contrib" for +contributed modules, and "custom" for custom modules. Note that if you move a +module to a subdirectory after it has been enabled, you may need to clear the +Drupal cache so it can be found. + +There are number of directories that are ignored when looking for modules. These +are 'src', 'lib', 'vendor', 'assets', 'css', 'files', 'images', 'js', 'misc', +'templates', 'includes', 'fixtures' and 'Drupal'. + +MULTISITE CONFIGURATION +----------------------- + +In multisite configurations, modules found in this directory are available to +all sites. You may also put modules in the sites/all/modules directory, and the +versions in sites/all/modules will take precedence over versions of the same +module that are here. Alternatively, the sites/your_site_name/modules directory +pattern may be used to restrict modules to a specific site instance. + +MORE INFORMATION +---------------- + +Refer to the “Developing for Drupal” section of the README.md in the Drupal +root directory for further information on extending Drupal with custom modules. diff --git a/templates/drupal10-govcms10/files/web/profiles/README.txt b/templates/drupal10-govcms10/files/web/profiles/README.txt new file mode 100644 index 000000000..6d11a5111 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/profiles/README.txt @@ -0,0 +1,28 @@ +Installation profiles define additional steps that run after the base +installation of Drupal is completed. They may also offer additional +functionality and change the behavior of the site. + +WHAT TO PLACE IN THIS DIRECTORY? +-------------------------------- + +Place downloaded and custom installation profiles in this directory. +Note that installation profiles are generally provided as part of a Drupal +distribution. + +DOWNLOAD ADDITIONAL DISTRIBUTIONS +--------------------------------- + +Contributed distributions from the Drupal community may be downloaded at +https://www.drupal.org/project/project_distribution. + +MULTISITE CONFIGURATION +----------------------- + +In multisite configurations, installation profiles found in this directory are +available to all sites during their initial site installation. + +MORE INFORMATION +---------------- + +Refer to the "Installation profiles" section of the README.md in the Drupal +root directory for further information on extending Drupal with custom profiles. diff --git a/templates/drupal10-govcms10/files/web/robots.txt b/templates/drupal10-govcms10/files/web/robots.txt new file mode 100644 index 000000000..3ad8e2e8d --- /dev/null +++ b/templates/drupal10-govcms10/files/web/robots.txt @@ -0,0 +1,73 @@ +# +# robots.txt +# +# This file is to prevent the crawling and indexing of certain parts +# of your site by web crawlers and spiders run by sites like Yahoo! +# and Google. By telling these "robots" where not to go on your site, +# you save bandwidth and server resources. +# +# This file will be ignored unless it is at the root of your host: +# Used: http://example.com/robots.txt +# Ignored: http://example.com/site/robots.txt +# +# For more information about the robots.txt standard, see: +# http://www.robotstxt.org/robotstxt.html + +User-agent: * +# CSS, JS, Images +Allow: /core/*.css$ +Allow: /core/*.css? +Allow: /core/*.js$ +Allow: /core/*.js? +Allow: /core/*.gif +Allow: /core/*.jpg +Allow: /core/*.jpeg +Allow: /core/*.png +Allow: /core/*.svg +Allow: /profiles/*.css$ +Allow: /profiles/*.css? +Allow: /profiles/*.js$ +Allow: /profiles/*.js? +Allow: /profiles/*.gif +Allow: /profiles/*.jpg +Allow: /profiles/*.jpeg +Allow: /profiles/*.png +Allow: /profiles/*.svg +# Directories +Disallow: /core/ +Disallow: /profiles/ +# Files +Disallow: /README.md +Disallow: /composer/Metapackage/README.txt +Disallow: /composer/Plugin/ProjectMessage/README.md +Disallow: /composer/Plugin/Scaffold/README.md +Disallow: /composer/Plugin/VendorHardening/README.txt +Disallow: /composer/Template/README.txt +Disallow: /modules/README.txt +Disallow: /sites/README.txt +Disallow: /themes/README.txt +Disallow: /web.config +# Paths (clean URLs) +Disallow: /admin/ +Disallow: /comment/reply/ +Disallow: /filter/tips +Disallow: /node/add/ +Disallow: /search/ +Disallow: /user/register +Disallow: /user/password +Disallow: /user/login +Disallow: /user/logout +Disallow: /media/oembed +Disallow: /*/media/oembed +# Paths (no clean URLs) +Disallow: /index.php/admin/ +Disallow: /index.php/comment/reply/ +Disallow: /index.php/filter/tips +Disallow: /index.php/node/add/ +Disallow: /index.php/search/ +Disallow: /index.php/user/password +Disallow: /index.php/user/register +Disallow: /index.php/user/login +Disallow: /index.php/user/logout +Disallow: /index.php/media/oembed +Disallow: /index.php/*/media/oembed diff --git a/templates/drupal10-govcms10/files/web/sites/README.txt b/templates/drupal10-govcms10/files/web/sites/README.txt new file mode 100644 index 000000000..0372902f1 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/sites/README.txt @@ -0,0 +1,10 @@ +This directory structure contains the settings and configuration files specific +to your site or sites and is an integral part of multisite configurations. + +It is now recommended to place your custom and downloaded extensions in the +/modules, /themes, and /profiles directories located in the Drupal root. The +sites/all/ subdirectory structure, which was recommended in previous versions +of Drupal, is still supported. + +See core/INSTALL.txt for information about single-site installation or +multisite configuration. diff --git a/templates/drupal10-govcms10/files/web/sites/default/default.services.yml b/templates/drupal10-govcms10/files/web/sites/default/default.services.yml new file mode 100644 index 000000000..c4b964fc2 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/sites/default/default.services.yml @@ -0,0 +1,230 @@ +parameters: + session.storage.options: + # Default ini options for sessions. + # + # Some distributions of Linux (most notably Debian) ship their PHP + # installations with garbage collection (gc) disabled. Since Drupal depends + # on PHP's garbage collection for clearing sessions, ensure that garbage + # collection occurs by using the most common settings. + # @default 1 + gc_probability: 1 + # @default 100 + gc_divisor: 100 + # + # Set session lifetime (in seconds), i.e. the grace period for session + # data. Sessions are deleted by the session garbage collector after one + # session lifetime has elapsed since the user's last visit. When a session + # is deleted, authenticated users are logged out, and the contents of the + # user's session is discarded. + # @default 200000 + gc_maxlifetime: 200000 + # + # Set session cookie lifetime (in seconds), i.e. the time from the session + # is created to the cookie expires, i.e. when the browser is expected to + # discard the cookie. The value 0 means "until the browser is closed". + # @default 2000000 + cookie_lifetime: 2000000 + # + # Drupal automatically generates a unique session cookie name based on the + # full domain name used to access the site. This mechanism is sufficient + # for most use-cases, including multi-site deployments. However, if it is + # desired that a session can be reused across different subdomains, the + # cookie domain needs to be set to the shared base domain. Doing so assures + # that users remain logged in as they cross between various subdomains. + # To maximize compatibility and normalize the behavior across user agents, + # the cookie domain should start with a dot. + # + # @default none + # cookie_domain: '.example.com' + # + # Set the SameSite cookie attribute: 'None', 'Lax', or 'Strict'. If set, + # this value will override the server value. See + # https://www.php.net/manual/en/session.security.ini.php for more + # information. + # @default no value + cookie_samesite: Lax + # + # Set the session ID string length. The length can be between 22 to 256. The + # PHP recommended value is 48. See + # https://www.php.net/manual/session.security.ini.php for more information. + # This value should be kept in sync with + # \Drupal\Core\Session\SessionConfiguration::__construct() + # @default 48 + sid_length: 48 + # + # Set the number of bits in encoded session ID character. The possible + # values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-", + # ","). The PHP recommended value is 6. See + # https://www.php.net/manual/session.security.ini.php for more information. + # This value should be kept in sync with + # \Drupal\Core\Session\SessionConfiguration::__construct() + # @default 6 + sid_bits_per_character: 6 + twig.config: + # Twig debugging: + # + # When debugging is enabled: + # - The markup of each Twig template is surrounded by HTML comments that + # contain theming information, such as template file name suggestions. + # - Note that this debugging markup will cause automated tests that directly + # check rendered HTML to fail. When running automated tests, 'debug' + # should be set to FALSE. + # - The dump() function can be used in Twig templates to output information + # about template variables. + # - Twig templates are automatically recompiled whenever the source code + # changes (see auto_reload below). + # + # For more information about debugging Twig templates, see + # https://www.drupal.org/node/1906392. + # + # Enabling Twig debugging is not recommended in production environments. + # @default false + debug: false + # Twig auto-reload: + # + # Automatically recompile Twig templates whenever the source code changes. + # If you don't provide a value for auto_reload, it will be determined + # based on the value of debug. + # + # Enabling auto-reload is not recommended in production environments. + # @default null + auto_reload: null + # Twig cache: + # + # By default, Twig templates will be compiled and stored in the filesystem + # to increase performance. Disabling the Twig cache will recompile the + # templates from source each time they are used. In most cases the + # auto_reload setting above should be enabled rather than disabling the + # Twig cache. + # + # Disabling the Twig cache is not recommended in production environments. + # @default true + cache: true + # File extensions: + # + # List of file extensions the Twig system is allowed to load via the + # twig.loader.filesystem service. Files with other extensions will not be + # loaded unless they are added here. For example, to allow a file named + # 'example.partial' to be loaded, add 'partial' to this list. To load files + # with no extension, add an empty string '' to the list. + # + # @default ['css', 'html', 'js', 'svg', 'twig'] + allowed_file_extensions: + - css + - html + - js + - svg + - twig + renderer.config: + # Renderer required cache contexts: + # + # The Renderer will automatically associate these cache contexts with every + # render array, hence varying every render array by these cache contexts. + # + # @default ['languages:language_interface', 'theme', 'user.permissions'] + required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions'] + # Renderer automatic placeholdering conditions: + # + # Drupal allows portions of the page to be automatically deferred when + # rendering to improve cache performance. That is especially helpful for + # cache contexts that vary widely, such as the active user. On some sites + # those may be different, however, such as sites with only a handful of + # users. If you know what the high-cardinality cache contexts are for your + # site, specify those here. If you're not sure, the defaults are fairly safe + # in general. + # + # For more information about rendering optimizations see + # https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing + auto_placeholder_conditions: + # Max-age at or below which caching is not considered worthwhile. + # + # Disable by setting to -1. + # + # @default 0 + max-age: 0 + # Cache contexts with a high cardinality. + # + # Disable by setting to []. + # + # @default ['session', 'user'] + contexts: ['session', 'user'] + # Tags with a high invalidation frequency. + # + # Disable by setting to []. + # + # @default [] + tags: [] + # Renderer cache debug: + # + # Allows cache debugging output for each rendered element. + # + # Enabling render cache debugging is not recommended in production + # environments. + # @default false + debug: false + # Cacheability debugging: + # + # Responses with cacheability metadata (CacheableResponseInterface instances) + # get X-Drupal-Cache-Tags, X-Drupal-Cache-Contexts and X-Drupal-Cache-Max-Age + # headers. + # + # For more information about debugging cacheable responses, see + # https://www.drupal.org/developing/api/8/response/cacheable-response-interface + # + # Enabling cacheability debugging is not recommended in production + # environments. + # @default false + http.response.debug_cacheability_headers: false + factory.keyvalue: {} + # Default key/value storage service to use. + # @default keyvalue.database + # default: keyvalue.database + # Collection-specific overrides. + # state: keyvalue.database + factory.keyvalue.expirable: {} + # Default key/value expirable storage service to use. + # @default keyvalue.database.expirable + # default: keyvalue.database.expirable + # Allowed protocols for URL generation. + filter_protocols: + - http + - https + - ftp + - news + - nntp + - tel + - telnet + - mailto + - irc + - ssh + - sftp + - webcal + - rtsp + + # Configure Cross-Site HTTP requests (CORS). + # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS + # for more information about the topic in general. + # Note: By default the configuration is disabled. + cors.config: + enabled: false + # Specify allowed headers, like 'x-allowed-header'. + allowedHeaders: [] + # Specify allowed request methods, specify ['*'] to allow all possible ones. + allowedMethods: [] + # Configure requests allowed from specific origins. Do not include trailing + # slashes with URLs. + allowedOrigins: ['*'] + # Configure requests allowed from origins, matching against regex patterns. + allowedOriginsPatterns: [] + # Sets the Access-Control-Expose-Headers header. + exposedHeaders: false + # Sets the Access-Control-Max-Age header. + maxAge: false + # Sets the Access-Control-Allow-Credentials header. + supportsCredentials: false + + queue.config: + # The maximum number of seconds to wait if a queue is temporarily suspended. + # This is not applicable when a queue is suspended but does not specify + # how long to wait before attempting to resume. + suspendMaximumWait: 30 diff --git a/templates/drupal10-govcms10/files/web/sites/default/default.settings.php b/templates/drupal10-govcms10/files/web/sites/default/default.settings.php new file mode 100644 index 000000000..8819d6431 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/sites/default/default.settings.php @@ -0,0 +1,883 @@ + 'databasename', + * 'username' => 'sql_username', + * 'password' => 'sql_password', + * 'host' => 'localhost', + * 'port' => '3306', + * 'driver' => 'mysql', + * 'prefix' => '', + * 'collation' => 'utf8mb4_general_ci', + * ]; + * @endcode + */ +$databases = []; + +/** + * Customizing database settings. + * + * Many of the values of the $databases array can be customized for your + * particular database system. Refer to the sample in the section above as a + * starting point. + * + * The "driver" property indicates what Drupal database driver the + * connection should use. This is usually the same as the name of the + * database type, such as mysql or sqlite, but not always. The other + * properties will vary depending on the driver. For SQLite, you must + * specify a database file name in a directory that is writable by the + * webserver. For most other drivers, you must specify a + * username, password, host, and database name. + * + * Drupal core implements drivers for mysql, pgsql, and sqlite. Other drivers + * can be provided by contributed or custom modules. To use a contributed or + * custom driver, the "namespace" property must be set to the namespace of the + * driver. The code in this namespace must be autoloadable prior to connecting + * to the database, and therefore, prior to when module root namespaces are + * added to the autoloader. To add the driver's namespace to the autoloader, + * set the "autoload" property to the PSR-4 base directory of the driver's + * namespace. This is optional for projects managed with Composer if the + * driver's namespace is in Composer's autoloader. + * + * For each database, you may optionally specify multiple "target" databases. + * A target database allows Drupal to try to send certain queries to a + * different database if it can but fall back to the default connection if not. + * That is useful for primary/replica replication, as Drupal may try to connect + * to a replica server when appropriate and if one is not available will simply + * fall back to the single primary server (The terms primary/replica are + * traditionally referred to as master/slave in database server documentation). + * + * The general format for the $databases array is as follows: + * @code + * $databases['default']['default'] = $info_array; + * $databases['default']['replica'][] = $info_array; + * $databases['default']['replica'][] = $info_array; + * $databases['extra']['default'] = $info_array; + * @endcode + * + * In the above example, $info_array is an array of settings described above. + * The first line sets a "default" database that has one primary database + * (the second level default). The second and third lines create an array + * of potential replica databases. Drupal will select one at random for a given + * request as needed. The fourth line creates a new database with a name of + * "extra". + * + * For MySQL, MariaDB or equivalent databases the 'isolation_level' option can + * be set. The recommended transaction isolation level for Drupal sites is + * 'READ COMMITTED'. The 'REPEATABLE READ' option is supported but can result + * in deadlocks, the other two options are 'READ UNCOMMITTED' and 'SERIALIZABLE'. + * They are available but not supported; use them at your own risk. For more + * info: + * https://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-isolation-levels.html + * + * On your settings.php, change the isolation level: + * @code + * $databases['default']['default']['init_commands'] = [ + * 'isolation_level' => 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED', + * ]; + * @endcode + * + * You can optionally set a prefix for all database table names by using the + * 'prefix' setting. If a prefix is specified, the table name will be prepended + * with its value. Be sure to use valid database characters only, usually + * alphanumeric and underscore. If no prefix is desired, do not set the 'prefix' + * key or set its value to an empty string ''. + * + * For example, to have all database table prefixed with 'main_', set: + * @code + * 'prefix' => 'main_', + * @endcode + * + * Advanced users can add or override initial commands to execute when + * connecting to the database server, as well as PDO connection settings. For + * example, to enable MySQL SELECT queries to exceed the max_join_size system + * variable, and to reduce the database connection timeout to 5 seconds: + * @code + * $databases['default']['default'] = [ + * 'init_commands' => [ + * 'big_selects' => 'SET SQL_BIG_SELECTS=1', + * ], + * 'pdo' => [ + * PDO::ATTR_TIMEOUT => 5, + * ], + * ]; + * @endcode + * + * WARNING: The above defaults are designed for database portability. Changing + * them may cause unexpected behavior, including potential data loss. See + * https://www.drupal.org/docs/8/api/database-api/database-configuration for + * more information on these defaults and the potential issues. + * + * More details can be found in the constructor methods for each driver: + * - \Drupal\mysql\Driver\Database\mysql\Connection::__construct() + * - \Drupal\pgsql\Driver\Database\pgsql\Connection::__construct() + * - \Drupal\sqlite\Driver\Database\sqlite\Connection::__construct() + * + * Sample Database configuration format for PostgreSQL (pgsql): + * @code + * $databases['default']['default'] = [ + * 'driver' => 'pgsql', + * 'database' => 'databasename', + * 'username' => 'sql_username', + * 'password' => 'sql_password', + * 'host' => 'localhost', + * 'prefix' => '', + * ]; + * @endcode + * + * Sample Database configuration format for SQLite (sqlite): + * @code + * $databases['default']['default'] = [ + * 'driver' => 'sqlite', + * 'database' => '/path/to/database_filename', + * ]; + * @endcode + * + * Sample Database configuration format for a driver in a contributed module: + * @code + * $databases['default']['default'] = [ + * 'driver' => 'my_driver', + * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver', + * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/', + * 'database' => 'databasename', + * 'username' => 'sql_username', + * 'password' => 'sql_password', + * 'host' => 'localhost', + * 'prefix' => '', + * ]; + * @endcode + * + * Sample Database configuration format for a driver that is extending another + * database driver. + * @code + * $databases['default']['default'] = [ + * 'driver' => 'my_driver', + * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver', + * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/', + * 'database' => 'databasename', + * 'username' => 'sql_username', + * 'password' => 'sql_password', + * 'host' => 'localhost', + * 'prefix' => '', + * 'dependencies' => [ + * 'parent_module' => [ + * 'namespace' => 'Drupal\parent_module', + * 'autoload' => 'core/modules/parent_module/src/', + * ], + * ], + * ]; + * @endcode + */ + +/** + * Location of the site configuration files. + * + * The $settings['config_sync_directory'] specifies the location of file system + * directory used for syncing configuration data. On install, the directory is + * created. This is used for configuration imports. + * + * The default location for this directory is inside a randomly-named + * directory in the public files path. The setting below allows you to set + * its location. + */ +# $settings['config_sync_directory'] = '/directory/outside/webroot'; + +/** + * Settings: + * + * $settings contains environment-specific configuration, such as the files + * directory and reverse proxy address, and temporary configuration, such as + * security overrides. + * + * @see \Drupal\Core\Site\Settings::get() + */ + +/** + * Salt for one-time login links, cancel links, form tokens, etc. + * + * This variable will be set to a random value by the installer. All one-time + * login links will be invalidated if the value is changed. Note that if your + * site is deployed on a cluster of web servers, you must ensure that this + * variable has the same value on each server. + * + * For enhanced security, you may set this variable to the contents of a file + * outside your document root, and vary the value across environments (like + * production and development); you should also ensure that this file is not + * stored with backups of your database. + * + * Example: + * @code + * $settings['hash_salt'] = file_get_contents('/home/example/salt.txt'); + * @endcode + */ +$settings['hash_salt'] = ''; + +/** + * Deployment identifier. + * + * Drupal's dependency injection container will be automatically invalidated and + * rebuilt when the Drupal core version changes. When updating contributed or + * custom code that changes the container, changing this identifier will also + * allow the container to be invalidated as soon as code is deployed. + */ +# $settings['deployment_identifier'] = \Drupal::VERSION; + +/** + * Access control for update.php script. + * + * If you are updating your Drupal installation using the update.php script but + * are not logged in using either an account with the "Administer software + * updates" permission or the site maintenance account (the account that was + * created during installation), you will need to modify the access check + * statement below. Change the FALSE to a TRUE to disable the access check. + * After finishing the upgrade, be sure to open this file again and change the + * TRUE back to a FALSE! + */ +$settings['update_free_access'] = FALSE; + +/** + * Fallback to HTTP for Update Manager and for fetching security advisories. + * + * If your site fails to connect to updates.drupal.org over HTTPS (either when + * fetching data on available updates, or when fetching the feed of critical + * security announcements), you may uncomment this setting and set it to TRUE to + * allow an insecure fallback to HTTP. Note that doing so will open your site up + * to a potential man-in-the-middle attack. You should instead attempt to + * resolve the issues before enabling this option. + * @see https://www.drupal.org/docs/system-requirements/php-requirements#openssl + * @see https://en.wikipedia.org/wiki/Man-in-the-middle_attack + * @see \Drupal\update\UpdateFetcher + * @see \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher + */ +# $settings['update_fetch_with_http_fallback'] = TRUE; + +/** + * External access proxy settings: + * + * If your site must access the Internet via a web proxy then you can enter the + * proxy settings here. Set the full URL of the proxy, including the port, in + * variables: + * - $settings['http_client_config']['proxy']['http']: The proxy URL for HTTP + * requests. + * - $settings['http_client_config']['proxy']['https']: The proxy URL for HTTPS + * requests. + * You can pass in the user name and password for basic authentication in the + * URLs in these settings. + * + * You can also define an array of host names that can be accessed directly, + * bypassing the proxy, in $settings['http_client_config']['proxy']['no']. + */ +# $settings['http_client_config']['proxy']['http'] = 'http://proxy_user:proxy_pass@example.com:8080'; +# $settings['http_client_config']['proxy']['https'] = 'http://proxy_user:proxy_pass@example.com:8080'; +# $settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost']; + +/** + * Reverse Proxy Configuration: + * + * Reverse proxy servers are often used to enhance the performance + * of heavily visited sites and may also provide other site caching, + * security, or encryption benefits. In an environment where Drupal + * is behind a reverse proxy, the real IP address of the client should + * be determined such that the correct client IP address is available + * to Drupal's logging, statistics, and access management systems. In + * the most simple scenario, the proxy server will add an + * X-Forwarded-For header to the request that contains the client IP + * address. However, HTTP headers are vulnerable to spoofing, where a + * malicious client could bypass restrictions by setting the + * X-Forwarded-For header directly. Therefore, Drupal's proxy + * configuration requires the IP addresses of all remote proxies to be + * specified in $settings['reverse_proxy_addresses'] to work correctly. + * + * Enable this setting to get Drupal to determine the client IP from the + * X-Forwarded-For header. If you are unsure about this setting, do not have a + * reverse proxy, or Drupal operates in a shared hosting environment, this + * setting should remain commented out. + * + * In order for this setting to be used you must specify every possible + * reverse proxy IP address in $settings['reverse_proxy_addresses']. + * If a complete list of reverse proxies is not available in your + * environment (for example, if you use a CDN) you may set the + * $_SERVER['REMOTE_ADDR'] variable directly in settings.php. + * Be aware, however, that it is likely that this would allow IP + * address spoofing unless more advanced precautions are taken. + */ +# $settings['reverse_proxy'] = TRUE; + +/** + * Reverse proxy addresses. + * + * Specify every reverse proxy IP address in your environment, as an array of + * IPv4/IPv6 addresses or subnets in CIDR notation. This setting is required if + * $settings['reverse_proxy'] is TRUE. + */ +# $settings['reverse_proxy_addresses'] = ['a.b.c.d', 'e.f.g.h/24', ...]; + +/** + * Reverse proxy trusted headers. + * + * Sets which headers to trust from your reverse proxy. + * + * Common values are: + * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR + * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST + * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT + * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO + * - \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * + * Note the default value of + * @code + * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * @endcode + * is not secure by default. The value should be set to only the specific + * headers the reverse proxy uses. For example: + * @code + * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO + * @endcode + * This would trust the following headers: + * - X_FORWARDED_FOR + * - X_FORWARDED_HOST + * - X_FORWARDED_PROTO + * - X_FORWARDED_PORT + * + * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR + * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST + * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT + * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO + * @see \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * @see \Symfony\Component\HttpFoundation\Request::setTrustedProxies + */ +# $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED; + + +/** + * Page caching: + * + * By default, Drupal sends a "Vary: Cookie" HTTP header for anonymous page + * views. This tells a HTTP proxy that it may return a page from its local + * cache without contacting the web server, if the user sends the same Cookie + * header as the user who originally requested the cached page. Without "Vary: + * Cookie", authenticated users would also be served the anonymous page from + * the cache. If the site has mostly anonymous users except a few known + * editors/administrators, the Vary header can be omitted. This allows for + * better caching in HTTP proxies (including reverse proxies), i.e. even if + * clients send different cookies, they still get content served from the cache. + * However, authenticated users should access the site directly (i.e. not use an + * HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid + * getting cached pages from the proxy. + */ +# $settings['omit_vary_cookie'] = TRUE; + + +/** + * Cache TTL for client error (4xx) responses. + * + * Items cached per-URL tend to result in a large number of cache items, and + * this can be problematic on 404 pages which by their nature are unbounded. A + * fixed TTL can be set for these items, defaulting to one hour, so that cache + * backends which do not support LRU can purge older entries. To disable caching + * of client error responses set the value to 0. Currently applies only to + * page_cache module. + */ +# $settings['cache_ttl_4xx'] = 3600; + +/** + * Expiration of cached forms. + * + * Drupal's Form API stores details of forms in a cache and these entries are + * kept for at least 6 hours by default. Expired entries are cleared by cron. + * + * @see \Drupal\Core\Form\FormCache::setCache() + */ +# $settings['form_cache_expiration'] = 21600; + +/** + * Class Loader. + * + * If the APCu extension is detected, the classloader will be optimized to use + * it. Set to FALSE to disable this. + * + * @see https://getcomposer.org/doc/articles/autoloader-optimization.md + */ +# $settings['class_loader_auto_detect'] = FALSE; + +/** + * Authorized file system operations: + * + * The Update Manager module included with Drupal provides a mechanism for + * site administrators to securely install missing updates for the site + * directly through the web user interface. On securely-configured servers, + * the Update manager will require the administrator to provide SSH or FTP + * credentials before allowing the installation to proceed; this allows the + * site to update the new files as the user who owns all the Drupal files, + * instead of as the user the webserver is running as. On servers where the + * webserver user is itself the owner of the Drupal files, the administrator + * will not be prompted for SSH or FTP credentials (note that these server + * setups are common on shared hosting, but are inherently insecure). + * + * Some sites might wish to disable the above functionality, and only update + * the code directly via SSH or FTP themselves. This setting completely + * disables all functionality related to these authorized file operations. + * + * @see https://www.drupal.org/node/244924 + * + * Remove the leading hash signs to disable. + */ +# $settings['allow_authorize_operations'] = FALSE; + +/** + * Default mode for directories and files written by Drupal. + * + * Value should be in PHP Octal Notation, with leading zero. + */ +# $settings['file_chmod_directory'] = 0775; +# $settings['file_chmod_file'] = 0664; + +/** + * Optimized assets path: + * + * A local file system path where optimized assets will be stored. This directory + * must exist and be writable by Drupal. This directory must be relative to + * the Drupal installation directory and be accessible over the web. + */ +# $settings['file_assets_path'] = 'sites/default/files'; + +/** + * Public file base URL: + * + * An alternative base URL to be used for serving public files. This must + * include any leading directory path. + * + * A different value from the domain used by Drupal to be used for accessing + * public files. This can be used for a simple CDN integration, or to improve + * security by serving user-uploaded files from a different domain or subdomain + * pointing to the same server. Do not include a trailing slash. + */ +# $settings['file_public_base_url'] = 'http://downloads.example.com/files'; + +/** + * Public file path: + * + * A local file system path where public files will be stored. This directory + * must exist and be writable by Drupal. This directory must be relative to + * the Drupal installation directory and be accessible over the web. + */ +# $settings['file_public_path'] = 'sites/default/files'; + +/** + * Additional public file schemes: + * + * Public schemes are URI schemes that allow download access to all users for + * all files within that scheme. + * + * The "public" scheme is always public, and the "private" scheme is always + * private, but other schemes, such as "https", "s3", "example", or others, + * can be either public or private depending on the site. By default, they're + * private, and access to individual files is controlled via + * hook_file_download(). + * + * Typically, if a scheme should be public, a module makes it public by + * implementing hook_file_download(), and granting access to all users for all + * files. This could be either the same module that provides the stream wrapper + * for the scheme, or a different module that decides to make the scheme + * public. However, in cases where a site needs to make a scheme public, but + * is unable to add code in a module to do so, the scheme may be added to this + * variable, the result of which is that system_file_download() grants public + * access to all files within that scheme. + */ +# $settings['file_additional_public_schemes'] = ['example']; + +/** + * File schemes whose paths should not be normalized: + * + * Normally, Drupal normalizes '/./' and '/../' segments in file URIs in order + * to prevent unintended file access. For example, 'private://css/../image.png' + * is normalized to 'private://image.png' before checking access to the file. + * + * On Windows, Drupal also replaces '\' with '/' in URIs for the local + * filesystem. + * + * If file URIs with one or more scheme should not be normalized like this, then + * list the schemes here. For example, if 'porcelain://china/./plate.png' should + * not be normalized to 'porcelain://china/plate.png', then add 'porcelain' to + * this array. In this case, make sure that the module providing the 'porcelain' + * scheme does not allow unintended file access when using '/../' to move up the + * directory tree. + */ +# $settings['file_sa_core_2023_005_schemes'] = ['porcelain']; + +/** + * Configuration for phpinfo() admin status report. + * + * Drupal's admin UI includes a report at admin/reports/status/php which shows + * the output of phpinfo(). The full output can contain sensitive information + * so by default Drupal removes some sections. + * + * This behavior can be configured by setting this variable to a different + * value corresponding to the flags parameter of phpinfo(). + * + * If you need to expose more information in the report - for example to debug a + * problem - consider doing so temporarily. + * + * @see https://www.php.net/manual/function.phpinfo.php + */ +# $settings['sa_core_2023_004_phpinfo_flags'] = ~ (INFO_VARIABLES | INFO_ENVIRONMENT); + +/** + * Private file path: + * + * A local file system path where private files will be stored. This directory + * must be absolute, outside of the Drupal installation directory and not + * accessible over the web. + * + * Note: Caches need to be cleared when this value is changed to make the + * private:// stream wrapper available to the system. + * + * See https://www.drupal.org/documentation/modules/file for more information + * about securing private files. + */ +# $settings['file_private_path'] = ''; + +/** + * Temporary file path: + * + * A local file system path where temporary files will be stored. This directory + * must be absolute, outside of the Drupal installation directory and not + * accessible over the web. + * + * If this is not set, the default for the operating system will be used. + * + * @see \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory() + */ +# $settings['file_temp_path'] = '/tmp'; + +/** + * Session write interval: + * + * Set the minimum interval between each session write to database. + * For performance reasons it defaults to 180. + */ +# $settings['session_write_interval'] = 180; + +/** + * String overrides: + * + * To override specific strings on your site with or without enabling the Locale + * module, add an entry to this list. This functionality allows you to change + * a small number of your site's default English language interface strings. + * + * Remove the leading hash signs to enable. + * + * The "en" part of the variable name, is dynamic and can be any langcode of + * any added language. (eg locale_custom_strings_de for german). + */ +# $settings['locale_custom_strings_en'][''] = [ +# 'Home' => 'Front page', +# '@count min' => '@count minutes', +# ]; + +/** + * A custom theme for the offline page: + * + * This applies when the site is explicitly set to maintenance mode through the + * administration page or when the database is inactive due to an error. + * The template file should also be copied into the theme. It is located inside + * 'core/modules/system/templates/maintenance-page.html.twig'. + * + * Note: This setting does not apply to installation and update pages. + */ +# $settings['maintenance_theme'] = 'claro'; + +/** + * PHP settings: + * + * To see what PHP settings are possible, including whether they can be set at + * runtime (by using ini_set()), read the PHP documentation: + * http://php.net/manual/ini.list.php + * See \Drupal\Core\DrupalKernel::bootEnvironment() for required runtime + * settings and the .htaccess file for non-runtime settings. + * Settings defined there should not be duplicated here so as to avoid conflict + * issues. + */ + +/** + * If you encounter a situation where users post a large amount of text, and + * the result is stripped out upon viewing but can still be edited, Drupal's + * output filter may not have sufficient memory to process it. If you + * experience this issue, you may wish to uncomment the following two lines + * and increase the limits of these variables. For more information, see + * http://php.net/manual/pcre.configuration.php. + */ +# ini_set('pcre.backtrack_limit', 200000); +# ini_set('pcre.recursion_limit', 200000); + +/** + * Configuration overrides. + * + * To globally override specific configuration values for this site, + * set them here. You usually don't need to use this feature. This is + * useful in a configuration file for a vhost or directory, rather than + * the default settings.php. + * + * Note that any values you provide in these variable overrides will not be + * viewable from the Drupal administration interface. The administration + * interface displays the values stored in configuration so that you can stage + * changes to other environments that don't have the overrides. + * + * There are particular configuration values that are risky to override. For + * example, overriding the list of installed modules in 'core.extension' is not + * supported as module install or uninstall has not occurred. Other examples + * include field storage configuration, because it has effects on database + * structure, and 'core.menu.static_menu_link_overrides' since this is cached in + * a way that is not config override aware. Also, note that changing + * configuration values in settings.php will not fire any of the configuration + * change events. + */ +# $config['system.site']['name'] = 'My Drupal site'; +# $config['user.settings']['anonymous'] = 'Visitor'; + +/** + * Load services definition file. + */ +$settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml'; + +/** + * Override the default service container class. + * + * This is useful for example to trace the service container for performance + * tracking purposes, for testing a service container with an error condition or + * to test a service container that throws an exception. + */ +# $settings['container_base_class'] = '\Drupal\Core\DependencyInjection\Container'; + +/** + * Override the default yaml parser class. + * + * Provide a fully qualified class name here if you would like to provide an + * alternate implementation YAML parser. The class must implement the + * \Drupal\Component\Serialization\SerializationInterface interface. + */ +# $settings['yaml_parser_class'] = NULL; + +/** + * Trusted host configuration. + * + * Drupal core can use the Symfony trusted host mechanism to prevent HTTP Host + * header spoofing. + * + * To enable the trusted host mechanism, you enable your allowable hosts + * in $settings['trusted_host_patterns']. This should be an array of regular + * expression patterns, without delimiters, representing the hosts you would + * like to allow. + * + * For example: + * @code + * $settings['trusted_host_patterns'] = [ + * '^www\.example\.com$', + * ]; + * @endcode + * will allow the site to only run from www.example.com. + * + * If you are running multisite, or if you are running your site from + * different domain names (eg, you don't redirect http://www.example.com to + * http://example.com), you should specify all of the host patterns that are + * allowed by your site. + * + * For example: + * @code + * $settings['trusted_host_patterns'] = [ + * '^example\.com$', + * '^.+\.example\.com$', + * '^example\.org$', + * '^.+\.example\.org$', + * ]; + * @endcode + * will allow the site to run off of all variants of example.com and + * example.org, with all subdomains included. + * + * @see https://www.drupal.org/docs/installing-drupal/trusted-host-settings + */ +# $settings['trusted_host_patterns'] = []; + +/** + * The default list of directories that will be ignored by Drupal's file API. + * + * By default ignore node_modules and bower_components folders to avoid issues + * with common frontend tools and recursive scanning of directories looking for + * extensions. + * + * @see \Drupal\Core\File\FileSystemInterface::scanDirectory() + * @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory() + */ +$settings['file_scan_ignore_directories'] = [ + 'node_modules', + 'bower_components', +]; + +/** + * The default number of entities to update in a batch process. + * + * This is used by update and post-update functions that need to go through and + * change all the entities on a site, so it is useful to increase this number + * if your hosting configuration (i.e. RAM allocation, CPU speed) allows for a + * larger number of entities to be processed in a single batch run. + */ +$settings['entity_update_batch_size'] = 50; + +/** + * Entity update backup. + * + * This is used to inform the entity storage handler that the backup tables as + * well as the original entity type and field storage definitions should be + * retained after a successful entity update process. + */ +$settings['entity_update_backup'] = TRUE; + +/** + * Node migration type. + * + * This is used to force the migration system to use the classic node migrations + * instead of the default complete node migrations. The migration system will + * use the classic node migration only if there are existing migrate_map tables + * for the classic node migrations and they contain data. These tables may not + * exist if you are developing custom migrations and do not want to use the + * complete node migrations. Set this to TRUE to force the use of the classic + * node migrations. + */ +$settings['migrate_node_migrate_type_classic'] = FALSE; + +/** + * The default settings for migration sources. + * + * These settings are used as the default settings on the Credential form at + * /upgrade/credentials. + * + * - migrate_source_version - The version of the source database. This can be + * '6' or '7'. Defaults to '7'. + * - migrate_source_connection - The key in the $databases array for the source + * site. + * - migrate_file_public_path - The location of the source Drupal 6 or Drupal 7 + * public files. This can be a local file directory containing the source + * Drupal 6 or Drupal 7 site (e.g /var/www/docroot), or the site address + * (e.g http://example.com). + * - migrate_file_private_path - The location of the source Drupal 7 private + * files. This can be a local file directory containing the source Drupal 7 + * site (e.g /var/www/docroot), or empty to use the same value as Public + * files directory. + * + * Sample configuration for a drupal 6 source site with the source files in a + * local directory. + * + * @code + * $settings['migrate_source_version'] = '6'; + * $settings['migrate_source_connection'] = 'migrate'; + * $settings['migrate_file_public_path'] = '/var/www/drupal6'; + * @endcode + * + * Sample configuration for a drupal 7 source site with public source files on + * the source site and the private files in a local directory. + * + * @code + * $settings['migrate_source_version'] = '7'; + * $settings['migrate_source_connection'] = 'migrate'; + * $settings['migrate_file_public_path'] = 'https://drupal7.com'; + * $settings['migrate_file_private_path'] = '/var/www/drupal7'; + * @endcode + */ +# $settings['migrate_source_connection'] = ''; +# $settings['migrate_source_version'] = ''; +# $settings['migrate_file_public_path'] = ''; +# $settings['migrate_file_private_path'] = ''; + +/** + * Load local development override configuration, if available. + * + * Create a settings.local.php file to override variables on secondary (staging, + * development, etc.) installations of this site. + * + * Typical uses of settings.local.php include: + * - Disabling caching. + * - Disabling JavaScript/CSS compression. + * - Rerouting outgoing emails. + * + * Keep this code block at the end of this file to take full effect. + */ +# +# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { +# include $app_root . '/' . $site_path . '/settings.local.php'; +# } diff --git a/templates/drupal10-govcms10/files/web/sites/default/settings.php b/templates/drupal10-govcms10/files/web/sites/default/settings.php new file mode 100755 index 000000000..e7e66abf8 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/sites/default/settings.php @@ -0,0 +1,38 @@ +hasRelationship('database')) { + $creds = $platformsh->credentials('database'); + $databases['default']['default'] = [ + 'driver' => $creds['scheme'], + 'database' => $creds['path'], + 'username' => $creds['username'], + 'password' => $creds['password'], + 'host' => $creds['host'], + 'port' => $creds['port'], + 'pdo' => [PDO::MYSQL_ATTR_COMPRESS => !empty($creds['query']['compression'])], + 'init_commands' => [ + 'isolation_level' => 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED', + ], + ]; +} + +// Enable verbose error messages on development branches, but not on the production branch. +// You may add more debug-centric settings here if desired to have them automatically enable +// on development but not production. +if (isset($platformsh->branch)) { + // Production type environment. + if ($platformsh->onProduction() || $platformsh->onDedicated()) { + $config['system.logging']['error_level'] = 'hide'; + } // Development type environment. + else { + $config['system.logging']['error_level'] = 'verbose'; + } +} + +// Enable Redis caching. +if ($platformsh->hasRelationship('redis') && !InstallerKernel::installationAttempted() && extension_loaded('redis') && class_exists('Drupal\redis\ClientFactory')) { + $redis = $platformsh->credentials('redis'); + + // Set Redis as the default backend for any cache bin not otherwise specified. + $settings['cache']['default'] = 'cache.backend.redis'; + $settings['redis.connection']['host'] = $redis['host']; + $settings['redis.connection']['port'] = $redis['port']; + + // Apply changes to the container configuration to better leverage Redis. + // This includes using Redis for the lock and flood control systems, as well + // as the cache tag checksum. Alternatively, copy the contents of that file + // to your project-specific services.yml file, modify as appropriate, and + // remove this line. + $settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml'; + + // Allow the services to work before the Redis module itself is enabled. + $settings['container_yamls'][] = 'modules/contrib/redis/redis.services.yml'; + + // Manually add the classloader path, this is required for the container cache bin definition below + // and allows to use it without the redis module being enabled. + $class_loader->addPsr4('Drupal\\redis\\', 'modules/contrib/redis/src'); + + // Use redis for container cache. + // The container cache is used to load the container definition itself, and + // thus any configuration stored in the container itself is not available + // yet. These lines force the container cache to use Redis rather than the + // default SQL cache. + $settings['bootstrap_container_definition'] = [ + 'parameters' => [], + 'services' => [ + 'redis.factory' => [ + 'class' => 'Drupal\redis\ClientFactory', + ], + 'cache.backend.redis' => [ + 'class' => 'Drupal\redis\Cache\CacheBackendFactory', + 'arguments' => ['@redis.factory', '@cache_tags_provider.container', '@serialization.phpserialize'], + ], + 'cache.container' => [ + 'class' => '\Drupal\redis\Cache\PhpRedis', + 'factory' => ['@cache.backend.redis', 'get'], + 'arguments' => ['container'], + ], + 'cache_tags_provider.container' => [ + 'class' => 'Drupal\redis\Cache\RedisCacheTagsChecksum', + 'arguments' => ['@redis.factory'], + ], + 'serialization.phpserialize' => [ + 'class' => 'Drupal\Component\Serialization\PhpSerialize', + ], + ], + ]; +} + +if ($platformsh->inRuntime()) { + // Configure private and temporary file paths. + if (!isset($settings['file_private_path'])) { + $settings['file_private_path'] = $platformsh->appDir . '/private'; + } + if (!isset($settings['file_temp_path'])) { + $settings['file_temp_path'] = $platformsh->appDir . '/tmp'; + } + +// Configure the default PhpStorage and Twig template cache directories. + if (!isset($settings['php_storage']['default'])) { + $settings['php_storage']['default']['directory'] = $settings['file_private_path']; + } + if (!isset($settings['php_storage']['twig'])) { + $settings['php_storage']['twig']['directory'] = $settings['file_private_path']; + } + + // Set the project-specific entropy value, used for generating one-time + // keys and such. + $settings['hash_salt'] = empty($settings['hash_salt']) ? $platformsh->projectEntropy : $settings['hash_salt']; + + // Set the deployment identifier, which is used by some Drupal cache systems. + $settings['deployment_identifier'] = $settings['deployment_identifier'] ?? $platformsh->treeId; +} + +// The 'trusted_hosts_pattern' setting allows an admin to restrict the Host header values +// that are considered trusted. If an attacker sends a request with a custom-crafted Host +// header then it can be an injection vector, depending on how the Host header is used. +// However, Platform.sh already replaces the Host header with the route that was used to reach +// Platform.sh, so it is guaranteed to be safe. The following line explicitly allows all +// Host headers, as the only possible Host header is already guaranteed safe. +$settings['trusted_host_patterns'] = ['.*']; + +// Import variables prefixed with 'drupalsettings:' into $settings +// and 'drupalconfig:' into $config. +foreach ($platformsh->variables() as $name => $value) { + $parts = explode(':', $name); + list($prefix, $key) = array_pad($parts, 3, null); + switch ($prefix) { + // Variables that begin with `drupalsettings` or `drupal` get mapped + // to the $settings array verbatim, even if the value is an array. + // For example, a variable named drupalsettings:example-setting' with + // value 'foo' becomes $settings['example-setting'] = 'foo'; + case 'drupalsettings': + case 'drupal': + $settings[$key] = $value; + break; + // Variables that begin with `drupalconfig` get mapped to the $config + // array. Deeply nested variable names, with colon delimiters, + // get mapped to deeply nested array elements. Array values + // get added to the end just like a scalar. Variables without + // both a config object name and property are skipped. + // Example: Variable `drupalconfig:conf_file:prop` with value `foo` becomes + // $config['conf_file']['prop'] = 'foo'; + // Example: Variable `drupalconfig:conf_file:prop:subprop` with value `foo` becomes + // $config['conf_file']['prop']['subprop'] = 'foo'; + // Example: Variable `drupalconfig:conf_file:prop:subprop` with value ['foo' => 'bar'] becomes + // $config['conf_file']['prop']['subprop']['foo'] = 'bar'; + // Example: Variable `drupalconfig:prop` is ignored. + case 'drupalconfig': + if (count($parts) > 2) { + $temp = &$config[$key]; + foreach (array_slice($parts, 2) as $n) { + $prev = &$temp; + $temp = &$temp[$n]; + } + $prev[$n] = $value; + } + break; + } +} \ No newline at end of file diff --git a/templates/drupal10-govcms10/files/web/sites/development.services.yml b/templates/drupal10-govcms10/files/web/sites/development.services.yml new file mode 100644 index 000000000..d2857c66f --- /dev/null +++ b/templates/drupal10-govcms10/files/web/sites/development.services.yml @@ -0,0 +1,9 @@ +# Local development services. +# +# To activate this feature, follow the instructions at the top of the +# 'example.settings.local.php' file, which sits next to this file. +parameters: + http.response.debug_cacheability_headers: true +services: + cache.backend.null: + class: Drupal\Core\Cache\NullBackendFactory diff --git a/templates/drupal10-govcms10/files/web/sites/example.settings.local.php b/templates/drupal10-govcms10/files/web/sites/example.settings.local.php new file mode 100644 index 000000000..bfe061d05 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/sites/example.settings.local.php @@ -0,0 +1,151 @@ +..' => 'directory'. As an + * example, to map https://www.drupal.org:8080/my-site/test to the configuration + * directory sites/example.com, the array should be defined as: + * @code + * $sites = [ + * '8080.www.drupal.org.my-site.test' => 'example.com', + * ]; + * @endcode + * The URL, https://www.drupal.org:8080/my-site/test/, could be a symbolic link + * or an Apache Alias directive that points to the Drupal root containing + * index.php. An alias could also be created for a subdomain. See the + * @link https://www.drupal.org/documentation/install online Drupal installation guide @endlink + * for more information on setting up domains, subdomains, and subdirectories. + * + * The following examples look for a site configuration in sites/example.com: + * @code + * URL: http://dev.drupal.org + * $sites['dev.drupal.org'] = 'example.com'; + * + * URL: http://localhost/example + * $sites['localhost.example'] = 'example.com'; + * + * URL: http://localhost:8080/example + * $sites['8080.localhost.example'] = 'example.com'; + * + * URL: https://www.drupal.org:8080/my-site/test/ + * $sites['8080.www.drupal.org.my-site.test'] = 'example.com'; + * @endcode + * + * @see default.settings.php + * @see \Drupal\Core\DrupalKernel::getSitePath() + * @see https://www.drupal.org/docs/getting-started/multisite-drupal + */ diff --git a/templates/drupal10-govcms10/files/web/themes/README.txt b/templates/drupal10-govcms10/files/web/themes/README.txt new file mode 100644 index 000000000..1e00ead6d --- /dev/null +++ b/templates/drupal10-govcms10/files/web/themes/README.txt @@ -0,0 +1,31 @@ +Themes allow you to change the look and feel of your Drupal site. You can use +themes contributed by others or create your own. + +WHAT TO PLACE IN THIS DIRECTORY? +-------------------------------- + +Placing downloaded and custom themes in this directory separates downloaded and +custom themes from Drupal core's themes. This allows Drupal core to be updated +without overwriting these files. + +DOWNLOAD ADDITIONAL THEMES +-------------------------- + +Contributed themes from the Drupal community may be downloaded at +https://www.drupal.org/project/project_theme. + +MULTISITE CONFIGURATION +----------------------- + +In multisite configurations, themes found in this directory are available to +all sites. You may also put themes in the sites/all/themes directory, and the +versions in sites/all/themes will take precedence over versions of the same +themes that are here. Alternatively, the sites/your_site_name/themes directory +pattern may be used to restrict themes to a specific site instance. + +MORE INFORMATION +----------------- + +Refer to the "Appearance" section of the README.md in the Drupal root directory +for further information on customizing the appearance of Drupal with custom +themes. diff --git a/templates/drupal10-govcms10/files/web/update.php b/templates/drupal10-govcms10/files/web/update.php new file mode 100644 index 000000000..b65649cb8 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/update.php @@ -0,0 +1,30 @@ +handle($request); +$response->send(); + +$kernel->terminate($request, $response); diff --git a/templates/drupal10-govcms10/files/web/web.config b/templates/drupal10-govcms10/files/web/web.config new file mode 100644 index 000000000..b769e45e3 --- /dev/null +++ b/templates/drupal10-govcms10/files/web/web.config @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/drupal10-govcms10/info/info.yaml b/templates/drupal10-govcms10/info/info.yaml new file mode 100644 index 000000000..7685822b4 --- /dev/null +++ b/templates/drupal10-govcms10/info/info.yaml @@ -0,0 +1,87 @@ +title: "Deploy the GovCMS Drupal Distribution on Platform.sh" +id: platformsh/drupal10-govcms10 +profile: GovCMS 10 +name: GovCMS 10 +default_branch: master +tags: + - PHP + - Drupal + - CMS + - Symfony +related_blog_tags: + - Drupal +license: + type: "GPL-2.0" + location: "LICENSE.txt" +features: + - PHP 8.3 + - MariaDB 10.11 + - Redis 7.2 + - Drush included + - Automatic TLS certificates + - Composer-based build +# Use Markdown for links and formatting. They will be converted to HTML automatically when the .platform.template.yaml file is generated. +description: + - This template builds the Australian government's GovCMS Drupal 10 distribution using the [Drupal Composer project](https://github.com/drupal-composer/drupal-project) for better flexibility. It is pre-configured to use MariaDB and Redis for caching. The Drupal installer will skip asking for database credentials as they are already provided. + - GovCMS is a Drupal distribution built for the Australian government, and includes configuration optimized for managing government websites. +logo: + link: "https://www.drupal.org/" + images: + - "data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390.52 390.5'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23222e5b;stroke:%23e72483;stroke-miterlimit:10;stroke-width:10px;%7D.cls-2%7Bfill:%23fff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M388.26,103.3v288h-288A92.65,92.65,0,0,1,7.74,298.71v-288h288A92.65,92.65,0,0,1,388.26,103.3Z' transform='translate(-2.74 -5.75)'/%3E%3Cpath class='cls-2' d='M120,199.28V183.19h41.58v38.05q-6.06,5.87-17.56,10.33a63.87,63.87,0,0,1-23.3,4.46q-15,0-26.13-6.28a40,40,0,0,1-16.74-18,58,58,0,0,1-5.61-25.44A55,55,0,0,1,78.5,159.8,42.14,42.14,0,0,1,96.81,142q9.18-4.75,22.87-4.76,17.79,0,27.79,7.46t12.87,20.63l-19.16,3.58a20.29,20.29,0,0,0-7.59-11.11q-5.57-4.06-13.91-4.07-12.65,0-20.1,8t-7.46,23.79q0,17,7.55,25.51t19.81,8.5a33.2,33.2,0,0,0,12.16-2.38,41.72,41.72,0,0,0,10.45-5.77V199.28Z' transform='translate(-2.74 -5.75)'/%3E%3Cpath class='cls-2' d='M175,198.83a37.52,37.52,0,0,1,4.49-17.66,30.87,30.87,0,0,1,12.74-13,37.79,37.79,0,0,1,18.41-4.5q15.71,0,25.74,10.2t10,25.77q0,15.7-10.13,26T210.77,236a40.18,40.18,0,0,1-18.15-4.3,29.56,29.56,0,0,1-13.13-12.61Q175,210.75,175,198.83Zm18.76,1q0,10.29,4.89,15.76a16,16,0,0,0,24.08,0q4.85-5.48,4.85-15.9,0-10.15-4.85-15.63a16,16,0,0,0-24.08,0Q193.76,189.52,193.76,199.81Z' transform='translate(-2.74 -5.75)'/%3E%3Cpath class='cls-2' d='M279.78,234.4l-27.89-69.19h19.22l13,35.31,3.78,11.8q1.5-4.5,1.89-5.93c.61-2,1.26-3.91,1.95-5.87l13.17-35.31h18.83l-27.5,69.19Z' transform='translate(-2.74 -5.75)'/%3E%3Cpath class='cls-2' d='M135.94,315.46l11.27,2.84q-3.56,13.88-12.75,21.16T112,346.75q-13.75,0-22.38-5.6a35,35,0,0,1-13.12-16.23A57.88,57.88,0,0,1,72,302.11q0-13.31,5.08-23.19a34.76,34.76,0,0,1,14.46-15,42.12,42.12,0,0,1,20.63-5.14q12.78,0,21.48,6.5t12.13,18.29l-11.08,2.61q-3-9.28-8.6-13.52t-14.16-4.24q-9.81,0-16.4,4.7a24.85,24.85,0,0,0-9.26,12.63,50.82,50.82,0,0,0-2.67,16.34A52.1,52.1,0,0,0,86.74,321a23.58,23.58,0,0,0,9.84,12.11,27.6,27.6,0,0,0,14.46,4,24.2,24.2,0,0,0,16-5.46Q133.62,326.21,135.94,315.46Z' transform='translate(-2.74 -5.75)'/%3E%3Cpath class='cls-2' d='M160.73,345.3V260.19h17l20.15,60.26q2.78,8.42,4.06,12.6,1.46-4.65,4.53-13.64l20.37-59.22h15.15V345.3H231.09V274.07L206.36,345.3H196.2l-24.61-72.45V345.3Z' transform='translate(-2.74 -5.75)'/%3E%3Cpath class='cls-2' d='M256.28,318l10.63-.92a23.36,23.36,0,0,0,3.51,10.47,19.14,19.14,0,0,0,8.56,6.62A32.3,32.3,0,0,0,292,336.65a31.23,31.23,0,0,0,11.38-1.92,15.79,15.79,0,0,0,7.34-5.25,12.19,12.19,0,0,0,2.41-7.29,11,11,0,0,0-2.32-7q-2.33-3-7.66-5A150.87,150.87,0,0,0,288,306q-11.73-2.81-16.43-5.31a23.08,23.08,0,0,1-9.09-7.92,19.44,19.44,0,0,1-3-10.59,21.61,21.61,0,0,1,3.66-12.05,22.73,22.73,0,0,1,10.68-8.51,40.62,40.62,0,0,1,15.62-2.9,42.69,42.69,0,0,1,16.69,3.05,24.08,24.08,0,0,1,11.12,9,25.76,25.76,0,0,1,4.17,13.41l-10.79.81q-.87-8.07-5.89-12.19T290,268.67q-10.21,0-14.89,3.74a11.25,11.25,0,0,0-4.67,9A9.68,9.68,0,0,0,273.7,289q3.26,3,17,6.06t18.84,5.43q7.43,3.43,11,8.68a21.15,21.15,0,0,1,3.54,12.1,23.15,23.15,0,0,1-3.89,12.8A25.63,25.63,0,0,1,309,343.41a39,39,0,0,1-16.4,3.34q-11.56,0-19.36-3.37A27.05,27.05,0,0,1,261,333.25,28.79,28.79,0,0,1,256.28,318Z' transform='translate(-2.74 -5.75)'/%3E%3Cpolygon class='cls-2' points='186.28 60.68 162.91 53.52 175.09 74.71 154.92 88.53 179.08 92.22 177.31 116.6 195.26 100.01 213.22 116.6 211.44 92.22 235.6 88.53 215.43 74.71 227.62 53.52 204.24 60.68 195.26 37.94 186.28 60.68'/%3E%3C/svg%3E" +sections: + "create-project": "composer create-project platformsh/govcms10 -s dev" + metrics: false + blackfire: true + postinstall: "templates/drupal10-govcms10/info/post_install.md" + local: + - "common/readme/drupal/local_ddev.md" + resources: + - "[GovCMS](https://www.govcms.gov.au/)" + - "[Drupal](https://www.drupal.org/)" + - "[Drupal 10 on Platform.sh](https://docs.platform.sh/guides/drupal/deploy.html)" + - "[Platform.sh PHP documentation](https://docs.platform.sh/languages/php.html)" + migration: + mounts: + - "web/sites/default/files" + - "private" + files: + "web/sites/default/settings.platformsh.php": + - "**Added:**

" + - "Contains Platform.sh-specific configuration, namely setting up the database connection to the MariaDB service and caching via Redis." + "config/sync/.gitkeep": + - "**Added**" + "web/sites/default/settings.php": + - "**Updated:**

" + - "The Drupal settings file has been updated to import and use `web/sites/default/settings.platformsh.php`." + ".environment": + - "**Added:**

" + - file: "common/readme/file_descriptions/.environment.md" + - "Here, the Composer config and `PATH` are updated to allow executable app dependencies from Composer to be run from the path (i.e. `drush`)." + ".blackfire.yml": + - "**Added:**

" + - file: "common/readme/file_descriptions/.blackfire.yml.md" + ".gitignore": + - "**Added:**

" + - "A `.gitignore` file is not included in the upstream, so one has been added." + ".platform.app.yaml": + - "**Added:**

" + - file: "common/readme/file_descriptions/.platform.app.yaml.md" + - "This template uses Composer 2 to install dependencies using the default `composer` [build flavor](https://docs.platform.sh/languages/php.html#build-flavor) prior to the `build` hook." + - "Drush tasks are run during the `deploy` hook, and referenced again during the defined `cron` job." + "drush/platformsh_generate_drush_yml.php": + - "**Added:**

" + - "This file has been included to generate the drush yaml configuration on every deployment." + "php.ini": + - "**Added:**

" + - file: "common/readme/drupal/php.ini.md" + ".platform/services.yaml": + - "**Added:**

" + - file: "common/readme/file_descriptions/.platform.services.yaml.md" + - "In this template, MariaDB and Redis have been configured." + ".platform/routes.yaml": + - "**Added:**

" + - file: "common/readme/file_descriptions/.platform.routes.yaml.md" + troubleshoot: + - file: "common/readme/troubleshoot_ssh.md" + - file: "common/readme/drupal/troubleshoot_cache.md" + - file: "common/readme/drupal/troubleshoot_hashsalt.md" diff --git a/templates/drupal10-govcms10/info/post_install.md b/templates/drupal10-govcms10/info/post_install.md new file mode 100644 index 000000000..795b018e1 --- /dev/null +++ b/templates/drupal10-govcms10/info/post_install.md @@ -0,0 +1,3 @@ +### Post-install + +Run through the Drupal installer as normal. You will not be asked for database credentials as those are already provided. diff --git a/templates/drupal10-govcms10/platformsh.wizard.yaml b/templates/drupal10-govcms10/platformsh.wizard.yaml new file mode 100644 index 000000000..5418e734a --- /dev/null +++ b/templates/drupal10-govcms10/platformsh.wizard.yaml @@ -0,0 +1,89 @@ +steps: + - id: "understanding_platformsh" + label: "Preparing for development" + title: "Preparing for development on Platform.sh" + required: true + bodyText: "

Congrats! We’ve started the first deployment to production for you.

\n

Once complete, select your default environment to see your production URL. Feel free to visit your website to complete the GovCMS installation steps.

\n

Git-driven development

\n

Platform.sh supports Git-driven development by design. Changes happen right in your code.  When SSH’ing into your website, all files are read-only by default.

\n

Mark the directories that you want to edit as write access. (See mounts documentation).

" + copyCode: [] + - id: "download_cli" + label: "Download the CLI" + title: "Download the Platform.sh CLI" + required: false + bodyText: "

To install the CLI, use the command for either macOS or Windows as shown.

\n

For more info about our CLI check out our documentation or take a look at our CLI source code.

" + copyCode: + - label: "macOS and Linux Installer (using Homebrew)" + code: + - "brew install platformsh/tap/platformsh-cli" + - label: "Windows Installer (using Scoop)" + code: + - "scoop bucket add platformsh https://github.com/platformsh/homebrew-tap.git" + - "scoop install platform" + - id: "download_project" + label: "Download your project" + title: "Download your project to start using it" + required: true + bodyText: "

The easiest way to download your project and prepare your SSH authentication is to use the Platform CLI.

\n

The platform get command will not only download your project but will also take care of your SSH authentication.

\n

Manually authenticate by adding your SSH key to your account.

" + copyCode: + - label: "Download your project" + code: + - "platform get" + - "" + - "# Using Git? Add your SSH Key and git clone " + - id: "prepare_staging" + label: "Creating dev branches" + title: "Clone production to your first development environment!" + required: true + bodyText: "

You'll now create a perfect live replica of production on Platform.sh and switch to that branch locally. Cool, huh!

\n

You can now modify your code and test your changes locally before pushing them to your live site on Platform.sh.

" + copyCode: + - label: 'Clone production environment to "develop" on Platform.sh and check it out locally.' + code: + - "platform environment:branch develop" + - label: "Using Git?" + code: + - "git checkout -b develop" + - "git push platform develop" + - "" + - "# Head to console.platform.sh to see live URL for your develop branch" + - id: "development" + label: "The first development change!" + title: "Making your first change in development" + required: false + bodyText: "

Let's try modifying your code and reviewing it locally. We’ll install the Pathauto extension.

" + copyCode: + - label: "Install the Pathauto extension to see it listed within GovCMS “Extend” page." + code: + - "composer require drupal/pathauto" + - "" + - '# Confirm it’s installed. "- Installing drupal/pathauto…"' + - id: "deploy" + label: "Deploy your changes" + title: "You're ready to deploy some code!" + required: false + bodyText: "

Congrats. You’ve installed drupal/pathauto.

\n

Let's publish those changes to Platform.sh and review them before merging them into production!

" + copyCode: + - label: "Save your changes and review your live develop website." + code: + - 'git add composer.json composer.lock && git commit -m "My first Platform.sh update";' + - "" + - "platform push" + - label: "Happy? Merge into production!" + code: + - "platform merge" + - "" + - "#Using git?" + - "git checkout main" + - "git merge develop" + - "git push platform main" + - id: "understanding_infrastructure" + label: "Know your infrastructure" + title: "Customize your infrastructure on Platform.sh" + required: false + bodyText: "

Finally, your project is a typical GovCMS installation, with 3 new files to help you deploy on Platform.sh.

\n

.platform.app.yaml Build steps, jobs, storage mounts, and more

\n

.platform/services.yaml Add services, e.g., databases, Redis

\n

.platform/routes.yaml Add domains, subdomains, and redirects

\n

< Default Strapi Code >

\n

See the readme.md in your project files for more info

\n

Explore these files to create additional apps, services, and routes for your project.

" + copyCode: + - label: "Application code structure" + code: + - "├── .platform" + - "│ ├── routes.yaml" + - "│ └── services.yaml" + - "├── .platform.app.yaml" + - "└── < application code >"