2017 © Pedro Peláez
 

drupal-theme ec_europa

EC Europa base theme.

image

ec-europa/ec_europa

EC Europa base theme.

  • Thursday, June 21, 2018
  • by ec-europa
  • Repository
  • 24 Watchers
  • 2 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 8 Open issues
  • 28 Versions
  • 0 % Grown

The README.md

EC Europa Theme

Build Status GitHub issues Current Release, (*1)

Repository containing the drupal theme for the NextEuropa platform., (*2)

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., (*3)

This theme is bundled with the version 1.4.0 of ECL., (*4)

ECL component library: https://v1--europa-component-library.netlify.com/ec, (*5)

Current supported browsers:, (*6)

  • 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., (*7)

Style guide

The style guide called Europa component library is to be used as a reference when building your website., (*8)

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., (*9)

Helper tools

All the templates are provided inside the theme:, (*10)

  • 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:, (*11)

NextEuropa Formatters (nexteuropa_formatters)

This module provides default theme implementations for custom ECL formatters., (*12)

NextEuropa Formatters - Views (nexteuropa_formatters_views)

This module extends nexteuropa_formatters with custom view plugins that render content using ECL formatters., (*13)

NextEuropa Formatters - Fields (nexteuropa_formatters_fields)

This module extends nexteuropa_formatters with custom field formatters that render field value using ECL formatters., (*14)

Go to top, (*15)

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., (*16)

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., (*17)

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")., (*18)

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"., (*19)

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., (*20)

Go to top, (*21)

Development environment

Usage

To start, run:, (*22)

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:, (*23)

docker-compose up -d

Then:, (*24)

docker-compose exec web composer install
docker-compose exec web ./vendor/bin/taskman drupal:site-install

Compile ECL

Requirements:, (*25)

Setup your environment by running:, (*26)

docker-compose exec -u node node npm install 
docker-compose exec -u node node npm run build 

or, (*27)

npm install

Build it by running:, (*28)

docker-compose exec -u node node npm run build 

or, (*29)

npm run build

This will:, (*30)

  1. Compile ECL SASS to ./assets/styles/europa.css
  2. Transpile ECL JavaScript dependencies from ./assets/scripts/entry.js to ./assets/scripts/europa.js
  3. Copy ECL fonts to ./assets/fonts/
  4. Copy ECL images to ./assets/images/

For more details about these build steps, check ecl-builder documentation, (*31)

Go to top, (*32)

Update ECL

Update the ECL by changing the @ec-europa/ecl-components-preset-base version in package.json and running:, (*33)

docker-compose exec -u node node npm build 

or, (*34)

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., (*35)

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., (*36)

Running the tests

To run the grumphp checks:, (*37)

docker-compose exec web ./vendor/bin/grumphp run

To run the behat tests:, (*38)

docker-compose exec web ./vendor/bin/behat

or, (*39)

./vendor/bin/behat

Go to top, (*40)

The Versions

21/06 2018

dev-nept-1889

dev-nept-1889

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

17/06 2018

dev-master

9999999-dev

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

17/06 2018

0.0.13

0.0.13.0

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

14/06 2018

0.0.12

0.0.12.0

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

30/04 2018

0.0.11

0.0.11.0

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

27/04 2018

dev-nept-1907

dev-nept-1907

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

27/04 2018

dev-nept-1907-test

dev-nept-1907-test

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

20/04 2018

dev-NEPT-1926

dev-NEPT-1926

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

19/03 2018

dev-nept-1419

dev-nept-1419

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

28/02 2018

0.0.10

0.0.10.0

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

23/02 2018

0.0.9

0.0.9.0

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

23/02 2018

dev-nept-1841

dev-nept-1841

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

20/02 2018

dev-nept-1089

dev-nept-1089

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

01/02 2018

dev-nept-1423

dev-nept-1423

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

31/01 2018

dev-NEPT-1627_visual_regression_with_backstop

dev-NEPT-1627_visual_regression_with_backstop

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

26/01 2018

0.0.8

0.0.8.0

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

22/12 2017

dev-feature/drone-pipeline

dev-feature/drone-pipeline

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

22/12 2017

0.0.7

0.0.7.0

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

06/12 2017

0.0.6

0.0.6.0

EC Europa base theme.

  Sources   Download

EUPL-1.1

The Development Requires

29/11 2017

dev-nept-1645

dev-nept-1645

EC Europa base theme.

  Sources   Download

The Development Requires

15/11 2017

0.0.5

0.0.5.0

EC Europa base theme.

  Sources   Download

The Development Requires

10/11 2017

dev-nept-1617

dev-nept-1617

EC Europa base theme.

  Sources   Download

The Development Requires

27/10 2017

0.0.4

0.0.4.0

EC Europa base theme.

  Sources   Download

The Development Requires

17/08 2017

dev-nept-1446

dev-nept-1446

EC Europa base theme.

  Sources   Download

The Development Requires

04/08 2017

dev-nept-1251

dev-nept-1251

EC Europa base theme.

  Sources   Download

The Development Requires

03/08 2017

0.0.3

0.0.3.0

EC Europa base theme.

  Sources   Download

The Development Requires

02/08 2017

0.0.2

0.0.2.0

OpenEuropa base theme.

  Sources   Download

The Development Requires

02/08 2017

0.0.1

0.0.1.0

OpenEuropa base theme.

  Sources   Download

The Development Requires