Mikhail Ismajlov 08/28/2019

Drupal 8 uses the new Twig template engine. Therefore, all topics were redone for him. Let's go in and see what lies in the /core/themes folder

drupal 8 theme

We have a Twig template; builder themes classy, stable, stark; ready-made themes bartik, seven.

Template Twig

Drupal 8 incorporates part of the Symfony libraries:

https://symfony.com/

Including Twig. This allowed us to rewrite Drupal not from scratch, but with ready-made routing and template engine, YML files and other Symfony and Zend Framework libraries.

What does Twig do and why was it not in the 7th Drupal? Twig divides site logic into PHP and website layout into HTML. It forces the coder to not use the PHP code in the template, which means you cannot write a query to the database, you cannot load a user, node or term through PHP code. It is necessary to transfer ready-made variables to the template and output them via Twig. We’ll talk more about Twig in the next article in this section.

Classy builder Theme

This is a basic theme, it is a set of stylized elements that use the themes of Seven and Bartik. On this topic, the designer should not do a topic, it serves to simplify the development of themes in the core of the site.

drupal 8 classy

Builder Theme Stable

And we will work a lot with this topic as a designer. I plan to make articles on how to create my own themes for Drupal 8 based on this theme. This theme is similar to the Zen theme, it is simple and has a minimum of settings.

It is on this topic that we will do under the topic in this article 6.3. Create your own Drupal 8 theme based on the Stable theme.

Theme builder Stark

If it makes sense to make a subtopic on the Stable topic, then the Stark topic is only for educational purposes, we will discuss the Stark topic in article 6.2.

drupal 8 starc

Bartik Base Theme

drupal 8 bartik

This is the same theme as the 7th Drupal, only redone through Twig and even more adaptive:

Seven Theme

Seven Theme

drupal 8 seven

The Seven theme also moved from the 7th Drupal. And just like Bartik, it’s much nicer for a phone and a tablet:

drupal 8 seven adaptive

Now it will be simple and convenient for you to post news to the Drupal blog directly from your phone.

It is also worth noting the new menu in Drupal, it is adaptive and does not interfere with the layout of the site, as Toolbar or Admin menu interfered.