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

  • 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.

主站蜘蛛池模板: 板桥市| 翁牛特旗| 城步| 千阳县| 凤冈县| 额尔古纳市| 且末县| 梨树县| 海口市| 怀化市| 霍林郭勒市| 承德县| 东丰县| 延庆县| 通辽市| 台中市| 眉山市| 柳江县| 偏关县| 沙河市| 蒲城县| 南漳县| 绥中县| 纳雍县| 宾阳县| 苏尼特左旗| 高碑店市| 永城市| 巍山| 孟津县| 平乡县| 洛阳市| 梓潼县| 吉林省| 淮阳县| 米林县| 五大连池市| 屏东市| 连云港市| 东兰县| 得荣县|