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

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.

主站蜘蛛池模板: 枣强县| 清丰县| 茌平县| 汉阴县| 扬州市| 宁都县| 崇信县| 平远县| 奉新县| 富川| 西平县| 库尔勒市| 泌阳县| 富宁县| 虎林市| 平凉市| 保亭| 苗栗县| 丹东市| 南澳县| 柘荣县| 汤阴县| 盐亭县| 望谟县| 敦煌市| 射洪县| 博罗县| 松滋市| 枣阳市| 集安市| 安化县| 浏阳市| 闸北区| 高碑店市| 三都| 拜城县| 元阳县| 广德县| 塔河县| 黄陵县| 襄樊市|