SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
INsReady Inc.        Upgrade Your Creat'v'ty
           引锐信息科技有限公司            升级你的创造力




Drupal front end development


  王景昇 (Jingsheng Wang)
   CEO @ INsReady
      微博: @王景昇
  Twitter: @skyredwang


                           The above QR-Code was
                           generated by qr.insready.com
INsReady Inc.   Upgrade Your Creat'v'ty
             引锐信息科技有限公司       升级你的创造力




Agenda:
  1. Presentation (1 hour):
     1. Theming & jQuery
     2. Subtheming
     3. Omega subtheme & 960 grid
     4. Views & Panels
     5. CSS & jQuery
     6. Responsive Design
  2. Workshop (1 hour):
     1. Create your own subtheme
     2. Add your own CSS & JS files
INsReady Inc.      Upgrade Your Creat'v'ty
              引锐信息科技有限公司          升级你的创造力




Theming & jQuery:
 1. Theme can change the look and feel of your
    Drupal site.
 2. Logic must be separated as much as
    possible from presentation. To accomplish
    this, modules do as much of the work on the
    data as possible, and hand that data off to the
    presentation layer. Modules then
    provide default implementations that
    provide the basic presentation and serve as a
    basis for themes that wish to provide an
    alternate presentation.
 3. ---- http://drupal.org/node/933976
INsReady Inc.   Upgrade Your Creat'v'ty
         引锐信息科技有限公司       升级你的创造力




Theming & jQuery:
INsReady Inc.       Upgrade Your Creat'v'ty
              引锐信息科技有限公司           升级你的创造力




Theming & jQuery:


 A quick example: Bartik (The default Drupal 7 theme)


 Demo: http://sandbox2.insready.com
INsReady Inc.     Upgrade Your Creat'v'ty
                         引锐信息科技有限公司         升级你的创造力

The number of lines of codes in Bartik:
 66 ./templates/maintenance-page.tpl.php
124 ./templates/node.tpl.php
105 ./templates/comment.tpl.php
246 ./templates/page.tpl.php
 51 ./templates/comment-wrapper.tpl.php
152 ./template.php
 65 ./color/preview.html
200 ./color/preview.css
 39 ./color/preview.js
132 ./color/color.inc                       3671 total
 41 ./bartik.info
 48 ./css/ie-rtl.css
 22 ./css/layout-rtl.css
1650 ./css/style.css
271 ./css/style-rtl.css
 46 ./css/print.css
 18 ./css/ie6.css
 63 ./css/ie.css
 58 ./css/colors.css
 67 ./css/maintenance-page.css
100 ./css/layout.css
INsReady Inc.       Upgrade Your Creat'v'ty
                引锐信息科技有限公司           升级你的创造力




Theming & jQuery:

It takes tremendous effort to develop and design a
robust, beautiful (and responsive) Drupal theme.




    Therefore, we use Sub-theme most of the time!
INsReady Inc.             Upgrade Your Creat'v'ty
                    引锐信息科技有限公司                 升级你的创造力




Subtheming:
  Sub-themes are just like any other theme, with one
  difference: They inherit the parent theme's resources.
INsReady Inc.                  Upgrade Your Creat'v'ty
                      引锐信息科技有限公司                      升级你的创造力




Subtheming:
1. Inheritance
     1. All style sheets defined in the parent theme will be inherited, as long as
        you declare at least one stylesheet in your sub-theme's .info
        file. You must declare at least one stylesheet in your sub-theme for any of
        the parent theme's stylesheets to be inherited.
     2. All JavaScripts defined in the parent theme will be inherited.
     3. Anything defined in the parent theme's template.php file will be inherited.
        This includes theme function overrides, preprocess functions and anything
        else in that file. Each sub-theme should also have its own template.php
        file, where you can add additional functions or override functions from the
        parent theme.
     4. Any .tpl.php files from the parent theme will be inherited. You can add
        template files with more specificity — for instance, node--blog.tpl.php
        building on an inherited node.tpl.php.
2. Overriding
     1. stylesheets[all][] = style.css
     2. scripts[] = script.js
     3. theme function overrides & template overrides http://drupal.
        org/node/173880#function-override
INsReady Inc.   Upgrade Your Creat'v'ty
引锐信息科技有限公司       升级你的创造力
INsReady Inc.   Upgrade Your Creat'v'ty
引锐信息科技有限公司       升级你的创造力
INsReady Inc.       Upgrade Your Creat'v'ty
               引锐信息科技有限公司           升级你的创造力




Great Base Themes:
  1. Omega - Responsive HTML5 Base Theme
  2. Zen http://drupal.org/project/zen
  3. Fusion http://drupal.org/project/fusion
INsReady Inc.     Upgrade Your Creat'v'ty
         引锐信息科技有限公司         升级你的创造力




Omega subtheme & 960 grid




              Demo Time!
INsReady Inc.          Upgrade Your Creat'v'ty
                    引锐信息科技有限公司              升级你的创造力




Views & Panels
They are the magic to let you create complex data presentation
without writing any code!




                           Demo Time!
INsReady Inc.                  Upgrade Your Creat'v'ty
                           引锐信息科技有限公司                      升级你的创造力




CSS & jQuery
   1. Drupal 7.x ships with jQuery 1.4.x
   2. Drupal 8.x ships with jQuery 1.7.x
   3. Drupal 7 dropped IE6 support.
   4. Drupal 8 is considering to drop IE7 support.

 Developer Tools:
   1. Chrome developer tool
   2. Firefox firebug
   3. IE9 developer tool
   4. CSS Lint http://csslint.net/ (Check errors, Compatibility, Performance,
      Maintainability & Duplication, Accessibility and OOCSS)
   5. jQuery Docs: http://docs.jquery.com/Main_Page
   6. api.drupal.org
   7. Devel http://drupal.org/project/devel

your style is nothing more than an advice for browsers to display it in certain ways. It
is by no means a law
INsReady Inc.   Upgrade Your Creat'v'ty
          引锐信息科技有限公司       升级你的创造力




Responsive Design & Examples:
INsReady Inc.   Upgrade Your Creat'v'ty
          引锐信息科技有限公司       升级你的创造力




Responsive Design & Examples:
INsReady Inc.      Upgrade Your Creat'v'ty
           引锐信息科技有限公司          升级你的创造力




Omega theme has Grid Responsive Settings.
INsReady Inc.     Upgrade Your Creat'v'ty
             引锐信息科技有限公司         升级你的创造力




Workshop Tasks:
  1. Create your own Omega subtheme
  2. Add your own CSS & JS files
  3. Make the header background black
  4. Create a layout like New York Times,
     using Panels
  5. Create a Views and display in a grid style
  6. Use jQuery to create an overlay and
     display welcome message when user
     visits the site for the first time.
INsReady Inc.     Upgrade Your Creat'v'ty
         引锐信息科技有限公司         升级你的创造力




Thank You/ 谢谢!

SPECIAL THANKS to 陈刚
& 上海万达信息股份有限公司
for sponsoring this training!

    王景昇 (Jingsheng Wang)
     CEO @ INsReady
        微博: @王景昇
    Twitter: @skyredwang

Weitere ähnliche Inhalte

Ähnlich wie Drupal Front End Development

TASK -1 MAJOR PROJECT.pptx
TASK -1  MAJOR PROJECT.pptxTASK -1  MAJOR PROJECT.pptx
TASK -1 MAJOR PROJECT.pptxMEMESSTATION
 
Drupal in 30 Minutes
Drupal in 30 MinutesDrupal in 30 Minutes
Drupal in 30 MinutesRobert Carr
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Morten Rand-Hendriksen
 
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)Amazon Web Services Japan
 
Managing modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java developmentManaging modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java developmentBaruch Sadogursky
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practicesmeghsweet
 
Manage Deployments with Install Profiles and Git
Manage Deployments with Install Profiles and GitManage Deployments with Install Profiles and Git
Manage Deployments with Install Profiles and Gitnhepner
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityTeamstudio
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentEvan Mullins
 
Responsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonResponsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonDhrubaJyoti Dey
 
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalI use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalChris Wu
 
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...Azilen Technologies Pvt. Ltd.
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumTechday7
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy wayJohn Azariah
 
Web Application Development
Web Application DevelopmentWeb Application Development
Web Application DevelopmentSanjay Kumar
 
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!Evan Mullins
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structurekeithdevon
 
Building Drupal 8 Sites
Building Drupal 8 SitesBuilding Drupal 8 Sites
Building Drupal 8 SitesExove
 

Ähnlich wie Drupal Front End Development (20)

TASK -1 MAJOR PROJECT.pptx
TASK -1  MAJOR PROJECT.pptxTASK -1  MAJOR PROJECT.pptx
TASK -1 MAJOR PROJECT.pptx
 
Drupal in 30 Minutes
Drupal in 30 MinutesDrupal in 30 Minutes
Drupal in 30 Minutes
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0
 
Pour Noël, devenez chrome extensioniste!
Pour Noël, devenez chrome extensioniste!Pour Noël, devenez chrome extensioniste!
Pour Noël, devenez chrome extensioniste!
 
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
 
Managing modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java developmentManaging modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java development
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
 
Manage Deployments with Install Profiles and Git
Manage Deployments with Install Profiles and GitManage Deployments with Install Profiles and Git
Manage Deployments with Install Profiles and Git
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
Responsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonResponsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparison
 
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalI use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 Drupal
 
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy way
 
Web Application Development
Web Application DevelopmentWeb Application Development
Web Application Development
 
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structure
 
Building Drupal 8 Sites
Building Drupal 8 SitesBuilding Drupal 8 Sites
Building Drupal 8 Sites
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Drupal Front End Development

  • 1. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Drupal front end development 王景昇 (Jingsheng Wang) CEO @ INsReady 微博: @王景昇 Twitter: @skyredwang The above QR-Code was generated by qr.insready.com
  • 2. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Agenda: 1. Presentation (1 hour): 1. Theming & jQuery 2. Subtheming 3. Omega subtheme & 960 grid 4. Views & Panels 5. CSS & jQuery 6. Responsive Design 2. Workshop (1 hour): 1. Create your own subtheme 2. Add your own CSS & JS files
  • 3. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Theming & jQuery: 1. Theme can change the look and feel of your Drupal site. 2. Logic must be separated as much as possible from presentation. To accomplish this, modules do as much of the work on the data as possible, and hand that data off to the presentation layer. Modules then provide default implementations that provide the basic presentation and serve as a basis for themes that wish to provide an alternate presentation. 3. ---- http://drupal.org/node/933976
  • 4. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Theming & jQuery:
  • 5. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Theming & jQuery: A quick example: Bartik (The default Drupal 7 theme) Demo: http://sandbox2.insready.com
  • 6. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 The number of lines of codes in Bartik: 66 ./templates/maintenance-page.tpl.php 124 ./templates/node.tpl.php 105 ./templates/comment.tpl.php 246 ./templates/page.tpl.php 51 ./templates/comment-wrapper.tpl.php 152 ./template.php 65 ./color/preview.html 200 ./color/preview.css 39 ./color/preview.js 132 ./color/color.inc 3671 total 41 ./bartik.info 48 ./css/ie-rtl.css 22 ./css/layout-rtl.css 1650 ./css/style.css 271 ./css/style-rtl.css 46 ./css/print.css 18 ./css/ie6.css 63 ./css/ie.css 58 ./css/colors.css 67 ./css/maintenance-page.css 100 ./css/layout.css
  • 7. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Theming & jQuery: It takes tremendous effort to develop and design a robust, beautiful (and responsive) Drupal theme. Therefore, we use Sub-theme most of the time!
  • 8. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Subtheming: Sub-themes are just like any other theme, with one difference: They inherit the parent theme's resources.
  • 9. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Subtheming: 1. Inheritance 1. All style sheets defined in the parent theme will be inherited, as long as you declare at least one stylesheet in your sub-theme's .info file. You must declare at least one stylesheet in your sub-theme for any of the parent theme's stylesheets to be inherited. 2. All JavaScripts defined in the parent theme will be inherited. 3. Anything defined in the parent theme's template.php file will be inherited. This includes theme function overrides, preprocess functions and anything else in that file. Each sub-theme should also have its own template.php file, where you can add additional functions or override functions from the parent theme. 4. Any .tpl.php files from the parent theme will be inherited. You can add template files with more specificity — for instance, node--blog.tpl.php building on an inherited node.tpl.php. 2. Overriding 1. stylesheets[all][] = style.css 2. scripts[] = script.js 3. theme function overrides & template overrides http://drupal. org/node/173880#function-override
  • 10. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力
  • 11. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力
  • 12. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Great Base Themes: 1. Omega - Responsive HTML5 Base Theme 2. Zen http://drupal.org/project/zen 3. Fusion http://drupal.org/project/fusion
  • 13. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Omega subtheme & 960 grid Demo Time!
  • 14. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Views & Panels They are the magic to let you create complex data presentation without writing any code! Demo Time!
  • 15. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 CSS & jQuery 1. Drupal 7.x ships with jQuery 1.4.x 2. Drupal 8.x ships with jQuery 1.7.x 3. Drupal 7 dropped IE6 support. 4. Drupal 8 is considering to drop IE7 support. Developer Tools: 1. Chrome developer tool 2. Firefox firebug 3. IE9 developer tool 4. CSS Lint http://csslint.net/ (Check errors, Compatibility, Performance, Maintainability & Duplication, Accessibility and OOCSS) 5. jQuery Docs: http://docs.jquery.com/Main_Page 6. api.drupal.org 7. Devel http://drupal.org/project/devel your style is nothing more than an advice for browsers to display it in certain ways. It is by no means a law
  • 16. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Responsive Design & Examples:
  • 17. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Responsive Design & Examples:
  • 18. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Omega theme has Grid Responsive Settings.
  • 19. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Workshop Tasks: 1. Create your own Omega subtheme 2. Add your own CSS & JS files 3. Make the header background black 4. Create a layout like New York Times, using Panels 5. Create a Views and display in a grid style 6. Use jQuery to create an overlay and display welcome message when user visits the site for the first time.
  • 20. INsReady Inc. Upgrade Your Creat'v'ty 引锐信息科技有限公司 升级你的创造力 Thank You/ 谢谢! SPECIAL THANKS to 陈刚 & 上海万达信息股份有限公司 for sponsoring this training! 王景昇 (Jingsheng Wang) CEO @ INsReady 微博: @王景昇 Twitter: @skyredwang