ec-europa / ec_europa
EC Europa base theme.
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 28
Forks: 8
Open Issues: 11
Type:drupal-theme
Requires (Dev)
- composer/installers: ^1.6
- drupal-composer/preserve-paths: 0.1.5
- drupal/admin_menu: 3.0.0-rc6
- drupal/adminrole: ^1.1
- drupal/atomium: ^2.24
- drupal/composer_autoloader: ^1.3
- drupal/date: ^2.10
- drupal/devel: ^1.7
- drupal/drupal: ^7.66
- drupal/drupal-driver: ^1.4
- drupal/drupal-extension: ^3.4.1
- drupal/entity_translation: ^1
- drupal/libraries: ^2.5
- drupal/realistic_dummy_content: ^2
- drupal/views: ^3.22
- drupol/drupal-conventions: ^1.4.11
- drush/drush: ^8.2.3
- guzzlehttp/guzzle: ^6.3.3
- mikey179/vfsstream: ^1.6
- phptaskman/drupal: ^0.1.16
- phptaskman/package: ^0.1.4
- symfony/browser-kit: ^3.4
- webflo/drupal-finder: ^1.1
- webmozart/path-util: ^2.3
- dev-master
- 1.0.0-alpha
- 0.x-dev
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1
- 0.0.x-dev
- 0.0.27
- 0.0.26
- 0.0.26-alpha
- 0.0.25
- 0.0.24
- 0.0.23
- 0.0.22
- 0.0.22-alpha
- 0.0.21
- 0.0.20
- 0.0.19
- 0.0.18
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14.2
- 0.0.14.1
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-dependabot/npm_and_yarn/qs-6.3.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/shell-quote-1.7.3
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-dependabot/npm_and_yarn/node-sass-7.0.1
- dev-dependabot/npm_and_yarn/set-value-4.1.0
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-nept-2781
- dev-nept-2489
- dev-nept-2110-14
- dev-nept-2766-mixin-deep-1.3.2
- dev-nept-2735
- dev-nept-1843
- dev-nept-2708-0.0.x
- dev-nept-2713-0.0.x
- dev-nept-2678-0.0.x
- dev-nept-2668-b
- dev-issue-176-update_phptaskman_drupal-0.0.x
- dev-nept-2668
- dev-issue-169-set-taskman-changelog-generator-0.0.x
- dev-issue-168-remove-views-grid-preprocess-0.0.x
- dev-issue-168-remove-views-grid-preprocess
- dev-issue-166-Fix_npm_packages_vulnerabilities
- dev-test-vul
- dev-nept-2573-make_pager_more_flexible
- dev-test_pager
- dev-nept-1889
- dev-159-update-drupal-convention-0.x
- dev-159-update-drupal-convention-0.0.x
- dev-155-update-pager-0.0.x
- dev-150-bug-remove-easy-breadcrumb-build-itens-0.0.x
- dev-148-synchronize-with-upstream-0.0.x
- dev-143-use-phptaskman-changelog
- dev-143-use-phptaskman-changelog-master
- dev-114-update-ecl-library
- dev-130-fix-pager-bug-master
- dev-132-fix-menu-link-0.x
- dev-90-enable-behat-tests
- dev-92-use-latest-stable-version-of-atomium
- dev-NEPT-1926
- dev-81-use-docker
- dev-84-fix-status-messages-component-based-on-nept-1889
- dev-nept-1907-test
- dev-nept-1841
- dev-nept-1089
- dev-nept-1423
- dev-NEPT-1627_visual_regression_with_backstop
- dev-feature/drone-pipeline
- dev-nept-1645
- dev-nept-1617
- dev-nept-1446
This package is auto-updated.
Last update: 2024-10-08 23:54:26 UTC
README
Repository containing the drupal theme for the NextEuropa platform.
The EC-Europa theme is a Drupal 7 theme, implementing the styling defined for the Digital Transformation of the European Commission. This theme is based on a component driven design.
This theme is bundled with the version 1.4.0 of ECL.
ECL component library: https://v1--europa-component-library.netlify.com/ec
Current supported browsers:
- Chrome >= 60
- Internet Explorer >= 11
- Safari >= 11
- Firefox >= 54
Table of content:
Installation
Place the content of this repository into a folder in sites/all/themes and enable the theme going to admin/appearance. The EC Europa Theme uses Atomium as the base theme.
Style guide
The style guide called Europa component library is to be used as a reference when building your website.
Settings
Option "Improved website"
On the settings page, the option 'Is this an "improved website"?' allows to active some customization - in the home page, the switcher-page and other blocks. By default, this option is checked.
Helper tools
All the templates are provided inside the theme:
- component templates
- views templates
- display suite templates
The platform provides the following modules to facilitate building your site and to integrate with Views and Fields:
NextEuropa Formatters (nexteuropa_formatters)
This module provides default theme implementations for custom ECL formatters.
NextEuropa Formatters - Views (nexteuropa_formatters_views)
This module extends nexteuropa_formatters with custom view plugins that render content using ECL formatters.
NextEuropa Formatters - Fields (nexteuropa_formatters_fields)
This module extends nexteuropa_formatters with custom field formatters that render field value using ECL formatters.
Tests
Developers are encouraged to create tests as a best practice, especially functional testing using Behat, and by doing so it should be on a vanilla Drupal 7 site and installing the theme and its dependencies, which can be easily achieved by using Docker as shown on development environment section.
Developer notes
Introduction
The theme implementation is a sub-theme of Atomium and follows its implementation logic. For more information, please consult its project page.
WYSIWYG content formatter
This theme includes a particular mechanism in order to format contents that involve HTML elements; I.E.:
- "Long text" and "Text with summary" fields;
- Custom blocks containing a markup ("body").
This mechanism is based on a namespacing CSS class put on the field value container (see "ec_europa_preprocess_block()" and "ec_europa_preprocess_field()"). This css class is "ecl-editor".
If you need to implement some specific content formats in the rich texts in your sub-theme and you want to reflect them in the WYSIWYG widget,
you just have to insert them in an "editor.css" file.
This file is to be put in a repository named "wysiwyg" placed at the root of the sub-theme.
Development environment
Usage
To start, run:
docker-compose up
It is advised to not daemonise docker-compose
so it can be turned off (CTRL+C
) quickly when it is not anymore needed.
However, there is an option to run docker on background by using the flag -d
:
docker-compose up -d
Then:
docker-compose exec web composer install docker-compose exec web ./vendor/bin/taskman drupal:site-install
Compile ECL
Requirements:
Setup your environment by running:
docker-compose exec -u node node npm install
docker-compose exec -u node node npm run build
or
npm install
Build it by running:
docker-compose exec -u node node npm run build
or
npm run build
This will:
- Compile ECL SASS to
./assets/styles/europa.css
- Transpile ECL JavaScript dependencies from
./assets/scripts/entry.js
to./assets/scripts/europa.js
- Copy ECL fonts to
./assets/fonts/
- Copy ECL images to
./assets/images/
For more details about these build steps, check ecl-builder
documentation
Update ECL
Update the ECL by changing the @ec-europa/ecl-components-preset-base
version in package.json
and running:
docker-compose exec -u node node npm build
or
npm run build
This will update assets such as images and fonts and re-compile CSS, resulting changes are meant to be committed to this repository since we cannot require theme users and/or deployment procedures to build the theme locally.
On browser
Using default configuration, the development site files should be available in the build
directory and the development site
should be available at: http://127.0.0.1:8080/build.
Running the tests
To run the grumphp checks:
docker-compose exec web ./vendor/bin/grumphp run
To run the behat tests:
docker-compose exec web ./vendor/bin/behat
or
./vendor/bin/behat