Custom Theme in Drupal 8
Create folder name custom in themes
Create Theme_Name folder in Custom
Create css,js,images,fonts,templates folder in themes folder
Create Theme_Name.info.yml
Create Theme_Name.libraries.yml
In Theme_Name.info.yml
name: Theme_Name
description: This is Expert Theme
type: theme
core: 8.x
package: other
libraries:
- expert/global-css-and-js
regions:
header_logo: 'Header Logo'
header_contact: 'Header Contect'
In Theme_Name.libraries.yml
global-css-and-js:
css:
theme:
https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,700&display=swap: { external: true }
css/style.css: {}
js:
js/custom.js: {}
dependencies:
- core/jquery
Past Logo image in Theme_Name folder
and screenshot named image in Theme_Name
Drupal for beginner Basic required tool and data With some basic instructions.
Download Drupal using Composer For 9:- composer create-project drupal/recommended-project:9.2.1 my_site_name_dir For 8:- composer create-project drupal/recommended-project:8.9.15 my_site_name_dir Admin Toolbar Module for drupal 9,8:-composer require 'drupal/admin_toolbar:^3.0' Paragraph Module For drupal 9,8:- composer require 'drupal/paragraphs:^1.12' Module To check Statndard formate of drupal composer require --dev drupal/coder dealerdirect/phpcodesniffer-composer-installer ./vendor/bin/phpcs --standard=Drupal web/modules/custom/footer/src/Plugin/Block/MyBlock.php ./vendor/bin/phpcs --standard=DrupalPractice web/modules/custom/footer/src/Plugin/Block/MyBlock.php To correct automaticaly:-- ./vendor/bin/phpcbf --standard=Drupal web/modules/custom/footer/src/Plugin/Block/MyBlock.php To correct manually./vendor/bin/phpcs --standard=Drupal web/modules/custom/footer/src/Plugin/Block/MyBlock.php Contact Storage For drupal 9,8:- composer require 'drupal/contact_storage:^...
Comments
Post a Comment