Magento 2.0 Has a diffirent theme sturcture then Magento 1.x.Like Magento Module ,Magento 2.0 it must have a Namespace/Vebdorname to create a theme.
Lets take a look app/design/frontend in the folder we will find a folder Name Magentowhich is the vebdor name.
Now we will create our theme in our Vendor Name.
Lets create a directory name Itheaven.which is our vendor name underapp/design/frontend.
under the Itheaven directory create the theme you want to create.
lets we will create our theme name jarifah.so we will create our theme jarifah usnder Itheaven directory.
under jarifah directory we will create.theme.xml,registration.php,comopser.json,web and media directory.so our theme folder structure will same as following.
app/design/frontend/Itheaven/jarifah/
—-theme.xml
—-web
—-etc
—-registration.php
—-composer.json
—-media
Lets describe the theme structure.if you see the root directory there is no skin folder.so the web directory will work as skin where we will place css,js,images folders.
lets open the theme.xml and add the following code
Lets describe the code .title tag is the Title of our new theme.and the parent them will play as base them in magento 1.x.if we go pub/static/frontend/Magento we will find a folder name blank which we will use as our parents theme.the new feature of Magento 2.0 is we can use any theme as our parents theme.after complete the theme jraifah we can create our another them jarifah2 using jarafah as a parents.add a preview.jpg image in media directory for theme preview.
Now in the compser.json file we will add the following code.
Now in the registration.php file we will add the following code.
this will register you theme in the system.so the theme.xml and registration.php will be the main file of your theme.in etc forder you can add a view.xml copy form pub/static/frontend/Magento/blank folder.it has some interesting setting.
Activate theme in admin
Clear the cache in magneto admin panel.Then From STORE->Configuration->Design section we will find out our theme .
select them theme from dropdown and save the settings.
No you are with your new theme jarifah !!!!.
Lets go to the next step.suppose we will change the product listing and veiw file of the theme.go tot the
vendor/magento/module-catalog/view/frontend folder.copy the layout,template and web folder.then go to
app/design/frontend/Itheaven/jarifah/ and create Magento_Catalog and paste those .so the new structure of the them will be.
app/design/frontend/Itheaven/jarifah/
Magento_Catalog
—————layout
—————templates
—————web
—-theme.xml
—-web
—-etc
—-registration.php
—-composer.json
—-media
Now you can edit the layout and html and css like Magento 1.x.
you have to add any module like catalog form vendor to edit this.
Next Article we will discuss how to change blob,model helpers etc.Best of luck .