官术网_书友最值得收藏!

  • Drupal 8 Blueprints
  • Alex Burrows
  • 244字
  • 2021-07-03 00:03:23

Using themes

With Drupal, we can start a site without writing any code for a theme, as Drupal core comes with the following accessible themes:

  • Bartik
  • Seven
  • Stark

Apart from these three, there are two others that are used as the entire base of Drupal core--Stable and Classy.

Classy is a subtheme of stable, makes Drupal look the way it does, and adds classes.

However, we want to get started with our own theme. So to do this, we need to open Terminal. As stated earlier, the button in DevDesktop on the right-hand side will launch our Terminal window.

Once this is open, we can download our modules and themes straight into our Drupal site. For this book, we will use Bootstrap as our base theme and then create our own theme:

drush dl bootstrap

This will download the Bootstrap theme (https://drupal.org/project/bootstrap) into our themes directory.

Now that we have Bootstrap downloaded, let's create a really basic theme so that we can add onto it later on. Inside our /themes/custom directory, create a new directory called blueprint.

This is where our custom theme will be stored; inside this, we have the ability to add our frontend structure, which includes our templates, CSS, and Javascript.

Start by creating a file called blueprint.info.yml; note that we have it structured as THEMENAME.info.yml.

In Drupal 8.x, we have adopted the use of YAML files, and you will note that all configuration in Drupal uses this format.

主站蜘蛛池模板: 塘沽区| 江津市| 宝坻区| 泰安市| 资兴市| 皮山县| 三河市| 汤阴县| 潼南县| 吉安市| 乐安县| 海宁市| 建宁县| 大冶市| 黔西县| 安乡县| 桓台县| 乌海市| 安康市| 噶尔县| 正安县| 延寿县| 嘉义市| 汉寿县| 西安市| 云安县| 西昌市| 樟树市| 云浮市| 西城区| 汉寿县| 荣昌县| 阜平县| 南陵县| 嫩江县| 繁昌县| 临清市| 岐山县| 留坝县| 尼玛县| 临泽县|