SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
Mobile Drupal:
                           Drupal       :
                         Building a mobile theme


                              Drupal Camp Taipei 2011

                                 John Albin Wilkins


Saturday, July 9, 2011
Traditional way to support mobile


                         • Build a separate mobile website
                         • Detect mobile device
                         • Redirect to mobile site
                             This is really hard!

Saturday, July 9, 2011
Responsive Design

                         •   Single source of HTML
                                       HTML
                         •   Responds to different viewport sizes


                         •   First described by Ethan Marcotte’s article
                                     Ethan Marcotte

                             “Responsive Web Design”
                             http://www.alistapart.com/articles/responsive-web-
                             design

Saturday, July 9, 2011
Building a responsive mobile theme


                         • Mobile First
                         • Responsive Design
                          1. Flexible Grids
                          2. Flexible Images
                          3. CSS3 Media Queries
                             CSS3 Media Queries


Saturday, July 9, 2011
Mobile device zooming

                         •   Meta tags can control the scaling/zooming of
                             mobile devices
                                 Meta tags

                         •   More info:
                             http://davidbcalhoun.com/2010/viewport-metatag

      <meta name="viewport"
        content="width=device-width, initial-scale=1">
      <meta name="MobileOptimized" content="width">
      <meta name="HandheldFriendly" content="true">


Saturday, July 9, 2011
Flexible grids

                         • Use percentages to set grid sizes
                         •




                             .content { width: 62.5%; } // 5 grids
                             .sidebar { width: 37.5%; } // 3 grids
                         • Grid will grow/shrink with the screen size
                                                       /

                         • Target ÷ context = result
                                   ÷       =

Saturday, July 9, 2011
Flexible images

                         • Use max-width to constrain images within
                           the flexible grid.
                                max-width


                         • img, embed, iframe, object, video {
                               max-width: 100%;
                           }


Saturday, July 9, 2011
How do we target
                                     different screen sizes?

                         •   With CSS2 media types we could target different
                             classes of devices:
                                  CSS2 media types                     class:
                                    print, screen, handheld, all
                         •   With CSS3 media queries we target device
                             capabilities.
                                 CSS3 media queries
                             •   [type] and ([query])
                             •   all and (max-width: 768px)


Saturday, July 9, 2011
3 ways to query
                                    query
                 1. <link rel="stylesheet" href="wide.css" media="screen
                    and (min-width: 992px)">
                 2. @import url(wide.css) screen and (min-width:
                    992px);
                         theme.info:
                         stylesheets[screen][] = file.css
                         stylesheets[screen and (min-width: 992px)][] = file.css
                 3. @media screen and (min-width: 992px) {
                      .selector { property: value; }
                    }
Saturday, July 9, 2011
Breakpoints
                         320px — iPhone in portrait mode
                                iPhone
                         480px — iPhone in landscape mode
                                  iPhone
                         768px — iPad in portrait mode
                                  iPad
                         992px — small laptop (minus browser chrome)

                         1200px — large desktop

Saturday, July 9, 2011
Dealing with IE 6-8
                               IE6~8
                         ‣ IE8 and earlier don’t support media queries
                           IE8             media queries
                         1. They do support IE conditional comments
                                     IE conditional comments
                         2. They do support JavaScript polyfills
                                     JavaScript polyfills



Saturday, July 9, 2011
Dealing with IE 6-8
                              IE6~8
                         Conditional Stylesheets module:
                         http://drupal.org/project/conditional_styles

                         <!--[if lte IE 8]>
                         <link src="/css/layout/desktop.css">
                         <![endif]-->



Saturday, July 9, 2011
Dealing with IE 6-8
                           IE6~8

                         Scott Jehl, Filament Group
                         Respond.js

                         https://github.com/scottjehl/Respond




Saturday, July 9, 2011
Responsive Design


                         1. Flexible Grids
                         2. Flexible Images
                         3. CSS3 Media Queries
                            CSS3 Media Queries




Saturday, July 9, 2011
Zen 7.x-5.x-dev


                         http://john.albin.net/



Saturday, July 9, 2011
Related Topics
                         •   HTML5
                             http://html5doctor.com/how-to-use-html5-in-your-
                             client-work-right-now/
                         •   CSS3
                             http://www.css3.info
                         •   Progressive enhancement
                             http://www.alistapart.com/articles/
                             understandingprogressiveenhancement
                         •   JavaScript polyfills
                             http://remysharp.com/2010/10/08/what-is-a-polyfill
                         •   Front-end Performance
                             http://developer.yahoo.com/performance/rules.html
Saturday, July 9, 2011

Más contenido relacionado

Destacado

[DCTPE2011] 11) Drupal 是好的生財工具嗎? 2. 中小型網站製作公司/工作室座談
[DCTPE2011] 11) Drupal 是好的生財工具嗎? 2. 中小型網站製作公司/工作室座談[DCTPE2011] 11) Drupal 是好的生財工具嗎? 2. 中小型網站製作公司/工作室座談
[DCTPE2011] 11) Drupal 是好的生財工具嗎? 2. 中小型網站製作公司/工作室座談Drupal Taiwan
 
[DCTPE2010] Drupal & (Open/Anti) Government
[DCTPE2010] Drupal & (Open/Anti) Government[DCTPE2010] Drupal & (Open/Anti) Government
[DCTPE2010] Drupal & (Open/Anti) GovernmentDrupal Taiwan
 
[DCTPE2011] 8) 多伺服器/高效能的Drupal 主機解決方案--黃雋
[DCTPE2011] 8) 多伺服器/高效能的Drupal 主機解決方案--黃雋[DCTPE2011] 8) 多伺服器/高效能的Drupal 主機解決方案--黃雋
[DCTPE2011] 8) 多伺服器/高效能的Drupal 主機解決方案--黃雋Drupal Taiwan
 
[DCTPE2011] Drupal 6 的 CCK/Views運用--黎偉志
[DCTPE2011] Drupal 6 的 CCK/Views運用--黎偉志[DCTPE2011] Drupal 6 的 CCK/Views運用--黎偉志
[DCTPE2011] Drupal 6 的 CCK/Views運用--黎偉志Drupal Taiwan
 
[DCTPE2010] Drupal 遇上行動網路服務
[DCTPE2010] Drupal 遇上行動網路服務[DCTPE2010] Drupal 遇上行動網路服務
[DCTPE2010] Drupal 遇上行動網路服務Drupal Taiwan
 
skinnySCAR in ArchitectuurNL 01 2017
skinnySCAR in ArchitectuurNL 01 2017skinnySCAR in ArchitectuurNL 01 2017
skinnySCAR in ArchitectuurNL 01 2017Marijn Boterman
 
交互组读书分享——组织页面,页面元素的布局
交互组读书分享——组织页面,页面元素的布局交互组读书分享——组织页面,页面元素的布局
交互组读书分享——组织页面,页面元素的布局jiangshuai
 
Leadership Personality Types: USA vs China
Leadership Personality Types: USA vs ChinaLeadership Personality Types: USA vs China
Leadership Personality Types: USA vs ChinaStep Research
 
[DCTPE2011] 11) Drupal 是好的生財工具嗎? 1. 網站標案經驗分享 x 2
[DCTPE2011] 11) Drupal 是好的生財工具嗎?  1. 網站標案經驗分享 x 2[DCTPE2011] 11) Drupal 是好的生財工具嗎?  1. 網站標案經驗分享 x 2
[DCTPE2011] 11) Drupal 是好的生財工具嗎? 1. 網站標案經驗分享 x 2Drupal Taiwan
 
Minutes Of The Meeting For The Exhibit of SHS
Minutes Of The Meeting For The Exhibit of SHSMinutes Of The Meeting For The Exhibit of SHS
Minutes Of The Meeting For The Exhibit of SHSLu
 
[DCTPE2010] 從企劃到開發維護的 Drupal 專案經驗
[DCTPE2010] 從企劃到開發維護的 Drupal 專案經驗[DCTPE2010] 從企劃到開發維護的 Drupal 專案經驗
[DCTPE2010] 從企劃到開發維護的 Drupal 專案經驗Drupal Taiwan
 
[DCTPE2010] 多站架設商業應用與實務-以本土癮科技為例
[DCTPE2010] 多站架設商業應用與實務-以本土癮科技為例[DCTPE2010] 多站架設商業應用與實務-以本土癮科技為例
[DCTPE2010] 多站架設商業應用與實務-以本土癮科技為例Drupal Taiwan
 
[DCTPE2010] Microsoft
[DCTPE2010] Microsoft[DCTPE2010] Microsoft
[DCTPE2010] MicrosoftDrupal Taiwan
 
[DCTPE2010] Drupal 模組開發入門
[DCTPE2010] Drupal 模組開發入門[DCTPE2010] Drupal 模組開發入門
[DCTPE2010] Drupal 模組開發入門Drupal Taiwan
 
SHS Proposed Tuition and Other School Fees
SHS Proposed Tuition  and Other School FeesSHS Proposed Tuition  and Other School Fees
SHS Proposed Tuition and Other School FeesLu
 
[DCTPE2010] 綠界科技-網路金流機制服務簡介
[DCTPE2010] 綠界科技-網路金流機制服務簡介[DCTPE2010] 綠界科技-網路金流機制服務簡介
[DCTPE2010] 綠界科技-網路金流機制服務簡介Drupal Taiwan
 

Destacado (18)

[DCTPE2011] 11) Drupal 是好的生財工具嗎? 2. 中小型網站製作公司/工作室座談
[DCTPE2011] 11) Drupal 是好的生財工具嗎? 2. 中小型網站製作公司/工作室座談[DCTPE2011] 11) Drupal 是好的生財工具嗎? 2. 中小型網站製作公司/工作室座談
[DCTPE2011] 11) Drupal 是好的生財工具嗎? 2. 中小型網站製作公司/工作室座談
 
[DCTPE2010] Drupal & (Open/Anti) Government
[DCTPE2010] Drupal & (Open/Anti) Government[DCTPE2010] Drupal & (Open/Anti) Government
[DCTPE2010] Drupal & (Open/Anti) Government
 
[DCTPE2011] 8) 多伺服器/高效能的Drupal 主機解決方案--黃雋
[DCTPE2011] 8) 多伺服器/高效能的Drupal 主機解決方案--黃雋[DCTPE2011] 8) 多伺服器/高效能的Drupal 主機解決方案--黃雋
[DCTPE2011] 8) 多伺服器/高效能的Drupal 主機解決方案--黃雋
 
[DCTPE2011] Drupal 6 的 CCK/Views運用--黎偉志
[DCTPE2011] Drupal 6 的 CCK/Views運用--黎偉志[DCTPE2011] Drupal 6 的 CCK/Views運用--黎偉志
[DCTPE2011] Drupal 6 的 CCK/Views運用--黎偉志
 
[DCTPE2010] Drupal 遇上行動網路服務
[DCTPE2010] Drupal 遇上行動網路服務[DCTPE2010] Drupal 遇上行動網路服務
[DCTPE2010] Drupal 遇上行動網路服務
 
skinnySCAR in ArchitectuurNL 01 2017
skinnySCAR in ArchitectuurNL 01 2017skinnySCAR in ArchitectuurNL 01 2017
skinnySCAR in ArchitectuurNL 01 2017
 
INNOVA
INNOVAINNOVA
INNOVA
 
交互组读书分享——组织页面,页面元素的布局
交互组读书分享——组织页面,页面元素的布局交互组读书分享——组织页面,页面元素的布局
交互组读书分享——组织页面,页面元素的布局
 
Leadership Personality Types: USA vs China
Leadership Personality Types: USA vs ChinaLeadership Personality Types: USA vs China
Leadership Personality Types: USA vs China
 
[DCTPE2011] 11) Drupal 是好的生財工具嗎? 1. 網站標案經驗分享 x 2
[DCTPE2011] 11) Drupal 是好的生財工具嗎?  1. 網站標案經驗分享 x 2[DCTPE2011] 11) Drupal 是好的生財工具嗎?  1. 網站標案經驗分享 x 2
[DCTPE2011] 11) Drupal 是好的生財工具嗎? 1. 網站標案經驗分享 x 2
 
What is Joomla?
What is Joomla?What is Joomla?
What is Joomla?
 
Minutes Of The Meeting For The Exhibit of SHS
Minutes Of The Meeting For The Exhibit of SHSMinutes Of The Meeting For The Exhibit of SHS
Minutes Of The Meeting For The Exhibit of SHS
 
[DCTPE2010] 從企劃到開發維護的 Drupal 專案經驗
[DCTPE2010] 從企劃到開發維護的 Drupal 專案經驗[DCTPE2010] 從企劃到開發維護的 Drupal 專案經驗
[DCTPE2010] 從企劃到開發維護的 Drupal 專案經驗
 
[DCTPE2010] 多站架設商業應用與實務-以本土癮科技為例
[DCTPE2010] 多站架設商業應用與實務-以本土癮科技為例[DCTPE2010] 多站架設商業應用與實務-以本土癮科技為例
[DCTPE2010] 多站架設商業應用與實務-以本土癮科技為例
 
[DCTPE2010] Microsoft
[DCTPE2010] Microsoft[DCTPE2010] Microsoft
[DCTPE2010] Microsoft
 
[DCTPE2010] Drupal 模組開發入門
[DCTPE2010] Drupal 模組開發入門[DCTPE2010] Drupal 模組開發入門
[DCTPE2010] Drupal 模組開發入門
 
SHS Proposed Tuition and Other School Fees
SHS Proposed Tuition  and Other School FeesSHS Proposed Tuition  and Other School Fees
SHS Proposed Tuition and Other School Fees
 
[DCTPE2010] 綠界科技-網路金流機制服務簡介
[DCTPE2010] 綠界科技-網路金流機制服務簡介[DCTPE2010] 綠界科技-網路金流機制服務簡介
[DCTPE2010] 綠界科技-網路金流機制服務簡介
 

Similar a [DCTPE2011] 7) Mobile Drupal(英/中雙語)

JavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies TodayJavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies TodayWesley Hales
 
MongoDB at Sailthru: Scaling and Schema Design
MongoDB at Sailthru: Scaling and Schema DesignMongoDB at Sailthru: Scaling and Schema Design
MongoDB at Sailthru: Scaling and Schema DesignDATAVERSITY
 
Build a responsive website with drupal
Build a responsive website with drupalBuild a responsive website with drupal
Build a responsive website with drupalTechday7
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practicesmintersam
 
Creating Large-Scale Responsive Websites
Creating Large-Scale Responsive WebsitesCreating Large-Scale Responsive Websites
Creating Large-Scale Responsive WebsitesKeith Doyle
 
Html5 today
Html5 todayHtml5 today
Html5 todayRoy Yu
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design Mindy McAdams
 
Responsive Web Design - Tom Robertshaw
Responsive Web Design - Tom RobertshawResponsive Web Design - Tom Robertshaw
Responsive Web Design - Tom RobertshawMeet Magento Spain
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. ToolboxWojtek Zając
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksGautam Krishnan
 
Netbiscuits @ SXSW Interactive: Android ≠ Android: Lessons Creating a JS Fram...
Netbiscuits @ SXSW Interactive: Android ≠ Android: Lessons Creating a JS Fram...Netbiscuits @ SXSW Interactive: Android ≠ Android: Lessons Creating a JS Fram...
Netbiscuits @ SXSW Interactive: Android ≠ Android: Lessons Creating a JS Fram...dbarkoe
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignJulia Vi
 
Infusion for the birds
Infusion for the birdsInfusion for the birds
Infusion for the birdscolinbdclark
 
Cm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCritical Mass
 
Designing Learning #eldc2011
Designing Learning #eldc2011Designing Learning #eldc2011
Designing Learning #eldc2011Nick Floro
 
Android Development Slides
Android Development SlidesAndroid Development Slides
Android Development SlidesVictor Miclovich
 
Bootstrap Tutorial
Bootstrap Tutorial Bootstrap Tutorial
Bootstrap Tutorial Luan Nguyen
 
Data Viz Barcamp, Amsterdam
Data Viz Barcamp, AmsterdamData Viz Barcamp, Amsterdam
Data Viz Barcamp, AmsterdamDan Brickley
 
Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Tirthesh Ganatra
 

Similar a [DCTPE2011] 7) Mobile Drupal(英/中雙語) (20)

JavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies TodayJavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies Today
 
MongoDB at Sailthru: Scaling and Schema Design
MongoDB at Sailthru: Scaling and Schema DesignMongoDB at Sailthru: Scaling and Schema Design
MongoDB at Sailthru: Scaling and Schema Design
 
Build a responsive website with drupal
Build a responsive website with drupalBuild a responsive website with drupal
Build a responsive website with drupal
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Jquery mobile
Jquery mobileJquery mobile
Jquery mobile
 
Creating Large-Scale Responsive Websites
Creating Large-Scale Responsive WebsitesCreating Large-Scale Responsive Websites
Creating Large-Scale Responsive Websites
 
Html5 today
Html5 todayHtml5 today
Html5 today
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design
 
Responsive Web Design - Tom Robertshaw
Responsive Web Design - Tom RobertshawResponsive Web Design - Tom Robertshaw
Responsive Web Design - Tom Robertshaw
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. Toolbox
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
 
Netbiscuits @ SXSW Interactive: Android ≠ Android: Lessons Creating a JS Fram...
Netbiscuits @ SXSW Interactive: Android ≠ Android: Lessons Creating a JS Fram...Netbiscuits @ SXSW Interactive: Android ≠ Android: Lessons Creating a JS Fram...
Netbiscuits @ SXSW Interactive: Android ≠ Android: Lessons Creating a JS Fram...
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Infusion for the birds
Infusion for the birdsInfusion for the birds
Infusion for the birds
 
Cm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learn
 
Designing Learning #eldc2011
Designing Learning #eldc2011Designing Learning #eldc2011
Designing Learning #eldc2011
 
Android Development Slides
Android Development SlidesAndroid Development Slides
Android Development Slides
 
Bootstrap Tutorial
Bootstrap Tutorial Bootstrap Tutorial
Bootstrap Tutorial
 
Data Viz Barcamp, Amsterdam
Data Viz Barcamp, AmsterdamData Viz Barcamp, Amsterdam
Data Viz Barcamp, Amsterdam
 
Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)
 

Más de Drupal Taiwan

[DCTPE2011] Drupal 6 的 CCK/Views運用--林振昇
[DCTPE2011] Drupal 6 的 CCK/Views運用--林振昇[DCTPE2011] Drupal 6 的 CCK/Views運用--林振昇
[DCTPE2011] Drupal 6 的 CCK/Views運用--林振昇Drupal Taiwan
 
[DCTPE2011] 9) 案例分析 1. NNCF.org - Content, Commerce, CRM
[DCTPE2011] 9) 案例分析 1. NNCF.org - Content, Commerce, CRM[DCTPE2011] 9) 案例分析 1. NNCF.org - Content, Commerce, CRM
[DCTPE2011] 9) 案例分析 1. NNCF.org - Content, Commerce, CRMDrupal Taiwan
 
[DCTPE2011]Drupalthon intro
[DCTPE2011]Drupalthon intro[DCTPE2011]Drupalthon intro
[DCTPE2011]Drupalthon introDrupal Taiwan
 
[DCTPE2010] Drupalcamp 商業案例:獎金獵人 share
[DCTPE2010] Drupalcamp 商業案例:獎金獵人 share[DCTPE2010] Drupalcamp 商業案例:獎金獵人 share
[DCTPE2010] Drupalcamp 商業案例:獎金獵人 shareDrupal Taiwan
 
[DCTPE2010] Drupal & 電子商務-Ubercart 實例介紹:線上書店
[DCTPE2010] Drupal & 電子商務-Ubercart 實例介紹:線上書店[DCTPE2010] Drupal & 電子商務-Ubercart 實例介紹:線上書店
[DCTPE2010] Drupal & 電子商務-Ubercart 實例介紹:線上書店Drupal Taiwan
 
[DCTPE2010] Drupal 學術應用-申請入學網路單一窗口
[DCTPE2010] Drupal 學術應用-申請入學網路單一窗口[DCTPE2010] Drupal 學術應用-申請入學網路單一窗口
[DCTPE2010] Drupal 學術應用-申請入學網路單一窗口Drupal Taiwan
 
[DCTPE2010] Biodiversity & Drupal
[DCTPE2010] Biodiversity & Drupal[DCTPE2010] Biodiversity & Drupal
[DCTPE2010] Biodiversity & DrupalDrupal Taiwan
 
[DCTPE2010] Open Hopen 政府網站的理想與現實
[DCTPE2010] Open Hopen 政府網站的理想與現實[DCTPE2010] Open Hopen 政府網站的理想與現實
[DCTPE2010] Open Hopen 政府網站的理想與現實Drupal Taiwan
 

Más de Drupal Taiwan (8)

[DCTPE2011] Drupal 6 的 CCK/Views運用--林振昇
[DCTPE2011] Drupal 6 的 CCK/Views運用--林振昇[DCTPE2011] Drupal 6 的 CCK/Views運用--林振昇
[DCTPE2011] Drupal 6 的 CCK/Views運用--林振昇
 
[DCTPE2011] 9) 案例分析 1. NNCF.org - Content, Commerce, CRM
[DCTPE2011] 9) 案例分析 1. NNCF.org - Content, Commerce, CRM[DCTPE2011] 9) 案例分析 1. NNCF.org - Content, Commerce, CRM
[DCTPE2011] 9) 案例分析 1. NNCF.org - Content, Commerce, CRM
 
[DCTPE2011]Drupalthon intro
[DCTPE2011]Drupalthon intro[DCTPE2011]Drupalthon intro
[DCTPE2011]Drupalthon intro
 
[DCTPE2010] Drupalcamp 商業案例:獎金獵人 share
[DCTPE2010] Drupalcamp 商業案例:獎金獵人 share[DCTPE2010] Drupalcamp 商業案例:獎金獵人 share
[DCTPE2010] Drupalcamp 商業案例:獎金獵人 share
 
[DCTPE2010] Drupal & 電子商務-Ubercart 實例介紹:線上書店
[DCTPE2010] Drupal & 電子商務-Ubercart 實例介紹:線上書店[DCTPE2010] Drupal & 電子商務-Ubercart 實例介紹:線上書店
[DCTPE2010] Drupal & 電子商務-Ubercart 實例介紹:線上書店
 
[DCTPE2010] Drupal 學術應用-申請入學網路單一窗口
[DCTPE2010] Drupal 學術應用-申請入學網路單一窗口[DCTPE2010] Drupal 學術應用-申請入學網路單一窗口
[DCTPE2010] Drupal 學術應用-申請入學網路單一窗口
 
[DCTPE2010] Biodiversity & Drupal
[DCTPE2010] Biodiversity & Drupal[DCTPE2010] Biodiversity & Drupal
[DCTPE2010] Biodiversity & Drupal
 
[DCTPE2010] Open Hopen 政府網站的理想與現實
[DCTPE2010] Open Hopen 政府網站的理想與現實[DCTPE2010] Open Hopen 政府網站的理想與現實
[DCTPE2010] Open Hopen 政府網站的理想與現實
 

Último

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

[DCTPE2011] 7) Mobile Drupal(英/中雙語)

  • 1. Mobile Drupal: Drupal : Building a mobile theme Drupal Camp Taipei 2011 John Albin Wilkins Saturday, July 9, 2011
  • 2. Traditional way to support mobile • Build a separate mobile website • Detect mobile device • Redirect to mobile site This is really hard! Saturday, July 9, 2011
  • 3. Responsive Design • Single source of HTML HTML • Responds to different viewport sizes • First described by Ethan Marcotte’s article Ethan Marcotte “Responsive Web Design” http://www.alistapart.com/articles/responsive-web- design Saturday, July 9, 2011
  • 4. Building a responsive mobile theme • Mobile First • Responsive Design 1. Flexible Grids 2. Flexible Images 3. CSS3 Media Queries CSS3 Media Queries Saturday, July 9, 2011
  • 5. Mobile device zooming • Meta tags can control the scaling/zooming of mobile devices Meta tags • More info: http://davidbcalhoun.com/2010/viewport-metatag <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="MobileOptimized" content="width"> <meta name="HandheldFriendly" content="true"> Saturday, July 9, 2011
  • 6. Flexible grids • Use percentages to set grid sizes • .content { width: 62.5%; } // 5 grids .sidebar { width: 37.5%; } // 3 grids • Grid will grow/shrink with the screen size / • Target ÷ context = result ÷ = Saturday, July 9, 2011
  • 7. Flexible images • Use max-width to constrain images within the flexible grid. max-width • img, embed, iframe, object, video { max-width: 100%; } Saturday, July 9, 2011
  • 8. How do we target different screen sizes? • With CSS2 media types we could target different classes of devices: CSS2 media types class: print, screen, handheld, all • With CSS3 media queries we target device capabilities. CSS3 media queries • [type] and ([query]) • all and (max-width: 768px) Saturday, July 9, 2011
  • 9. 3 ways to query query 1. <link rel="stylesheet" href="wide.css" media="screen and (min-width: 992px)"> 2. @import url(wide.css) screen and (min-width: 992px); theme.info: stylesheets[screen][] = file.css stylesheets[screen and (min-width: 992px)][] = file.css 3. @media screen and (min-width: 992px) { .selector { property: value; } } Saturday, July 9, 2011
  • 10. Breakpoints 320px — iPhone in portrait mode iPhone 480px — iPhone in landscape mode iPhone 768px — iPad in portrait mode iPad 992px — small laptop (minus browser chrome) 1200px — large desktop Saturday, July 9, 2011
  • 11. Dealing with IE 6-8 IE6~8 ‣ IE8 and earlier don’t support media queries IE8 media queries 1. They do support IE conditional comments IE conditional comments 2. They do support JavaScript polyfills JavaScript polyfills Saturday, July 9, 2011
  • 12. Dealing with IE 6-8 IE6~8 Conditional Stylesheets module: http://drupal.org/project/conditional_styles <!--[if lte IE 8]> <link src="/css/layout/desktop.css"> <![endif]--> Saturday, July 9, 2011
  • 13. Dealing with IE 6-8 IE6~8 Scott Jehl, Filament Group Respond.js https://github.com/scottjehl/Respond Saturday, July 9, 2011
  • 14. Responsive Design 1. Flexible Grids 2. Flexible Images 3. CSS3 Media Queries CSS3 Media Queries Saturday, July 9, 2011
  • 15. Zen 7.x-5.x-dev http://john.albin.net/ Saturday, July 9, 2011
  • 16. Related Topics • HTML5 http://html5doctor.com/how-to-use-html5-in-your- client-work-right-now/ • CSS3 http://www.css3.info • Progressive enhancement http://www.alistapart.com/articles/ understandingprogressiveenhancement • JavaScript polyfills http://remysharp.com/2010/10/08/what-is-a-polyfill • Front-end Performance http://developer.yahoo.com/performance/rules.html Saturday, July 9, 2011